/* ================================================================ VERSION D : l'affichage de C, la journée en tête, une accroche par chapitre */

/* ------------------------------------------------ en-tête de chapitre : le gros chiffre à gauche du titre, le reste sur toute la largeur */
.chap-in { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "num head" "body body"; column-gap: 16px; row-gap: 0; align-items: center; max-width: 860px; }
.chap-in > .chap-num { grid-area: num; }
.chap-in > div { display: contents; }
.chap-in .chap-k { grid-area: head; align-self: end; margin: 0 0 6px; }
.chap-in .h2 { grid-column: 1 / -1; margin-top: 14px; }
.chap-in .lead, .chap-in .hook, .chap-in .chap-hint { grid-column: 1 / -1; }
@media (min-width: 760px) { .chap-in { grid-template-columns: 64px minmax(0, 1fr); column-gap: 22px; margin-inline: auto; } }

/* ------------------------------------------------ l'accroche : la question puis la réponse, comme une conversation */
.hook { display: grid; gap: 8px; margin-top: 20px; }
.hk-t { font-family: var(--display); font-size: 1.12rem; font-weight: 700; color: var(--titre); }
.hk-b, .hk-a { position: relative; margin: 0; padding: 12px 15px; font-size: .92rem; line-height: 1.5; max-width: 88%; }
.hk-b { justify-self: start; border-radius: 18px 18px 18px 5px; background: #fff; color: #5a6b77; box-shadow: 0 0 0 1px color-mix(in srgb, var(--cc, var(--ocean)) 18%, transparent); }
.hk-a { justify-self: end; border-radius: 18px 18px 5px 18px; background: linear-gradient(150deg, var(--nuit-2), var(--nuit)); color: #d5e3ec; box-shadow: 0 16px 30px -22px rgba(11, 34, 51, .6); }
.hk-b span, .hk-a span { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.hk-b span { color: #7d8f9c; }
.hk-a span { color: var(--ciel); }
.sec:not(.chap) .hook .hk-b { background: #f2f5f7; box-shadow: none; }
@media (min-width: 760px) { .hook { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 10px 14px; } .hk-t { grid-column: 1 / -1; } .hk-b, .hk-a { max-width: none; } .hk-a { margin-top: 28px; } }

/* ------------------------------------------------ historique : la capture à gauche, ses trois points à droite, centrés sur la capture */
@media (max-width: 899px) {
  .g3.dside { grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); grid-template-areas: "text text" "vis more"; column-gap: 16px; align-items: center; }
  .g3.dside .g-text { grid-area: text; }
  .g3.dside .g-vis { grid-area: vis; margin: 24px 0 0; }
  .g3.dside .g-more { grid-area: more; margin-top: 24px; }
  .g3.dside .points { margin: 0; gap: 14px; }
  .g3.dside .points li { display: block; padding-left: 11px; border-left: 2px solid color-mix(in srgb, var(--cc, var(--ocean)) 55%, transparent); font-size: .88rem; line-height: 1.45; }
  .g3.dside .points li svg { display: none; }
  .g3.dside .stage { padding: 0; min-height: 0; }
  .g3.dside .stage .halo, .g3.dside .stage .floats { display: none; }
  .g3.dside .stage-phone { width: 100%; position: static; transform: none; margin: 0; }
}
/* encart « Dans la boîte à outils » sous la capture et les points, sur toute la largeur */
.g3 > .tie-row .tie { margin-top: 18px; }
@media (max-width: 899px) { .g3.dside > .tie-row { grid-column: 1 / -1; } }
@media (min-width: 900px) { .g3 > .tie-row { grid-column: 1; } .g3.rev > .tie-row { grid-column: 2; } }

/* ------------------------------------------------ traçabilité : l'arbre du lot posé sur le fond, sans carte */
.lotcard { background: none; box-shadow: none; padding: 4px 2px 0; border-radius: 0; }

/* ------------------------------------------------ « Inclus dans les deux forfaits » : une ligne discrète */
.incl { margin-top: 14px; padding: 0; background: none; font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; gap: 6px; }
.incl svg { width: 14px; height: 14px; flex: none; }

/* ------------------------------------------------ questions de terrain */
.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }
.faq-i { border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--ligne); }
.faq-i[open] { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ocean) 45%, transparent), 0 18px 40px -30px rgba(11, 34, 51, .5); }
.faq-i summary { list-style: none; position: relative; padding: 16px 48px 16px 18px; font-family: var(--display); font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--titre); cursor: pointer; }
.faq-i summary::-webkit-details-marker { display: none; }
.faq-i summary::after { content: "+"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ecume); color: var(--ocean); font-family: var(--sans); font-size: 1.1rem; font-weight: 600; line-height: 1; }
.faq-i[open] summary::after { content: "–"; }
.faq-i p { margin: 0; padding: 0 18px 18px; font-size: .94rem; line-height: 1.6; color: var(--texte); }
.faq-more { margin: 22px auto 0; max-width: 820px; text-align: center; font-size: .94rem; color: var(--muted); }

/* ------------------------------------------------ contact : e-mail et WhatsApp */
.reach { display: grid; gap: 10px; margin-top: 24px; }
.reach .mail { margin: 0; width: auto; }
.mail.wa b { display: flex; align-items: center; gap: 10px; }
.mail.wa svg { width: 24px; height: 24px; color: #25d366; flex: none; }
@media (min-width: 600px) { .reach { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------ transitions : chaque section claire se fond dans la couleur de la suivante */
.chapters .sec.bg-ecume::before, .chapters .sec.bg-ecume::after, .chap::before, .chap::after, #journee::before, #journee::after { content: none; }
.fx-to, .fx-from { position: relative; }
.fx-to > .wrap, .fx-from > .wrap { position: relative; z-index: 1; }
.fx-to::after, .fx-from::before { content: "" !important; position: absolute; left: 0; right: 0; height: 64px !important; pointer-events: none; z-index: 0; }
.fx-to::after { top: auto !important; bottom: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--fx-to) 0%, transparent), var(--fx-to)) !important; }
.fx-from::before { top: 0; bottom: auto !important; background: linear-gradient(0deg, color-mix(in srgb, var(--fx-from) 0%, transparent), var(--fx-from)) !important; }
@media (min-width: 760px) { .fx-to::after, .fx-from::before { height: 96px !important; } }

/* ------------------------------------------------ menu des chapitres : cinq entrées, l'application seulement */
.chap-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 680px; }
@media (min-width: 760px) { .chap-nav { grid-template-columns: repeat(5, auto); } }

/* ------------------------------------------------ pourquoi : sans photo, le texte seul */
.why { display: block; max-width: 760px; }

/* ------------------------------------------------ arbre du lot sur le fond : le cache sous la dernière branche prend la couleur du fond */
.lotcard .branch:last-of-type::after { background: var(--ecume); }
.lotcard .tree small { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ statistiques : la capture dans un cadre blanc, pour la détacher du fond */
.stat-card { overflow: hidden; }
.stat-card img { box-sizing: border-box; padding: 10px 10px 0; background: #fff; border-bottom: 0; }

/* ------------------------------------------------ D · écrans d'accueil : chaque écran à côté de son profil, en alternance */
.pers-rows li { grid-template-columns: minmax(0, 44fr) 44px minmax(0, 56fr); grid-template-rows: auto 1fr; column-gap: 12px; row-gap: 6px; align-items: start; }
.pers-rows .pphone { grid-column: 1; grid-row: 1 / span 2; margin: 0; align-self: center; }
.pers-rows .av { grid-column: 2; grid-row: 1; }
.pers-rows li > div { grid-column: 2 / span 2; grid-row: 2; }
.pers-rows li:nth-child(2) { grid-template-columns: minmax(0, 56fr) 44px minmax(0, 44fr); }
.pers-rows li:nth-child(2) .pphone { grid-column: 3; }
.pers-rows li:nth-child(2) .av { grid-column: 1; }
.pers-rows li:nth-child(2) > div { grid-column: 1 / span 2; }
.pers-rows em { display: inline-block; margin: 4px 0 0; }
@media (min-width: 900px) { .g3.pers { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "more"; max-width: 860px; } .pers-rows li { grid-template-columns: 220px 44px minmax(0, 1fr); } .pers-rows li:nth-child(2) { grid-template-columns: minmax(0, 1fr) 44px 220px; } }

/* ------------------------------------------------ mockups sur scène claire : l'ombre du téléphone n'est plus coupée net en bas */
.stage-light { overflow-x: clip; overflow-y: visible; }

/* ------------------------------------------------ la journée de chaque chapitre, sous son en-tête (variantes) */
.jt-steps { position: relative; margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.jt-steps::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: color-mix(in srgb, var(--cc) 35%, #fff); }
.jt-steps li { position: relative; display: grid; gap: 6px; padding-left: 30px; }
.jt-steps li::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--cc); box-sizing: border-box; }
.jt-steps .when { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cct); }
.jt-b, .jt-a { padding: 11px 14px; border-radius: 14px; }
.jt-b { background: #fff; box-shadow: 0 0 0 1px var(--ligne); }
.jt-a { background: linear-gradient(150deg, var(--nuit-2), var(--nuit)); }
.jt-b span, .jt-a span { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 3px; }
.jt-b span { color: #7d8f9c; }
.jt-a span { color: var(--ciel); }
.jt-b p, .jt-a p { margin: 0; font-size: .9rem; line-height: 1.5; }
.jt-b p { color: #5a6b77; }
.jt-a p { color: #e3edf4; }
.jt-day { --cc2: var(--cc); margin-top: 26px; max-width: 860px; }
.jt-k { margin: 0 0 14px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cct); }
.jt-day .jt-steps::before { background: color-mix(in srgb, var(--cc) 35%, transparent); }
.jt-day .jt-steps li::before { background: var(--ct); }
@media (min-width: 760px) { .jt-day { margin-left: 86px; margin-top: 30px; } }

/* menu des chapitres : il suit le bandeau de confiance, il ne chevauche plus rien au repos */
.chap-nav { margin-top: 22px; margin-bottom: 14px; }
.chapter:first-of-type .chap { padding-top: 52px; }

/* ================================================================ MOULES / HUÎTRES : « Vous élevez » */
/* un élément marqué data-pour n'est affiché que pour les élevages listés (mh = les deux, m = moules, h = huîtres) */
html[data-esp="m"] [data-pour]:not([data-pour~="m"]),
html[data-esp="h"] [data-pour]:not([data-pour~="h"]),
html[data-esp="mh"] [data-pour]:not([data-pour~="mh"]),
html:not([data-esp]) [data-pour]:not([data-pour~="mh"]) { display: none !important; }

/* le sélecteur, dans le haut de page et dans le menu */
/* le choix de l'élevage : un sélecteur à curseur glissant, posé juste avant la journée */
.esp { display: grid; justify-items: center; gap: 12px; margin: 4px auto 38px; text-align: center; }
.esp-k { display: flex; align-items: center; gap: 14px; margin: 0; font-family: var(--titres); font-weight: 600; font-size: 1.12rem; color: var(--nuit); }
.esp-k::before, .esp-k::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .25; }
.esp-sw { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 440px); padding: 5px; border-radius: 999px; background: rgba(10, 58, 92, .055); box-shadow: inset 0 0 0 1px rgba(10, 58, 92, .08); }
.esp-sw::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(10, 58, 92, .1), 0 8px 20px -8px rgba(10, 58, 92, .35); transform: translateX(100%); transition: transform .4s cubic-bezier(.3, .8, .2, 1); }
html[data-esp="m"] .esp-sw::before { transform: translateX(200%); }
html[data-esp="h"] .esp-sw::before { transform: none; }
.esp-sw button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 999px; padding: 11px 6px; background: none; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; cursor: pointer; transition: color .25s; }
.esp-sw button:hover { color: var(--nuit); }
.esp-sw button[aria-pressed="true"] { color: var(--nuit); }
.esp-sw button:focus-visible { outline: 2px solid var(--bleu, #0077b6); outline-offset: 2px; }
.esp-d { width: 7px; height: 7px; border-radius: 50%; flex: none; opacity: .45; transition: opacity .25s; }
.esp-d + .esp-d { margin-left: -5px; }
.esp-d.m { background: #34437a; }
.esp-d.h { background: #3f9a78; }
.esp-sw button[aria-pressed="true"] .esp-d { opacity: 1; }
.esp-note { max-width: 34em; text-wrap: balance; margin: 0; font-size: .8rem; line-height: 1.55; color: var(--muted); }
@media (max-width: 380px) { .esp-sw button { font-size: .82rem; gap: 5px; padding-inline: 3px; } }
@media (prefers-reduced-motion: reduce) { .esp-sw::before { transition: none; } }
/* le même choix dans le menu, sur fond nuit */
.esp-menu { justify-items: start; text-align: left; margin: 24px 0 6px; }
.esp-menu .esp-k { color: #fff; }
.esp-menu .esp-k::before, .esp-menu .esp-k::after { display: none; }
.esp-menu .esp-sw { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.esp-menu .esp-sw button { color: #c3d4e0; }
.esp-menu .esp-sw button[aria-pressed="true"] { color: var(--nuit); }
.esp-menu .esp-d.m { background: #8c9be0; }
.esp-menu .esp-sw button[aria-pressed="true"] .esp-d.m { background: #34437a; }
.esp-menu .esp-note { color: #9fb6c7; }

/* les recettes de mise en place : une seule quand on a choisi son élevage */
html[data-esp="h"] .recipes { grid-template-columns: minmax(0, 1fr); max-width: 620px; margin-inline: auto; }

/* pastille d'espèce sur les captures, dans la vue « les deux » */
.esp-tag { position: absolute; z-index: 4; top: 6.5%; left: 50%; transform: translateX(-50%); padding: 3px 11px; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .45); }
.esp-tag.m { background: #26324f; color: #fff; }
.esp-tag.h { background: #e2f3ec; color: #136e4d; }

/* capture provisoire : bandeau bien visible, à retirer avant la mise en ligne */
.todo { position: absolute; z-index: 5; left: 4%; right: 4%; top: 42%; display: grid; gap: 4px; padding: 12px 10px; border-radius: 12px; background: rgba(200, 30, 45, .93); color: #fff; text-align: center; font-size: .74rem; line-height: 1.3; transform: rotate(-6deg); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6); pointer-events: none; }
.todo b { font-size: .95rem; letter-spacing: .08em; }

/* traçabilité : le mot pour le mytiliculteur */
.esp-aside { margin: 16px 0 0; padding: 12px 15px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--ligne); font-size: .9rem; line-height: 1.5; color: var(--texte); }
/* les variantes de texte se fondent dans leur phrase : aucun style de « span » du site ne s'y applique */
span[data-pour]:not(.esp-tag):not(.todo) { all: unset; }
/* vue moules : la traçabilité (lots d'huîtres) est masquée ; la mise en place se fond directement dans l'historique, blanc */
html[data-esp="m"] #mise-en-place.fx-to::after { content: none !important; }
