/* ==========================================================================
   Pages locales (villes, départements, services) — préfixe .fd-
   Couleurs du site : bleu #222274, rouge #d11c1c. Mobile-first.
   ========================================================================== */

:root {
    --fd-bleu: #222274;
    --fd-rouge: #d11c1c;
    --fd-gris: #f4f6fb;
    --fd-texte: #2b2b2b;
    --fd-bordure: #dfe3ee;
    /* Hauteur de l'en-tête fixe du site (main.css : .header 100 px, 80 px sous 820 px). */
    --fd-entete: 100px;
}
@media (max-width: 820px) { :root { --fd-entete: 80px; } }

/* Modèle de boîte homogène dans les pages locales : largeurs = contenu + marges internes + bordures. */
.fd-page *, .fd-page *::before, .fd-page *::after,
.fd-devis, .fd-devis *, .fd-devis *::before, .fd-devis *::after { box-sizing: border-box; }

/* L'en-tête est en position fixe : la page commence sous lui (fil d'Ariane, bandeau brouillon, hero). */
main > .fd-page:first-child { padding-top: var(--fd-entete); }

.fd-page { color: var(--fd-texte); line-height: 1.65; }
.fd-page h2, .fd-page h3 { color: var(--fd-bleu); line-height: 1.25; }
.fd-page h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 1rem; }
.fd-page h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); margin: 1.2rem 0 .5rem; }
.fd-page p { margin: 0 0 .9rem; }
.fd-page a:not(.fd-btn) { color: var(--fd-bleu); }

/* Conteneur centré commun (pages villes, /devis, départements, services) : 1180 px maximum
   marges internes comprises, soit 1100 px de contenu en desktop, marges latérales fluides. */
.fd-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px); }
.fd-section { padding: 2.5rem 0; }
.fd-section--gris { background: var(--fd-gris); }
.fd-section--bleu { background: var(--fd-bleu); color: #fff; }
.fd-section--bleu h2, .fd-section--bleu h3, .fd-section--bleu a:not(.fd-btn) { color: #fff; }

/* Fil d'Ariane */
.fd-breadcrumb { font-size: .9rem; padding: .8rem 0; }
.fd-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.fd-breadcrumb li + li::before { content: "›"; margin-right: .3rem; color: #777; }
.fd-breadcrumb a { color: var(--fd-bleu); text-decoration: none; }
.fd-breadcrumb [aria-current] { color: #555; }

/* Hero */
.fd-hero {
    position: relative;
    background: linear-gradient(to right, rgba(255, 252, 252, .85), rgba(189, 210, 248, .8), rgba(65, 125, 255, .7)), url("../img/pexels-photo-5025667.webp") center 30% / cover no-repeat;
    /* Hauteur minimale (jamais de hauteur fixe) : le hero grandit avec son contenu. */
    padding: clamp(1.5rem, 3.5vw, 2.75rem) 0 clamp(2rem, 4vw, 3.25rem);
}
.fd-hero__grid { display: grid; gap: 1.75rem; align-items: start; }
/* H1 fluide : 2 lignes visées, 3 au maximum en desktop pour les H1 les plus longs. */
.fd-hero h1 {
    color: var(--fd-bleu); font-size: clamp(1.4rem, .55rem + 1.55vw, 1.8rem); line-height: 1.22;
    margin: 0 0 .8rem; text-wrap: balance; overflow-wrap: break-word;
}
.fd-insecable { white-space: nowrap; }
.fd-hero__sous { font-size: 1.1rem; color: #1a1a4a; margin-bottom: 1.2rem; }
.fd-hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
@media (min-width: 900px) {
    .fd-hero { min-height: 460px; }
    .fd-hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); column-gap: clamp(2rem, 4vw, 3.5rem); }
}

/* Boutons */
.fd-btn {
    display: inline-block; padding: .75rem 1.3rem; border-radius: 6px; font-weight: 700;
    text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; line-height: 1.2;
}
.fd-btn--rouge { background: var(--fd-rouge); color: #fff; }
.fd-btn--bleu { background: var(--fd-bleu); color: #fff; }
.fd-btn--contour { background: #fff; color: var(--fd-bleu); border-color: var(--fd-bleu); }
.fd-btn:hover { filter: brightness(1.08); }

/* Encart devis (stub Phase 4) */
.fd-devis {
    background: #fff; border-radius: 10px; padding: 1.4rem; box-shadow: 0 8px 30px rgba(34, 34, 116, .15);
}
.fd-devis__titre { font-weight: 700; color: var(--fd-bleu); font-size: 1.15rem; margin-bottom: .4rem; }
.fd-devis__promesse { font-size: .95rem; color: #444; margin-bottom: 1rem; }
.fd-devis .fd-btn { display: block; width: 100%; text-align: center; margin-bottom: .6rem; }
.fd-devis__tel { display: block; text-align: center; font-weight: 700; color: var(--fd-bleu); text-decoration: none; margin-top: .4rem; font-size: 1.1rem; }
.fd-devis__lien { display: block; text-align: center; font-size: .9rem; margin-top: .6rem; }

/* Bandeau réassurance */
.fd-reassurance { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.fd-reassurance li { text-align: center; padding: 1rem .5rem; background: #fff; border: 1px solid var(--fd-bordure); border-radius: 8px; }
.fd-reassurance strong { display: block; color: var(--fd-rouge); font-size: 1.5rem; }
.fd-reassurance span { font-size: .9rem; color: #444; }
@media (min-width: 700px) { .fd-reassurance { grid-template-columns: repeat(4, 1fr); } }

/* Grilles / cartes */
.fd-grid { display: grid; gap: 1.2rem; }
.fd-grid--2 { grid-template-columns: 1fr; }
.fd-grid--3 { grid-template-columns: 1fr; }
.fd-grid--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) {
    .fd-grid--2 { grid-template-columns: repeat(2, 1fr); }
    .fd-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .fd-grid--4 { grid-template-columns: repeat(4, 1fr); }
}
.fd-card { background: #fff; border: 1px solid var(--fd-bordure); border-radius: 10px; padding: 1.2rem; }
.fd-card h3 { margin-top: 0; }
.fd-card--lien { display: block; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.fd-card--lien:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(34, 34, 116, .12); }
.fd-card__meta { color: #555; font-size: .95rem; }
.fd-card__tel { font-weight: 700; color: var(--fd-bleu); }

/* Bloc agence */
.fd-agence { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 800px) { .fd-agence { grid-template-columns: 1fr 1fr; } }
.fd-agence address { font-style: normal; line-height: 1.7; }
.fd-agence__label { font-weight: 700; color: var(--fd-rouge); text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; }
.fd-agence__carte { border-radius: 10px; overflow: hidden; border: 1px solid var(--fd-bordure); }
.fd-agence__carte img { width: 100%; height: auto; display: block; }
.fd-horaires { margin: 0; padding: 0; list-style: none; }

/* Listes de communes / quartiers */
.fd-tags { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.fd-tags li { background: #fff; border: 1px solid var(--fd-bordure); border-radius: 999px; padding: .3rem .8rem; font-size: .92rem; }
.fd-tags a { text-decoration: none; }

/* Étapes */
.fd-etapes { counter-reset: etape; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
@media (min-width: 800px) { .fd-etapes { grid-template-columns: repeat(5, 1fr); } }
.fd-etapes li { position: relative; background: #fff; border: 1px solid var(--fd-bordure); border-radius: 10px; padding: 2.4rem 1rem 1rem; }
.fd-etapes li::before {
    counter-increment: etape; content: counter(etape);
    position: absolute; top: .7rem; left: 1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%;
    background: var(--fd-rouge); color: #fff; font-weight: 700; display: grid; place-items: center;
}
.fd-etapes strong { display: block; color: var(--fd-bleu); margin-bottom: .3rem; }

/* Tableau tarifs */
.fd-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.fd-table th, .fd-table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--fd-bordure); }
.fd-table th { background: var(--fd-bleu); color: #fff; font-weight: 600; }
.fd-table tr:last-child td { border-bottom: 0; }
.fd-note { font-size: .88rem; color: #555; }
.fd-a-valider { background: #fff3cd; color: #7a5a00; font-size: .75rem; padding: .1rem .4rem; border-radius: 4px; font-weight: 700; vertical-align: middle; }

/* FAQ */
.fd-faq details { background: #fff; border: 1px solid var(--fd-bordure); border-radius: 8px; margin-bottom: .7rem; padding: 0 1rem; }
.fd-faq summary { cursor: pointer; padding: .9rem 0; font-weight: 700; color: var(--fd-bleu); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.fd-faq summary::-webkit-details-marker { display: none; }
.fd-faq summary::after { content: "+"; color: var(--fd-rouge); font-size: 1.3rem; line-height: 1; }
.fd-faq details[open] summary::after { content: "–"; }
.fd-faq summary h3 { margin: 0; font-size: 1.05rem; }
.fd-faq .fd-faq__reponse { padding: 0 0 1rem; }

/* Avis */
.fd-avis blockquote { margin: 0; background: #fff; border-left: 4px solid var(--fd-rouge); padding: 1rem 1.2rem; border-radius: 0 8px 8px 0; }
.fd-avis cite { display: block; font-style: normal; color: #555; font-size: .9rem; margin-top: .5rem; }
.fd-avis__note { font-weight: 700; color: var(--fd-bleu); }

/* Brouillon */
.fd-brouillon { background: #ffe8e8; color: #8a1c1c; text-align: center; padding: .6rem 1rem; font-weight: 700; }

/* CTA final */
.fd-cta-final { text-align: center; }
.fd-cta-final .fd-hero__actions { justify-content: center; margin-top: 1rem; }

/* Mini-formulaire de devis (Phase 4) */
.fd-form { margin-top: .4rem; }
/* Deux colonnes de même largeur séparées d'un espace ; tous les champs occupent 100 % de leur
   cellule (bordures et marges internes comprises) et ne sortent jamais de la carte. */
.fd-form__grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; row-gap: .85rem; }
.fd-champ { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.fd-champ--large { grid-column: 1 / -1; }
.fd-champ label { font-size: .85rem; font-weight: 600; color: #333; }
.fd-champ input, .fd-champ select, .fd-champ textarea {
    display: block; width: 100%; max-width: 100%; margin: 0; padding: .6rem .7rem;
    border: 1px solid #c9c9d6; border-radius: 6px; font: inherit; font-size: 1rem; line-height: 1.3;
    background: #fff; color: #222;
}
.fd-champ input, .fd-champ select { height: 2.9rem; }
.fd-champ textarea { resize: vertical; min-height: 6rem; }
.fd-champ input::placeholder, .fd-champ textarea::placeholder { color: #8a8a99; }
.fd-champ input:focus, .fd-champ select:focus, .fd-champ textarea:focus { outline: 2px solid var(--fd-bleu); outline-offset: 1px; border-color: var(--fd-bleu); }
.fd-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.fd-consent { display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem; color: #444; margin: .9rem 0; }
.fd-consent input { margin-top: .2rem; flex: 0 0 auto; }
.fd-form .fd-btn { display: block; width: 100%; margin: 0; text-align: center; }
.fd-form .fd-btn[disabled] { opacity: .7; cursor: wait; }
.fd-form__note { font-size: .78rem; color: #666; text-align: center; margin-top: .5rem; }
.fd-form__erreurs { background: #fdecec; border: 1px solid #e5a3a3; color: #7a1c1c; border-radius: 6px; padding: .7rem .9rem; margin-bottom: .8rem; font-size: .9rem; }
.fd-form__erreurs ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.fd-merci { max-width: 760px; }
.fd-merci__ref { font-size: 1.1rem; }
.fd-merci__inventaire { background: #fff; border: 1px solid var(--fd-bordure); border-radius: 10px; padding: 1.2rem 1.4rem; margin-top: 1.5rem; }
.fd-merci__inventaire h2 { margin-top: 0; font-size: 1.2rem; }
@media (max-width: 560px) { .fd-form__grille { grid-template-columns: 1fr; } }

/* Accueil : la carte de présentation suivante remonte de 3 % (main.css, .conteneurPresentation) ;
   la section du formulaire garde une marge basse suffisante pour ne jamais être recouverte. */
.fd-section--avant-presentation { padding-bottom: calc(2.5rem + 3vw); }

/* Étapes en 3 colonnes (page /devis) */
@media (min-width: 800px) { .fd-etapes--3 { grid-template-columns: repeat(3, 1fr); } }
