/* Geodyssey — design system « atlas » repris de l'app (Papier / Nuit). */

:root {
  --bg:        #EFE6D2;
  --bg-alt:    #E8DDC6;
  --surface:   #FBF5E7;
  --ink:       #2A2118;
  --dim:       rgba(42, 33, 24, .70);
  --mute:      rgba(42, 33, 24, .52);
  --line:      rgba(42, 33, 24, .14);
  --gold:      #A9772A;
  --gold-soft: rgba(169, 119, 42, .12);
  --navy:      #0C2247;
  --navy-ink:  #F4EFE2;
  --shadow:    0 10px 30px rgba(42, 33, 24, .10);
  --shadow-lg: 0 34px 70px rgba(12, 34, 71, .22);
  --radius:    18px;
  --radius-lg: 28px;
  --maxw:      1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0C2247;
    --bg-alt:    #0A1C3B;
    --surface:   #16294C;
    --ink:       #F4EFE2;
    --dim:       rgba(244, 239, 226, .74);
    --mute:      rgba(244, 239, 226, .55);
    --line:      rgba(244, 194, 75, .22);
    --gold:      #F4C24B;
    --gold-soft: rgba(244, 194, 75, .14);
    --navy:      #F4C24B;
    --navy-ink:  #0C2247;
    --shadow:    0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 34px 70px rgba(0, 0, 0, .5);
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.22rem; line-height: 1.25; }
p  { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.lead { font-size: clamp(1.06rem, 1.8vw, 1.24rem); color: var(--dim); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .9rem;
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--serif); font-weight: 700; font-size: 1.24rem; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--dim); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav + .header-cta { margin-left: 0; }
.lang-switch { font-size: .85rem; font-weight: 700; color: var(--mute); text-decoration: none; letter-spacing: .06em; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.lang-switch:hover { color: var(--ink); border-color: var(--gold); }
/* Retour au portfolio depuis une page d'app : discret mais lisible comme un
   chemin de retour, pas comme un bouton d'action. */
.back-link { font-size: .92rem; font-weight: 600; color: var(--mute); text-decoration: none; white-space: nowrap; }
.back-link:hover { color: var(--gold); }
@media (max-width: 560px) { .back-link { display: none; } }
/* Fin d'une page légale : le chemin de retour vers l'app concernée. */
.doc-back { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.doc-back a { color: var(--gold); text-decoration: none; font-weight: 600; }
.doc-back a:hover { text-decoration: underline; }
@media (max-width: 860px) { .nav { display: none; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-store {
  background: var(--navy); color: var(--navy-ink);
  box-shadow: 0 8px 22px rgba(12, 34, 71, .28);
  padding: 12px 26px;
}
.btn-store:hover { color: var(--navy-ink); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(12, 34, 71, .34); }
.btn-store svg { width: 25px; height: 25px; fill: currentColor; flex: none; }
.btn-store b { display: block; font-size: 1.02rem; font-weight: 700; line-height: 1.15; }
.btn-store small { display: block; font-size: .7rem; opacity: .8; letter-spacing: .08em; text-transform: uppercase; }
/* App annoncée mais pas encore publiée : le badge garde la forme du bouton
   App Store — c'est ce qui le rend lisible d'un coup d'œil — mais il ne mène
   nulle part, et doit le dire : pas de relief, pas de survol, pas de curseur
   de lien. */
.btn-soon {
  background: transparent; color: var(--muted);
  border: 1px dashed var(--line); box-shadow: none; cursor: default;
}
.btn-soon:hover { transform: none; box-shadow: none; color: var(--muted); }
.btn-soon svg { opacity: .55; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: .92rem; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero-map::before {
  content: ""; position: absolute; inset: -12% -6% auto -6%; height: 118%;
  background: url("../img/world.svg") center 32% / 140% no-repeat;
  opacity: .06; pointer-events: none;
}
@media (prefers-color-scheme: dark) { .hero-map::before { filter: invert(1); opacity: .1; } }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .38em; }
.hero .lead { margin-bottom: 1.7em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero-note { font-size: .88rem; color: var(--mute); margin: 1.1rem 0 0; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
}

/* ---------- Appareils ---------- */
.device {
  position: relative;
  padding: 8px;
  background: linear-gradient(160deg, #2b2b2f, #131316);
  border-radius: 42px;
  box-shadow: var(--shadow-lg);
}
.device img { border-radius: 34px; display: block; width: 100%; }
.device::after {
  content: ""; position: absolute; inset: 8px;
  border-radius: 34px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.device-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; }
.device-pair .device:first-child { transform: rotate(-3deg); }
.device-pair .device:last-child { transform: rotate(3deg) translateY(18px); }
@media (max-width: 900px) {
  .device-pair { max-width: 460px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .device { border-radius: 32px; padding: 6px; }
  .device img { border-radius: 26px; }
  .device::after { inset: 6px; border-radius: 26px; }
}

/* ---------- Bandeau chiffres ---------- */
.stats { border-block: 1px solid var(--line); background: var(--surface); }
.stats ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; margin: 0; padding: 30px 0; text-align: center; }
.stats b { display: block; font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.05rem); line-height: 1.1; }
.stats span { font-size: .82rem; color: var(--mute); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 700px) { .stats ul { grid-template-columns: repeat(2, 1fr); gap: 26px 12px; } }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 8vw, 104px) 0; }
section[id], div[id] { scroll-margin-top: 84px; }
section.tint { background: var(--bg-alt); }
.section-head { max-width: 66ch; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head.center { margin-inline: auto; }

/* ---------- Grille des modes ---------- */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 22px; }
.mode {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px 22px 26px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.mode:hover { transform: translateY(-4px); border-color: var(--gold); }
.mode .ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; font-size: 1.4rem;
  background: var(--gold-soft); color: var(--gold); margin-bottom: 16px;
}
.mode h3 { margin-bottom: .35em; }
.mode p { color: var(--dim); font-size: .95rem; margin: 0; }
@media (prefers-reduced-motion: reduce) { .mode:hover { transform: none; } }

/* ---------- Sections alternées ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split + .split { margin-top: clamp(56px, 7vw, 100px); }
.split.reverse .split-media { order: -1; }
.split-media { max-width: 330px; justify-self: center; }
.split ul { list-style: none; padding: 0; margin: 1.4em 0 0; }
.split ul li { position: relative; padding-left: 30px; margin-bottom: .8em; color: var(--dim); }
.split ul li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft);
}
.split ul li b { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
}

/* ---------- Galerie thèmes ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.gallery .device { max-width: 300px; margin: 0 auto; }
.gallery figure { margin: 0; }
.gallery figcaption { text-align: center; font-size: .86rem; color: var(--mute); margin-top: 14px; }

/* ---------- Publics ---------- */
.audience { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.audience div { border-left: 2px solid var(--gold); padding-left: 20px; }
.audience h3 { font-size: 1.08rem; margin-bottom: .4em; }
.audience p { color: var(--dim); font-size: .95rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 4px;
}
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--serif); font-size: 1.16rem; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--sans); font-size: 1.5rem; font-weight: 400;
  color: var(--gold); line-height: 1; flex: none; transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .9em 0 0; color: var(--dim); }

/* ---------- CTA final ---------- */
.cta-final { text-align: center; }
.cta-final .inner {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px) 24px;
  box-shadow: var(--shadow);
}
.cta-final .btn { margin-top: 12px; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; background: var(--surface); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 0 0 14px; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--dim); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-brand p { color: var(--mute); max-width: 34ch; margin-top: 12px; }
.legal { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--mute); font-size: .84rem; display: flex; flex-wrap: wrap; gap: 8px 20px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ---------- Pages légales ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 0; }
.doc h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); }
.doc h2 { font-size: 1.42rem; margin-top: 2.2em; }
.doc h3 { font-size: 1.08rem; margin-top: 1.6em; }
.doc p, .doc li { color: var(--dim); }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: .5em; }
.doc .updated { font-size: .88rem; color: var(--mute); margin-bottom: 2.4em; }
.doc table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .93rem; }
.doc th, .doc td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--ink); font-weight: 600; }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Accessibilité ---------- */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: var(--navy-ink); padding: 12px 18px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Portfolio : grille d'applications ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 20px; }
.app-card {
  display: flex; gap: 18px; align-items: flex-start; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: transform .25s ease, border-color .25s ease;
}
.app-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.app-card img { width: 72px; height: 72px; border-radius: 16px; flex: none; }
.app-card h3 { margin-bottom: .3em; }
.app-card p { color: var(--dim); font-size: .93rem; margin: 0; }
.app-card-cat { color: var(--mute) !important; font-size: .82rem !important; margin-bottom: .6em !important; letter-spacing: .03em; }
@media (prefers-reduced-motion: reduce) { .app-card:hover { transform: none; } }

/* ---------- Héros d'une page d'application ---------- */
.app-hero-shot { max-width: 300px; justify-self: center; }
@media (max-width: 900px) { .app-hero-shot { margin: 0 auto; } }

/* ---------- Pied de page simple (pages générées) ---------- */
.foot-brand { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; margin: 0 0 6px; }
.foot-note { color: var(--mute); margin: 0 0 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links li { margin: 0; }
