/* ===== Thème v12 : couche de finition (se charge après style.css) ===== */
:root {
  --bg: #050e12; --surface: #0c1b20; --surface2: #12282e; --line: #1f3d44;
  --text: #f5f2ff; --muted: #8fb3b0;
  --accent: #2dd4bf; --accent2: #38bdf8; --foil: #f5c451;
  --glass: rgba(22, 18, 52, .72);
  --shadow: 0 18px 44px -18px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  --grad: linear-gradient(135deg, #34e0b4 0%, #22c3d6 55%, #4aa8f8 100%);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ring: 0 0 0 3px rgba(45, 212, 191, .3);
}
body {
  background:
    radial-gradient(1000px 560px at 88% -10%, rgba(45, 212, 191, .30), transparent 70%),
    radial-gradient(820px 520px at 2% 8%, rgba(56, 189, 248, .14), transparent 70%),
    radial-gradient(900px 600px at 50% 120%, rgba(60, 90, 220, .16), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; }
::selection { background: rgba(45, 212, 191, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1f3d44; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ----- En-tête ----- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(8, 6, 24, .72); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(45, 212, 191, .18);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .9);
}
.logo { display: inline-flex; align-items: center; gap: .45rem; color: var(--text); font-size: 1.25rem; letter-spacing: -.02em; }
.logo em {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.logoMark { color: var(--foil); filter: drop-shadow(0 0 8px rgba(255, 211, 107, .7)); }
nav { gap: .25rem; }
.tab {
  position: relative; border-radius: 999px; padding: .5rem 1rem; font-weight: 600; font-size: .95rem;
  color: var(--muted); transition: color .2s, background .2s;
}
.tab:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.tab.active { color: #fff; background: rgba(45, 212, 191, .2); box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .45); }
.who { gap: .8rem; font-size: .92rem; }
#whoName {
  padding: .3rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08); font-weight: 600;
}
.who a { color: var(--foil); text-decoration: none; font-weight: 600; }
.who a:hover { text-decoration: underline; }
.link { transition: color .2s; }
.link:hover { color: var(--text); }

/* ----- Boutons et champs ----- */
.btn {
  border-radius: 12px; font-weight: 700; letter-spacing: .01em; border: 0;
  background: var(--grad); box-shadow: 0 10px 26px -10px rgba(34, 195, 214, .75);
}
.btn.wide { width: 100%; padding: .85rem 1rem; font-size: 1rem; margin-top: .4rem; }
.btn.ghost { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12); }
input, select, textarea {
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(6, 5, 20, .7); border-radius: 12px;
  padding: .75rem .9rem; color: var(--text);
}
input::placeholder { color: #5f8582; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
label { font-weight: 600; font-size: .85rem; letter-spacing: .02em; }

/* ----- Panneaux et titres ----- */
.panel, .quest, .modalBox, .authCard {
  background: var(--glass); border: 1px solid rgba(45, 212, 191, .2); border-radius: 20px; box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.panel { padding: 1.4rem; }
.view h2 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin-bottom: .2em; }
.view > h3, .panel h3 { margin-top: 1.2em; padding-bottom: .4em; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.view { animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.chip { border-radius: 999px; }
.quest { transition: transform .2s, border-color .2s; }
.quest:hover { transform: translateY(-2px); border-color: rgba(45, 212, 191, .5); }

/* ----- Cartes ----- */
.card { border-radius: 14px; }
.grid { gap: 1.1rem; }
.grid .card:not(.unknown):hover { filter: brightness(1.08) saturate(1.1); }
.modal { background: rgba(4, 3, 14, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.toast { border-radius: 14px; background: rgba(20, 16, 48, .95); border: 1px solid rgba(45, 212, 191, .4); box-shadow: var(--shadow); }

/* ----- Page de connexion ----- */
.authSplit {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
  max-width: 1020px; margin: 5vh auto 0;
}
.authSplit[hidden] { display: none; }
.authBrand { padding: 1rem 0; }
.authBrand .eyebrow { color: var(--accent2); font-weight: 700; }
.authBrand .heroName { text-align: left; font-size: clamp(2.6rem, 6vw, 4.2rem); margin: .1em 0 .3em; }
.authBrand .heroName em { padding-left: 0; letter-spacing: .45em; font-size: .5em; }
.tagline { font-size: 1.15rem; color: var(--muted); line-height: 1.5; margin: 0 0 1.8rem; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.perks li { display: flex; gap: .9rem; align-items: center; }
.perks .pi {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-size: 1.3rem;
  background: rgba(45, 212, 191, .14); border: 1px solid rgba(45, 212, 191, .3);
}
.perks b { display: block; font-size: .98rem; }
.perks small { color: var(--muted); font-size: .85rem; }
.authCard { padding: 1.6rem; position: relative; }
.authCard::before {
  content: ''; position: absolute; inset: -1px; border-radius: 21px; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(45, 212, 191, .7), transparent 40%, rgba(56, 189, 248, .5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.authTabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(6, 5, 20, .7); margin-bottom: 1.2rem; }
.authTabs button {
  border: 0; border-radius: 10px; padding: .6rem .3rem; cursor: pointer; font: inherit; font-weight: 700; font-size: .9rem; white-space: nowrap;
  color: var(--muted); background: transparent; transition: all .2s;
}
.authTabs button.on { color: #fff; background: var(--grad); box-shadow: 0 6px 16px -8px rgba(34, 195, 214, .9); }
.googleBtn {
  display: flex; align-items: center; justify-content: center; gap: .7rem; margin: 0 0 .2rem;
  padding: .8rem 1rem; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: .98rem;
  background: #fff; color: #1f1f2e; border: 0; transition: transform .15s, box-shadow .2s;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .7);
}
.googleBtn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(255, 255, 255, .35); }
.sep { display: flex; align-items: center; gap: .8rem; margin: 1.1rem 0 1rem; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.sep::before, .sep::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, .1); }
.sep[hidden], .googleBtn[hidden] { display: none; }
.pw { position: relative; display: block; margin-top: .3rem; }
.pw input { margin-top: 0; padding-right: 2.8rem; }
.pwBtn { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; font-size: 1.05rem; padding: .4rem; opacity: .65; }
.pwBtn:hover { opacity: 1; }
.pseudoWrap { max-width: 460px; margin: 8vh auto 0; }
.pseudoWrap .hero { margin-bottom: 1.2rem; }
.pseudoWrap h1 { font-size: clamp(1.5rem, 4vw, 2rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hint { color: var(--muted); font-size: .84rem; margin: .5rem 0 .2rem; }

/* ----- Pied de page ----- */
.foot { text-align: center; padding: 1.4rem 1rem 1.8rem; color: #5f8582; font-size: .82rem; border-top: 1px solid rgba(255, 255, 255, .05); }

/* ----- Mobile ----- */
@media (max-width: 820px) {
  .authSplit { grid-template-columns: 1fr; margin-top: 2vh; }
  .authBrand { text-align: center; padding: 0; }
  .authBrand .heroName { text-align: center; }
  .authBrand .heroName em { padding-left: .45em; }
  .tagline { margin-bottom: 0; }
  .perks { display: none; }
  .authCard { padding: 1.3rem; }
}
@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: .5rem; }
  nav { order: 3; width: 100%; overflow-x: auto; }
  .tab { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }

.dangerZone { border-color: rgba(255, 107, 122, .4); }
.dangerZone h3 { color: #ff8b97; }

/* ----- Palette « émeraude & or » : contrastes et finitions ----- */
.btn:not(.ghost):not(.danger), .authTabs button.on, .chip.active { color: #03231f; }
.btn.danger { color: #fff; }
.logoMark { color: var(--foil); }
h1, h2, h3, .logo, .heroName { font-weight: 700; letter-spacing: -.015em; }
.heroName { font-weight: 800; }
.tab.active { color: #d7fff6; }
.authBrand .eyebrow { color: var(--accent); }
.pseudoWrap h1 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.perks .pi { background: rgba(45, 212, 191, .1); border-color: rgba(45, 212, 191, .28); }
.googleBtn { color: #14201f; }
body {
  background:
    radial-gradient(1000px 560px at 85% -10%, rgba(45, 212, 191, .16), transparent 70%),
    radial-gradient(820px 520px at 0% 10%, rgba(245, 196, 81, .07), transparent 70%),
    radial-gradient(900px 600px at 50% 120%, rgba(56, 189, 248, .10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
.top { background: rgba(5, 14, 18, .78); border-bottom-color: rgba(45, 212, 191, .16); }
.panel, .quest, .modalBox, .authCard { background: rgba(12, 27, 32, .78); border-color: rgba(45, 212, 191, .16); }
.bar div { background: linear-gradient(90deg, #2dd4bf, #38bdf8, #f5c451); }
