/* Page de connexion, chargée après aventure.css */

.cx {
  --cx-accent: #1a90f2;
  --cx-sur-accent: #04143a;
  --cx-carte: #142238;
  --cx-bord: #2c405e;
  --cx-titre: #f8fafc;
  --cx-doux: #aeb9ca;
  --cx-label: #e7ecf4;
  --cx-champ: #1c2c46;
  --cx-champ-survol: #20314e;
  --cx-champ-bord: #354b6d;
  --cx-champ-bord-survol: #496182;
  --cx-icone: #afbacb;
  --cx-texte: #f6f8fb;
  --cx-indice: #8795ab;
  --cx-erreur: #ff8ca0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  width: min(1176px, calc(100% - 32px));
  margin: 120px auto 64px;
  overflow: hidden;
  border: 1px solid var(--cx-bord);
  border-radius: 26px;
  box-shadow: 0 28px 60px rgb(4 10 28 / .42);
}
html[data-theme="clair"] .cx {
  --cx-carte: #fff;
  --cx-bord: #dfe5ee;
  --cx-titre: #13203e;
  --cx-doux: #55627e;
  --cx-label: #33415e;
  --cx-champ: #f1f4f9;
  --cx-champ-survol: #fff;
  --cx-champ-bord: #cdd6e3;
  --cx-champ-bord-survol: #9dbbdf;
  --cx-icone: #55627e;
  --cx-texte: #13203e;
  --cx-indice: #6c7a94;
  --cx-erreur: #b5301a;
}

/* Volet de présentation : le décor animé du site reste visible à travers */
.cx-intro {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 5.4vw, 64px);
  color: #fff;
  background:
    radial-gradient(circle at 85% 8%, rgb(26 144 242 / .26), transparent 50%),
    linear-gradient(160deg, rgb(7 15 34 / .74), rgb(7 15 34 / .93));
}
.cx-tete {
  position: relative;
  width: 112px;
  height: 112px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: 24px;
  background: rgb(11 22 46 / .86);
}
.cx-skin,
.cx-skin-vide { display: block; width: 100%; height: 100%; }
.cx-skin { object-fit: cover; image-rendering: pixelated; }
.cx-skin-vide { display: grid; place-items: center; }
.cx-skin-vide img { width: 76px; height: 76px; object-fit: contain; }

.cx-apercu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 18px 0 0;
  padding: 6px 14px;
  border: 1px solid rgb(127 200 255 / .5);
  border-radius: 999px;
  color: #8fd2ff;
  background: rgb(26 144 242 / .14);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.cx-apercu::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--cx-accent); }
.cx-apercu.est-pseudo { letter-spacing: .02em; text-transform: none; }

html body.aventure .cx-intro h1 {
  margin: 20px 0 14px;
  color: #fff;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.02;
}
.cx-intro-texte { margin: 0; color: #c4cfe2; line-height: 1.6; }

.cx-aide { margin-top: auto; padding-top: 32px; }
html body.aventure .cx-aide h2 { margin: 0 0 12px; color: #fff; font-size: 1.15rem; line-height: 1.2; }
.cx-aide ol { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: cx-etape; }
.cx-aide li { display: flex; gap: 10px; color: #c4cfe2; font-size: .9rem; counter-increment: cx-etape; }
.cx-aide li > div { min-width: 0; }
.cx-aide li::before {
  content: counter(cx-etape);
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--cx-sur-accent);
  background: var(--cx-accent);
  font-size: .8rem;
  font-weight: 600;
}
.cx-aide strong { color: #fff; font-weight: 600; }
.cx-aide code {
  display: block;
  margin-top: 6px;
  padding: 7px 10px;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 8px;
  color: #dbe8fa;
  background: rgb(11 22 46 / .8);
  font-size: .8rem;
  overflow-wrap: anywhere;
}

/* Carte du formulaire */
.cx-carte {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(30px, 5vw, 56px) clamp(20px, 5vw, 52px);
  border-left: 1px solid var(--cx-bord);
  background: var(--cx-carte);
}
.cx-carte::after {
  content: "";
  position: absolute;
  right: -72px;
  bottom: -96px;
  width: 230px;
  height: 230px;
  border: 1px solid rgb(26 144 242 / .16);
  border-radius: 38px;
  pointer-events: none;
  transform: rotate(22deg);
}
.cx-form,
.cx-compte { position: relative; z-index: 1; }

.cx-entete { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; margin-bottom: 26px; }
.cx-marque {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cx-accent) 72%, white);
  border-radius: 15px;
  color: var(--cx-sur-accent);
  background: var(--cx-accent);
  box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--cx-accent) 78%, black), 0 13px 28px color-mix(in srgb, var(--cx-accent) 20%, transparent);
}
.cx-marque img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
html body.aventure .cx-entete h2 {
  margin: 0;
  color: var(--cx-titre);
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.cx-entete p { margin: 7px 0 0; color: var(--cx-doux); font-size: .84rem; line-height: 1.45; }


.cx-form { display: grid; gap: 18px; }
.cx-groupe { display: grid; gap: 8px; }
.cx-groupe > label { color: var(--cx-label); font-size: .76rem; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; }
.cx-champ {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 56px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--cx-champ-bord);
  border-radius: 13px;
  color: var(--cx-icone);
  background: var(--cx-champ);
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.cx-champ:hover { border-color: var(--cx-champ-bord-survol); background: var(--cx-champ-survol); }
.cx-champ:focus-within {
  border-color: var(--cx-accent);
  background: var(--cx-champ-survol);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cx-accent) 18%, transparent);
}
.cx-icone { display: grid; place-items: center; width: 50px; height: 100%; }
.cx-form.a-skin .cx-icone-pseudo svg { visibility: hidden; }
.cx-skin-mini { position: absolute; top: 50%; left: 12px; width: 26px; height: 26px; border-radius: 6px; image-rendering: pixelated; transform: translateY(-50%); pointer-events: none; }
.cx-champ input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--cx-texte);
  background: transparent;
  font: inherit;
  font-size: .94rem;
}
.cx-champ input::placeholder { color: var(--cx-indice); }
.cx-champ input:-webkit-autofill,
.cx-champ input:-webkit-autofill:hover,
.cx-champ input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--cx-texte);
  box-shadow: 0 0 0 1000px var(--cx-champ-survol) inset;
}
.cx-voir {
  display: grid;
  place-items: center;
  width: 48px;
  height: 54px;
  padding: 0;
  border: 0;
  color: var(--cx-indice);
  background: transparent;
}
.cx-voir:hover { color: var(--cx-accent); }
.cx-voir[aria-pressed="true"] .cx-oeil-barre { display: none; }

/* Case à cocher */
.cx-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--cx-doux);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.cx-option input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.cx-case {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border: 1px solid var(--cx-champ-bord);
  border-radius: 7px;
  background: var(--cx-champ);
  box-shadow: inset 0 1px #ffffff0a;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.cx-case > span {
  width: 9px;
  height: 5px;
  box-sizing: content-box;
  border-bottom: 2px solid var(--cx-sur-accent);
  border-left: 2px solid var(--cx-sur-accent);
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg) scale(.6);
  transition: opacity .14s, transform .14s;
}
.cx-option:hover .cx-case { border-color: var(--cx-champ-bord-survol); background: var(--cx-champ-survol); }
.cx-option input:checked + .cx-case {
  border-color: color-mix(in srgb, var(--cx-accent) 78%, white);
  background: var(--cx-accent);
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--cx-accent) 80%, black), 0 7px 18px color-mix(in srgb, var(--cx-accent) 20%, transparent);
}
.cx-option input:checked + .cx-case > span { opacity: 1; transform: translateY(-1px) rotate(-45deg) scale(1); }
.cx-option input:focus-visible + .cx-case { box-shadow: 0 0 0 4px color-mix(in srgb, var(--cx-accent) 22%, transparent); }
.cx-option-texte { display: grid; gap: 2px; }
.cx-option strong { color: var(--cx-label); font-size: .82rem; font-weight: 600; line-height: 1.25; }
.cx-option small { font-size: .72rem; line-height: 1.3; }

.cx-message { margin: 0; color: var(--cx-erreur); font-size: .84rem; font-weight: 600; line-height: 1.45; }

.cx-bouton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 57px;
  box-sizing: border-box;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--cx-accent) 78%, white);
  border-radius: 13px;
  color: var(--cx-sur-accent);
  background: linear-gradient(180deg, #4cc6f7, #1a90f2);
  font: inherit;
  font-size: .96rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 #0a63c9, 0 12px 26px rgb(26 144 242 / .28);
  transition: filter .16s, box-shadow .2s, transform .16s;
}
.cx-bouton:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }
.cx-bouton:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 -1px 0 #0a63c9; }
.cx-bouton:disabled { cursor: not-allowed; opacity: .68; }
.cx-secondaire {
  border-color: var(--cx-champ-bord);
  color: var(--cx-texte);
  background: var(--cx-champ);
  box-shadow: none;
}
.cx-secondaire:active:not(:disabled) { box-shadow: none; }
.cx-compte { display: grid; gap: 14px; }
.cx-compte .cx-entete { margin-bottom: 8px; }

@media (max-width: 900px) {
  .cx { grid-template-columns: minmax(0, 1fr); margin-top: 100px; }
  .cx-carte { order: -1; border-bottom: 1px solid var(--cx-bord); border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-champ, .cx-case, .cx-case > span, .cx-bouton { transition: none; }
}

/* Présentation : formulaire à gauche, sans encadrés superflus */
.cx { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); width: min(1080px, calc(100% - 32px)); }
.cx-intro { order: 2; }
.cx-carte {
  order: 1;
  border-right: 1px solid var(--cx-bord);
  border-left: 0;
  box-shadow: inset 0 4px 0 var(--cx-accent);
}
.cx-carte::after { display: none; }
.cx-entete { display: block; margin-bottom: 8px; }
html body.aventure .cx-entete h2 { font-size: clamp(2rem, 3.4vw, 2.6rem); }
.cx-entete p { margin-top: 8px; font-size: .96rem; }
.cx-compte .cx-entete { display: grid; }
.cx-groupe > label { font-size: .9rem; letter-spacing: 0; text-transform: none; }
.cx-champ { border-radius: 14px; }
.cx-bouton { font-size: 1rem; }
html body.aventure .cx-intro h1 { font-size: clamp(2.2rem, 4.6vw, 3.3rem); line-height: 1.06; }
@media (max-width: 900px) {
  .cx { grid-template-columns: minmax(0, 1fr); }
  .cx-carte { order: -1; border-right: 0; }
  .cx-intro { order: 0; }
}
