/* style.css — site de « Raconte encore ! » (accueil généré par outils/genere-site.mjs, pages d'aide servies par
   worker/aide.js). Même charte que l'app (WebContent/css/app.css) : ciel de veillée, bougie dorée, papier ivoire,
   titres à empattements (New York sur les appareils Apple), texte en police système. Aucune police téléchargée :
   rien ne part chez un tiers. Animations : anim.js et anim.css (copies de Game Duo/partage). */

:root {
  --nuit: #0F1630; --nuit-0: #0B1127; --nuit-2: #18213F; --nuit-3: #222D52; --nuit-4: #3A4672;
  --texte: #EDE6D8; --doux: #A9B0C8; --papier: #F5ECDC; --encre: #1D2340; --encre-2: #5B5F78;
  --bougie: #E9A94F; --bougie-2: #F3C47E; --braise: #9A5A1E; --lilas: #9C86C9;
  --fx-a: var(--bougie); --fx-b: var(--lilas); --fx-c: var(--bougie-2);
  --titre: ui-serif, "New York", "Iowan Old Style", "Palatino", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--nuit-0); scroll-behavior: smooth; }
body {
  margin: 0; color: var(--texte); font: 17px/1.6 -apple-system, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  position: relative; isolation: isolate;   /* le ciel et le décor (z-index -1) passent devant ce fond */
  background:
    radial-gradient(110% 55% at 50% -12%, #2A376A 0%, transparent 62%),
    radial-gradient(60% 40% at 88% 18%, rgba(233,169,79,.10), transparent 70%),
    linear-gradient(180deg, #131C3D 0%, var(--nuit) 45%, var(--nuit-0) 100%);
}
a { color: var(--bougie-2); }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; letter-spacing: -.015em; margin: 0; line-height: 1.08; }
p { margin: 0; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Ciel étoilé, fixe, qui scintille doucement */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .65;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 8%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 18%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 47% 6%, #F3C47E 50%, transparent 51%), radial-gradient(1px 1px at 63% 14%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 79% 4%, #fff 50%, transparent 51%), radial-gradient(1.6px 1.6px at 91% 19%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 27%, rgba(255,255,255,.5) 50%, transparent 51%), radial-gradient(1px 1px at 71% 28%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 37% 33%, rgba(243,196,126,.7) 50%, transparent 51%), radial-gradient(1px 1px at 55% 41%, rgba(255,255,255,.45) 50%, transparent 51%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 60%); mask-image: linear-gradient(180deg, #000, transparent 60%);
  animation: scintille 7s ease-in-out infinite alternate;
}
@keyframes scintille { from { opacity: .4; } to { opacity: .75; } }

/* ── En-tête ── */
.studio-bar { position: relative; z-index: 6; padding-top: 10px; }
.studio-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--doux); font-size: 15px; font-weight: 600; text-decoration: none; }
.studio-back:hover { color: var(--texte); }
.top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.studio-bar + .top { padding-top: 2px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--texte); text-decoration: none; font: 600 21px/1.1 var(--titre); }
.brand img { border-radius: 11px; box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 0 1px rgba(243,196,126,.3); }
.langs { position: relative; }
.langs summary { list-style: none; white-space: nowrap; letter-spacing: .04em; cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(243,196,126,.3); background: rgba(24,33,63,.6); font-weight: 600; font-size: 15px; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: " ▾"; color: var(--doux); margin-left: 4px; }
.langs ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; list-style: none; margin: 0; padding: 6px; min-width: 220px;
  border-radius: 14px; background: var(--nuit-2); border: 1px solid rgba(243,196,126,.25); box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.langs a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--texte); text-decoration: none; }
.langs a:hover, .langs a[aria-current] { background: rgba(233,169,79,.15); color: var(--bougie-2); }

/* ── Haut de page ── */
.hero { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; padding: 34px 0 10px; }
.ribbon { display: inline-block; padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bougie-2); border: 1px solid rgba(243,196,126,.45); background: rgba(233,169,79,.10); }
.ribbon.centre { display: table; margin: 0 auto 16px; }
.hero h1 { margin-top: 22px; font-size: clamp(42px, 6.4vw, 78px); color: #FBF4E6; }
.hero h1 em { font-style: normal; color: var(--bougie-2); }
.lead { margin-top: 22px; font-size: 18.5px; color: #D7D4CC; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 16.5px;
  text-decoration: none; transition: transform .35s var(--ease), background .35s var(--ease); }
.btn svg { width: 17px; height: 21px; fill: currentColor; }
.btn-gold { color: #2A1F0E; background: linear-gradient(180deg, #F6D49A, var(--bougie)); box-shadow: 0 10px 30px rgba(233,169,79,.32), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-gold:hover { transform: translateY(-2px); }
.btn-gold.soon { cursor: default; }
.btn-gold.soon:hover { transform: none; }
.btn-line { color: var(--texte); background: rgba(255,255,255,.06); border: 1px solid rgba(237,230,216,.2); }
.btn-line:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }

/* Téléphones */
.phones { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 520px; }
.phone { margin: 0; flex: none; width: min(250px, 42vw); border-radius: 38px; padding: 9px; background: #05070F;
  box-shadow: 0 0 0 2px rgba(243,196,126,.35), 0 40px 90px rgba(0,0,0,.6), 0 0 120px rgba(233,169,79,.14); }
.phone img { display: block; width: 100%; height: auto; border-radius: 30px; }
.phones .phone:first-child { z-index: 2; transform: rotate(-4deg); animation: flotte 7s ease-in-out infinite; }
.phones .phone:nth-child(2) { margin-left: -64px; margin-top: 70px; transform: rotate(5deg); animation: flotte 7s ease-in-out -3.5s infinite; }
@keyframes flotte { 50% { translate: 0 -10px; } }

/* ── Théâtre de papier du haut de page : lune, collines découpées en trois plans, maison éclairée, lucioles ── */
/* Le décor suit la hauteur du haut de page, sur toute la largeur de l'écran. */
.hero { position: relative; }
.theatre { position: absolute; left: 50%; width: 100vw; margin-left: -50vw; top: -150px; bottom: -90px; z-index: -1; pointer-events: none; overflow: hidden; }
.lune-halo { position: absolute; right: 4%; top: 190px; width: 420px; height: 420px; margin: -150px -150px 0 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,236,200,.28), rgba(243,196,126,.08) 40%, transparent 70%); animation: respire 9s ease-in-out infinite; }
.lune { position: absolute; right: 4%; top: 190px; width: 110px; height: 110px; color: #F7E9C8; filter: drop-shadow(0 0 30px rgba(255,236,200,.55)); animation: berce 12s ease-in-out infinite; }
.plan { position: absolute; left: -4%; width: 108%; bottom: 0; height: 320px; }
.plan-3 { bottom: 70px; opacity: .85; animation: glisse 38s ease-in-out infinite alternate; }
.plan-2 { bottom: 30px; animation: glisse 30s ease-in-out -8s infinite alternate-reverse; }
.plan-1 { bottom: -2px; height: 220px; }
.fenetre { animation: veille 6s ease-in-out infinite; }
.luciole { position: absolute; left: var(--x); top: var(--y); width: 5px; height: 5px; border-radius: 50%; background: #FFE3A3;
  box-shadow: 0 0 10px 3px rgba(255,214,130,.55); opacity: 0; animation: luciole var(--t) ease-in-out var(--d) infinite; }
@keyframes respire { 50% { transform: scale(1.08); opacity: .8; } }
@keyframes berce { 50% { transform: rotate(-6deg) translateY(4px); } }
@keyframes glisse { to { transform: translateX(3%); } }
@keyframes veille { 50% { opacity: .65; } }
@keyframes luciole { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: .9; } 50% { transform: translate(18px, -26px); } 80% { opacity: .7; } 100% { transform: translate(-8px, -50px); opacity: 0; } }
.hero h1 em { --fx-words-bg: linear-gradient(180deg, #FFE7B8 10%, #E9A94F 95%); background: var(--fx-words-bg); -webkit-background-clip: text; background-clip: text; color: transparent; }
.halo-or { position: absolute; z-index: -1; left: 50%; top: 45%; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,169,79,.30), rgba(156,134,201,.10) 45%, transparent 70%); animation: respire 10s ease-in-out infinite; }
.phone { position: relative; transform-style: preserve-3d; }
.phone[data-tilt] { transition: transform .5s var(--ease); }
.phone::after { content: ""; position: absolute; inset: 9px; border-radius: 30px; pointer-events: none;
  background: linear-gradient(125deg, rgba(255,255,255,.16), transparent 32%); mix-blend-mode: screen; }

/* ── Blocs ── */
.block { padding: 64px 0; }
.section-title { text-align: center; font-size: clamp(32px, 4.6vw, 50px); color: #FBF4E6; margin-bottom: 40px; }
.section-title em { font-style: normal; color: var(--bougie-2); }
.center-note { max-width: 40em; margin: 26px auto 0; text-align: center; color: var(--doux); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-top: 30px; }
.stat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 10px; border-radius: 22px;
  background: linear-gradient(180deg, #1C2550, #141C40); border: 1px solid rgba(243,196,126,.22); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.stat b { font: 600 clamp(40px, 5vw, 56px)/1 var(--titre); color: var(--bougie-2); }
.stat span { color: var(--doux); }

.feature { display: grid; grid-template-columns: auto 1fr; gap: 60px; align-items: center; margin-bottom: 90px; }
.feature:last-child { margin-bottom: 0; }
.feature.flip { grid-template-columns: 1fr auto; }
.feature.flip > .phone { order: 2; }
.feature .phone { width: min(270px, 68vw); }
.kicker { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--bougie); }
.kicker b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 600 14px/1 var(--titre); letter-spacing: 0;
  color: #2A1F0E; background: radial-gradient(circle at 35% 30%, #F6D49A, var(--bougie)); box-shadow: 0 0 18px rgba(233,169,79,.45); }
.feature { position: relative; }
.feature::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; border-radius: 50%; left: -80px; top: 50%; margin-top: -260px;
  background: radial-gradient(circle, rgba(156,134,201,.16), transparent 68%); }
.feature.flip::before { left: auto; right: -80px; background: radial-gradient(circle, rgba(233,169,79,.14), transparent 68%); }
.feat-t { margin: 14px 0 14px; font-size: clamp(30px, 3.8vw, 44px); color: #FBF4E6; }
.feat-t em { font-style: normal; color: var(--bougie-2); }
.feature p { font-size: 19px; color: #D7D4CC; max-width: 30em; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { position: relative; overflow: hidden; padding: 26px 22px; border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid rgba(243,196,126,.22); }
.card h3 { font-size: 22px; margin: 16px 0 8px; color: #FBF4E6; }
.card p { color: var(--doux); font-size: 15.5px; }
.picto { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #2A1F0E; background: radial-gradient(circle at 35% 30%, #F6D49A, var(--bougie)); }
.picto svg { width: 26px; height: 26px; }

/* Appel final */
.fin { position: relative; overflow: hidden; text-align: center; padding: 64px 28px 56px; margin-top: 30px; border-radius: 36px;
  background: radial-gradient(90% 120% at 50% 0%, rgba(233,169,79,.22), transparent 60%), linear-gradient(180deg, var(--nuit-2), #121A3A);
  border: 1px solid rgba(243,196,126,.35); box-shadow: 0 40px 100px rgba(0,0,0,.45); }
.fin::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 90px;
  background: radial-gradient(120% 100% at 30% 100%, #0B1127 60%, transparent 61%), radial-gradient(120% 100% at 80% 100%, #141C40 60%, transparent 61%); opacity: .9; }
.fin > * { position: relative; z-index: 1; }
.fin-icone { width: 110px; height: 110px; border-radius: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 2px rgba(243,196,126,.4), 0 0 90px rgba(233,169,79,.35);
  animation: flotte 7s ease-in-out infinite; }
.fin h2 { margin-top: 26px; font-size: clamp(34px, 5vw, 58px); color: #FBF4E6; }
.fin h2 em { font-style: normal; background: linear-gradient(180deg, #FFE7B8 10%, #E9A94F 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fin p { margin: 16px auto 0; max-width: 34em; color: #D7D4CC; font-size: 18px; }
.fin .actions { justify-content: center; margin-bottom: 40px; }

/* Questions fréquentes (accueil et assistance) */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq details { border-radius: 18px; background: rgba(24,33,63,.7); border: 1px solid rgba(243,196,126,.18); padding: 0 22px; transition: border-color .3s; }
.faq details[open] { border-color: rgba(243,196,126,.45); }
.faq summary { cursor: pointer; list-style: none; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 17.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 28px/1 var(--titre); color: var(--bougie-2); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: #D7D4CC; }

/* Bandeau « Du même studio » (Game Duo/outils/catalogue.mjs, othersBand) */
.others-list { display: grid; gap: 14px; max-width: 820px; margin: 0 auto; }
.other-game { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border-radius: 20px; text-decoration: none; color: var(--texte);
  background: var(--nuit-2); border: 1px solid rgba(243,196,126,.15); transition: transform .35s var(--ease), background .35s; }
.other-game:hover { background: var(--nuit-3); transform: translateY(-2px); }
.other-game img { width: 64px; height: 64px; border-radius: 15px; flex: none; }
.other-game > span:first-of-type { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.other-game b { font: 600 21px/1.2 var(--titre); }
.other-game small { color: var(--doux); font-size: 16px; }
.other-go { flex: none; color: var(--bougie-2); font-weight: 700; white-space: nowrap; }

/* ── Pages d'aide (worker/aide.js) ── */
.help { padding-bottom: 40px; }
.help-hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 40px 0 10px; }
.help-hero h1 { margin-top: 18px; font-size: clamp(40px, 6vw, 68px); color: #FBF4E6; }
.help-art img { width: 132px; height: 132px; border-radius: 30px; box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 2px rgba(243,196,126,.35), 0 0 120px rgba(233,169,79,.2);
  animation: flotte 7s ease-in-out infinite; }
.help-intro { margin-top: 18px; font-size: 19px; color: #D7D4CC; max-width: 44em; }
.help-actions { margin-bottom: 20px; }
.help-h2 { font-size: clamp(28px, 3.6vw, 38px); margin: 44px 0 20px; color: #FBF4E6; }
.help .faq { max-width: none; }
.legal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 34px; }
.legal-card { position: relative; padding: 26px 24px 24px; border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  border: 1px solid rgba(243,196,126,.18); }
.legal-card h2 { font-size: 23px; margin: 8px 0 12px; color: #FBF4E6; }
.legal-card p { color: #D7D4CC; font-size: 16px; }
.legal-card p + p { margin-top: 10px; }
.legal-num { font: 600 15px/1 var(--titre); color: var(--bougie); letter-spacing: .08em; }
.help-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 40px; padding: 30px 32px; border-radius: 26px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(233,169,79,.18), transparent 60%), var(--nuit-2); border: 1px solid rgba(243,196,126,.35); }
.help-band h2 { font-size: 28px; color: #FBF4E6; }
.help-band p { color: var(--doux); margin-top: 6px; }
.help-band .actions { margin-top: 0; }
.help-updated { margin-top: 26px; color: var(--doux); font-size: 14.5px; }

/* ── Pied ── */
.foot { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 50px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--doux); font-size: 15px; text-align: center;
  border-top: 1px solid rgba(237,230,216,.1); margin-top: 30px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.foot a { color: var(--doux); text-decoration: none; }
.foot a:hover, .foot a[aria-current] { color: var(--bougie-2); }

/* ── Très grands écrans (télé, 1920 px et plus) : la page s'élargit au lieu de rester une colonne au milieu ── */
@media (min-width: 1600px) {
  body { font-size: 18px; }
  .wrap { width: min(1440px, 100% - 120px); }
  .legal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .phone { width: 290px; }
  .feature .phone { width: 310px; }
  .faq { max-width: 1040px; }
}

/* ── Tablettes et téléphones ── */
@media (max-width: 900px) {
  .lune { width: 64px; height: 64px; right: 5%; top: 170px; }
  .lune-halo { right: 5%; top: 170px; width: 280px; height: 280px; margin: -105px -105px 0 0; }
  .feature::before { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .lead { margin-inline: auto; }
  .actions { justify-content: center; }
  .phones { min-height: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 26px; text-align: center; justify-items: center; }
  .feature.flip > .phone { order: 0; }
  .feature p { margin-inline: auto; }
  .legal { grid-template-columns: 1fr; }
  .help-art { display: none; }
}
@media (max-width: 520px) {
  .lune, .lune-halo { display: none; }   /* sur téléphone, la lune passerait sous le bandeau du titre */
  .cards { grid-template-columns: 1fr; }
  .phone { width: min(200px, 44vw); border-radius: 30px; padding: 7px; }
  .phone img { border-radius: 24px; }
  .feature .phone { width: min(250px, 70vw); }
  .help-band { padding: 24px 22px; }
  .other-go { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sky, .phones .phone, .help-art img, .theatre *, .halo-or, .fin-icone { animation: none !important; }
  .luciole { display: none; }
  html { scroll-behavior: auto; }
}
