/* ============================================================
   Talediver — landing « coming soon »
   Encre chaude × ambre chandelle × vert feuille. Mobile-first.
   ============================================================ */

:root {
  --encre: #171310;          /* fond principal — brun-noir chaud */
  --encre-2: #1F1913;        /* panneaux */
  --encre-3: #2A211A;        /* cartes */
  --bord: #3D3126;
  --parchemin: #EFE6D2;      /* texte principal */
  --parchemin-2: #C9BCA4;    /* texte secondaire */
  --ambre: #E29140;          /* or chaleureux */
  --ambre-clair: #EDAA5D;
  --ambre-sombre: #C77F33;
  --sur-ambre: #271503;
  --feuille: #93AF6B;        /* vert feuille — accent vie */
  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--encre);
  color: var(--parchemin);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ambre-clair); }
a:hover { color: var(--ambre); }
:focus-visible { outline: 2px solid var(--ambre); outline-offset: 3px; border-radius: 4px; }

/* ---------- Sélecteur de langue ---------- */
.langues {
  position: fixed; top: 14px; right: 16px; z-index: 20;
  display: flex; gap: 4px;
  padding: 4px;
  border: 1px solid var(--bord);
  border-radius: 999px;
  background: rgba(23,19,16,0.72);
  backdrop-filter: blur(6px);
}
.langues button {
  border: none; background: transparent;
  padding: 4px 12px; border-radius: 999px;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--parchemin-2); cursor: pointer;
}
.langues button:hover { color: var(--parchemin); }
.langues button[aria-pressed="true"] {
  background: var(--ambre); color: var(--sur-ambre);
}

.visuallyhidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Parois de la descente ---------- */
.parois { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.paroi { position: absolute; top: 0; bottom: 0; width: min(300px, 20vw); }
.paroi-gauche { left: 0; }
.paroi-droite { right: 0; }
.paroi-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: left center;
  -webkit-mask-image: linear-gradient(to right, #000 34%, transparent 70%);
  mask-image: linear-gradient(to right, #000 34%, transparent 70%);
}
.paroi-droite .paroi-img { transform: scaleX(-1); }
.paroi-img.surface { background-image: url("img/paroi-surface-gauche.webp"); }
.paroi-img.abysse { background-image: url("img/paroi-abysse-gauche.webp"); opacity: 0; }

/* zones brillantes des parois : elles scintillent, les lucioles y butinent */
.lueur-point {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,232,180,0.95) 0%, rgba(237,170,93,0.5) 45%, transparent 72%);
  animation: scintiller 3.2s ease-in-out infinite alternate;
}
.lueur-point.teal {
  background: radial-gradient(circle, rgba(214,255,244,0.95) 0%, rgba(127,214,194,0.5) 45%, transparent 72%);
}
.lueur-point.ambre { opacity: calc(1 - var(--prof, 0)); }
.lueur-point.teal { opacity: var(--prof, 0); }
.lueur-point:nth-child(odd) { animation-delay: -1.7s; animation-duration: 4.1s; }
@keyframes scintiller {
  from { transform: scale(0.75); filter: brightness(0.8); }
  to   { transform: scale(1.6);  filter: brightness(1.7); }
}

@media (max-width: 1100px) { .paroi { width: 150px; } }
@media (max-width: 860px)  { .parois { display: none; } }

/* ---------- L'entrée de la grotte ---------- */
.grotte-entree {
  height: clamp(220px, 36vw, 430px);
  max-width: 1050px;
  margin: 6px auto -18px;
  background: url("img/entree-grotte.webp") center / contain no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 50%, #000 55%, transparent 78%);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 50%, #000 55%, transparent 78%);
}

/* ---------- Vrilles (enluminure vivante) ---------- */
.vrille {
  position: absolute; width: 96px; height: 96px;
  stroke: var(--feuille); stroke-width: 1.6; opacity: 0.34;
  fill: none; pointer-events: none;
  will-change: transform;
}
.vrille circle { fill: var(--ambre); stroke: none; }
.vrille-hg { top: 12px; left: 12px; transform-origin: 8% 92%; }
.vrille-bandeau { top: 8px; left: 8px; width: 70px; height: 70px; transform-origin: 8% 92%; }
.vrille-pied { bottom: 10px; right: 10px; transform-origin: 92% 92%; }

/* ---------- Héros ---------- */
.heros {
  position: relative;
  padding: 48px 20px 34px;
  text-align: center;
  /* pas de fond : les parois de la grotte sont visibles dès l'arrivée */
}
.heros-inner { position: relative; max-width: 720px; margin: 0 auto; z-index: 2; }

.logo-zone img {
  width: min(430px, 80vw); height: auto;
  filter: drop-shadow(0 6px 24px rgba(226,145,64,0.25));
}

.wordmark {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  letter-spacing: 0.5px;
  line-height: 1.05;
}
.tale  { color: var(--ambre); }
.diver { color: var(--parchemin); }

.tagline {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 3.4vw, 1.5rem);
  color: var(--ambre-clair);
}
.sous-titre {
  margin: 14px auto 0;
  max-width: 34em;
  color: var(--parchemin-2);
  font-size: clamp(1rem, 2.6vw, 1.15rem);
}
.sous-titre strong { color: var(--parchemin); font-weight: 600; }

/* cadre de la future vidéo héros (cf. commentaire VIDEO-HERO dans index.html) */
.visuel-heros {
  position: relative;
  margin: 30px auto 0;
  width: 100%; max-width: 640px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--bord);
  background: linear-gradient(170deg, #241B12 0%, #150F0A 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* indice de descente : visible tant qu'on n'a pas scrollé */
.descente-indice {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-top: 30px;
  color: var(--parchemin-2);
  font-family: var(--serif); font-style: italic; font-size: 0.92rem;
  transition: opacity 0.6s ease;
}
.descente-indice svg { color: var(--ambre); animation: descendre 2s ease-in-out infinite; }
@keyframes descendre {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(8px); opacity: 1; }
}
.descente-indice.cache { opacity: 0; }

/* ---------- CTA ---------- */
.cta-rangee {
  margin-top: 30px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 12px 26px;
  border-radius: 10px;
  font-family: var(--sans); font-size: 1.02rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-discord {
  background: var(--ambre); border-color: var(--ambre); color: var(--sur-ambre);
}
.btn-discord:hover { background: var(--ambre-clair); border-color: var(--ambre-clair); color: var(--sur-ambre); }

.cta-note { margin-top: 8px; font-size: 0.88rem; color: #8A7A63; }

/* ---------- Badge Steam (sans lien) — vert Steam, bien visible ---------- */
.badge-steam {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 22px auto 0;
  padding: 9px 18px;
  border: 1px solid #7CA82B;
  border-radius: 10px;
  color: #EDF7D9;
  font-size: 0.95rem; font-weight: 600;
  background: linear-gradient(180deg, #6B9420 0%, #4D6E12 100%);
}

/* ---------- Sections ---------- */
.section { position: relative; padding: 64px 20px; max-width: 980px; margin: 0 auto; }
.section h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  margin: 0 0 14px; line-height: 1.2;
}
.quoi { text-align: center; }
.quoi p { max-width: 42em; margin: 0 auto; color: var(--parchemin-2); }
.quoi em { color: var(--ambre-clair); font-style: normal; font-weight: 600; }

.equipe { text-align: center; }
.equipe p { max-width: 44em; margin: 0 auto 14px; color: var(--parchemin-2); }
.equipe p:last-child { margin-bottom: 0; }
.equipe em { color: var(--ambre-clair); font-style: normal; font-weight: 600; }

/* cartes — grilles */
.cartes-4 {
  display: grid; gap: 18px; grid-template-columns: 1fr; padding-top: 6px;
}
@media (min-width: 620px)  { .cartes-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cartes-4 { grid-template-columns: repeat(4, 1fr); } }

.modes-jeu h2, .dedans h2 { text-align: center; }
.dedans-intro { text-align: center; color: var(--parchemin-2); margin: 0 0 20px; }

/* ---------- Chaîne de valeur : Crée → Joue → Partage ---------- */
.chaine {
  list-style: none; margin: 0 auto 34px; padding: 0;
  max-width: 900px;
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .chaine { grid-template-columns: repeat(3, 1fr); gap: 0; } }
.chaine-etape {
  position: relative; text-align: center;
  padding: 4px 20px;
}
/* la flèche entre les étapes (desktop) */
@media (min-width: 720px) {
  .chaine-etape + .chaine-etape::before {
    content: ""; position: absolute; left: -7px; top: 20px;
    width: 12px; height: 12px;
    border-top: 2px solid var(--ambre-sombre); border-right: 2px solid var(--ambre-sombre);
    transform: rotate(45deg); opacity: 0.7;
  }
}
.chaine-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--ambre); color: var(--ambre-clair);
  font-family: var(--serif); font-size: 1.15rem;
  margin-bottom: 10px;
}
.chaine-etape h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.3rem; margin: 0 0 6px; color: var(--parchemin);
}
.chaine-etape p {
  margin: 0; color: var(--parchemin-2); font-size: 0.96rem;
  max-width: 22em; margin-inline: auto;
}

.cartes-features {
  display: grid; gap: 18px; grid-template-columns: 1fr;
}
@media (min-width: 620px)  { .cartes-features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px)  { .cartes-features { grid-template-columns: repeat(3, 1fr); } }

.carte {
  background: var(--encre-2);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 18px;
}
.carte-visuel {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  border: 1px dashed #4E3F30;
  background: linear-gradient(170deg, #221A11, #17110C);
  display: flex; align-items: center; justify-content: center;
  color: #8A7A63; font-size: 0.88rem; font-style: italic; font-family: var(--serif);
}
.carte h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.15rem; margin: 14px 0 6px; color: var(--ambre-clair);
}
.carte h3:first-child { margin-top: 2px; }
.carte p { margin: 0; color: var(--parchemin-2); font-size: 0.96rem; }

/* ---------- Le plan de plongée (roadmap) ---------- */
.plongee h2 { text-align: center; }
.plongee-intro { text-align: center; max-width: 42em; margin: 0 auto; color: var(--parchemin-2); }
.plongee-intro strong { color: var(--ambre-clair); }
.paliers {
  list-style: none;
  position: relative;
  max-width: 620px;
  margin: 34px auto 0; padding: 0;
}
.paliers::before {
  content: "";
  position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--feuille) 0%, var(--ambre) 20%, var(--ambre-sombre) 52%, #7FD6C2 100%);
  opacity: 0.55;
}
.palier { position: relative; padding: 0 0 30px 36px; }
.palier:last-child { padding-bottom: 0; }
.palier::before {
  content: "";
  position: absolute; left: 2px; top: 7px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--ambre);
  background: var(--encre);
}
.palier:nth-child(4)::before { border-color: #C9A05A; }
.palier:nth-child(5)::before { border-color: #A9BC8B; }
.palier:nth-child(6)::before { border-color: #8FC9AC; }
.palier:nth-child(7)::before { border-color: #7FD6C2; }
.palier.actuel::before {
  background: var(--ambre);
  box-shadow: 0 0 14px rgba(237,170,93,0.8);
}
.palier.fait::before {
  background: var(--feuille);
  border-color: var(--feuille);
}
.palier.fait h3 { color: var(--parchemin); }
.palier-prof {
  display: block;
  font-family: var(--serif); font-style: italic;
  font-size: 0.85rem; letter-spacing: 0.05em;
  color: #8A7A63;
}
.palier:nth-child(6) .palier-prof, .palier:nth-child(7) .palier-prof { color: #6FA89A; }
.palier h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.2rem; margin: 2px 0 4px; color: var(--ambre-clair);
}
.palier:nth-child(6) h3 { color: #8FD0BA; }
.palier:nth-child(7) h3 { color: #7FD6C2; }
.palier p { margin: 0; color: var(--parchemin-2); font-size: 0.96rem; max-width: 34em; }
.palier-badge {
  display: inline-block; margin-left: 8px; padding: 2px 11px;
  border-radius: 999px;
  background: var(--ambre); color: var(--sur-ambre);
  font-family: var(--sans); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  vertical-align: 3px;
}
.palier-badge.badge-fait { background: var(--feuille); color: #1A2410; }

/* ---------- Comparatif ---------- */
.pourquoi h2 { text-align: center; }
.table-scroll { overflow-x: auto; margin-top: 10px; border-radius: 12px; border: 1px solid var(--bord); }
.comparatif {
  width: 100%; min-width: 640px;
  border-collapse: collapse;
  background: var(--encre-2);
  font-size: 0.95rem;
}
.comparatif th, .comparatif td {
  padding: 13px 16px;
  text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--bord);
  color: var(--parchemin-2);
}
.comparatif thead th {
  font-family: var(--serif); font-weight: 600; font-size: 1rem;
  color: var(--parchemin);
  border-bottom: 2px solid var(--bord);
}
.comparatif tbody th[scope="row"] {
  font-weight: 600; color: var(--parchemin); white-space: nowrap;
}
.comparatif tr:last-child th, .comparatif tr:last-child td { border-bottom: none; }
.comparatif .col-talediver {
  background: rgba(226,145,64,0.11);
  color: var(--parchemin);
  font-weight: 500;
  border-left: 1px solid var(--ambre-sombre);
  border-right: 1px solid var(--ambre-sombre);
}
.comparatif thead .col-talediver {
  font-size: 1.05rem;
  border-top: 2px solid var(--ambre);
  border-bottom-color: var(--ambre);
}
.comparatif tr:last-child .col-talediver { border-bottom: 1px solid var(--ambre-sombre); }

/* Sur mobile, le tableau s'empile : un bloc par critère, la cellule Talediver
   encadrée d'or — plus aucun défilement horizontal. */
@media (max-width: 720px) {
  .comparatif { min-width: 0; }
  .comparatif thead { display: none; }
  .comparatif tbody, .comparatif tr, .comparatif tbody th, .comparatif td { display: block; }
  .comparatif tr { padding: 16px; border-bottom: 1px solid var(--bord); }
  .comparatif tr:last-child { border-bottom: none; }
  .comparatif tbody th[scope="row"] {
    padding: 0 0 8px; border-bottom: none;
    white-space: normal; font-family: var(--serif); font-size: 1.08rem;
  }
  .comparatif td { padding: 6px 0; border-bottom: none; }
  .comparatif td::before {
    content: attr(data-col);
    display: block;
    font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase;
    color: #8A7A63;
  }
  .comparatif td.col-talediver {
    margin-top: 8px; padding: 10px 12px;
    border: 1px solid var(--ambre-sombre); border-radius: 8px;
  }
  .comparatif td.col-talediver::before { content: "Talediver"; color: var(--ambre-clair); }
  .comparatif thead .col-talediver, .comparatif tr:last-child .col-talediver { border: 1px solid var(--ambre-sombre); }
}
.pourquoi-conclusion {
  text-align: center; margin: 24px auto 0; max-width: 40em;
  font-family: var(--serif); font-size: 1.15rem; color: var(--parchemin);
}
.pourquoi-conclusion em { color: var(--ambre-clair); font-style: italic; }

/* ---------- FAQ (accordéon natif) ---------- */
.faq h2 { text-align: center; }
.faq-liste { max-width: 46em; margin: 24px auto 0; }
.faq details {
  border: 1px solid var(--bord); border-radius: 10px;
  background: var(--encre-2);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  list-style: none; cursor: pointer;
  padding: 16px 44px 16px 18px; position: relative;
  font-family: var(--serif); font-weight: 600;
  font-size: 1.05rem; color: var(--parchemin);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 18px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--ambre); border-bottom: 2px solid var(--ambre);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--ambre-clair); }
.faq details p {
  margin: 0; padding: 0 18px 18px; color: var(--parchemin-2);
  font-size: 0.98rem; line-height: 1.6;
}
.faq details p em { color: var(--parchemin-2); font-style: italic; }

/* bandeau communauté */
.bandeau {
  text-align: center;
  background: var(--encre-2);
  border: 1px solid var(--bord);
  border-radius: 14px;
  padding: 48px 24px;
  margin-top: 20px; margin-bottom: 20px;
  max-width: 940px;
}
.bandeau p { color: var(--parchemin-2); margin: 0 0 24px; }
.compagnon {
  display: block;
  width: min(280px, 62vw); height: auto;
  margin: 0 auto 4px;
  filter: brightness(0.94) drop-shadow(0 6px 20px rgba(0,0,0,0.35));
}


/* ---------- Footer ---------- */
.pied {
  position: relative;
  border-top: 1px solid var(--bord);
  padding: 40px 20px 48px;
  text-align: center;
  overflow: hidden;
}
.pied-liens { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; }
.pied-liens a { font-weight: 500; text-decoration: none; }
.pied-liens a:hover { text-decoration: underline; }
.pied .badge-steam { margin-top: 22px; }
.pied-contact { margin: 18px 0 0; color: var(--parchemin-2); font-size: 0.95rem; }
.pied-mention { margin: 10px 0 0; color: #8A7A63; font-size: 0.9rem; }
.pied-mention .diver { color: var(--parchemin-2); }
.pied-marque { font-family: var(--serif); font-weight: 600; }

/* ---------- Lucioles (couche vivante pleine page) ---------- */
.lucioles { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.luciole {
  position: absolute; left: 0; top: 0;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--luciole-c, var(--ambre-clair));
  box-shadow: 0 0 14px 4px var(--luciole-g, rgba(237,170,93,0.5));
  opacity: 0;
  will-change: transform, opacity;
  transition: background 0.8s ease, box-shadow 0.8s ease;
}
/* petit cœur émis près de la lampe de la mascotte (piloté par script.js, coupable via COEURS) */
.coeur {
  position: absolute; left: 0; top: 0; z-index: 6;
  color: #FF9EC9;
  font-size: 13px; line-height: 1;
  pointer-events: none; will-change: transform, opacity;
  text-shadow: 0 0 6px rgba(255,120,180,0.6);
  animation: coeur-monte 1.5s ease-out forwards;
}
@keyframes coeur-monte {
  0%   { opacity: 0; transform: translate(var(--cx), var(--cy)) scale(0.4); }
  25%  { opacity: 0.9; }
  100% { opacity: 0; transform: translate(var(--cx), calc(var(--cy) - 46px)) scale(1); }
}
/* ---------- Apparition au scroll (activée par JS seulement) ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js-reveal .reveal.visible { opacity: 1; transform: none; }


/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .luciole, .lueur-point, .descente-indice svg { animation: none; }
  .luciole { opacity: 0.35; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}
