/* isolation-fouesnant.fr - design system "Cornouaille"
   Sable et vert marin. Mise en page editoriale : filets fins, cartes plates,
   grandes marges. Aucune ombre portee, angles peu arrondis. */

@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/fraunces-italic-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/fraunces-normal-400-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/public-sans-normal-400-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --sable-50:  #faf6ef;
  --sable-100: #f3ebdd;
  --sable-200: #e6d9c3;
  --sable-300: #d3c1a3;
  --marin-900: #0f2f2a;
  --marin-800: #16443c;
  --marin-700: #1f5f52;
  --marin-500: #358674;
  --marin-300: #7fb3a5;
  --terre:     #b4552f;
  --terre-pale:#f6e2d8;
  --encre:     #1a1c19;
  --gris:      #5e655f;

  --fond:       var(--sable-50);
  --fond-carte: #fffdf9;
  --fond-creux: var(--sable-100);
  --texte:      var(--encre);
  --texte-doux: var(--gris);
  --bordure:    var(--sable-200);
  --accent:     var(--marin-700);
  --accent-fort:var(--marin-900);

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --corps: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-s: 4px;
  --r-m: 6px;
  --largeur: 1140px;
  --gouttiere: clamp(1.15rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond:       #10130f;
    --fond-carte: #171b16;
    --fond-creux: #1c211a;
    --texte:      #eef1ea;
    --texte-doux: #a3ad9f;
    --bordure:    #2a3128;
    --accent:     var(--marin-300);
    --accent-fort:#a8d0c4;
    --sable-100:  #1c211a;
    --sable-50:   #10130f;
    --terre-pale: #2a1a13;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--corps);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--texte);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }

h1, h2, h3, h4 { margin: 0 0 .55em; font-weight: 600; line-height: 1.16; }
h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -.025em;
  font-variation-settings: 'opsz' 100, 'SOFT' 0;
}
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 3.2vw, 2.5rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.08rem, 1.6vw, 1.24rem); font-weight: 600; letter-spacing: -.005em; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1.15em; }

.wrap { max-width: var(--largeur); margin-inline: auto; padding-inline: var(--gouttiere); }
.wrap-etroit { max-width: 720px; margin-inline: auto; padding-inline: var(--gouttiere); }

/* ---------- Bandeau ---------- */
.bandeau { background: var(--marin-900); color: var(--sable-200); font-size: .82rem; }
.bandeau .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .5rem; }
.bandeau strong { color: #fff; font-weight: 600; }

/* ---------- En-tete ---------- */
.entete { position: sticky; top: 0; z-index: 40; background: var(--fond); border-bottom: 1px solid var(--bordure); }
.entete .wrap { display: flex; align-items: center; gap: 1.6rem; padding-block: .9rem; }

.logo { text-decoration: none; color: var(--texte); font-family: var(--display); font-weight: 600; font-size: 1.28rem; letter-spacing: -.02em; white-space: nowrap; }
.logo span { color: var(--accent); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.nav a { color: var(--texte-doux); text-decoration: none; font-size: .93rem; font-weight: 500; padding-block: .2rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--texte); border-bottom-color: var(--accent); }
.nav-cta {
  background: var(--marin-700); color: #fff !important; border-bottom: 0 !important;
  padding: .58rem 1.15rem; border-radius: var(--r-s); font-weight: 600;
}
.nav-cta:hover { background: var(--marin-900); }

.burger { display: none; background: none; border: 1px solid var(--bordure); border-radius: var(--r-s); padding: .5rem .6rem; cursor: pointer; color: var(--texte); }
@media (max-width: 900px) {
  .burger { display: block; margin-left: auto; }
  .nav {
    position: absolute; inset: 100% 0 auto 0; margin: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--fond); border-bottom: 1px solid var(--bordure);
    padding: .4rem var(--gouttiere) 1.1rem;
  }
  .nav.ouvert { display: flex; }
  .nav a { padding: .78rem 0; border-bottom: 1px solid var(--bordure); }
  .nav-cta { text-align: center; margin-top: .9rem; }
}

/* ---------- Hero editorial ---------- */
.hero { background: var(--sable-100); border-bottom: 1px solid var(--bordure); }
.hero .wrap { padding-block: clamp(3rem, 7vw, 5.4rem); display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 5vw, 4rem); align-items: end; }
@media (max-width: 940px) { .hero .wrap { grid-template-columns: 1fr; align-items: start; } }

.hero h1 em { font-style: italic; color: var(--accent); }
.hero-chapo { font-size: clamp(1.06rem, 1.6vw, 1.22rem); color: var(--texte-doux); max-width: 36em; }

.hero-fiche { border: 1px solid var(--bordure); background: var(--fond-carte); border-radius: var(--r-m); padding: 1.5rem 1.6rem; }
.hero-fiche .fiche-titre { font-family: var(--corps); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-doux); margin-bottom: 1rem; }
.hero-fiche dl { margin: 0; display: grid; gap: .85rem; }
.hero-fiche dt { font-size: .84rem; color: var(--texte-doux); }
.hero-fiche dd { margin: 0; font-family: var(--display); font-size: 1.5rem; font-weight: 400; line-height: 1.1; color: var(--accent-fort); }
.hero-fiche .ligne { border-top: 1px solid var(--bordure); padding-top: .85rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--corps); font-weight: 600; font-size: 1rem;
  padding: .82rem 1.5rem; border-radius: var(--r-s); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
}
.btn-vert { background: var(--marin-700); color: #fff; }
.btn-vert:hover { background: var(--marin-900); }
.btn-ligne { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-ligne:hover { background: var(--marin-700); color: #fff; }
.btn-bloc { width: 100%; }

/* ---------- Sections ---------- */
section { padding-block: clamp(2.8rem, 6.5vw, 4.8rem); }
section + section { border-top: 1px solid var(--bordure); }
.sec-creuse { background: var(--fond-creux); }
.sec-verte { background: var(--marin-900); color: var(--sable-200); border-top: 0 !important; }
.sec-verte h2, .sec-verte h3 { color: #fff; }
.sec-verte a { color: var(--marin-300); }

.titre-oeil { font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 .9rem; }
.sec-verte .titre-oeil { color: var(--marin-300); }
.intro-sec { max-width: 60ch; color: var(--texte-doux); font-size: 1.06rem; }
.sec-verte .intro-sec { color: #9db5ac; }

/* ---------- Grilles et cartes plates ---------- */
.grille { display: grid; gap: 1.5rem; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g2, .g3 { grid-template-columns: 1fr; } }

.carte { border: 1px solid var(--bordure); background: var(--fond-carte); border-radius: var(--r-m); padding: 1.5rem; }
.carte p:last-child { margin-bottom: 0; }
.carte-lien { text-decoration: none; color: inherit; display: block; }
.carte-lien:hover { border-color: var(--accent); }
.carte-lien .fleche { color: var(--accent); font-weight: 600; font-size: .92rem; display: block; margin-top: .8rem; }

/* Colonne numerotee, propre a ce site */
.etapes { counter-reset: etape; display: grid; gap: 0; margin: 2rem 0 0; padding: 0; list-style: none; }
.etapes li { counter-increment: etape; border-top: 1px solid var(--bordure); padding: 1.4rem 0 1.4rem 3.6rem; position: relative; }
.etapes li:last-child { border-bottom: 1px solid var(--bordure); }
.etapes li::before {
  content: counter(etape, decimal-leading-zero);
  position: absolute; left: 0; top: 1.4rem;
  font-family: var(--display); font-size: 1.5rem; color: var(--accent); line-height: 1;
}
.etapes h3 { margin-bottom: .35rem; }
.etapes p:last-child { margin-bottom: 0; color: var(--texte-doux); }

/* ---------- Tableaux ---------- */
.tableau-enveloppe { overflow-x: auto; border-top: 2px solid var(--accent-fort); }
table { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 520px; }
th, td { text-align: left; padding: .85rem 1rem .85rem 0; border-bottom: 1px solid var(--bordure); }
thead th { font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; color: var(--texte-doux); font-weight: 700; }
td b { color: var(--accent-fort); }
.note-tab { font-size: .85rem; color: var(--texte-doux); margin-top: .9rem; }

/* ---------- Prose ---------- */
.prose { max-width: 66ch; }
.prose h2 { margin-top: 2.3em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.9em; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose blockquote {
  margin: 1.9em 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--terre);
  font-family: var(--display); font-size: 1.2rem; font-style: italic; line-height: 1.5; color: var(--texte);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.encadre { border: 1px solid var(--bordure); background: var(--fond-creux); border-radius: var(--r-m); padding: 1.3rem 1.5rem; margin: 1.9em 0; }
.encadre h4 { color: var(--accent-fort); margin-bottom: .4rem; }
.encadre p:last-child { margin-bottom: 0; }
.encadre-terre { background: var(--terre-pale); border-color: #e8c4b4; }
@media (prefers-color-scheme: dark) { .encadre-terre { border-color: #4a2c1e; } }

/* ---------- Ariane ---------- */
.ariane { font-size: .85rem; color: var(--texte-doux); }
.ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.ariane li::after { content: '\203A'; margin-left: .4rem; color: var(--sable-300); }
.ariane li:last-child::after { content: ''; }
.ariane a { color: var(--texte-doux); }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--bordure); padding: 1.1rem 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--bordure); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '\002B'; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details > *:not(summary) { margin-top: .8rem; color: var(--texte-doux); }
.faq details p:last-child { margin-bottom: 0; }

/* ---------- Communes ---------- */
.communes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--bordure); }
.communes li { border-bottom: 1px solid var(--bordure); }
.communes a { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .85rem 1rem .85rem 0; text-decoration: none; color: var(--texte); font-weight: 500; }
.communes a:hover { color: var(--accent); }
.communes .cp { color: var(--texte-doux); font-size: .85rem; font-variant-numeric: tabular-nums; }

/* ---------- Formulaire ---------- */
.devis { scroll-margin-top: 88px; }
.devis-duo { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.8rem, 4vw, 3.4rem); align-items: start; }
@media (max-width: 940px) { .devis-duo { grid-template-columns: 1fr; } }

.devis-boite { background: var(--fond-carte); border: 1px solid var(--bordure); border-radius: var(--r-m); }
.devis-tete { border-bottom: 1px solid var(--bordure); padding: 1.4rem 1.6rem; }
.devis-tete h3 { margin-bottom: .25rem; }
.devis-tete p { margin: 0; color: var(--texte-doux); font-size: .93rem; }
form.devis-form { padding: 1.6rem; display: grid; gap: 1rem; }

.champ { display: grid; gap: .3rem; }
.champ label { font-size: .84rem; font-weight: 600; color: var(--texte-doux); }
.champ input, .champ select, .champ textarea {
  font: inherit; font-size: 1rem; color: var(--texte);
  background: var(--fond); border: 1px solid var(--bordure); border-radius: var(--r-s);
  padding: .72rem .85rem; width: 100%;
}
.champ textarea { min-height: 94px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .duo { grid-template-columns: 1fr; } }

.pot-de-miel { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consentement { border: 1px solid var(--bordure); border-left: 3px solid var(--accent); background: var(--fond-creux); border-radius: 0 var(--r-s) var(--r-s) 0; padding: 1rem 1.1rem; }
.consentement label { display: flex; gap: .7rem; align-items: flex-start; font-size: .91rem; line-height: 1.5; cursor: pointer; }
.consentement input[type=checkbox] { flex: 0 0 auto; width: 20px; height: 20px; margin-top: .12rem; accent-color: var(--marin-700); }
.mention-legale { font-size: .79rem; color: var(--texte-doux); margin: .8rem 0 0; line-height: 1.5; }

.devis-message { font-size: .94rem; padding: .8rem 1rem; border-radius: var(--r-s); display: none; }
.devis-message.ok { display: block; background: #e6f2ec; color: #16443c; border: 1px solid #b3d8c8; }
.devis-message.ko { display: block; background: #fbe9e2; color: #8a3a1c; border: 1px solid #edc3b1; }
@media (prefers-color-scheme: dark) {
  .devis-message.ok { background: #12271f; color: #8ecfb7; border-color: #244536; }
  .devis-message.ko { background: #2b1610; color: #eda88f; border-color: #52281b; }
}

.rassurance { display: grid; gap: .55rem; font-size: .93rem; color: var(--texte-doux); margin: 1.4rem 0 0; padding: 0; list-style: none; }
.rassurance li { padding-left: 1.1rem; position: relative; }
.rassurance li::before { content: '\2022'; position: absolute; left: 0; color: var(--accent); }
.sec-verte .rassurance { color: #9db5ac; }

/* ---------- Pied ---------- */
.pied { background: var(--marin-900); color: #9db5ac; padding-block: 3rem 1.8rem; font-size: .92rem; }
.pied a { color: var(--sable-200); text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied h4 { color: #fff; font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: .9rem; }
.pied .logo { color: #fff; }
.pied .logo span { color: var(--marin-300); }
.pied-grille { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .pied-grille { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pied-grille { grid-template-columns: 1fr; } }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pied-bas { border-top: 1px solid #234a41; margin-top: 2.2rem; padding-top: 1.3rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .82rem; }

/* ---------- Barre mobile ---------- */
.barre-mobile { display: none; }
@media (max-width: 700px) {
  .barre-mobile {
    display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
    position: fixed; inset: auto 0 0 0; z-index: 50;
    padding: .65rem var(--gouttiere) calc(.65rem + env(safe-area-inset-bottom));
    background: var(--fond); border-top: 1px solid var(--bordure);
  }
  .barre-mobile .btn { padding: .78rem 1rem; font-size: .95rem; }
  body { padding-bottom: 4.5rem; }
}

.saut-contenu { position: absolute; left: -9999px; }
.saut-contenu:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--fond-carte); color: var(--texte); padding: .7rem 1rem; border-radius: var(--r-s); }

/* ---------- Hero compact (pages internes) ---------- */
.hero-compact { background: var(--sable-100); border-bottom: 1px solid var(--bordure); }
.hero-compact .wrap { padding-block: 1.1rem clamp(2.2rem, 5vw, 3.4rem); }
.hero-compact .ariane { margin-bottom: 1.6rem; }
.hero-compact h1 { max-width: 18ch; }
.hero-compact .hero-chapo { max-width: 52ch; }
.fiche-cles { list-style: none; margin: 1.8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--bordure); }
.fiche-cles li { padding: 1rem 2.2rem 0 0; }
.fiche-cles b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.55rem; line-height: 1.1; color: var(--accent-fort); }
.fiche-cles span { font-size: .78rem; color: var(--texte-doux); letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Bloc editeur revele au scroll ---------- */
/* Sans JS, la classe js-reveal n'est jamais posee : le bloc reste visible (conformite). */
.bloc-editeur { transition: opacity .55s ease, transform .55s ease; }
.js-reveal .bloc-editeur { opacity: 0; transform: translateY(16px); }
.js-reveal .bloc-editeur.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .bloc-editeur { transition: none; }
  .js-reveal .bloc-editeur { transform: none; }
}
.fiche-editeur { margin: 0 0 1.2rem; display: grid; gap: 0; border-top: 2px solid var(--accent-fort); }
.fiche-editeur > div { display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--bordure); }
.fiche-editeur dt { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--texte-doux); font-weight: 700; align-self: center; }
.fiche-editeur dd { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.12rem; color: var(--accent-fort); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .fiche-editeur > div { grid-template-columns: 1fr; gap: .15rem; } }
.note-editeur { font-size: .9rem; color: var(--texte-doux); }

/* ---------- Correctif lisibilite ---------- */
/* La boite de devis est une carte claire posee sur une section sombre : sans couleur
   explicite, son contenu heritait la couleur de texte de la section et devenait
   illisible (le libelle de consentement notamment). */
.devis-boite { color: var(--texte); }
.consentement label { color: var(--texte); }
.consentement label span { color: var(--texte); }

/* ---------- Images editoriales ---------- */
.prose figure { margin: 2rem 0; }
.prose figure img,
.prose img { width: 100%; height: auto; border: 1px solid var(--bordure); border-radius: var(--r-m); }
