/* Le site d'Extraction : l'accueil, la connexion et la création de compte. Même or, même nuit que le jeu. */

:root {
  --nuit: #0b0907;
  --nuit-2: #14100c;
  --nuit-3: #1d1712;
  --pierre: #2a221a;
  --or: #e0bd6e;
  --or-clair: #f6dc9c;
  --or-sombre: #a7843c;
  --braise: #ff8a3d;
  --sang: #d9483b;
  --vert: #6fce7a;
  --texte: #efe6d6;
  --doux: #a99c86;
  --ligne: rgba(224, 189, 110, 0.18);
  --verre: rgba(20, 16, 12, 0.72);
  --titre: "Cinzel", Georgia, serif;
  --corps: "Spectral", Georgia, serif;
  --courbe: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--or); text-decoration: none; }
a:hover { color: var(--or-clair); }
::selection { background: var(--or); color: var(--nuit); }

/* Un grain très léger sur tout le site : la nuit n'est jamais tout à fait plate. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  background-image: radial-gradient(rgba(255, 255, 255, 0.6) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

h1, h2, h3, h4 { font-family: var(--titre); font-weight: 700; letter-spacing: 0.04em; margin: 0; line-height: 1.15; }

.or-texte {
  background: linear-gradient(100deg, var(--or-sombre) 0%, var(--or-clair) 30%, #fff4d2 45%, var(--or) 60%, var(--or-sombre) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: reflet 7s linear infinite;
}
@keyframes reflet { from { background-position: 120% 0; } to { background-position: -130% 0; } }

/* --- Boutons --- */

.bouton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95em 1.9em;
  border-radius: 999px;
  font-family: var(--titre);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--courbe), box-shadow 0.35s var(--courbe), background 0.35s, color 0.35s;
}
.bouton:focus-visible { outline: 2px solid var(--or-clair); outline-offset: 3px; }
.bouton-or {
  color: #241707;
  background: linear-gradient(180deg, var(--or-clair), var(--or) 55%, var(--or-sombre));
  box-shadow: 0 10px 40px -10px rgba(224, 189, 110, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.bouton-or::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.75) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--courbe);
}
.bouton-or:hover { color: #241707; transform: translateY(-3px); box-shadow: 0 18px 50px -10px rgba(224, 189, 110, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.bouton-or:hover::after { transform: translateX(120%); }
.bouton-fantome { color: var(--texte); border-color: rgba(239, 230, 214, 0.35); background: rgba(11, 9, 7, 0.35); backdrop-filter: blur(6px); }
.bouton-fantome:hover { color: var(--or-clair); border-color: var(--or); transform: translateY(-3px); }
.bouton-grand { font-size: 1.05rem; padding: 1.1em 2.4em; }
.pulse { animation: pulse 3.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 40px -10px rgba(224, 189, 110, 0.65), 0 0 0 0 rgba(224, 189, 110, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
  50% { box-shadow: 0 10px 40px -10px rgba(224, 189, 110, 0.65), 0 0 0 14px rgba(224, 189, 110, 0), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
}

/* --- Navigation --- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(16px, 4vw, 56px);
  transition: background 0.5s, padding 0.5s var(--courbe), border-color 0.5s;
  border-bottom: 1px solid transparent;
}
.nav.solide { background: rgba(11, 9, 7, 0.82); backdrop-filter: blur(14px) saturate(140%); padding-top: 12px; padding-bottom: 12px; border-color: var(--ligne); }
.marque { display: flex; align-items: center; gap: 12px; color: var(--texte); font-family: var(--titre); font-weight: 700; letter-spacing: 0.32em; font-size: 1.05rem; }
.marque svg { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(224, 189, 110, 0.45)); }
.marque:hover { color: var(--or-clair); }
.nav-liens { display: flex; gap: clamp(14px, 2.4vw, 34px); font-family: var(--titre); font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; }
.nav-liens a { color: var(--doux); position: relative; padding: 6px 0; }
.nav-liens a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--or); transform: scaleX(0); transition: transform 0.4s var(--courbe); }
.nav-liens a:hover { color: var(--texte); }
.nav-liens a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-actions .bouton { padding: 0.7em 1.4em; font-size: 0.8rem; }
/* Le choix de la langue : deux pastilles, la langue en cours en or. */
.choix-langue { display: inline-flex; border: 1px solid var(--ligne); border-radius: 999px; padding: 2px; }
.choix-langue button { font: 600 0.7rem/1 var(--titre); letter-spacing: 0.12em; color: var(--doux); background: none; border: 0; border-radius: 999px; padding: 0.5em 0.75em; cursor: pointer; }
.choix-langue button:hover { color: var(--texte); }
.choix-langue button.choisi { color: #1a1206; background: var(--or-clair); cursor: default; }
.lien-connexion { font-family: var(--titre); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte); padding: 0.6em 0.8em; }

/* --- Héros --- */

.heros {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.heros-image {
  position: absolute;
  inset: -4%;
  z-index: -3;
  background: url("assets/site/capitale.webp") center 35% / cover no-repeat;
  animation: ken-burns 38s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes ken-burns { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.16) translate3d(-2%, 1.5%, 0); } }
.heros::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 70% 40%, rgba(11, 9, 7, 0), rgba(11, 9, 7, 0.55) 75%),
    linear-gradient(180deg, rgba(11, 9, 7, 0.55) 0%, rgba(11, 9, 7, 0) 30%, rgba(11, 9, 7, 0.35) 72%, var(--nuit) 100%),
    linear-gradient(90deg, rgba(11, 9, 7, 0.9) 0%, rgba(11, 9, 7, 0.55) 38%, rgba(11, 9, 7, 0) 70%);
}
#braises { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.heros-contenu { padding: 140px clamp(16px, 6vw, 96px) 120px; max-width: 1240px; }
.heros-contenu > :not(.titre-jeu) { max-width: 760px; }
.sur-titre {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--ligne);
  border-radius: 999px;
  background: rgba(11, 9, 7, 0.5);
  backdrop-filter: blur(6px);
  font-family: var(--titre);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--or-clair);
}
.sur-titre b { background: var(--sang); color: #fff; padding: 2px 9px; border-radius: 999px; letter-spacing: 0.12em; font-size: 0.68rem; }
/* Pas de filter ici : il effaçait l'or des lettres (background-clip: text). */
.titre-jeu {
  margin: 22px 0 6px;
  font-size: clamp(2.4rem, 9.4vw, 8.2rem);
  letter-spacing: 0.06em;
  line-height: 0.95;
  white-space: nowrap;
}
/* Chaque lettre porte son or (un dégradé de haut en bas : il se raccorde d'une lettre à l'autre). */
.titre-jeu .lettre {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em) rotateX(70deg);
  animation: lettre 1.1s var(--courbe) forwards;
  background: linear-gradient(180deg, #fff6da 0%, var(--or-clair) 30%, var(--or) 58%, var(--or-sombre) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes lettre { to { opacity: 1; transform: none; } }
.accroche { font-family: var(--titre); font-size: clamp(1.15rem, 2.4vw, 1.7rem); letter-spacing: 0.08em; color: var(--texte); margin: 18px 0 14px; }
.accroche em { font-style: normal; color: var(--or-clair); }
.chapo { max-width: 560px; color: #d8ccb6; font-size: 1.12rem; margin: 0 0 34px; }
.heros-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.badges { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 38px; color: var(--doux); font-size: 0.92rem; }
.badges span { display: inline-flex; align-items: center; gap: 8px; }
.badges svg { width: 18px; height: 18px; color: var(--or); }
.defiler {
  position: absolute;
  left: 50%;
  bottom: 26px;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  font-family: var(--titre);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--doux);
  text-transform: uppercase;
}
.defiler i { width: 1px; height: 46px; background: linear-gradient(var(--or), transparent); animation: goutte 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes goutte { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* --- Sections --- */

.section { position: relative; padding: clamp(80px, 12vw, 160px) clamp(16px, 6vw, 96px); }
.cadre { max-width: 1240px; margin: 0 auto; }
.etiquette { font-family: var(--titre); font-size: 0.78rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--or); display: inline-flex; align-items: center; gap: 14px; }
.etiquette::before { content: ""; width: 38px; height: 1px; background: linear-gradient(90deg, transparent, var(--or)); }
.titre-section { font-size: clamp(2.1rem, 5vw, 3.6rem); margin: 18px 0 18px; }
.intro { color: #cfc2ab; max-width: 680px; font-size: 1.12rem; }
.centre { text-align: center; }
.centre .intro { margin-left: auto; margin-right: auto; }
.centre .etiquette::after { content: ""; width: 38px; height: 1px; background: linear-gradient(90deg, var(--or), transparent); }

/* Apparition au défilement */
.apparait { opacity: 0; transform: translateY(42px); transition: opacity 1.1s var(--courbe), transform 1.1s var(--courbe); transition-delay: var(--delai, 0s); }
.apparait.vu { opacity: 1; transform: none; }

/* La boucle : trois temps */
.boucle { background: radial-gradient(ellipse at 50% 0%, rgba(224, 189, 110, 0.08), transparent 60%), var(--nuit); }
.etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 64px; counter-reset: etape; }
.etape {
  position: relative;
  padding: 38px 32px 34px;
  border: 1px solid var(--ligne);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(29, 23, 18, 0.9), rgba(14, 11, 8, 0.9));
  overflow: hidden;
  transition: transform 0.6s var(--courbe), border-color 0.6s;
}
.etape:hover { transform: translateY(-8px); border-color: rgba(224, 189, 110, 0.45); }
.etape::before {
  counter-increment: etape;
  content: "0" counter(etape);
  position: absolute;
  right: 18px;
  top: 4px;
  font-family: var(--titre);
  font-size: 5.6rem;
  font-weight: 700;
  color: rgba(224, 189, 110, 0.07);
}
.etape-icone { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: rgba(224, 189, 110, 0.1); color: var(--or-clair); margin-bottom: 22px; }
.etape-icone svg { width: 30px; height: 30px; }
.etape h3 { font-size: 1.35rem; margin-bottom: 10px; }
.etape p { margin: 0; color: #cdbfa7; }
.etape.danger .etape-icone { background: rgba(217, 72, 59, 0.14); color: #ff8a7d; }

/* Les grandes rubriques : une image, un texte, en alternance */
.rubrique { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.rubrique + .rubrique { margin-top: clamp(90px, 12vw, 150px); }
.rubrique.inverse { grid-template-columns: 1fr 1.15fr; }
.rubrique.inverse .visuel { order: 2; }
.visuel { position: relative; }
.visuel .image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--ligne);
  transform: perspective(1200px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  transition: transform 0.5s var(--courbe);
}
.visuel .image img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08) translateY(var(--parallaxe, 0px)); transition: transform 0.2s linear; }
.visuel .image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(11, 9, 7, 0.55)); pointer-events: none; }
.visuel .vignette {
  position: absolute;
  width: 46%;
  right: -6%;
  bottom: -12%;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(224, 189, 110, 0.35);
  animation: flotte 7s ease-in-out infinite;
}
.rubrique.inverse .visuel .vignette { right: auto; left: -6%; }
.visuel .vignette img { width: 100%; height: 100%; object-fit: cover; }
@keyframes flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.coin { position: absolute; width: 34px; height: 34px; border: 2px solid var(--or); opacity: 0.8; pointer-events: none; }
.coin.hg { left: -12px; top: -12px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.coin.bd { right: -12px; bottom: -12px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.texte h3 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin: 16px 0 18px; }
.texte p { color: #d0c3ab; margin: 0 0 18px; }
.puces { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.puces li { display: flex; gap: 14px; align-items: flex-start; color: #e3d8c4; }
.puces li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 0.55em; rotate: 45deg; background: linear-gradient(135deg, var(--or-clair), var(--or-sombre)); box-shadow: 0 0 12px rgba(224, 189, 110, 0.6); }

/* Les classes */
.classes { background: linear-gradient(180deg, var(--nuit), #120d09 50%, var(--nuit)); }
.liste-classes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 60px; }
.classe {
  position: relative;
  padding: 26px 18px 24px;
  border-radius: 22px;
  border: 1px solid var(--ligne);
  background: linear-gradient(180deg, rgba(36, 28, 21, 0.85), rgba(14, 11, 8, 0.95));
  text-align: center;
  overflow: hidden;
  transition: transform 0.6s var(--courbe), border-color 0.6s, box-shadow 0.6s;
}
.classe::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 32%, var(--teinte, rgba(224, 189, 110, 0.35)), transparent 62%); opacity: 0.55; transition: opacity 0.6s; }
.classe:hover { transform: translateY(-12px); border-color: rgba(224, 189, 110, 0.55); box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.9); }
.classe:hover::before { opacity: 1; }
.classe img { position: relative; width: 78%; margin: 0 auto 6px; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.6)); transition: transform 0.6s var(--courbe); }
.classe:hover img { transform: scale(1.08) translateY(-4px); }
.classe h3 { position: relative; font-size: 1.15rem; margin-bottom: 4px; }
.classe .arme { position: relative; font-size: 0.85rem; color: var(--or); font-family: var(--titre); letter-spacing: 0.08em; }
.classe p { position: relative; margin: 10px 0 0; font-size: 0.92rem; color: #c8bba3; line-height: 1.45; }

/* Les chiffres */
.chiffres { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin-top: 70px; border: 1px solid var(--ligne); border-radius: 22px; overflow: hidden; background: var(--ligne); }
.chiffre { background: var(--nuit-2); padding: 34px 16px; text-align: center; }
.chiffre strong { display: block; font-family: var(--titre); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
.chiffre span { display: block; margin-top: 10px; color: var(--doux); font-size: 0.9rem; }

/* La galerie */
/* Huit images sur une grille de 4 × 4 sans trou : chacune a sa place. */
.galerie {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 210px);
  grid-template-areas: "a a b c" "a a d c" "e f f g" "e h h g";
  gap: 14px;
  margin-top: 60px;
}
.galerie button:nth-child(1) { grid-area: a; }
.galerie button:nth-child(2) { grid-area: b; }
.galerie button:nth-child(3) { grid-area: c; }
.galerie button:nth-child(4) { grid-area: d; }
.galerie button:nth-child(5) { grid-area: e; }
.galerie button:nth-child(6) { grid-area: f; }
.galerie button:nth-child(7) { grid-area: g; }
.galerie button:nth-child(8) { grid-area: h; }
.galerie button {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--nuit-3);
  box-shadow: 0 0 0 1px var(--ligne);
}
.galerie img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--courbe), filter 0.6s; filter: saturate(0.92); }
.galerie button:hover img { transform: scale(1.07); filter: saturate(1.1); }
.galerie figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 16px 14px;
  text-align: left;
  font-family: var(--titre);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--texte);
  background: linear-gradient(transparent, rgba(11, 9, 7, 0.9));
  transform: translateY(30%);
  opacity: 0;
  transition: transform 0.5s var(--courbe), opacity 0.5s;
}
.galerie button:hover figcaption, .galerie button:focus-visible figcaption { transform: none; opacity: 1; }
.galerie button:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }

/* La visionneuse */
.visionneuse { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 4vh 4vw; background: rgba(5, 4, 3, 0.94); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity 0.4s; }
.visionneuse.ouverte { opacity: 1; pointer-events: auto; }
.visionneuse figure { margin: 0; max-width: 1400px; width: 100%; transform: scale(0.96); transition: transform 0.5s var(--courbe); }
.visionneuse.ouverte figure { transform: none; }
.visionneuse img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 14px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8); }
.visionneuse figcaption { margin-top: 16px; text-align: center; font-family: var(--titre); letter-spacing: 0.1em; color: var(--or-clair); }
.visionneuse button { position: absolute; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--ligne); background: rgba(20, 16, 12, 0.8); color: var(--texte); font-size: 1.6rem; cursor: pointer; transition: background 0.3s, color 0.3s; }
.visionneuse button:hover { background: var(--or); color: var(--nuit); }
.visionneuse .fermer { top: 22px; right: 22px; }
.visionneuse .precedent { left: 22px; top: 50%; translate: 0 -50%; }
.visionneuse .suivant { right: 22px; top: 50%; translate: 0 -50%; }

/* Le dernier appel */
.appel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  padding: clamp(110px, 16vw, 200px) 24px;
}
.appel .fond { position: absolute; inset: -10% 0; z-index: -2; background: url("assets/site/donjon.webp") center / cover; transform: translateY(var(--parallaxe, 0px)) scale(1.1); }
.appel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(11, 9, 7, 0.55), rgba(11, 9, 7, 0.95) 70%), linear-gradient(var(--nuit), transparent 25%, transparent 75%, var(--nuit)); }
.appel h2 { font-size: clamp(2.4rem, 6.5vw, 5rem); margin-bottom: 18px; }
.appel p { color: #d8ccb6; font-size: 1.2rem; margin: 0 auto 40px; max-width: 620px; }

/* Le pied de page */
.pied { border-top: 1px solid var(--ligne); padding: 54px clamp(16px, 6vw, 96px) 40px; background: #080605; }
.pied-cadre { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center; }
.pied nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 0.95rem; }
.pied nav a { color: var(--doux); }
.pied nav a:hover { color: var(--or-clair); }
.pied small { display: block; width: 100%; color: #6f6556; margin-top: 26px; font-size: 0.85rem; }

/* --- Connexion et création de compte --- */

.page-compte { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.15fr 1fr; }
.compte-visuel { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; padding: 34px clamp(24px, 4vw, 56px); }
.diaporama { position: absolute; inset: 0; z-index: -2; }
.diaporama img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity 1.8s ease, transform 9s linear; }
.diaporama img.actif { opacity: 1; transform: scale(1.02); }
.compte-visuel::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 9, 7, 0.65), rgba(11, 9, 7, 0.05) 30%, rgba(11, 9, 7, 0.2) 55%, rgba(11, 9, 7, 0.95)), linear-gradient(90deg, transparent 70%, rgba(11, 9, 7, 0.75)); }
.legende-visuel { max-width: 520px; }
.legende-visuel h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin: 14px 0 12px; }
.legende-visuel p { margin: 0; color: #d8ccb6; }
.points-diaporama { display: flex; gap: 8px; margin-top: 26px; }
.points-diaporama span { width: 28px; height: 3px; border-radius: 3px; background: rgba(239, 230, 214, 0.25); overflow: hidden; }
.points-diaporama span.actif::after { content: ""; display: block; height: 100%; background: var(--or); animation: remplir 6s linear forwards; }
@keyframes remplir { from { width: 0; } to { width: 100%; } }

.compte-panneau {
  position: relative;
  display: grid;
  place-items: center;
  padding: 40px clamp(20px, 5vw, 72px);
  background: radial-gradient(ellipse at 50% 0%, rgba(224, 189, 110, 0.09), transparent 55%), linear-gradient(180deg, #110d0a, var(--nuit));
  border-left: 1px solid var(--ligne);
}
.carte-compte { width: 100%; max-width: 460px; animation: entree 1s var(--courbe) both; }
@keyframes entree { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.carte-compte h1 { font-size: clamp(1.9rem, 3vw, 2.4rem); margin: 14px 0 8px; }
.carte-compte > p { color: var(--doux); margin: 0 0 28px; }
.formulaire { display: grid; gap: 18px; }
.champ { display: grid; gap: 8px; }
.champ > span:first-child { font-family: var(--titre); font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: #cbbd9f; display: flex; justify-content: space-between; align-items: baseline; }
.champ > span:first-child a { font-family: var(--corps); text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.saisie { display: block; }
.saisie { position: relative; }
.saisie input {
  width: 100%;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1px solid rgba(224, 189, 110, 0.22);
  background: rgba(8, 6, 5, 0.75);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 1.05rem;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.saisie input::placeholder { color: #6f6556; }
.saisie input:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 4px rgba(224, 189, 110, 0.16); background: rgba(14, 11, 8, 0.95); }
.saisie input[aria-invalid="true"] { border-color: var(--sang); box-shadow: 0 0 0 4px rgba(217, 72, 59, 0.15); }
.saisie input[type="date"] { color-scheme: dark; }
.voir-mdp { position: absolute; right: 10px; top: 50%; translate: 0 -50%; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--doux); cursor: pointer; display: grid; place-items: center; }
.voir-mdp:hover { color: var(--or-clair); background: rgba(224, 189, 110, 0.08); }
.voir-mdp svg { width: 20px; height: 20px; }
.aide { font-size: 0.86rem; color: #8f8370; }
.force { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 2px; }
.force i { height: 4px; border-radius: 4px; background: rgba(239, 230, 214, 0.12); transition: background 0.4s; }
.force[data-niveau="1"] i:nth-child(-n+1) { background: var(--sang); }
.force[data-niveau="2"] i:nth-child(-n+2) { background: var(--braise); }
.force[data-niveau="3"] i:nth-child(-n+3) { background: var(--or); }
.force[data-niveau="4"] i { background: var(--vert); }
.accord { display: flex; gap: 12px; align-items: flex-start; font-size: 0.92rem; color: #c8bba3; line-height: 1.5; cursor: pointer; }
.accord input { flex: none; appearance: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 6px; border: 1px solid rgba(224, 189, 110, 0.45); background: rgba(8, 6, 5, 0.75); cursor: pointer; display: grid; place-items: center; transition: background 0.25s, border-color 0.25s; }
.accord input:checked { background: var(--or); border-color: var(--or); }
.accord input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--nuit); border-width: 0 2.5px 2.5px 0; rotate: 45deg; translate: 0 -1px; }
.accord input:focus-visible { outline: 2px solid var(--or-clair); outline-offset: 2px; }
.message { min-height: 1.4em; margin: 0; font-size: 0.95rem; }
.message.erreur { color: #ff8a7d; }
.message.ok { color: var(--vert); }
.formulaire .bouton { width: 100%; margin-top: 4px; }
.bouton[disabled] { opacity: 0.6; cursor: progress; }
.bouton .roue { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(36, 23, 7, 0.3); border-top-color: #241707; animation: tourne 0.8s linear infinite; display: none; }
.bouton.charge .roue { display: block; }
@keyframes tourne { to { rotate: 360deg; } }
.separateur { display: flex; align-items: center; gap: 16px; margin: 26px 0 18px; color: #6f6556; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.2em; font-family: var(--titre); }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--ligne); }
.fournisseurs-site { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fournisseurs-site button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(239, 230, 214, 0.14);
  background: rgba(239, 230, 214, 0.04);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--courbe);
}
.fournisseurs-site button:hover { border-color: rgba(224, 189, 110, 0.5); background: rgba(224, 189, 110, 0.07); transform: translateY(-2px); }
.fournisseurs-site svg { width: 18px; height: 18px; }
.bascule { text-align: center; margin: 28px 0 0; color: var(--doux); }
.haut-panneau { position: absolute; top: 22px; right: 30px; display: flex; align-items: center; gap: 18px; }
.retour-accueil { font-family: var(--titre); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--doux); }
.retour-accueil:hover { color: var(--or-clair); }
.etat-final { text-align: center; display: grid; justify-items: center; gap: 16px; }
.etat-final .sceau { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(224, 189, 110, 0.25), transparent 70%); color: var(--or-clair); animation: sceau 1.2s var(--courbe) both; }
.etat-final .sceau svg { width: 46px; height: 46px; }
@keyframes sceau { from { transform: scale(0.4) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.etat-final p { color: #cdbfa7; margin: 0; }
[hidden] { display: none !important; }

/* --- Petits écrans --- */

@media (max-width: 1100px) {
  .liste-classes { grid-template-columns: repeat(3, 1fr); }
  .chiffres { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  body { font-size: 17px; }
  .nav-liens { display: none; }
  .etapes { grid-template-columns: 1fr; }
  .rubrique, .rubrique.inverse { grid-template-columns: 1fr; }
  .rubrique.inverse .visuel { order: 0; }
  .visuel .vignette { width: 42%; right: -2%; bottom: -10%; }
  .rubrique.inverse .visuel .vignette { left: -2%; }
  .galerie { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; grid-auto-rows: 160px; grid-template-areas: "a a" "a a" "b c" "d c" "e f" "e g" "h h"; }
  .page-compte { grid-template-columns: 1fr; }
  .compte-visuel { position: relative; height: 240px; }
  .compte-visuel .legende-visuel { display: none; }
  .compte-panneau { border-left: 0; border-top: 1px solid var(--ligne); }
  .haut-panneau { top: auto; bottom: 18px; right: 50%; translate: 50% 0; }
}
@media (max-width: 560px) {
  .liste-classes { grid-template-columns: repeat(2, 1fr); }
  .chiffres { grid-template-columns: repeat(2, 1fr); }
  .nav-actions .lien-connexion { display: none; }
  .sur-grand { display: none; }
  .fournisseurs-site { grid-template-columns: 1fr; }
  .heros-actions .bouton { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .apparait { opacity: 1; transform: none; }
  .titre-jeu .lettre { opacity: 1; transform: none; }
}
.aide-contact { text-align: center; margin: 14px 0 0; }

/* Un fournisseur pas encore ouvert (Facebook, en attente de validation chez Meta) : grisé, avec son badge. */
.fournisseurs-site button.bientot { position: relative; color: #7d7466; border-style: dashed; cursor: not-allowed; }
.fournisseurs-site button.bientot:hover { transform: none; border-color: rgba(239, 230, 214, 0.14); background: rgba(239, 230, 214, 0.04); }
.fournisseurs-site button.bientot svg { filter: grayscale(1); opacity: 0.45; }
.badge-bientot { position: absolute; top: -9px; right: -6px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(180deg, var(--or-clair), var(--or)); color: #241707; font-family: var(--titre); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; box-shadow: 0 4px 12px -4px rgba(224, 189, 110, 0.6); }

/* --- Ta légende : les voies (héros, bandit, mercenaire, marchand) et l'échelle de réputation --- */
.voies { background: radial-gradient(ellipse at 50% 30%, rgba(217, 72, 59, 0.10), transparent 60%), linear-gradient(180deg, var(--nuit), #120b09 50%, var(--nuit)); }
.liste-voies { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 60px; text-align: left; }
.voie {
  position: relative;
  padding: 30px 26px 28px;
  border: 1px solid var(--ligne);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(36, 28, 21, 0.85), rgba(14, 11, 8, 0.95));
  transition: transform 0.6s var(--courbe), border-color 0.6s, box-shadow 0.6s;
}
.voie:hover { transform: translateY(-10px); border-color: rgba(224, 189, 110, 0.5); box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.9); }
.voie-icone { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px; background: rgba(224, 189, 110, 0.1); color: var(--or-clair); }
.voie-icone svg { width: 28px; height: 28px; }
.voie h3 { font-size: 1.3rem; margin-bottom: 10px; }
.voie p { margin: 0; color: #cdbfa7; font-size: 0.98rem; }
.voie-sombre { border-color: rgba(217, 72, 59, 0.35); background: linear-gradient(180deg, rgba(48, 20, 16, 0.9), rgba(16, 9, 7, 0.95)); }
.voie-sombre:hover { border-color: rgba(255, 120, 100, 0.6); box-shadow: 0 30px 60px -25px rgba(120, 20, 10, 0.6); }
.voie-sombre .voie-icone { background: rgba(217, 72, 59, 0.16); color: #ff8a7d; }
.reputation { margin: 70px auto 0; max-width: 1080px; }
.echelle { height: 6px; border-radius: 6px; background: linear-gradient(90deg, #8f1d14, var(--sang) 18%, #6f6556 45%, var(--or) 80%, var(--or-clair)); box-shadow: 0 0 24px rgba(224, 189, 110, 0.25); position: relative; }
.echelle i { position: absolute; left: 45%; top: 50%; width: 16px; height: 16px; translate: -50% -50%; border-radius: 50%; background: var(--texte); box-shadow: 0 0 0 4px rgba(239, 230, 214, 0.2); animation: curseur 6s ease-in-out infinite; }
@keyframes curseur { 0%, 100% { left: 45%; } 30% { left: 92%; } 65% { left: 8%; } }
.titres-reputation { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 14px 0 0; padding: 0; list-style: none; font-family: var(--titre); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--doux); }
.titres-reputation li { text-align: center; line-height: 1.3; }
.titres-reputation .rouge, .rouge { color: #ff8a7d; }
.titres-reputation .milieu { color: var(--texte); }
.titres-reputation .sommet { color: var(--or-clair); }
.note-reputation { margin: 28px auto 0; max-width: 760px; color: #d8ccb6; }
@media (max-width: 1100px) { .liste-voies { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  .liste-voies { grid-template-columns: 1fr; }
  .titres-reputation { grid-template-columns: repeat(5, 1fr); row-gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .echelle i { animation: none; } }
