/* =========================================================================
   Pile ou Face — feuille de style unique
   1. Variables & base          6. Résultat & statistiques
   2. Utilitaires & conteneurs  7. Contenu éditorial & FAQ
   3. En-tête & navigation      8. Formulaire de contact
   4. Héros & sections          9. Pied de page & publicités
   5. Pièce 3D & boutons       10. Responsive & accessibilité
   ====================================================================== */

/* -------------------------------------------------------------------------
   1. Variables & base
   ---------------------------------------------------------------------- */
:root {
  --navy-900: #080e19;
  --navy-800: #0e1726;
  --navy-700: #16233a;
  --navy-600: #22334f;
  --gold-400: #f7c948;
  --gold-500: #eab308;
  --gold-600: #c98a10;
  --white: #ffffff;
  --gray-50: #f7f9fc;
  --gray-100: #eef2f7;
  --gray-200: #dde4ed;
  --gray-400: #97a3b6;
  --gray-600: #55637a;
  --gray-800: #263449;
  --green-600: #0f8a5f;
  --red-600: #b3261e;

  --text: var(--gray-800);
  --text-muted: var(--gray-600);
  --bg: var(--white);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(8, 14, 25, .06), 0 2px 8px rgba(8, 14, 25, .05);
  --shadow-md: 0 10px 30px rgba(8, 14, 25, .10);
  --shadow-lg: 0 24px 60px rgba(8, 14, 25, .18);

  --container: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --flip-duration: 2400ms;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--navy-800); font-weight: 750; letter-spacing: -.02em; }
h1 { font-size: clamp(1.65rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.3rem); }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: .45em; }

a { color: #12508f; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #0b3a6b; }

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------------------------------------------------
   2. Utilitaires & conteneurs
   ---------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold-400); color: var(--navy-900);
  padding: 10px 18px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700; text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--tinted { background: var(--gray-50); border-block: 1px solid var(--gray-200); }
.section__lead { font-size: 1.08rem; color: var(--text-muted); max-width: 70ch; }

/* -------------------------------------------------------------------------
   3. En-tête & navigation
   ---------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 23, 38, .96);
  border-bottom: 1px solid rgba(247, 201, 72, .18);
  backdrop-filter: saturate(140%) blur(8px);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.logo:hover { color: var(--white); }
.logo__coin {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 28%, #ffe9a8, var(--gold-400) 45%, var(--gold-600));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45), 0 2px 8px rgba(247, 201, 72, .45);
}
.logo__text-accent { color: var(--gold-400); font-weight: 600; }
.logo--footer { color: var(--white); font-size: 1.1rem; }

.site-nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 9px 14px; border-radius: 999px;
  color: #d7deea; text-decoration: none; font-weight: 600; font-size: .97rem;
  transition: background-color .18s ease, color .18s ease;
}
.site-nav a:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.site-nav a[aria-current="page"] { background: var(--gold-400); color: var(--navy-900); }

.nav-toggle {
  display: none; width: 46px; height: 42px; flex: none;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 20px; height: 2px; background: var(--white); border-radius: 2px;
  margin-inline: auto; position: relative; transition: transform .22s ease, opacity .18s ease;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* -------------------------------------------------------------------------
   4. Héros & sections
   ---------------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(1000px 520px at 50% -10%, rgba(247, 201, 72, .18), transparent 60%),
    linear-gradient(170deg, var(--navy-800), var(--navy-900) 65%);
  color: #e8edf5;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .06));
  pointer-events: none;
}
/* Petits écrans : le titre, puis l'outil, puis le texte d'introduction,
   afin que la pièce reste visible sans défilement. */
.hero__grid { display: flex; flex-direction: column; gap: 1.5rem; }
.hero__title { order: 1; color: var(--white); margin: 0; }
.hero__tool  { order: 2; }
.hero__intro { order: 3; font-size: 1.05rem; color: #c3cddd; max-width: 56ch; margin: 0; }
.hero__badges { order: 4; display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.hero__title .accent { color: var(--gold-400); }
.hero__badges li {
  margin: 0; font-size: .87rem; font-weight: 600; color: #e6ecf6;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  padding: 7px 14px; border-radius: 999px;
}

/* -------------------------------------------------------------------------
   5. Pièce 3D & boutons
   ---------------------------------------------------------------------- */
.tool {
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 4vw, 2.4rem) clamp(1rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.coin-stage {
  --coin-size: clamp(150px, 38vw, 230px);
  --coin-thickness: calc(var(--coin-size) * .075);
  position: relative;
  display: grid; place-items: center;
  height: calc(var(--coin-size) + 90px);
  perspective: 1200px;
}

.coin-tosser { transform-style: preserve-3d; will-change: transform; }
.coin-tosser.is-tossing { animation: toss var(--flip-duration) cubic-bezier(.33, 0, .3, 1); }

.coin {
  width: var(--coin-size); height: var(--coin-size);
  position: relative; transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform var(--flip-duration) cubic-bezier(.25, .8, .28, 1);
  will-change: transform;
}

.coin__face {
  position: absolute; inset: 0; border-radius: 50%;
  backface-visibility: hidden;
  display: grid; place-items: center;
  color: var(--navy-800);
  background:
    radial-gradient(circle at 33% 26%, #fff3cd 0%, var(--gold-400) 38%, var(--gold-500) 68%, var(--gold-600) 100%);
  box-shadow:
    inset 0 0 0 calc(var(--coin-size) * .035) rgba(255, 255, 255, .38),
    inset 0 -8px 18px rgba(140, 90, 0, .35),
    inset 0 8px 18px rgba(255, 255, 255, .45);
}
.coin__face--pile { transform: translateZ(calc(var(--coin-thickness) / 2)); }
.coin__face--face {
  transform: rotateY(180deg) translateZ(calc(var(--coin-thickness) / 2));
  background:
    radial-gradient(circle at 33% 26%, #fff6dd 0%, #f9d267 38%, #e4ad1c 68%, #b8820c 100%);
}

.coin__inner {
  display: grid; place-items: center; gap: 2px;
  width: 78%; height: 78%; border-radius: 50%;
  border: 2px dashed rgba(10, 18, 32, .18);
}
.coin__emblem { width: 46%; height: auto; color: rgba(12, 20, 35, .82); }
.coin__label {
  font-weight: 800; letter-spacing: .14em;
  font-size: calc(var(--coin-size) * .105);
  color: rgba(10, 18, 32, .85);
}

/* Tranche de la pièce : 24 segments assemblés en cylindre. */
.coin__edge {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--coin-size) * 0.1309 + 1px);   /* 2πr / 24 */
  height: var(--coin-thickness);
  margin-left: calc(var(--coin-size) * -0.06545);
  margin-top: calc(var(--coin-thickness) / -2);
  background: linear-gradient(to bottom, #b8820c, #f7c948 45%, #a9760a);
  transform:
    rotateZ(calc(var(--i) * 15deg))
    translateY(calc(var(--coin-size) / -2))
    rotateX(90deg);
}

.coin-shadow {
  position: absolute; bottom: 18px; left: 50%;
  width: calc(var(--coin-size) * .7); height: calc(var(--coin-size) * .12);
  margin-left: calc(var(--coin-size) * -.35);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .55), transparent 70%);
  filter: blur(2px);
  transition: transform var(--flip-duration) cubic-bezier(.33, 0, .3, 1), opacity .3s ease;
}
.coin-tosser.is-tossing ~ .coin-shadow { animation: shadow-toss var(--flip-duration) cubic-bezier(.33, 0, .3, 1); }

@keyframes toss {
  0%   { transform: translateY(0) scale(1); }
  45%  { transform: translateY(calc(var(--coin-size) * -.42)) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes shadow-toss {
  0%   { transform: scale(1); opacity: .5; }
  45%  { transform: scale(.62); opacity: .22; }
  100% { transform: scale(1); opacity: .5; }
}

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; line-height: 1;
  padding: 16px 34px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn--primary {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900);
  box-shadow: 0 10px 24px rgba(234, 179, 8, .34);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(234, 179, 8, .44); color: var(--navy-900); }
.btn--primary:active { transform: translateY(0); }
.btn--flip { font-size: 1.12rem; letter-spacing: .01em; min-width: 240px; }
.btn__icon {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 33% 30%, #fffbe9, #e0a516);
  box-shadow: inset 0 0 0 2px rgba(10, 18, 32, .22);
}
.btn[disabled] { opacity: .62; cursor: progress; transform: none; box-shadow: none; }

.btn--ghost {
  background: transparent; color: #dbe3ef;
  border-color: rgba(255, 255, 255, .28);
  padding: 11px 22px; font-size: .95rem; font-weight: 600;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .1); color: var(--white); }

.btn--secondary {
  background: var(--navy-800); color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn--secondary:hover { background: var(--navy-700); color: var(--white); transform: translateY(-2px); }

.tool__actions { margin-top: 6px; }
.tool__hint { margin: 14px 0 0; font-size: .87rem; color: #9aa7bb; }

/* -------------------------------------------------------------------------
   6. Résultat & statistiques
   ---------------------------------------------------------------------- */
.result {
  min-height: 3.1rem; margin: 0 0 18px;
  display: flex; align-items: center; justify-content: center;
}
.result__placeholder { color: #93a1b6; font-size: 1rem; }
.result__value {
  display: inline-block;
  font-size: clamp(1.9rem, 6.5vw, 2.9rem); font-weight: 800; letter-spacing: .04em;
  color: var(--gold-400);
  text-shadow: 0 6px 24px rgba(247, 201, 72, .35);
  animation: pop .5s cubic-bezier(.2, 1.4, .45, 1);
}
.result__value--face { color: #ffe08a; }
@keyframes pop {
  0%   { transform: scale(.5) translateY(10px); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.stats { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); }
.stats__title { color: var(--white); font-size: 1.05rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1em; }
.stats__subtitle { color: #c3cddd; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .7em; }

.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 16px; }
.stats__item {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius); padding: 14px 10px;
}
.stats__item dt { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: #a9b6c9; margin-bottom: 4px; }
.stats__item dd { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--white); }
.stats__item--pile dd { color: var(--gold-400); }
.stats__item--face dd { color: #8fd8ff; }
.stats__pct { font-size: .85rem; font-weight: 600; color: #a9b6c9; }

.stats__bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.stats__bar-pile { background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); transition: width .4s ease; }
.stats__bar-face { background: linear-gradient(90deg, #4aa8dc, #8fd8ff); transition: width .4s ease; }

.stats__history { margin: 20px 0 18px; }
.history { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; list-style: none; margin: 0; padding: 0; }
.history li { margin: 0; }
.history__item {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: .72rem; font-weight: 800; letter-spacing: .02em;
}
.history__item--pile { background: rgba(247, 201, 72, .2); color: var(--gold-400); border: 1px solid rgba(247, 201, 72, .45); }
.history__item--face { background: rgba(143, 216, 255, .16); color: #8fd8ff; border: 1px solid rgba(143, 216, 255, .4); }
.history__empty { color: #8b99ad; font-size: .9rem; }

.stats__note { margin: 12px 0 0; font-size: .82rem; color: #8b99ad; }

/* -------------------------------------------------------------------------
   7. Contenu éditorial & FAQ
   ---------------------------------------------------------------------- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); list-style: none; margin: 1.5em 0; padding: 0; }
.card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); margin: 0;
  transition: transform .18s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: .4em; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .96rem; }
.card__icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px;
  border-radius: 12px; background: linear-gradient(140deg, var(--gold-400), var(--gold-600));
  color: var(--navy-900); font-weight: 800; font-size: 1.05rem;
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5em 0; display: grid; gap: 16px; }
.steps li {
  counter-increment: step; position: relative;
  padding: 18px 20px 18px 66px; margin: 0;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: var(--navy-800); color: var(--gold-400);
  font-weight: 800; font-size: .95rem;
}
.steps li strong { display: block; color: var(--navy-800); }

.table-wrap { overflow-x: auto; margin: 1.4em 0; }
table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: .96rem; }
caption { text-align: left; color: var(--text-muted); font-size: .9rem; padding-bottom: .6em; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--gray-200); }
thead th { background: var(--gray-100); color: var(--navy-800); font-size: .88rem; text-transform: uppercase; letter-spacing: .05em; }

.callout {
  border-left: 4px solid var(--gold-500); background: #fffaeb;
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.5em 0;
}
.callout p:last-child { margin-bottom: 0; }

.faq { margin-top: 2.5rem; }
.faq__list { display: grid; gap: 12px; }
.faq__item {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq__question {
  cursor: pointer; padding: 16px 52px 16px 20px; position: relative;
  list-style: none; font-weight: 700; color: var(--navy-800);
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question h3 { display: inline; margin: 0; font-size: 1.03rem; font-weight: 700; }
.faq__question::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--gray-600); border-bottom: 2px solid var(--gray-600);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq__item[open] .faq__question::after { transform: rotate(-135deg); margin-top: -2px; }
.faq__question:hover { background: var(--gray-50); }
.faq__answer { padding: 0 20px 18px; color: var(--text-muted); }
.faq__answer p { margin: 0; }

.related { margin-top: 2.5rem; padding: 22px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); }
.related__title { font-size: 1.05rem; margin-bottom: .7em; }
.related__list { display: flex; flex-wrap: wrap; gap: 10px 18px; list-style: none; margin: 0; padding: 0; }
.related__list li { margin: 0; }

.cta-band {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #e8edf5; border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.4rem); text-align: center; margin: 2.5rem 0 0;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #c3cddd; max-width: 60ch; margin-inline: auto; }

/* -------------------------------------------------------------------------
   8. Formulaire de contact
   ---------------------------------------------------------------------- */
.form { max-width: 640px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 650; color: var(--navy-800); font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--text-muted); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 1rem; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(234, 179, 8, .18); outline: none;
}
.field textarea { min-height: 170px; resize: vertical; }
.field--error input, .field--error textarea { border-color: var(--red-600); }
.field__error { color: var(--red-600); font-size: .88rem; font-weight: 600; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 16px 20px; border-radius: var(--radius); margin-bottom: 1.5em; border: 1px solid; }
.alert--ok { background: #eafaf2; border-color: #a9e3c8; color: #0b5c40; }
.alert--error { background: #fdeceb; border-color: #f3bdb9; color: #8a1c16; }
.alert p:last-child { margin-bottom: 0; }
.alert ul { margin-bottom: 0; }

/* -------------------------------------------------------------------------
   9. Pied de page & emplacements publicitaires
   ---------------------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: #b9c4d4; margin-top: 3.5rem; padding-top: 2.5rem; }
.site-footer__inner { display: grid; gap: 28px; grid-template-columns: 1fr; padding-bottom: 2rem; }
.site-footer__desc { margin: 14px 0 0; font-size: .95rem; max-width: 46ch; color: #98a5b8; }
.site-footer__title { color: var(--white); font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .9em; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__nav a { color: #c8d2e0; text-decoration: none; }
.site-footer__nav a:hover { color: var(--gold-400); text-decoration: underline; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 18px; }
.site-footer__bottom p { margin: 0; font-size: .88rem; color: #8592a5; }

.ad-slot {
  display: grid; place-items: center;
  min-height: 96px; margin: 26px 0;
  border: 1px dashed var(--gray-200); border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--gray-50), var(--gray-50) 12px, #fff 12px, #fff 24px);
}
.ad-slot__label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-600); }
.ad-slot--top { margin-top: 20px; }
.ad-slot--footer { margin-bottom: 0; }

/* -------------------------------------------------------------------------
   10. Responsive & accessibilité
   ---------------------------------------------------------------------- */
@media (min-width: 900px) {
  /* Grands écrans : texte à gauche, outil à droite. */
  .hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    /* La dernière rangée souple absorbe la hauteur de l'outil : le texte
       reste groupé en haut, face à la pièce. */
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "titre  outil"
      "intro  outil"
      "atouts outil"
      "vide   outil";
    column-gap: clamp(2rem, 4vw, 3.5rem);
    row-gap: 1.3rem;
  }
  .hero__title  { grid-area: titre; margin-bottom: .2em; }
  .hero__intro  { grid-area: intro; }
  .hero__badges { grid-area: atouts; }
  .hero__tool   { grid-area: outil; align-self: center; }
  .site-footer__inner { grid-template-columns: 1.4fr 1fr; }
  .site-footer__nav ul { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 899px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--navy-800);
    border-bottom: 1px solid rgba(247, 201, 72, .2);
    padding: 10px 20px 18px;
    visibility: hidden; opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: translateY(0); }
  .site-nav__list { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 13px 14px; border-radius: var(--radius-sm); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 1.4rem; }
  .hero__grid { gap: 1.1rem; }
  .hero__intro { font-size: 1rem; }
  .btn--flip { width: 100%; min-width: 0; padding: 16px 20px; }
  .stats__grid { grid-template-columns: 1fr; text-align: left; }
  .stats__item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; }
  .stats__item dt { margin: 0; }
  .stats__item dd { font-size: 1.25rem; }
  .tool { padding-inline: 14px; }
  .history__item { width: 30px; height: 30px; font-size: .68rem; }
}

/* Impression : contenu lisible, décor supprimé. */
@media print {
  .site-header, .site-footer, .ad-slot, .tool__actions, .skip-link { display: none !important; }
  body { color: #000; background: #fff; }
}

/* Respect des préférences d'animation réduite. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .coin { transition: none !important; }
  .coin-tosser.is-tossing { animation: none !important; }
  .result__value { animation: none !important; }
  .card:hover, .btn--primary:hover, .btn--secondary:hover { transform: none; }
}
