@font-face {
  font-family: "Rubik";
  src: url("rubik-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ghost: #F8F8FF;
  --blanc: #FFFFFF;
  --erebus: #12012D;
  --nuit: #1C0B3A;
  --er80: #413457;
  --er60: #716781;
  --er20: #D0CCD5;
  --er10: #E9E6EE;
  --violet: #5B26FE;
  --violet-fonce: #4816E6;
  --lavande: #C9C2FF;
  --lavande-pale: #EFEDFF;
  --cyan: #1AECDE;
  --butter: #F3FF55;
  --butter-pale: #FBFFD4;
  --anneau: 0 0 0 3px rgba(91, 38, 254, 0.2);
  --rayon: 4px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--lavande-pale);
  color: var(--erebus);
  font-family: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.kx-masque {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.kx-evitement {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--erebus); color: var(--blanc); padding: 10px 14px; border-radius: var(--rayon);
}
.kx-evitement:focus { top: 12px; }

.kx-haut {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 32px;
}
.kx-logo { display: inline-flex; align-items: center; gap: 9px; color: var(--erebus); }
.kx-logo:hover { text-decoration: none; }
.kx-logo svg { width: 28px; height: 28px; color: var(--violet); }
.kx-logo span { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }

.kx-aide-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  background: var(--blanc); border: 1px solid var(--er20); border-radius: var(--rayon);
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.kx-aide-btn:hover { border-color: var(--er60); }
.kx-aide-btn svg { width: 18px; height: 18px; color: var(--violet); }

.kx-scene {
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 452px;
  gap: 72px; align-items: start;
  padding: 4px 32px 24px;
}

.kx-promo { min-width: 0; padding-top: 40px; }
.kx-etiquette {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 8px;
  background: var(--blanc); border: 1px solid var(--er10); border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--er80);
}
.kx-etiquette b {
  padding: 2px 8px; border-radius: 999px;
  background: var(--violet); color: var(--blanc); font-weight: 500; font-size: 12px;
}
.kx-promo h2 {
  margin: 20px 0 0; max-width: 560px;
  font-size: 44px; line-height: 1.08; font-weight: 500; letter-spacing: -0.028em;
}
.kx-promo h2 em { font-style: normal; color: var(--violet); }
.kx-promo > p {
  margin: 18px 0 0; max-width: 470px;
  font-size: 17px; line-height: 1.55; color: var(--er80);
}
.kx-promo__lien {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  font-weight: 500;
}
.kx-promo__lien svg { width: 16px; height: 16px; }

.kx-ecran {
  margin-top: 30px; max-width: 580px;
  background: var(--ghost); border: 1px solid var(--er20); border-radius: 14px; overflow: hidden;
}
.kx-ecran__barre {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 44px; padding: 0 16px;
  background: var(--blanc); border-bottom: 1px solid var(--er10);
  font-size: 13px;
}
.kx-ecran__fil { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.kx-ecran__fil svg { width: 16px; height: 16px; color: var(--violet); flex: none; }
.kx-ecran__fil b { font-weight: 600; }
.kx-ecran__fil span { color: var(--er60); overflow: hidden; text-overflow: ellipsis; }
.kx-pastille {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 4px 12px; border-radius: 999px;
  background: var(--violet); color: var(--blanc); font-size: 11px; font-weight: 500;
}
.kx-pastille svg { width: 12px; height: 12px; }
.kx-ecran__corps { display: grid; gap: 12px; padding: 16px; }

.kx-indics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kx-indic {
  padding: 11px 13px; background: var(--blanc);
  border: 1px solid var(--er10); border-radius: 12px;
}
.kx-indic p { margin: 0; font-size: 11.5px; color: var(--er60); }
.kx-indic strong {
  display: block; margin-top: 3px;
  font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15;
}
.kx-indic small { display: inline-block; margin-top: 4px; font-size: 11px; color: var(--er80); }
.kx-indic small.kx-attention {
  padding: 1px 6px; border-radius: var(--rayon); background: var(--butter); color: var(--erebus); font-weight: 500;
}

.kx-question {
  justify-self: end; max-width: 80%;
  padding: 9px 14px; background: var(--blanc);
  border: 1px solid var(--er10); border-radius: 12px 12px 4px 12px;
  font-size: 14px;
}
.kx-question b { color: var(--violet); font-weight: 500; }

.kx-reponse {
  padding: 15px 16px; border-radius: 12px;
  background: var(--violet); color: var(--blanc);
}
.kx-reponse__tete {
  display: flex; justify-content: space-between; gap: 12px;
  margin: 0; font-size: 11.5px; color: rgba(255, 255, 255, 0.82);
}
.kx-reponse__texte {
  margin: 8px 0 0; min-height: 3.6em;
  font-size: 17px; line-height: 1.3; font-weight: 500; letter-spacing: -0.012em;
}
.kx-reponse__pied {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 12px 0 0; font-size: 11.5px;
}
.kx-reponse__source { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.85); }
.kx-reponse__source svg { width: 13px; height: 13px; }
.kx-reponse__action {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--blanc); color: var(--violet); font-weight: 500;
}
.kx-reponse__action svg { width: 12px; height: 12px; }

.kx-points { display: inline-flex; gap: 4px; padding: 6px 0; }
.kx-points i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--blanc); opacity: 0.4;
  animation: kx-point 1s infinite ease-in-out;
}
.kx-points i:nth-child(2) { animation-delay: 0.15s; }
.kx-points i:nth-child(3) { animation-delay: 0.3s; }
@keyframes kx-point { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.kx-apparait { opacity: 0; transform: translateY(6px); transition: opacity 0.4s ease, transform 0.4s ease; }
.kx-apparait.kx-vu { opacity: 1; transform: none; }

.kx-carte {
  width: 100%;
  background: var(--blanc); border: 1px solid var(--er10); border-radius: 12px;
  padding: 34px 36px;
}
.kx-carte h1 {
  margin: 0; font-size: 30px; line-height: 1.15; font-weight: 500; letter-spacing: -0.022em;
}
.kx-carte__intro { margin: 8px 0 0; color: var(--er80); font-size: 15px; }
.kx-carte__intro strong { display: inline-block; max-width: 100%; color: var(--erebus); font-weight: 500; overflow-wrap: anywhere; }

.kx-retour {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 18px; padding: 0; background: none; border: 0;
  font-size: 14px; font-weight: 500; color: var(--er80); cursor: pointer;
}
.kx-retour:hover { color: var(--erebus); text-decoration: none; }
.kx-retour svg { width: 16px; height: 16px; }

.kx-pile { display: grid; gap: 10px; margin-top: 24px; }
.kx-pile .kx-btn--trait { height: 44px; }

.kx-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 48px; padding: 0 18px;
  border-radius: var(--rayon); border: 1px solid transparent;
  font-size: 15px; font-weight: 500; line-height: 1; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.kx-btn:hover { text-decoration: none; }
.kx-btn svg { width: 18px; height: 18px; flex: none; }
.kx-btn--plein { background: var(--violet); color: var(--blanc); }
.kx-btn--plein:hover { background: var(--violet-fonce); }
.kx-btn--trait { background: var(--blanc); color: var(--erebus); border-color: var(--er20); }
.kx-btn--trait:hover { border-color: var(--er60); background: var(--ghost); }
.kx-btn[disabled] { cursor: default; }
.kx-btn--plein[disabled] { background: var(--violet); opacity: 0.72; }
.kx-btn--trait[disabled] { background: var(--ghost); color: var(--er60); }
.kx-btn .kx-roue { display: none; }
.kx-btn.kx-attente .kx-roue { display: block; }
.kx-btn.kx-attente .kx-icone-btn { display: none; }

.kx-roue {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: kx-tour 0.7s linear infinite;
}
@keyframes kx-tour { to { transform: rotate(360deg); } }

.kx-ou {
  display: flex; align-items: center; gap: 14px; margin: 18px 0;
  font-size: 13px; color: var(--er60);
}
.kx-ou::before, .kx-ou::after { content: ""; flex: 1; height: 1px; background: var(--er10); }

.kx-form { display: grid; gap: 16px; }
.kx-form--seul { margin-top: 28px; }

.kx-champ { display: grid; gap: 7px; }
.kx-champ__tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.kx-champ label { font-size: 14px; font-weight: 500; color: var(--er80); }
.kx-champ__tete a { font-size: 14px; font-weight: 500; }
.kx-saisie { position: relative; }
.kx-saisie input {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--blanc); color: var(--erebus);
  border: 1px solid var(--er20); border-radius: var(--rayon);
  font: inherit; font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kx-saisie input::placeholder { color: #9A93A6; }
.kx-saisie input:hover { border-color: var(--er60); }
.kx-saisie input:focus { outline: none; border-color: var(--violet); box-shadow: var(--anneau); }
.kx-saisie input[aria-invalid="true"] { border-color: var(--erebus); box-shadow: inset 0 0 0 1px var(--erebus); }
.kx-saisie--mdp input { padding-right: 52px; }
.kx-oeil {
  position: absolute; right: 4px; top: 4px;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--rayon); color: var(--er60); cursor: pointer;
}
.kx-oeil:hover { color: var(--erebus); background: var(--ghost); }
.kx-oeil svg { width: 20px; height: 20px; }

.kx-erreur {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 0; font-size: 13.5px; color: var(--erebus);
}
.kx-erreur::before {
  content: "!"; flex: none;
  width: 17px; height: 17px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--butter); font-size: 11px; font-weight: 700; line-height: 1;
}
.kx-erreur:empty { display: none; }

.kx-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kx-ligne__lien { font-size: 14px; font-weight: 500; }
.kx-case { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--er80); cursor: pointer; }
.kx-case input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 18px; height: 18px; border: 1px solid var(--er20); border-radius: 3px; background: var(--blanc);
  display: grid; place-items: center; cursor: pointer;
}
.kx-case input:checked { background: var(--violet); border-color: var(--violet); }
.kx-case input:checked::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px;
  border-left: 2px solid var(--blanc); border-bottom: 2px solid var(--blanc); transform: rotate(-45deg);
}
.kx-case input:focus-visible { box-shadow: var(--anneau); outline: none; }

.kx-lien-btn {
  justify-self: center; padding: 4px; background: none; border: 0;
  font-size: 14px; font-weight: 500; color: var(--violet); cursor: pointer;
}
.kx-lien-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.kx-lien-btn[disabled] { color: var(--er60); cursor: default; text-decoration: none; }

.kx-bas-carte {
  margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--er10);
  text-align: center; font-size: 14px; color: var(--er80);
}
.kx-bas-carte a { font-weight: 500; }

.kx-alerte {
  display: grid; gap: 10px;
  margin: 0 0 22px; padding: 16px 18px;
  background: var(--butter-pale); border: 1px solid #E3EA8F; border-radius: 8px;
  font-size: 14px; color: var(--er80);
}
.kx-alerte:focus { outline: none; }
.kx-alerte__titre {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0; font-size: 15px; font-weight: 500; color: var(--erebus);
}
.kx-alerte__titre::before {
  content: "!"; flex: none; margin-top: 1px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--butter); border: 1px solid #D6DE3F;
  font-size: 12px; font-weight: 700; line-height: 1;
}
.kx-alerte p { margin: 0; }
.kx-alerte__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 4px; }
.kx-alerte__cta {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px; border-radius: var(--rayon);
  background: var(--erebus); color: var(--blanc); font-weight: 500; font-size: 14px;
}
.kx-alerte__cta:hover { background: var(--nuit); text-decoration: none; }
.kx-alerte__cta svg { width: 15px; height: 15px; }
.kx-alerte__note { font-size: 12.5px; color: var(--er60); }

.kx-sceau {
  width: 52px; height: 52px; margin-bottom: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--lavande-pale); color: var(--violet);
}
.kx-sceau svg { width: 24px; height: 24px; }
.kx-liste-conseils {
  display: grid; gap: 8px; margin: 22px 0 0; padding: 16px 18px;
  list-style: none; background: var(--ghost); border: 1px solid var(--er10); border-radius: 8px;
  font-size: 14px; color: var(--er80);
}
.kx-liste-conseils li { display: flex; gap: 10px; }
.kx-liste-conseils svg { width: 16px; height: 16px; margin-top: 3px; flex: none; color: var(--violet); }

.kx-code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.kx-code input {
  width: 100%; height: 56px; padding: 0;
  text-align: center; font: inherit; font-size: 22px; font-weight: 500;
  background: var(--blanc); color: var(--erebus);
  border: 1px solid var(--er20); border-radius: var(--rayon);
  font-variant-numeric: tabular-nums;
}
.kx-code input:focus { outline: none; border-color: var(--violet); box-shadow: var(--anneau); }
.kx-code[aria-invalid="true"] input { border-color: var(--erebus); }
.kx-code input:nth-child(3) { margin-right: 10px; }
.kx-minuteur { margin: 0; text-align: center; font-size: 14px; color: var(--er60); }

.kx-etapes { display: grid; gap: 0; margin: 26px 0 0; padding: 0; list-style: none; counter-reset: etape; }
.kx-etapes li {
  position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 14px;
  padding-bottom: 20px;
}
.kx-etapes li:last-child { padding-bottom: 0; }
.kx-etapes li::before {
  counter-increment: etape; content: counter(etape);
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--lavande-pale); color: var(--violet); font-weight: 500; font-size: 14px;
}
.kx-etapes li:not(:last-child)::after {
  content: ""; position: absolute; left: 15.5px; top: 36px; bottom: 4px; width: 1px; background: var(--er10);
}
.kx-etapes h3 { margin: 4px 0 0; font-size: 16px; font-weight: 500; }
.kx-etapes p { margin: 3px 0 0; font-size: 14px; color: var(--er80); }
.kx-note-cta { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--er60); }

.kx-pied {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding: 14px 32px 18px; font-size: 13px; color: var(--er60);
}
.kx-pied nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.kx-pied a { color: var(--er60); }
.kx-pied a:hover { color: var(--erebus); }
.kx-pied__chiffre { display: inline-flex; align-items: center; gap: 6px; }
.kx-pied__chiffre svg { width: 14px; height: 14px; }

.kx-panneau {
  margin: 0 0 0 auto; padding: 0; border: 0;
  width: min(440px, 100vw); height: 100vh; height: 100dvh; max-height: none; max-width: 100vw;
  background: var(--blanc); color: var(--erebus);
}
.kx-panneau[open] { display: flex; flex-direction: column; animation: kx-glisse 0.22s ease-out; }
.kx-panneau::backdrop { background: rgba(18, 1, 45, 0.36); }
@keyframes kx-glisse { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.kx-panneau__tete {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--er10);
}
.kx-panneau__tete p { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.kx-panneau__tete p svg { width: 20px; height: 20px; color: var(--violet); }
.kx-fermer {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--rayon); color: var(--er80); cursor: pointer;
}
.kx-fermer:hover { background: var(--ghost); color: var(--erebus); }
.kx-fermer svg { width: 20px; height: 20px; }
.kx-panneau__corps { flex: 1; overflow-y: auto; padding: 26px 24px 32px; }
.kx-panneau h2 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.kx-panneau__intro { margin: 6px 0 22px; color: var(--er80); font-size: 15px; }
.kx-sujet { border: 1px solid var(--er10); border-radius: 8px; background: var(--blanc); }
.kx-sujet + .kx-sujet { margin-top: 8px; }
.kx-sujet summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 500;
}
.kx-sujet summary::-webkit-details-marker { display: none; }
.kx-sujet summary svg { width: 18px; height: 18px; flex: none; color: var(--er60); transition: transform 0.2s ease; }
.kx-sujet[open] summary svg { transform: rotate(180deg); }
.kx-sujet summary:hover { background: var(--ghost); border-radius: 8px; }
.kx-sujet__texte { padding: 0 16px 16px; font-size: 14px; color: var(--er80); }
.kx-sujet__texte p { margin: 0; }
.kx-sujet__texte p + p { margin-top: 8px; }
.kx-sujet__texte a { font-weight: 500; }
.kx-panneau__fin {
  margin-top: 26px; padding: 18px; border-radius: 8px;
  background: var(--lavande-pale); font-size: 14px; color: var(--er80);
}
.kx-panneau__fin strong { display: block; margin-bottom: 4px; color: var(--erebus); font-weight: 500; font-size: 15px; }

.kx-seul { display: grid; place-items: center; padding: 24px 16px 64px; }
.kx-seul .kx-carte { max-width: 452px; }

@media (max-width: 1080px) {
  .kx-scene { gap: 48px; grid-template-columns: minmax(0, 1fr) 420px; }
  .kx-promo h2 { font-size: 36px; }
  .kx-carte { padding: 32px; }
}

@media (max-width: 900px) {
  .kx-scene { grid-template-columns: minmax(0, 1fr); max-width: 516px; padding: 8px 16px 40px; }
  .kx-promo { display: none; }
  .kx-haut { padding: 16px; }
  .kx-pied { padding: 16px; justify-content: center; text-align: center; }
  .kx-pied nav { justify-content: center; }
}

@media (max-width: 480px) {
  .kx-carte { padding: 28px 20px; }
  .kx-carte h1 { font-size: 26px; }
  .kx-aide-btn span { display: none; }
  .kx-aide-btn { width: 38px; padding: 0; justify-content: center; }
  .kx-code { gap: 6px; }
  .kx-code input { height: 50px; font-size: 20px; }
  .kx-code input:nth-child(3) { margin-right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .kx-roue { animation: kx-tour 1.4s linear infinite !important; }
}
