/* isolation-crozon.fr - design system "presqu'ile"
   Schiste et ocre. Angles droits, filets epais, typo grotesque.
   Aucune ombre, aucun arrondi : le contraire des deux autres sites du reseau. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/bricolage-grotesque-normal-400-800.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: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-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 {
  --schiste-950: #14181c;
  --schiste-900: #1d242a;
  --schiste-700: #38454e;
  --schiste-500: #5c6e79;
  --schiste-300: #9aabb4;
  --schiste-150: #cfd8dd;
  --schiste-100: #e3e9ec;
  --schiste-50:  #f4f7f8;
  --ocre:        #c2701c;
  --ocre-clair:  #e29a44;
  --ocre-pale:   #fbeedd;
  --bruyere:     #6b3f63;
  --papier:      #fbfaf8;

  --fond:       var(--papier);
  --fond-carte: #ffffff;
  --fond-creux: var(--schiste-50);
  --texte:      var(--schiste-950);
  --texte-doux: var(--schiste-500);
  --bordure:    var(--schiste-150);
  --trait:      var(--schiste-950);
  --accent:     #9c5813;
  --accent-vif: var(--ocre);

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --corps: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --largeur: 1200px;
  --gouttiere: clamp(1.1rem, 4vw, 2.4rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond:       var(--schiste-950);
    --fond-carte: var(--schiste-900);
    --fond-creux: #191f24;
    --texte:      #eaf0f3;
    --texte-doux: var(--schiste-300);
    --bordure:    #2c363d;
    --trait:      #4a5a64;
    --accent:     var(--ocre-clair);
    --accent-vif: var(--ocre-clair);
    --ocre-pale:  #2a1e0e;
    --schiste-50: #191f24;
    --schiste-100:#20272d;
    --papier:     var(--schiste-950);
  }
}

*, *::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.65;
  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 .5em; line-height: 1.08; letter-spacing: -.02em; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.3rem, 6vw, 4.2rem); text-transform: none; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-family: var(--display); font-weight: 600; font-size: clamp(1.1rem, 1.7vw, 1.3rem); letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1.1em; }

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

/* ---------- Bandeau ---------- */
.bandeau { background: var(--schiste-950); color: var(--schiste-300); font-size: .8rem; letter-spacing: .02em; }
.bandeau .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .5rem; }
.bandeau strong { color: var(--ocre-clair); font-weight: 600; }

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

.logo { text-decoration: none; color: var(--texte); font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; text-transform: uppercase; white-space: nowrap; }
.logo b { color: var(--accent-vif); font-weight: 800; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.nav a { color: var(--texte-doux); text-decoration: none; font-size: .8rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.nav a:hover { color: var(--texte); }
.nav-cta { background: var(--ocre); color: #fff !important; padding: .6rem 1.1rem; letter-spacing: .07em; }
.nav-cta:hover { background: var(--schiste-950); }

.burger { display: none; background: none; border: 2px solid var(--trait); padding: .45rem .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: 2px solid var(--trait);
    padding: .3rem var(--gouttiere) 1rem;
  }
  .nav.ouvert { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--bordure); }
  .nav-cta { text-align: center; margin-top: .9rem; }
}

/* ---------- Hero ---------- */
.hero { border-bottom: 2px solid var(--trait); background: var(--fond-creux); }
.hero .wrap { padding-block: clamp(2.8rem, 7vw, 5rem); }
.hero h1 { max-width: 15ch; }
.hero h1 b { color: var(--accent-vif); font-weight: 800; }
.hero-chapo { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--texte-doux); max-width: 44ch; margin-top: 1.2rem; }
.hero-actions { margin-top: 2rem; display: flex; gap: .8rem; flex-wrap: wrap; }

/* Bandeau de chiffres pleine largeur, propre a ce site */
.chiffres { border-top: 2px solid var(--trait); display: grid; grid-template-columns: repeat(4, 1fr); }
.chiffres div { padding: 1.4rem 1.2rem 1.4rem 0; border-right: 1px solid var(--bordure); }
.chiffres div:last-child { border-right: 0; }
.chiffres b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1; color: var(--accent); letter-spacing: -.03em; }
.chiffres span { display: block; margin-top: .4rem; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-doux); }
@media (max-width: 800px) { .chiffres { grid-template-columns: repeat(2, 1fr); } .chiffres div:nth-child(2) { border-right: 0; } }
@media (max-width: 460px) { .chiffres { grid-template-columns: 1fr; } .chiffres div { border-right: 0; border-bottom: 1px solid var(--bordure); } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--corps); font-weight: 700; font-size: .88rem;
  letter-spacing: .07em; text-transform: uppercase;
  padding: .95rem 1.6rem; border: 2px solid transparent; border-radius: 0;
  text-decoration: none; cursor: pointer;
}
.btn-ocre { background: var(--ocre); color: #fff; }
.btn-ocre:hover { background: var(--schiste-950); }
.btn-trait { background: transparent; color: var(--texte); border-color: var(--trait); }
.btn-trait:hover { background: var(--texte); color: var(--fond); }
.btn-bloc { width: 100%; }

/* ---------- Sections ---------- */
section { padding-block: clamp(2.8rem, 6.5vw, 4.6rem); }
section + section { border-top: 1px solid var(--bordure); }
.sec-creuse { background: var(--fond-creux); }
.sec-sombre { background: var(--schiste-950); color: var(--schiste-300); border-top: 2px solid var(--trait) !important; }
.sec-sombre h2, .sec-sombre h3, .sec-sombre h4 { color: #fff; }
.sec-sombre a { color: var(--ocre-clair); }

.titre-oeil { font-size: .73rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.sec-sombre .titre-oeil { color: var(--ocre-clair); }
.intro-sec { max-width: 58ch; color: var(--texte-doux); font-size: 1.05rem; }
.sec-sombre .intro-sec { color: var(--schiste-300); }

/* ---------- Grilles ---------- */
.grille { display: grid; gap: 0; border-top: 1px solid var(--bordure); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.grille > * { border-bottom: 1px solid var(--bordure); border-right: 1px solid var(--bordure); padding: 1.6rem 1.6rem 1.6rem 0; }
.g2 > *:nth-child(2n), .g3 > *:nth-child(3n) { border-right: 0; padding-right: 0; }
.grille > *:not(:nth-child(3n)):not(:nth-child(2n)) { padding-left: 0; }
@media (max-width: 880px) { .g3 { grid-template-columns: repeat(2, 1fr); } .g3 > *:nth-child(3n) { border-right: 1px solid var(--bordure); } .g3 > *:nth-child(2n) { border-right: 0; } }
@media (max-width: 600px) { .g2, .g3 { grid-template-columns: 1fr; } .grille > * { border-right: 0 !important; padding-right: 0; } }

.carte h3 { margin-bottom: .5rem; }
.carte p:last-child { margin-bottom: 0; }
.carte .chiffre { font-family: var(--display); font-weight: 800; font-size: 2rem; color: var(--accent); line-height: 1; display: block; margin-bottom: .6rem; letter-spacing: -.03em; }

.carte-lien { text-decoration: none; color: inherit; display: block; }
.carte-lien:hover h3 { color: var(--accent); }
.carte-lien .fleche { color: var(--accent); font-weight: 600; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; display: block; margin-top: .9rem; }

/* ---------- Tableaux ---------- */
.tableau-enveloppe { overflow-x: auto; border-top: 2px solid var(--trait); border-bottom: 2px solid var(--trait); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
th, td { text-align: left; padding: .85rem 1rem .85rem 0; border-bottom: 1px solid var(--bordure); }
tbody tr:last-child td { border-bottom: 0; }
thead th { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-doux); font-weight: 700; }
td b { color: var(--accent); font-family: var(--display); font-weight: 600; }
.note-tab { font-size: .84rem; color: var(--texte-doux); margin-top: .9rem; }

/* ---------- Prose ---------- */
.prose { max-width: 65ch; }
.prose h2 { margin-top: 2.2em; }
.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: 1.3rem 0 1.3rem 0;
  border-top: 2px solid var(--trait); border-bottom: 2px solid var(--trait);
  font-family: var(--display); font-weight: 600; font-size: 1.2rem; line-height: 1.35; letter-spacing: -.015em;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.encadre { border-left: 4px solid var(--ocre); background: var(--fond-creux); padding: 1.25rem 1.4rem; margin: 1.9em 0; }
.encadre h4 { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: .6rem; }
.encadre p:last-child { margin-bottom: 0; }
.encadre-alerte { border-left-color: var(--bruyere); }
.encadre-alerte h4 { color: var(--bruyere); }
@media (prefers-color-scheme: dark) { .encadre-alerte h4 { color: #c294ba; } }

/* ---------- Ariane ---------- */
.ariane { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-doux); }
.ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.ariane li::after { content: '/'; margin-left: .5rem; color: var(--schiste-300); }
.ariane li:last-child::after { content: ''; }
.ariane a { color: var(--texte-doux); }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--bordure); padding: 1.15rem 0; }
.faq details:first-of-type { border-top: 2px solid var(--trait); }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1.08rem; letter-spacing: -.01em; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-weight: 400; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details > *:not(summary) { margin-top: .85rem; color: var(--texte-doux); }
.faq details p:last-child { margin-bottom: 0; }

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

/* ---------- Formulaire ---------- */
.devis { scroll-margin-top: 88px; }
.devis-duo { display: grid; grid-template-columns: .85fr 1.15fr; 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: 2px solid var(--trait); }
@media (prefers-color-scheme: dark) { .devis-boite { border-color: var(--bordure); } }
.devis-tete { border-bottom: 2px solid var(--trait); padding: 1.3rem 1.5rem; background: var(--fond-creux); }
.devis-tete h3 { margin-bottom: .2rem; }
.devis-tete p { margin: 0; color: var(--texte-doux); font-size: .92rem; }
form.devis-form { padding: 1.5rem; display: grid; gap: 1rem; }

.champ { display: grid; gap: .3rem; }
.champ label { font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; 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: 0;
  padding: .72rem .85rem; width: 100%;
}
.champ textarea { min-height: 92px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid var(--ocre); outline-offset: 0; border-color: var(--ocre); }
.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: 2px solid var(--trait); padding: 1rem 1.1rem; }
@media (prefers-color-scheme: dark) { .consentement { border-color: var(--bordure); } }
.consentement label { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; line-height: 1.5; cursor: pointer; }
.consentement input[type=checkbox] { flex: 0 0 auto; width: 20px; height: 20px; margin-top: .12rem; accent-color: var(--ocre); }
.mention-legale { font-size: .78rem; color: var(--texte-doux); margin: .8rem 0 0; line-height: 1.5; }

.devis-message { font-size: .93rem; padding: .8rem 1rem; display: none; }
.devis-message.ok { display: block; background: #e8f2ea; color: #1f4a2c; border-left: 4px solid #2f7a48; }
.devis-message.ko { display: block; background: #f7e7e2; color: #7d3218; border-left: 4px solid #b0472a; }
@media (prefers-color-scheme: dark) {
  .devis-message.ok { background: #14251a; color: #8ecf9f; }
  .devis-message.ko { background: #2a1610; color: #eba48c; }
}

.rassurance { display: grid; gap: .5rem; font-size: .92rem; color: var(--texte-doux); margin: 1.5rem 0 0; padding: 0; list-style: none; }
.rassurance li { padding-left: 1.2rem; position: relative; }
.rassurance li::before { content: '\2014'; position: absolute; left: 0; color: var(--accent); }
.sec-sombre .rassurance { color: var(--schiste-300); }

/* ---------- Pied ---------- */
.pied { background: var(--schiste-950); color: var(--schiste-300); padding-block: 3rem 1.8rem; font-size: .92rem; border-top: 2px solid var(--trait); }
.pied a { color: var(--schiste-150); text-decoration: none; }
.pied a:hover { color: var(--ocre-clair); text-decoration: underline; }
.pied h4 { color: #fff; font-size: .73rem; letter-spacing: .15em; text-transform: uppercase; margin-bottom: .9rem; }
.pied .logo { color: #fff; }
.pied .logo b { color: var(--ocre-clair); }
.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 #2c363d; margin-top: 2.2rem; padding-top: 1.3rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .81rem; }

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

.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: 2px solid var(--trait); }

/* ---------- Hero compact (pages internes) ---------- */
.hero-compact { background: var(--fond-creux); border-bottom: 2px solid var(--trait); }
.hero-compact .wrap { padding-block: 1.1rem clamp(2rem, 5vw, 3.2rem); }
.hero-compact .ariane { margin-bottom: 1.7rem; }
.hero-compact h1 { max-width: 17ch; }
.hero-compact .hero-chapo { max-width: 54ch; }
.fiche-cles { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; border-top: 2px solid var(--trait); }
.fiche-cles li { padding: 1.1rem 2rem 0 0; }
.fiche-cles b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--accent); letter-spacing: -.03em; }
.fiche-cles span { display: block; margin-top: .35rem; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-doux); }

/* ---------- 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(--trait); border-bottom: 2px solid var(--trait); }
.fiche-editeur > div { display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--bordure); }
.fiche-editeur > div:last-child { border-bottom: 0; }
.fiche-editeur dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-doux); font-weight: 700; align-self: center; }
.fiche-editeur dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--accent); letter-spacing: -.01em; 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); }
