/* ============================================================
   Travaux Mexico - Thème v2 (inspiré travaux.com)
   Bleu profond + Orange CTA + Bootstrap Icons
   ============================================================ */
:root {
    --primary: #0b5ea8;
    --primary-dark: #084a85;
    --primary-light: #e8f1fa;
    --accent: #ff7a00;
    --accent-dark: #e56d00;
    --success: #1e9e5a;
    --danger: #d64545;
    --warning: #f0a020;
    --dark: #1f2d3d;
    --gray: #5f6b7a;
    --gray-light: #f5f7fa;
    --border: #dde3ea;
}

* { box-sizing: border-box; }

html { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    background-color: var(--gray-light);
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}
/* Le footer est poussé en bas; plus d'espace blanc résiduel */
body > .footer-tm { margin-top: auto; }

/* ---------- Navbar ---------- */
.navbar-tm {
    background: #fff;
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.navbar-tm .navbar-brand {
    color: var(--primary) !important;
    font-weight: 800;
    font-size: 1.35rem;
    display: flex; align-items: center; gap: .5rem;
}
.navbar-tm .navbar-brand .bi { color: var(--accent); }
.navbar-tm .nav-link { color: var(--dark); font-weight: 500; }
.navbar-tm .nav-link:hover, .navbar-tm .nav-link.active { color: var(--primary); }

/* ---------- Hero ---------- */
.hero-tm {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 3.5rem 0;
}
.hero-tm h1 { font-weight: 800; line-height: 1.15; }
.hero-tm .lead { opacity: .92; }

/* ---------- Boutons ---------- */
.btn { border-radius: 10px; font-weight: 600; padding: .65rem 1.4rem; }
.btn-primary {
    background: var(--primary); border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark); border-color: var(--primary-dark);
}
.btn-accent {
    background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-accent:hover, .btn-accent:focus {
    background: var(--accent-dark); border-color: var(--accent-dark); color: #fff;
}
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-lg { min-height: 52px; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--border); border-radius: 14px; }
.card-tm { transition: transform .18s ease, box-shadow .18s ease; }
.card-tm:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(11,94,168,.12); }
.card-header { background: #fff; border-bottom: 1px solid var(--border); font-weight: 600; }

/* ---------- Badges catégorie / vérifié ---------- */
.badge-cat {
    background: var(--primary-light); color: var(--primary);
    font-weight: 600; border-radius: 20px; padding: .35em .8em;
    display: inline-flex; align-items: center; gap: .35em;
}
.badge-verified {
    background: #e6f7ee; color: var(--success);
    font-weight: 600; border-radius: 20px; padding: .35em .8em;
    display: inline-flex; align-items: center; gap: .3em;
}
.badge-premium {
    background: #fff4e0; color: var(--accent-dark);
    font-weight: 700; border-radius: 20px; padding: .35em .8em;
    display: inline-flex; align-items: center; gap: .3em;
}

/* ---------- Étoiles ---------- */
.stars { color: var(--warning); white-space: nowrap; }
.stars .bi-star { color: #cbd5e0; }

/* ---------- Avatar / photo profil ---------- */
.avatar-tm {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--primary-light); color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.8rem; object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--border);
}
.avatar-tm-lg { width: 110px; height: 110px; font-size: 2.6rem; }
img.avatar-tm { background: #fff; }

/* ---------- Formulaires (tactile mobile) ---------- */
.form-control, .form-select {
    border: 1px solid var(--border); border-radius: 10px;
    min-height: 48px; font-size: 1rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11,94,168,.12);
}
textarea.form-control { min-height: 110px; }
.form-label { font-weight: 600; font-size: .9rem; }

/* ---------- Galerie photos ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.photo-grid img {
    width: 100%; aspect-ratio: 4/3; object-fit: cover;
    border-radius: 10px; border: 1px solid var(--border);
    cursor: pointer; transition: transform .15s ease;
}
.photo-grid img:hover { transform: scale(1.03); }

/* ---------- Annuaire artisans ---------- */
.artisan-card { display: flex; gap: 1rem; padding: 1rem; align-items: flex-start; }
.artisan-card .info { flex: 1; min-width: 0; }
.filter-bar {
    background: #fff; border: 1px solid var(--border);
    border-radius: 14px; padding: 1rem;
}

/* ---------- Oferta card ---------- */
.oferta-card { border-left: 4px solid var(--accent); }
.oferta-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .9rem; color: var(--gray); }
.oferta-meta strong { color: var(--dark); }

/* ---------- Steps (comment ça marche) ---------- */
.step-icon {
    width: 64px; height: 64px; border-radius: 16px;
    background: var(--primary-light); color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.7rem; margin-bottom: .75rem;
}

/* ---------- Footer ---------- */
.footer-tm { background: var(--dark); color: #cbd5e0; padding: 2.5rem 0 1.5rem; }
.footer-tm a { color: #cbd5e0; text-decoration: none; }
.footer-tm a:hover { color: #fff; }

/* ---------- Mobile ---------- */
@media (max-width: 576px) {
    .hero-tm { padding: 2.25rem 0; }
    .hero-tm h1 { font-size: 1.7rem; }
    .btn-lg { width: 100%; }
    .artisan-card { flex-direction: row; }
    .avatar-tm { width: 56px; height: 56px; font-size: 1.4rem; }
}

/* ---------- Utils ---------- */
.text-primary-tm { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-primary-light { background: var(--primary-light); }
.rounded-14 { border-radius: 14px; }
.price-tag { font-size: 1.4rem; font-weight: 800; color: var(--primary); }

/* ---------- Sélecteur de catégories: cartes STRICTEMENT égales ---------- */
.cat-select-btn {
    height: 92px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    padding: .5rem .35rem !important;
    font-size: .78rem !important;
    line-height: 1.15;
}
.cat-select-btn i { font-size: 1.35rem; }
.cat-select-btn span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

/* ---------- Documents légaux ---------- */
.terms-doc h5 { color: var(--primary); font-size: 1rem; margin-top: 1.5rem; }
.terms-doc h5:first-child { margin-top: 0; }
.terms-doc p { font-size: .9rem; line-height: 1.65; color: #3d4a5c; }

/* ---------- Tuiles catégories (style app mobile) ---------- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: .6rem;
}
.cat-radio { position: absolute; opacity: 0; pointer-events: none; }
.cat-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .5rem; aspect-ratio: 1 / 1; width: 100%;
    background: #fff; border: 2px solid var(--border); border-radius: 16px;
    cursor: pointer; transition: all .18s ease; text-align: center; padding: .5rem;
    -webkit-tap-highlight-color: transparent; user-select: none;
}
.cat-tile-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; transition: all .18s ease;
}
.cat-tile-label {
    font-size: .74rem; font-weight: 600; color: var(--gray); line-height: 1.15;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-tile:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(11,94,168,.12); }
.cat-radio:checked + .cat-tile {
    border-color: var(--accent); background: #fff8ee;
    box-shadow: 0 0 0 3px rgba(255,122,0,.18);
}
.cat-radio:checked + .cat-tile .cat-tile-icon { background: var(--accent); color: #fff; }
.cat-radio:checked + .cat-tile .cat-tile-label { color: var(--accent-dark); }
.cat-radio:focus-visible + .cat-tile { outline: 2px solid var(--primary); outline-offset: 2px; }
