/* Outils gratuits (Latte Builder, 12 fiches recettes, suivi 30 jours) : se charge APRÈS pages.css.
   Mêmes couleurs, polices et formes que la page d'accueil (héros rose, pilules vert profond, FAQ dépliable).
   Règle : jamais de petit texte blanc sur le vert matcha (#86ad4e) ; les numéros sur le vert sont en vert profond. */
:root {
  --pink: #fdd4dc; --blush: #f3cfc8; --ice: #cfe3ec; --sun: #f7b8c4;
  --mono: "DM Mono", ui-monospace, monospace;
  --hand: "Caveat", "Segoe Print", cursive;
}
body.tool { overflow-x: hidden; }
.tool main { padding: 0; }
.tool .gnav { background: color-mix(in srgb, var(--pink) 82%, transparent); border-bottom: 0; }
.tool .gnav nav { display: flex; gap: 22px; font-size: 14px; }
.tool .gnav nav a { color: color-mix(in srgb, var(--deep) 82%, transparent); text-decoration: none; }
.tool .gnav nav a:hover, .tool .gnav nav a[aria-current] { color: var(--deep); }
.tool .gnav nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.eyebrow { font: 600 12px/1.2 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--leaf-ink); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pill { border: 0; cursor: pointer; font-family: var(--body); transition: transform .2s, background .2s; }
.pill:hover { transform: translateY(-1px); background: #2c4f36; }
.pill:focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; }
.pill.ghost { background: transparent; color: var(--deep); box-shadow: inset 0 0 0 1.5px var(--deep); }
.pill.ghost:hover { background: color-mix(in srgb, var(--deep) 8%, transparent); }
.block { padding: clamp(56px, 8vw, 104px) 0; }
.oat { background: var(--oat); }
.sec-head { max-width: 720px; margin: 0 auto clamp(30px, 5vw, 52px); text-align: center; }
.sec-head h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1.02; margin: 12px 0 0; }
.sec-head p { color: var(--muted); font-size: clamp(17px, 1.7vw, 20px); margin: 14px auto 0; }
h2 em, h1 em { color: #2f5a1c; }

/* le héros rose */
.t-hero { background: var(--pink); overflow: hidden; }
.t-hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(20px, 4vw, 56px); align-items: center; padding: clamp(30px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); }
.t-hero h1 { font-size: clamp(44px, 6.6vw, 88px); line-height: .95; margin: 16px 0 18px; color: var(--deep); }
.t-hero .lead { font-size: clamp(18px, 1.8vw, 22px); color: color-mix(in srgb, var(--deep) 84%, transparent); max-width: 30em; margin: 0; }
.t-hero .ctas { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 26px; }
.t-hero .note { margin: 16px 0 0; font-size: 14px; color: color-mix(in srgb, var(--deep) 75%, transparent); }
.t-hero .more { color: var(--deep); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.fan { position: relative; margin: 0; min-height: 0; display: flex; justify-content: center; }
.fan img { width: min(78%, 360px); border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(30,58,38,.35); transform: rotate(3deg); background: var(--milk); }
.fan img + img { position: absolute; width: min(56%, 260px); left: 2%; bottom: -6%; transform: rotate(-7deg); }
.fan.single img { transform: rotate(-2deg); width: min(88%, 420px); }

/* le builder */
.builder { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(22px, 4vw, 48px); align-items: start; }
.controls { display: grid; gap: 22px; }
.controls fieldset { border: 0; margin: 0; padding: 0; min-width: 0; transition: opacity .25s; }
.controls fieldset:disabled { opacity: .38; }
.controls legend { font: 400 24px/1.2 var(--display); color: var(--deep); padding: 0; margin-bottom: 10px; }
.controls legend small { font: 400 13px var(--body); color: var(--muted); margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--deep); font-size: 15px; font-weight: 500; box-shadow: inset 0 0 0 1.5px var(--line); transition: background .15s, color .15s, box-shadow .15s; }
.chip input:hover + span { box-shadow: inset 0 0 0 1.5px var(--deep); }
.chip input:checked + span { background: var(--deep); color: var(--milk); box-shadow: none; }
.chip input:focus-visible + span { outline: 2px solid var(--deep); outline-offset: 3px; }
.controls fieldset:disabled .chip input { cursor: default; }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.result { background: #fff; border-radius: 30px; padding: clamp(22px, 3.4vw, 36px); position: sticky; top: 78px; box-shadow: 0 24px 60px -36px rgba(30,58,38,.35); min-width: 0; }
.result h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.04; margin: 10px 0 4px; }
.r-tag { margin: 0; font: italic 400 20px var(--display); color: var(--leaf-ink); }
.r-top { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; align-items: center; margin: 20px 0 6px; }
.r-art { background: radial-gradient(closest-side, #fff 30%, var(--pink) 100%); border-radius: 22px; aspect-ratio: 3 / 4; display: grid; place-items: center; padding: 8px; }
.r-art svg { width: 100%; height: 100%; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.tile { background: var(--milk); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.tile small { display: block; font: 600 11px/1.3 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--leaf-ink); }
.tile b { display: block; font: 400 26px/1.15 var(--display); color: var(--deep); margin-top: 2px; }
.tile span { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; }
.result h3 { font-size: 22px; margin: 22px 0 8px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 8px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; margin: 0; max-width: none; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--matcha); color: var(--deep); font: 700 14px/28px var(--body); text-align: center; }
.notes { margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); display: grid; gap: 4px; }
.notes li { margin: 0; padding-left: 16px; position: relative; max-width: none; }
.notes li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }
.caf { margin: 16px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--oat); font-size: 13px; line-height: 1.5; color: var(--ink); }
.caf a { color: var(--leaf-ink); }
.r-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.r-actions .pill { padding: 13px 20px; font-size: 15px; }
.act-note { min-height: 1.3em; margin: 10px 0 0; font-size: 13px; color: var(--deep); }
.print-only { display: none; }

/* l'aperçu de la carte */
.preview { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.preview img { width: 100%; aspect-ratio: 2 / 3; border-radius: 18px; box-shadow: 0 30px 60px -28px rgba(30,58,38,.4); background: var(--pink); }
.preview h2 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.02; margin: 12px 0 12px; }
.preview p { color: var(--muted); margin: 0 0 18px; }

/* textes d'explication, tableaux */
.prose { max-width: 720px; margin-inline: auto; }
.prose h2 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 12px; }
.prose h3 { font-size: 24px; margin: 30px 0 6px; }
.prose p, .prose li { color: var(--ink); }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl table { width: 100%; min-width: 420px; }
.tbl td:first-child { font-weight: 600; color: var(--deep); }

/* les produits */
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.product { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; background: #fff; border-radius: 24px; padding: 16px; color: var(--ink); text-decoration: none; transition: transform .2s; }
.product:hover { transform: translateY(-2px); }
.product img { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; background: var(--milk); }
.product b { display: block; font: 400 22px/1.15 var(--display); color: var(--deep); }
.product span { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.product em { display: inline-block; margin-top: 8px; font-style: normal; font-weight: 600; font-size: 14px; color: var(--leaf-ink); text-decoration: underline; text-underline-offset: 4px; }

/* le bloc e-mail (le même sur les 3 pages) */
.signup { background: var(--pink); padding: clamp(56px, 8vw, 96px) 0; }
.signup-in { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.signup-art { margin: 0; }
.signup-art img { width: 100%; border-radius: 22px; box-shadow: 0 26px 50px -26px rgba(30,58,38,.4); }
.signup h2 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; margin: 12px 0 0; color: var(--deep); }
.signup p { color: color-mix(in srgb, var(--deep) 82%, transparent); }
.signup form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.signup input[type=email] { flex: 1 1 220px; min-width: 0; height: 52px; border: 0; border-radius: 999px; padding: 0 20px; font: 16px var(--body); background: #fff; color: var(--ink); }
.signup input[type=email]:focus { outline: 2px solid var(--deep); outline-offset: 2px; }
.signup .pill { height: 52px; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup .form-note { flex-basis: 100%; margin: 4px 0 0; min-height: 1.2em; font-size: 14px; color: var(--deep); }
.signup .form-note a { color: var(--deep); font-weight: 600; }
.signup form.done input[type=email], .signup form.done .pill { display: none; }
.su-fine { font-size: 13px; margin: 12px 0 0; }
.su-fine a { color: inherit; }

/* FAQ (comme l'accueil) */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; }
.faq h2 { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.02; margin: 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font: 400 22px/1.25 var(--display); color: var(--deep); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--body); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* les autres outils */
.tools-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 24px; padding: 22px 22px 24px; color: var(--ink); text-decoration: none; min-width: 0; }
.tool-card small { font: 500 24px/1 var(--hand); color: var(--leaf-ink); }
.tool-card b { font: 400 26px/1.1 var(--display); color: var(--deep); }
.tool-card span { color: var(--muted); font-size: 15px; }
.tool-card:hover b { text-decoration: underline; text-underline-offset: 5px; }

/* page des 12 fiches */
.r-index { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 auto; max-width: 900px; }
.r-index a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--deep); font-size: 15px; text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--line); }
.r-index a:hover { box-shadow: inset 0 0 0 1.5px var(--deep); }
.recipes { display: grid; gap: clamp(20px, 3vw, 28px); margin-top: clamp(30px, 5vw, 50px); }
.recipe { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(18px, 4vw, 44px); background: #fff; border-radius: 30px; padding: clamp(16px, 3vw, 28px); scroll-margin-top: 80px; }
.recipe figure { margin: 0; }
.recipe figure img { width: 100%; aspect-ratio: 2 / 3; border-radius: 18px; }
.recipe .kick { font: 600 12px/1.3 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--leaf-ink); }
.recipe h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.04; margin: 8px 0 2px; }
.recipe .tag { font: italic 400 20px var(--display); color: var(--leaf-ink); margin: 0 0 10px; }
.recipe p { color: var(--muted); }
.recipe-cols { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 24px; }
.recipe h3 { font-size: 20px; margin: 8px 0 6px; }
.ing { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ing li { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; max-width: none; font-size: 16px; }
.ing b { color: var(--leaf-ink); white-space: nowrap; min-width: 3.4em; }
.ing li.plain { grid-template-columns: minmax(0, 1fr); }
.tip { margin: 16px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--oat); font-size: 14px; color: var(--ink) !important; }
.recipe-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 15px; }
.recipe-links a { color: var(--leaf-ink); font-weight: 600; }

/* page du suivi 30 jours */
.howto { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.howto li { counter-increment: s; background: #fff; border-radius: 24px; padding: 20px; margin: 0; max-width: none; }
.howto li::before { content: counter(s); display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--matcha); color: var(--deep); font: 700 16px/34px var(--body); text-align: center; margin-bottom: 12px; }
.howto b { display: block; font: 400 22px/1.15 var(--display); color: var(--deep); margin-bottom: 4px; }
.howto span { color: var(--muted); font-size: 15px; }
.dl { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 860px) {
  .tool .gnav nav { display: none; }
  .t-hero-in { grid-template-columns: 1fr; text-align: center; padding-top: 22px; }
  .t-hero .lead { margin-inline: auto; }
  .t-hero .ctas { justify-content: center; }
  .fan { order: -1; max-height: 340px; }
  .fan img { width: min(56%, 240px); }
  .fan img + img { width: min(42%, 180px); left: 12%; }
  .fan.single img { width: min(62%, 260px); }
  .builder, .preview, .signup-in, .faq, .products, .recipe, .recipe-cols { grid-template-columns: minmax(0, 1fr); }
  .result { position: static; }
  .preview { justify-items: center; text-align: center; }
  .preview img { width: min(100%, 300px); }
  .tools-row, .howto { grid-template-columns: minmax(0, 1fr); }
  .recipe figure { max-width: 210px; margin-inline: auto; }
  .fan:has(img + img) { margin-bottom: 30px; }
  .signup-art { max-width: 420px; }
}
@media (max-width: 420px) {
  .r-top { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .r-art { width: 120px; margin-inline: auto; }
  .tbl table { min-width: 0; font-size: 15px; }
  .tbl th, .tbl td { padding-right: 12px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile b { font-size: 22px; }
  .chip span { padding: 10px 14px; font-size: 14px; }
}

/* impression : seulement la recette (builder) ou les fiches (page des 12 recettes) */
@media print {
  @page { margin: 0.5in; }
  body { background: #fff; font-size: 11pt; }
  .gnav, footer, .t-hero, .signup, .no-print, .preview-band, .faq-sec, .more-sec, .products-sec, .explain-sec { display: none !important; }
  .block { padding: 0; }
  .builder { display: block; }
  .controls, .r-actions, .act-note { display: none !important; }
  .result { position: static; box-shadow: none; padding: 0; border-radius: 0; }
  .print-only { display: block; }
  .print-head { display: flex !important; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
  .tile, .caf, .tip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .steps li::before, .r-art { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .recipe { break-inside: avoid; box-shadow: none; border: 1px solid var(--line); }
  .recipe figure { display: none; }
  .recipe { grid-template-columns: 1fr; }
  .r-index, .recipe-links { display: none; }
  a { color: inherit; text-decoration: none; }
}
