/* ============================================================
   cafetiere.org — Système de design partagé
   Aesthetic: éditorial chaleureux / culture du café
   Réutilisé sur les 40+ pages (mise en cache = pages rapides)
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --bg:        #F6EFE4;   /* parchemin chaud */
  --bg-2:      #EFE4D2;   /* crème plus profonde */
  --bg-card:   #FCF8F1;
  --ink:       #20140D;   /* espresso quasi-noir */
  --ink-soft:  #5A4A3C;   /* texte secondaire */
  --brown:     #3A2418;
  --accent:    #BE552B;   /* terre cuite / torréfaction */
  --accent-deep:#9A3F1C;
  --crema:     #D8B48A;   /* mousse / crema */
  --gold:      #C9A24B;
  --line:      rgba(32,20,13,.12);
  --line-soft: rgba(32,20,13,.07);
  --shadow:    0 1px 2px rgba(32,20,13,.04), 0 8px 30px rgba(32,20,13,.06);
  --shadow-lg: 0 4px 12px rgba(32,20,13,.08), 0 24px 60px rgba(32,20,13,.12);
  --radius:    14px;
  --radius-lg: 22px;
  --maxw:      1180px;
  --display:   "Fraunces", Georgia, "Times New Roman", serif;
  --body:      "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease:      cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto } *{ animation:none!important; transition:none!important } }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* grain léger pour la texture, sans requête réseau */
  background-image:
    radial-gradient(circle at 18% -10%, rgba(190,85,43,.06), transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(201,162,75,.07), transparent 40%);
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent); }

/* ---------- Accessibilité ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.eyebrow {
  font-family: var(--body); font-weight: 600; font-size: .78rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent-deep); display: inline-flex; align-items: center; gap: .55rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); display: inline-block; }

/* ---------- Typographie ---------- */
h1,h2,h3,h4 { font-family: var(--display); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 400; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-soft); line-height: 1.6; }
.serif-italic { font-family: var(--display); font-style: italic; font-weight: 400; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; font-family: var(--body);
  font-weight: 600; font-size: .98rem; padding: .9rem 1.6rem; border-radius: 100px;
  border: 1px solid transparent; cursor: pointer; transition: all .25s var(--ease); white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent-deep); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: rgba(32,20,13,.03); }
.btn svg { width: 17px; height: 17px; }

/* ============================================================
   HEADER / NAV  (identique sur toutes les pages)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,239,228,.82); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 74px; }
.brand { display: flex; align-items: center; gap: .65rem; font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand b { color: var(--accent); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; }
.nav-links > li { position: relative; }
.nav-links a.top {
  display: block; padding: .55rem .85rem; border-radius: 8px; font-weight: 500; font-size: .96rem;
  color: var(--ink); transition: background .2s var(--ease);
}
.nav-links a.top:hover, .nav-links li:focus-within a.top { background: rgba(32,20,13,.05); color: var(--ink); }
.nav-links a.top[aria-current="page"]{ color: var(--accent-deep); }

/* méga / dropdown */
.dropdown { position: relative; }
.dropdown > .top::after { content: "›"; display: inline-block; transform: rotate(90deg); margin-left: .35rem; font-size: .8rem; opacity: .5; transition: transform .2s var(--ease); }
.dropdown:hover > .top::after, .dropdown:focus-within > .top::after { transform: rotate(-90deg); }
.menu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .6rem; min-width: 250px; list-style: none;
  opacity: 0; visibility: hidden; transition: all .22s var(--ease); z-index: 50;
}
.dropdown:hover .menu, .dropdown:focus-within .menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.menu.wide { min-width: 480px; columns: 2; column-gap: .4rem; }
.menu a { display: block; padding: .58rem .8rem; border-radius: 9px; color: var(--ink); font-size: .94rem; font-weight: 500; break-inside: avoid; }
.menu a:hover { background: var(--accent); color: #fff; }
.menu a small { display: block; font-weight: 400; font-size: .78rem; color: var(--ink-soft); }
.menu a:hover small { color: rgba(255,255,255,.85); }

.nav-cta { display: flex; align-items: center; gap: .6rem; }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; color: var(--ink); }
.burger svg { width: 26px; height: 26px; }

@media (max-width: 980px) {
  .nav-links { position: fixed; inset: 74px 0 auto 0; background: var(--bg); flex-direction: column; align-items: stretch;
    gap: 0; padding: 1rem clamp(1.1rem,4vw,2.5rem) 2rem; border-bottom: 1px solid var(--line); max-height: calc(100vh - 74px);
    overflow-y: auto; transform: translateY(-130%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
  .nav-links.open { transform: translateY(0); }
  .nav-links a.top { padding: .85rem .5rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .dropdown > .top::after { float: right; }
  .menu, .menu.wide { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
    background: transparent; columns: 1; padding: 0 0 .6rem .8rem; min-width: 0; display: none; }
  .dropdown.open .menu { display: block; }
  .burger { display: block; }
  .nav-cta .btn-ghost { display: none; }
}

/* ============================================================
   HERO (homepage)
   ============================================================ */
.hero { position: relative; padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem,5vw,4rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin: 1.1rem 0 1.3rem; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lead { max-width: 36ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.hero-stats { display: flex; gap: 2.2rem; margin-top: 2.6rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.hero-stats .num { font-family: var(--display); font-size: 1.9rem; color: var(--ink); line-height: 1; }
.hero-stats .lbl { font-size: .82rem; color: var(--ink-soft); margin-top: .35rem; }

/* visuel hero : tasse SVG dans un disque dégradé (zéro image lourde) */
.hero-visual { position: relative; aspect-ratio: 1/1; }
.hero-disc {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #6B4326, #3A2418 60%, #20140D);
  box-shadow: var(--shadow-lg), inset 0 0 80px rgba(0,0,0,.4);
}
.hero-disc::after { /* anneau crema */
  content:""; position:absolute; inset: 8%; border-radius:50%;
  border: 2px solid rgba(216,180,138,.25);
}
.steam { position: absolute; top: 8%; left: 50%; width: 4px; height: 70px; transform: translateX(-50%);
  background: linear-gradient(to top, rgba(255,255,255,.4), transparent); filter: blur(3px); border-radius: 4px;
  animation: steam 4s ease-in-out infinite; }
.steam.s2 { left: 42%; animation-delay: .8s; height: 55px; }
.steam.s3 { left: 58%; animation-delay: 1.6s; height: 60px; }
@keyframes steam { 0%,100%{ opacity:0; transform: translateX(-50%) translateY(10px) scaleX(1) } 50%{ opacity:.7; transform: translateX(-50%) translateY(-14px) scaleX(1.4) } }
.hero-cup { position: absolute; inset: 0; display: grid; place-items: center; }
.hero-cup svg { width: 56%; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.badge-float {
  position: absolute; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  padding: .7rem 1rem; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: .6rem; font-size: .85rem; font-weight: 600;
}
.badge-float small { display:block; font-weight: 400; color: var(--ink-soft); font-size: .72rem; }
.badge-float.b1 { top: 6%; right: -4%; animation: float 6s ease-in-out infinite; }
.badge-float.b2 { bottom: 10%; left: -6%; animation: float 6s ease-in-out infinite .5s; }
@keyframes float { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-10px) } }
.badge-dot { width: 9px; height: 9px; border-radius: 50%; background: #3fae6b; box-shadow: 0 0 0 4px rgba(63,174,107,.18); }

@media (max-width: 880px){ .hero-grid{ grid-template-columns: 1fr } .hero-visual{ max-width: 360px; margin-inline: auto; order: -1 } .badge-float.b1{ right: 0 } .badge-float.b2{ left: 0 } }

/* ---------- ticker prix (TradingView mini) ---------- */
.ticker-band { background: var(--ink); color: var(--bg); padding-block: 0; }
.ticker-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center; padding-block: 1rem; }
.ticker-inner .t-label { display: flex; align-items: center; gap: .7rem; font-weight: 600; font-size: .9rem; }
.ticker-inner .t-label .badge-dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,75,.2); }
.ticker-widget { min-width: 0; }
.ticker-inner .t-cta { font-weight: 600; font-size: .9rem; color: var(--crema); white-space: nowrap; }
.ticker-inner .t-cta:hover { color: #fff; }
@media (max-width:760px){ .ticker-inner{ grid-template-columns: 1fr; gap:.6rem; text-align:center } }

/* ============================================================
   COMPOSANTS DE CONTENU
   ============================================================ */
.section-head { max-width: 640px; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin: .9rem 0 .8rem; }
.section-head p { color: var(--ink-soft); }

/* grille de cartes */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px){ .grid-3,.grid-4{ grid-template-columns: repeat(2,1fr) } }
@media (max-width: 620px){ .grid-3,.grid-4,.grid-2{ grid-template-columns: 1fr } }

.card {
  background: var(--bg-card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 1.6rem; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  position: relative; overflow: hidden; height: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line); }
.card .ico { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: linear-gradient(135deg, var(--bg-2), #fff); border: 1px solid var(--line-soft); }
.card .ico svg { width: 26px; height: 26px; color: var(--accent); }
.card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .96rem; }
.card .more { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; font-weight: 600; font-size: .9rem; color: var(--accent-deep); }
.card .more svg { width: 15px; transition: transform .2s var(--ease); }
.card:hover .more svg { transform: translateX(4px); }
.card.dark { background: var(--brown); border-color: transparent; color: var(--bg); }
.card.dark h3, .card.dark .more { color: var(--bg); }
.card.dark p { color: rgba(246,239,228,.72); }
.card .tag { position: absolute; top: 1.2rem; right: 1.2rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent-deep); background: rgba(190,85,43,.1); padding: .25rem .6rem; border-radius: 100px; }

/* bandeau éditorial 2 colonnes */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: center; }
@media (max-width: 860px){ .split{ grid-template-columns: 1fr } }
.split-visual { aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; position: relative;
  background: radial-gradient(circle at 30% 25%, #7A4E2E, #3A2418); box-shadow: var(--shadow-lg); }
.split-visual .beans { position:absolute; inset:0; opacity:.5;
  background-image: radial-gradient(ellipse 14px 9px at 20% 30%, #1c0f07 40%, transparent 42%),
                    radial-gradient(ellipse 14px 9px at 60% 70%, #1c0f07 40%, transparent 42%),
                    radial-gradient(ellipse 14px 9px at 80% 25%, #1c0f07 40%, transparent 42%),
                    radial-gradient(ellipse 14px 9px at 38% 80%, #1c0f07 40%, transparent 42%);
  background-size: 130px 130px; }
.feature-list { list-style: none; display: grid; gap: 1.1rem; margin-top: 1.6rem; }
.feature-list li { display: flex; gap: .9rem; align-items: flex-start; }
.feature-list .chk { flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(190,85,43,.12);
  display: grid; place-items: center; margin-top: .15rem; }
.feature-list .chk svg { width: 14px; color: var(--accent-deep); }
.feature-list b { display: block; font-family: var(--body); font-weight: 600; }
.feature-list span { color: var(--ink-soft); font-size: .95rem; }

/* tableau comparatif */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
table.cmp { width: 100%; border-collapse: collapse; min-width: 560px; }
table.cmp th, table.cmp td { padding: 1rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: .95rem; }
table.cmp thead th { background: var(--bg-2); font-family: var(--body); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
table.cmp tbody tr:hover { background: rgba(190,85,43,.04); }
table.cmp td:first-child { font-weight: 600; }
.stars { color: var(--gold); letter-spacing: 2px; }

/* étapes / recettes */
.steps { counter-reset: step; display: grid; gap: 1.2rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; background: var(--bg-card);
  border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.step::before { counter-increment: step; content: counter(step); font-family: var(--display); font-size: 1.4rem; color: var(--accent);
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--accent); display: grid; place-items: center; }
.step h3 { font-family: var(--body); font-weight: 700; font-size: 1.05rem; margin-bottom: .25rem; }
.step p { color: var(--ink-soft); font-size: .95rem; }

/* CTA newsletter */
.cta-band { background: linear-gradient(135deg, var(--brown), var(--ink)); color: var(--bg); border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 5vw, 3.6rem); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content:""; position:absolute; top:-40%; right:-10%; width:320px; height:320px; border-radius:50%;
  background: radial-gradient(circle, rgba(190,85,43,.4), transparent 70%); }
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: rgba(246,239,228,.78); max-width: 50ch; margin: 1rem auto 1.8rem; position: relative; }
.nl-form { display: flex; gap: .6rem; max-width: 460px; margin-inline: auto; position: relative; flex-wrap: wrap; justify-content: center; }
.nl-form input { flex: 1; min-width: 220px; padding: .95rem 1.2rem; border-radius: 100px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08); color: #fff; font-family: var(--body); font-size: 1rem; }
.nl-form input::placeholder { color: rgba(246,239,228,.55); }
.nl-form .btn-primary { background: var(--accent); color: #fff; }
.nl-form .btn-primary:hover { background: #fff; color: var(--ink); }

/* fil d'ariane */
.breadcrumb { padding-block: 1.1rem; font-size: .85rem; color: var(--ink-soft); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; }
.breadcrumb li::after { content: "›"; margin-left: .4rem; opacity: .5; }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--accent); }

/* article (pages de contenu) */
.article { max-width: 760px; margin-inline: auto; }
.article p, .article ul, .article ol { margin-block: 1.1rem; color: #2e2118; }
.article h2 { margin-top: 2.6rem; margin-bottom: .9rem; }
.article h3 { margin-top: 1.8rem; margin-bottom: .6rem; }
.article ul, .article ol { padding-left: 1.3rem; }
.article li { margin-block: .4rem; }
.article blockquote { border-left: 3px solid var(--accent); padding: .4rem 0 .4rem 1.4rem; margin: 1.6rem 0;
  font-family: var(--display); font-style: italic; font-size: 1.25rem; color: var(--brown); }
.callout { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin: 1.8rem 0; }
.callout strong { color: var(--accent-deep); }

/* FAQ accordéon */
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-family: var(--display); font-size: 1.2rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--body); color: var(--accent); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); margin-top: .8rem; }

/* ============================================================
   FOOTER (identique sur toutes les pages)
   ============================================================ */
.site-footer { background: var(--ink); color: rgba(246,239,228,.78); padding-block: clamp(3rem,6vw,4.5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 860px){ .footer-grid{ grid-template-columns: 1fr 1fr } }
@media (max-width: 520px){ .footer-grid{ grid-template-columns: 1fr } }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer .brand b { color: var(--crema); }
.footer-about { font-size: .94rem; max-width: 34ch; }
.footer-col h3 { color: #fff; font-family: var(--body); font-weight: 700; font-size: .82rem; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.footer-col a { color: rgba(246,239,228,.72); font-size: .93rem; }
.footer-col a:hover { color: var(--crema); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center;
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(246,239,228,.12); font-size: .85rem; color: rgba(246,239,228,.55); }
.footer-bottom nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-bottom nav a { color: rgba(246,239,228,.72); }
.footer-bottom nav a:hover { color: var(--crema); }

/* ---------- animations d'apparition ---------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"]{ transition-delay: .08s }
[data-reveal][data-delay="2"]{ transition-delay: .16s }
[data-reveal][data-delay="3"]{ transition-delay: .24s }
[data-reveal][data-delay="4"]{ transition-delay: .32s }
