/* Site de Thierry Hay Consulting : une seule feuille pour toutes les pages, claire ou sombre selon l'appareil. */
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url('fonts/fredoka-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url('fonts/fredoka-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #F4FAFB;
  --surface: #FFFFFF;
  --tint: #E5F4F5;
  --text: #12334A;
  --muted: #4B697B;
  --line: #D5E7ED;
  --accent: #0D7896;
  --accent-ink: #FFFFFF;
  --deep: #0B2A3D;
  --peach-1: #FFF1CC;
  --peach-2: #FFC3A0;
  --peach-3: #FF9EB4;
  --peach-ink: #4A2333;
  --radius: 22px;
  --shadow: 0 18px 40px rgba(12, 60, 90, 0.12);
  --title: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #081925;
    --surface: #0E2433;
    --tint: #0F2C3E;
    --text: #E6F3F7;
    --muted: #9BB6C4;
    --line: #1C3C4F;
    --accent: #6BD3D8;
    --accent-ink: #062130;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--title); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 76px); letter-spacing: -0.5px; }
h2 { font-size: clamp(30px, 4.4vw, 46px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin: 0 auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 20; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 26px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s; }
.btn:hover { transform: translateY(-2px); }
.btn.peach { background: linear-gradient(180deg, var(--peach-1), var(--peach-2) 55%, var(--peach-3)); color: var(--peach-ink); box-shadow: 0 10px 24px rgba(255, 140, 140, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.btn.glass { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; border-color: rgba(255, 255, 255, 0.45); backdrop-filter: blur(8px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn.soon { border: 2px dashed var(--line); color: var(--muted); cursor: default; background: transparent; }
.btn.soon:hover { transform: none; }
.btn svg { width: 18px; height: 18px; }

/* En-tête : transparent sur le lagon de l'accueil (.over), plein ailleurs ou après défilement (.solid) */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; }
/* Le haut du lagon est très clair : texte bleu nuit sur un léger voile, lisible même quand un poisson passe derrière. */
.top.over { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; backdrop-filter: none; }
.top.over:not(.solid) { background: linear-gradient(180deg, rgba(225, 252, 248, 0.82), rgba(225, 252, 248, 0.5) 60%, rgba(225, 252, 248, 0)); }
.top.over:not(.solid) .brand, .top.over:not(.solid) nav a { color: #0B3550; }
.top.over:not(.solid) .lang { border-color: rgba(11, 53, 80, 0.35); background: rgba(255, 255, 255, 0.55); }
.top.over.solid { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-color: var(--line); box-shadow: 0 6px 24px rgba(10, 50, 80, 0.08); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--title); font-weight: 700; font-size: 20px; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 4px 10px rgba(10, 60, 90, 0.25)); }
.top nav { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; font-size: 15px; }
.top nav a { color: var(--text); text-decoration: none; font-weight: 600; }
.top nav a:hover { opacity: 0.75; }
.top nav .lang { border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 14px; }

/* Le lagon de l'accueil */
.hero {
  position: relative; overflow: hidden; color: #FFFFFF;
  min-height: min(100vh, 940px); min-height: min(100svh, 940px);
  display: flex; align-items: center;
  background: linear-gradient(180deg, #B4F5EA 0%, #5ACBD0 30%, #2192B4 64%, #0F5F86 100%);
  touch-action: manipulation;
}
.hero .rays { position: absolute; inset: -20% -40% auto; height: 95%; pointer-events: none; transform-origin: top center;
  background: repeating-linear-gradient(100deg, rgba(255, 255, 238, 0.16) 0 46px, transparent 46px 150px);
  -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 90%); mask-image: linear-gradient(to bottom, #000 10%, transparent 90%);
  animation: rays 11s ease-in-out infinite alternate; }
@keyframes rays { from { transform: rotate(-5deg) translateX(-2%); } to { transform: rotate(5deg) translateX(2%); } }
.hero .lagoon { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding: 104px 0 150px; pointer-events: none; }
.hero-inner a, .hero-inner button, .hero-inner .device { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(8, 62, 92, 0.42); border: 1px solid rgba(255, 255, 255, 0.4); backdrop-filter: blur(6px); margin-bottom: 22px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--peach-2); box-shadow: 0 0 0 4px rgba(255, 195, 160, 0.35); }
.hero h1 { text-shadow: 0 4px 0 rgba(15, 95, 134, 0.3), 0 16px 40px rgba(8, 50, 80, 0.3); }
.glow { background: linear-gradient(90deg, var(--peach-1), var(--peach-2) 45%, var(--peach-3)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.hero .lead { font-size: clamp(18px, 2vw, 21px); max-width: 560px; color: rgba(255, 255, 255, 0.92); text-shadow: 0 2px 12px rgba(8, 50, 80, 0.35); }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hint { margin-top: 26px; font-size: 14px; color: rgba(255, 255, 255, 0.8); display: flex; align-items: center; gap: 8px; }
.hint svg { width: 18px; height: 18px; }
.waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 140px; z-index: 1; pointer-events: none; }
.waves svg { position: absolute; bottom: 0; width: 200%; height: 100%; }
.waves .w1 { fill: rgba(255, 255, 255, 0.16); animation: drift 18s linear infinite; }
.waves .w2 { fill: rgba(255, 255, 255, 0.28); animation: drift 13s linear infinite reverse; }
.waves .w3 { fill: var(--bg); animation: drift 22s linear infinite; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Le téléphone (captures qui défilent, puis le vrai jeu) */
.device { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
/* Largeur limitée aussi par la hauteur de l'écran : le téléphone entier doit tenir dans le lagon. */
.phone { position: relative; width: min(310px, 78vw, max(240px, calc((100vh - 290px) / 2.2))); padding: 12px; border-radius: 50px; background: linear-gradient(160deg, #1F3A4A, #0B1A24);
  box-shadow: 0 40px 80px rgba(6, 30, 50, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.12) inset, 0 0 0 1px rgba(0, 0, 0, 0.4);
  animation: float 7s ease-in-out infinite; }
.phone.live { animation: none; }
@keyframes float { 50% { transform: translateY(-12px) rotate(-1deg); } }
.phone::before { content: ''; position: absolute; top: 20px; left: 50%; width: 86px; height: 24px; margin-left: -43px; border-radius: 999px; background: #050C12; z-index: 3; }
.phone-screen { position: relative; aspect-ratio: 495 / 1071; border-radius: 38px; overflow: hidden; background: #46C6CC; }
.phone-screen .shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 0.9s var(--ease), transform 1.2s var(--ease); }
.phone-screen .shot.on { opacity: 1; transform: none; }
.phone-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Centré par les marges, sans transform : le survol des boutons (translateY) ne le décale plus. */
.play-here { position: absolute; z-index: 4; left: 0; right: 0; bottom: 26px; width: max-content; margin: 0 auto; white-space: nowrap; }
.play-here::after { content: ''; position: absolute; inset: -6px; border-radius: 999px; border: 2px solid rgba(255, 220, 200, 0.8); animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { opacity: 0.9; transform: scale(0.94); } to { opacity: 0; transform: scale(1.18); } }
.dots { display: flex; gap: 8px; }
.dots[hidden] { display: none; }
.dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.45); cursor: pointer; transition: width 0.3s var(--ease), background 0.3s; }
.dots button[aria-current="true"] { width: 26px; border-radius: 999px; background: #FFFFFF; }
.live-note { font-size: 13px; color: rgba(255, 255, 255, 0.85); margin: 0; }

/* Sections */
section { padding: 96px 0; position: relative; }
.head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.head p { color: var(--muted); font-size: 19px; }

/* Plouf Pop! : éventail de captures et règles du jeu */
.showcase { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center; }
.fan { position: relative; height: 560px; }
.fan img { position: absolute; top: 40px; width: 46%; border-radius: 26px; border: 6px solid var(--surface); box-shadow: var(--shadow); transition: transform 0.6s var(--ease); }
.fan img:nth-child(1) { left: 2%; transform: rotate(-9deg) translateY(30px); }
.fan img:nth-child(2) { left: 27%; top: 0; z-index: 2; transform: rotate(0deg); }
.fan img:nth-child(3) { left: 52%; transform: rotate(9deg) translateY(30px); }
.fan:hover img:nth-child(1) { transform: rotate(-14deg) translate(-18px, 24px); }
.fan:hover img:nth-child(3) { transform: rotate(14deg) translate(18px, 24px); }
.fan:hover img:nth-child(2) { transform: translateY(-10px) scale(1.03); }
.game-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.game-icon { width: 92px; height: 92px; border-radius: 24px; box-shadow: 0 10px 24px rgba(15, 70, 100, 0.3); }
.game-head h3 { font-size: 44px; margin: 0; }
.tag { margin: 2px 0 0; color: var(--muted); font-weight: 600; font-size: 18px; }
.steps { list-style: none; padding: 0; margin: 26px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 14px; font-size: 15px; line-height: 1.4; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin-bottom: 10px; font-family: var(--title); font-weight: 700; color: var(--peach-ink); background: linear-gradient(180deg, var(--peach-1), var(--peach-2)); }
.steps b { display: block; font-family: var(--title); font-size: 17px; margin-bottom: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.chips li { padding: 7px 14px; border-radius: 999px; background: var(--tint); font-size: 14px; font-weight: 600; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Chiffres clés */
.numbers { padding: 0 0 96px; }
.band { border-radius: 36px; padding: clamp(32px, 5vw, 56px); color: #FFFFFF; position: relative; overflow: hidden;
  background: radial-gradient(800px 300px at 90% 0%, rgba(90, 203, 208, 0.45), transparent 70%), linear-gradient(135deg, #0F5F86, var(--deep)); box-shadow: var(--shadow); }
.band dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0; text-align: center; }
.band dt { font-family: var(--title); font-weight: 700; font-size: clamp(44px, 6vw, 68px); line-height: 1; background: linear-gradient(180deg, #FFFFFF, var(--peach-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.band dd { margin: 8px 0 0; color: rgba(255, 255, 255, 0.82); font-weight: 600; }

/* Engagements */
.alt { background: var(--tint); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card h3 { font-size: 23px; }
.card p { color: var(--muted); margin: 0; }
.blob { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 18px; color: #FFFFFF; background: linear-gradient(140deg, #5ACBD0, #0F5F86); box-shadow: 0 10px 20px rgba(15, 95, 134, 0.3); }
.card:nth-child(2) .blob { background: linear-gradient(140deg, var(--peach-2), var(--peach-3)); color: var(--peach-ink); box-shadow: 0 10px 20px rgba(255, 140, 140, 0.3); }
.card:nth-child(3) .blob { background: linear-gradient(140deg, #9BE7C4, #2FA08A); }
.blob svg { width: 28px; height: 28px; }

/* L'entreprise */
.two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.services { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.services li { display: flex; gap: 12px; align-items: flex-start; }
.services svg { flex: none; width: 24px; height: 24px; color: var(--accent); margin-top: 2px; }
.facts-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 26px; margin: 0; box-shadow: var(--shadow); }
.facts-box div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts-box div:last-child { border-bottom: 0; }
.facts-box dt { color: var(--muted); font-size: 15px; }
.facts-box dd { margin: 0; font-weight: 600; }

/* Contact */
.contact-card { position: relative; overflow: hidden; border-radius: 36px; padding: clamp(32px, 6vw, 64px); color: #FFFFFF; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
  background: linear-gradient(180deg, #5ACBD0, #1A7FA6 60%, #0F5F86); box-shadow: var(--shadow); }
.contact-card::before { content: ''; position: absolute; inset: 0 -30%; background: repeating-linear-gradient(100deg, rgba(255, 255, 238, 0.12) 0 40px, transparent 40px 130px); pointer-events: none; }
.contact-card > * { position: relative; }
.contact-card h2 { color: #FFFFFF; }
.contact-card p { color: rgba(255, 255, 255, 0.9); font-size: 18px; }
.mail { display: inline-block; font-family: var(--title); font-size: clamp(24px, 3.4vw, 36px); font-weight: 700; color: #FFFFFF; text-decoration-color: rgba(255, 255, 255, 0.5); margin: 6px 0 22px; overflow-wrap: anywhere; }
address { font-style: normal; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: var(--radius); padding: 22px 24px; line-height: 1.7; backdrop-filter: blur(6px); }

/* Pages de texte (mentions légales, confidentialité) */
.doc-hero { position: relative; overflow: hidden; color: #FFFFFF; padding: 72px 0 120px; background: linear-gradient(180deg, #8EE6DE 0%, #3DB6C4 45%, #0F5F86 100%); }
.doc-hero .rays { position: absolute; inset: 0 -40%; pointer-events: none; background: repeating-linear-gradient(100deg, rgba(255, 255, 238, 0.14) 0 40px, transparent 40px 140px); }
.doc-hero h1 { position: relative; font-size: clamp(36px, 5vw, 56px); text-shadow: 0 4px 0 rgba(15, 95, 134, 0.3); }
.doc-hero p { position: relative; color: rgba(255, 255, 255, 0.9); margin: 0; }
.doc-hero a { color: #FFFFFF; }
.doc-hero .waves { height: 90px; }
.doc { padding: 24px 0 80px; }
.doc .wrap { max-width: 800px; }
.doc h2 { font-size: 28px; margin-top: 1.7em; }
.doc h3 { font-size: 20px; margin-top: 1.3em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.45em; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 8px 0 28px; box-shadow: var(--shadow); }
.summary ul { margin: 0; }

/* Pied de page */
footer { background: var(--deep); color: rgba(255, 255, 255, 0.75); padding: 56px 0 44px; font-size: 14px; }
footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
footer .brand { color: #FFFFFF; }
footer nav { display: flex; gap: 8px 22px; flex-wrap: wrap; }
footer a { color: rgba(255, 255, 255, 0.85); }
footer p { margin: 0; }
.legal-line { width: 100%; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 18px; }

/* Apparitions au défilement (seulement si le script tourne) */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease) var(--d, 0s), transform 0.9s var(--ease) var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
/* Le haut de l'accueil apparaît dès l'affichage, sans attendre le script. */
.hero [data-reveal], .js .hero [data-reveal] { opacity: 1; transform: none; transition: none; animation: rise 1s var(--ease) var(--d, 0s) both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 110px 0 150px; text-align: left; gap: 40px; }
  .showcase, .two, .contact-card { grid-template-columns: 1fr; }
  .fan { height: clamp(380px, 90vw, 560px); max-width: 560px; width: 100%; margin: 0 auto; }
  .cards { grid-template-columns: 1fr; }
  .band dl { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  section { padding: 72px 0; }
  .top .wrap { min-height: 60px; padding: 8px 0; flex-wrap: nowrap; }
  .brand { font-size: 16px; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .top nav { gap: 4px 14px; font-size: 14px; }
  .top nav a:not(.lang) { display: none; }
  .steps { grid-template-columns: 1fr; }
  .facts-box div { grid-template-columns: 1fr; gap: 2px; }
  .game-head h3 { font-size: 36px; }
  .phone { width: min(280px, 76vw); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .rays, .waves path, .phone, .play-here::after { animation: none; }
  .js [data-reveal], .hero [data-reveal] { opacity: 1; transform: none; transition: none; animation: none; }
}
