/* ===== Root variables ===== */
:root{
  --bg: #07080c;
  --card: #0b0d14;
  --text: #f7f8ff;
  --muted: rgba(247,248,255,.72);
  --muted2: rgba(247,248,255,.48);
  --line: rgba(247,248,255,.10);
  --line2: rgba(247,248,255,.18);
  --shadow: 0 28px 85px rgba(0,0,0,.70);
  --radius: 18px;
  --radius2: 12px;
  --focus: 0 0 0 4px rgba(140,175,255,.16), 0 0 0 1px rgba(210,225,255,.18) inset;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
}
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden; /* empêche tout scroll */
  background-color: #000000;
}

main.shell {
  height: 100%;
  overflow: hidden; /* si main a scroll interne, bloque aussi */
}
html{
  background:#000;
}
html, body{
  overscroll-behavior: none;
}
body{
  background:#000;
}
/* ===== Global resets ===== */
*{ box-sizing: border-box; }
html{
  height: 100%;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-rendering: geometricPrecision;
  scrollbar-gutter: stable both-edges;
  font-kerning: normal;
  font-variant-ligatures: none;
  background: var(--bg);
}
body {
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: hidden; /* bloque le scroll */
}

body.no-scroll{
  overflow: hidden;
}

/* La card ne doit jamais scroll */
.card {
  overflow: visible;       /* laisse le contenu dépasser si nécessaire, le scroll sera sur la page */
}
html, body{
  background:#000;
}
body{
  margin:0;
  min-height:100dvh;
  background-color: var(--bg);
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;

  overflow-x: hidden;   /* jamais de scroll horizontal */
  overflow-y: auto;     /* scroll vertical seulement si nécessaire */

  color: var(--text);
  font-family: var(--sans);
  font-feature-settings: "ss01" 1, "cv11" 1;
  letter-spacing: .2px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Corriger le champ date sur mobile */
input[type="date"].field__input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 46px;
  padding: 12px;
  line-height: 1.2;
}

/* Ajuster l'icône calendrier interne */
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.8;
  cursor: pointer;
}
body::before{
  content:"";
  position: fixed;
  inset:-200vh; /* très important pour iOS */
  background:#000;
  z-index:-1;
}
/* ===== Generic elements ===== */
img, svg, video, canvas{ max-width: 100%; height: auto; display: block; }
button, input{ font: inherit; background-clip: padding-box; }
button::-moz-focus-inner{ border: 0; padding: 0; }
a{ color: inherit; -webkit-tap-highlight-color: transparent; }

/* ===== Layout containers ===== */
.shell{
  height:100dvh;
  display:grid;
  place-items:center;
  padding:20px 16px;
  width:100%;
  overflow:hidden;
}

.card{
  width:min(560px, 100%);
  background:
    radial-gradient(800px 220px at 15% 0%, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 70%),
    var(--card);
  border: 1px solid rgba(247,248,255,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-inline: auto;
}

/* ===== Brand block ===== */
.brand{ display:flex; gap: 14px; align-items:center; }
.brand__logo{
  width: 58px; height: 58px; border-radius: 14px;
  object-fit: cover; border: 1px solid var(--line2); background: #000; flex: 0 0 auto;
}
.brand__title{ margin: 0; font-size: clamp(18px, 2.2vw, 20px); font-weight: 700; }
.brand__subtitle{ margin: 4px 0 0; color: var(--muted); font-size: clamp(12px, 1.6vw, 13px); font-family: var(--mono); }

.divider{ height: 1px; background: linear-gradient(90deg, transparent, var(--line2), transparent); margin: 18px 0; }
.field {
  width: 100%;
}

.field__row {
  width: 100%;
}
/* ===== Forms ===== */
.field{ display:grid; gap: 8px; }
/* ===== Ajustement général des labels ===== */
.field__label {
  display: block;
  margin-bottom: 4px; /* réduire pour “Mot de passe” */
}

/* ===== Ajustement des champs ===== */
.form .field {
  margin-bottom: 24px; /* espace entre le champ identifiant et le label Mot de passe */
}

/* ===== Champ Mot de passe ===== */
.field__row--pwd {
  margin-top: 0; /* réduire l’écart entre label et zone de texte */
  position: relative; /* nécessaire pour positionner l’œil */
}

.field__input{
  width:100%;
  background: rgba(0,0,0,.42);
  border: 1px solid rgba(247,248,255,.14);
  border-radius: var(--radius2);
  padding: 12px;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  min-height: 46px;
}
.field__input::placeholder{ color: rgba(245,245,245,.35); }
.field__input:focus{ border-color: rgba(175,205,255,.45); box-shadow: var(--focus); }
/* ===== Input Mot de passe ===== */
.field__input--pwd {
  padding-right: 50px; /* espace suffisant pour le bouton œil */
}

.field__input:-webkit-autofill,
.field__input:-webkit-autofill:hover,
.field__input:-webkit-autofill:focus{
  -webkit-text-fill-color: var(--text);
  transition: background-color 99999s ease-out 0s;
  box-shadow: 0 0 0 1000px rgba(0,0,0,.42) inset, var(--focus);
  border: 1px solid rgba(247,248,255,.14);
}

.hint{ color: var(--muted2); font-size: 12px; line-height: 1.35; }

.form__row{ display:flex; justify-content: space-between; align-items:center; gap: 12px; margin-top: 2px; }

/* ===== Checkbox ===== */
.check{
  display:inline-flex; align-items:center; gap:6px; font-size:13px; color: var(--muted); cursor:pointer; line-height:1; user-select:none;
}
.check input{ position:absolute; opacity:0; width:0; height:0; }
.checkbox{
  width:16px; height:16px; border-radius:4px; border:2px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08); display:flex; align-items:center; justify-content:center; position:relative; flex-shrink:0; box-sizing:border-box; transform: translateY(1px);
}
.checkbox::after{
  content:""; position:absolute; left:50%; top:50%; width:6px; height:10px; border: solid #fff; border-width:0 2px 2px 0;
  transform: translate(-50%, -60%) rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}
.check input:checked + .checkbox{ background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.25); }
.check input:checked + .checkbox::after{ transform: translate(-50%, -60%) rotate(45deg) scale(0.8); }
#registerForm .cta {
  margin-top: -0.5rem; /* espace au-dessus du bouton, ajustable */
  display: inline-flex; /* conserve l’alignement des spans internes */
  justify-content: center; /* centrer le texte et la flèche */
}
/* ===== Bouton gris métallique de base ===== */
.cta {
  margin-top: 8px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(100,100,100,0.5);
  background: linear-gradient(180deg, rgba(70,70,70,0.95), rgba(50,50,50,0.6));
  color: #f7f8ff; /* texte blanc clair */
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}



/* Quand on veut bloquer le scroll */
body.no-scroll {
  overflow: hidden;       /* bloque le scroll de la page entière */
}

/* Hover : gris plus foncé uniforme */
.cta:hover {
  background: rgba(70,70,70,0.95);
  border-color: rgba(50,50,50,0.6);
}

.cta:hover .icon {
  fill: #ffffff; /* icône légèrement plus claire */
}

.cta:active {
  transform: scale(0.98);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.cta:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(180,180,180,0.25), 0 6px 18px rgba(0,0,0,0.45);
}
/* Conteneur flex pour aligner case et lien */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap; /* permet de passer à la ligne si trop serré */
}
/* Si nécessaire, réduire le margin-bottom du champ Mot de passe */
.form .field:last-of-type {
  margin-bottom: 8px; /* moins d’espace après le champ mot de passe */
}

/* Style de la case */
.login-options .check {
  font-size: 13px;
  color: var(--muted);
}

/* Style du lien "Mot de passe oublié ?" légèrement grisé */
.login-options .helpLink {
  font-size: 13px;
  color: var(--muted2); /* grisé plus léger */
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-options .helpLink:hover {
  color: rgba(205,225,255,.95); /* accent au survol */
  text-decoration: underline;
}

/* Responsive : mobile <520px */
@media (max-width: 520px) {
  body {
    overflow: hidden;  /* bloque le scroll global */
    height: 100vh;     /* nécessaire pour iOS */
  }

  #registerForm {
    position: relative;       /* assure que le scroll fonctionne */
    display: block;
    max-height: 100vh;        /* ne dépasse pas la hauteur de l'écran */
    -webkit-overflow-scrolling: touch; /* scroll fluide iOS */
    padding-right: 5px;       /* pour éviter que la barre de scroll soit coupée */
  }
  /* Background global unifié */
  html, body {
    height: 100%;
    margin: 0;
    background-color: #000000; /* même couleur que theme-color */
    overscroll-behavior: none; /* empêche le scroll de révéler un fond différent */
  }

  /* iOS pull-to-refresh fix */
  body::before {
    content: "";
    position: fixed;
    inset: -200vh; /* assez grand pour recouvrir toute la zone iOS */
    background: #000000;
    z-index: -1;
  }

  /* Assure que main a bien la même couleur */
  main.shell {
    background-color: #000000;
  }
  .login-options {
    flex-wrap: nowrap;       /* essayer de rester sur une ligne si possible */
    justify-content: space-between;
  }

  /* si les éléments se chevauchent, ils passeront automatiquement à la ligne */
  .login-options .check,
  .login-options .helpLink {
    white-space: nowrap; /* évite le retour automatique sauf overflow */
  }
}
/* ===== Views & transitions ===== */
.views{
  position: relative; width:100%; min-height:auto;
}
@media (min-width:521px){ .views{ min-height:320px; } }
@media (max-width:520px){ .views{ min-height:420px; } }

.view{
  position:absolute; inset:0; width:100%;
  opacity:0; transform: translateX(16px) scale(.995) translateZ(0);
  pointer-events:none;
  backface-visibility:hidden; /* NET rendu */
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.views[data-view="login"] .view--login,
.views[data-view="register"] .view--register{
  position: relative;
  opacity:1;
  transform:none;
  pointer-events:auto;
}

@keyframes viewToonIn{
  0%   { opacity:0; transform: translateX(26px) rotate(.6deg) scale(.92,1.04) translateZ(0); }
  55%  { opacity:1; transform: translateX(-6px) rotate(-.4deg) scale(1.04,.96) translateZ(0); }
  80%  { opacity:1; transform: translateX(2px) rotate(.15deg) scale(.99,1.01) translateZ(0); }
  100% { opacity:1; transform: translateX(0) rotate(0) scale(1,1) translateZ(0); }
}
@keyframes viewToonOut{
  0%   { opacity:1; transform: translateX(0) rotate(0) scale(1,1) translateZ(0); }
  100% { opacity:0; transform: translateX(-34px) rotate(-.8deg) scale(.92,1.04) translateZ(0); }
}

.view.is-enter{ animation: viewToonIn 520ms cubic-bezier(.18,1,.22,1) both; }
.view.is-exit{ animation: viewToonOut 240ms cubic-bezier(.55,0,1,1) both; }

@media (prefers-reduced-motion: reduce){
  .view.is-enter, .view.is-exit{ animation:none !important; }
}
.ghost{
  border: 1px solid rgba(247,248,255,.14);
  background: rgba(255,255,255,.05);
  color: rgba(245,245,245,.86);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
  white-space: nowrap;
}
.ghost:hover{ border-color: rgba(245,245,255,.26); background: rgba(255,255,255,.06); }
.ghost:focus{ outline:none; box-shadow: var(--focus); }

.icon{
  width: 20px;
  height: 20px;
  fill: rgba(247,248,255,.86);
}

.ghost[aria-pressed="true"] .icon{
  fill: rgba(205,225,255,.95);
}

/* ===== Bouton œil ===== */
.pwdToggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 36px; height: 36px;
}

.pwdToggle{
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(247,248,255,.14);
  background: rgba(255,255,255,.04);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.pwdToggle:focus{
  outline: none;
  box-shadow: var(--focus);
}

@media (hover:hover) and (pointer:fine){
  .pwdToggle:hover{
    border-color: rgba(205,225,255,.34);
    background: rgba(255,255,255,.06);
  }
}

.pwdToggle .icon{
  width: 18px;
  height: 18px;
  fill: rgba(205,225,255,.95);
}

.pwdToggle[aria-pressed="true"] .icon{
  fill: rgba(247,248,255,.82);
}

.pwdToggle[aria-pressed="true"]::after{
  content:"";
  position:absolute;
  width: 22px;
  height: 2px;
  background: rgba(247,248,255,.82);
  border-radius: 999px;
  transform: rotate(-38deg);
  /* center line over icon */
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}

.error{
  margin: 8px 0 0;
  min-height: 18px;
  color: rgba(255,255,255,.9);
  font-family: var(--mono);
  font-size: 12px;
  opacity: .95;
}
.error.is-bad{ color: rgba(255,255,255,.92); }
.error.is-ok{ color: rgba(255,255,255,.92); }
.error:empty{ display:none; }

.fineprint{
  margin-top: 0; /* was 4px -> remove extra bottom spacing */
  display:flex;
  flex-wrap:wrap;
  gap: 6px;
  align-items:center;
  justify-content:center;
  color: var(--muted2);
  font-size: 12px;
  font-family: var(--mono);
  line-height: 1.1;
}
.dot{ opacity:.5; }

.dash{ margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.dash__top{ display:flex; justify-content: space-between; align-items:flex-start; gap: 10px; }
.dash__title{ margin: 0; font-size: 18px; }
.dash__subtitle{ margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.dash__grid{ margin-top: 14px; display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.panel{ border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(0,0,0,.24); }
.panel__title{
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 1.1px;
}
.panel__value{ margin: 10px 0 0; font-size: 18px; font-weight: 800; }
.panel__meta{ margin: 6px 0 0; color: var(--muted2); font-size: 12px; line-height: 1.35; }

/* Views container (stable cross-browser) */
.views{
  position: relative;
  width: 100%;
  min-height: auto; /* remove forced empty space */
}

/* Optional safety: prevent tiny collapse during animations */
@media (min-width: 521px){
  .views{ min-height: 320px; }
}
@media (max-width: 520px){
  .views{ min-height: 420px; }
}

/* Stack the forms */
.view {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(16px) scale(.995) translateZ(0);
  pointer-events: none;
  will-change: transform, opacity;
}

.views[data-view="login"] .view--login,
.views[data-view="register"] .view--register{
  position: relative;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@media (max-width: 520px){
  html, body{
    height:100%;
  }
  
  body.no-scroll{
    overflow:hidden;
  }

  .shell{
    min-height:100vh;
    padding:16px;
  }

  .views{
    min-height: 315px;
  }

  .card{
    padding:18px;
  }

  .dash__grid{
    grid-template-columns: 1fr;
  }

  .field__row:not(.field__row--pwd){
    flex-direction: column;
  }

  .ghost{
    width:100%;
  }

}

.signup{
  margin-top:22px;
  text-align:center;
  font-size:13.5px;
  color:rgba(255,255,255,.6);
}

.signup a{
  color:#8caaff;
  text-decoration:none;
  font-weight:500;
  margin-left:4px;
  transition:color .2s ease;
}

.signup a:hover{
  color:#cde1ff;
  text-decoration:underline;
}

/* ===== Better “create account” block ===== */
.signupCard{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 6px;

  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.signupText{
  color: rgba(247,248,255,.74);
  font-size: 13px;
}

.linkbtn--text{
  /* hard override of .linkbtn (make it look like plain text) */
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;

  width: auto !important;
  box-shadow: none !important;

  color: rgba(205,225,255,.95);
  font-family: inherit; /* not mono */
  font-size: 13px;
  letter-spacing: 0;
  text-decoration: none !important;
  text-underline-offset: initial;
  font-weight: 600;
}

@media (hover:hover) and (pointer:fine){
  .linkbtn--text:hover{
    opacity: .9;
    filter: none !important;
  }
}

@media (max-width: 520px){
  .signupCard{
    flex-direction: row;
    align-items: center;
    text-align: left;
  }
  .linkbtn--text{
    width: auto;
  }
}

/* ===== Staggered “one by one” animation ===== */
.view.is-enter .field,
.view.is-enter .form__row,
.view.is-enter .signupCard,
.view.is-enter .cta,
.view.is-enter .error,
.view.is-enter .fineprint,
.view.is-enter .switchRow{
  animation: itemIn 520ms cubic-bezier(.2,1,.2,1) both;
  animation-delay: calc((var(--i, 0)) * 60ms + 90ms);
  transform: translateZ(0);
}

.view {
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* Prevent initial flash before stagger kicks in */
.view.is-enter .field,
.view.is-enter .form__row,
.view.is-enter .signupCard,
.view.is-enter .cta,
.view.is-enter .error,
.view.is-enter .fineprint,
.view.is-enter .switchRow{
  opacity: 0;              /* hide immediately */
  transform: translateY(10px) scale(.98);
  filter: none; /* <-- remplacer blur(2px) par none */
}

@keyframes itemIn{
  0%   { opacity:0; transform: translateY(10px) scale(.98); filter: none; }
  70%  { opacity:1; transform: translateY(-2px) scale(1.01); filter: none; }
  100% { opacity:1; transform: translateY(0) scale(1); filter: none; }
}

@media (prefers-reduced-motion: reduce){
  .view.is-enter .field,
  .view.is-enter .form__row,
  .view.is-enter .signupCard,
  .view.is-enter .cta,
  .view.is-enter .error,
  .view.is-enter .fineprint,
  .view.is-enter .switchRow{
    animation: none !important;
  }
}

/* ===== View transition: cleaner, less “ugly” ===== */
@keyframes viewToonIn{
  0%   { opacity:0; transform: translateX(26px) rotate(.6deg) scale(.92,1.04) translateZ(0); }
  55%  { opacity:1; transform: translateX(-6px) rotate(-.4deg) scale(1.04,.96) translateZ(0); }
  80%  { opacity:1; transform: translateX(2px) rotate(.15deg) scale(.99,1.01) translateZ(0); }
  100% { opacity:1; transform: translateX(0) rotate(0) scale(1,1) translateZ(0); }
}
@keyframes viewToonOut{
  0%   { opacity:1; transform: translateX(0) rotate(0) scale(1,1) translateZ(0); }
  100% { opacity:0; transform: translateX(-34px) rotate(-.8deg) scale(.92,1.04) translateZ(0); }
}

/* override previous definitions */
.view.is-enter{ animation: viewToonIn 520ms cubic-bezier(.18,1,.22,1) both; }
.view.is-exit{ animation: viewToonOut 240ms cubic-bezier(.55,0,1,1) both; }

.switchRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;

  border-top: 0;
  padding-top: 0;
  margin-top: 10px;
  opacity: 0.5; /* visually disable */
}

.switchRow__txt{
  font-size: 13px;
  color: rgba(247,248,255,.72);
}

.switchRow--preCta{
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(700px 140px at 10% 0%, rgba(120,155,255,.14), transparent 60%),
    rgba(255,255,255,.03);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}

.switchRow--preCta .switchRow__txt{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .2px;
  color: rgba(247,248,255,.76);
}

/* small secondary button */
.linkbtn{
  border-radius: 999px;
  padding: 9px 12px;
  border: 1px solid rgba(175,205,255,.26);
  background: rgba(255,255,255,.04);
  color: rgba(247,248,255,.90);
  cursor:pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .3px;
}
.linkbtn:focus{ outline:none; box-shadow: var(--focus); }

@media (hover:hover) and (pointer:fine){
  .linkbtn:hover{
    border-color: rgba(205,225,255,.46);
    background: rgba(255,255,255,.06);
    filter: brightness(1.04);
  }
}
.linkbtn:active{ transform: translateY(0); }

@media (max-width: 520px){
  .switchRow{ flex-direction: column; align-items: stretch; text-align:center; }
  .linkbtn{ width: 100%; }
}

/* Pre-CTA signup row (sits above main CTA) */
.switchRow--preCta{
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(247,248,255,.10);
  background: rgba(255,255,255,.035);
  align-items: center;
}

/* Make it look less like a footer separator */
.switchRow--preCta{
  border-top: 0;
}

/* Slightly stronger button inside the pre-CTA row */
.linkbtn--cta{
  border-color: rgba(205,225,255,.34);
  background:
    radial-gradient(600px 120px at 20% 0%, rgba(120,155,255,.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
}

@media (hover:hover) and (pointer:fine){
  .linkbtn--cta:hover{
    border-color: rgba(205,225,255,.42);
    filter: brightness(1.06);
  }
}

@media (max-width: 520px){
  .switchRow--preCta{
    padding: 12px;
  }
}

/* Cartoon animations */
@keyframes toonPopIn{
  0%{ opacity:0; transform: translateX(46px) rotate(2deg) scale(.70,1.08) translateZ(0); }
  35%{ opacity:1; transform: translateX(-10px) rotate(-1.4deg) scale(1.18,.82) translateZ(0); }
  60%{ opacity:1; transform: translateX(6px) rotate(.8deg) scale(.94,1.06) translateZ(0); }
  78%{ opacity:1; transform: translateX(-3px) rotate(-.35deg) scale(1.03,.98) translateZ(0); }
  100%{ opacity:1; transform: translateX(0) rotate(0) scale(1,1) translateZ(0); }
}
@keyframes toonPopOut{
  0%{ opacity:1; transform: translateX(0) rotate(0) scale(1,1) translateZ(0); }
  25%{ opacity:1; transform: translateX(-8px) rotate(-.6deg) scale(1.06,.94) translateZ(0); }
  100%{ opacity:0; transform: translateX(-52px) rotate(-3deg) scale(.70,1.08) translateZ(0); }
}
.view.is-enter{ animation: viewToonIn 520ms cubic-bezier(.18,1,.22,1) both; }
.view.is-exit{ animation: viewToonOut 240ms cubic-bezier(.55,0,1,1) both; }

@media (prefers-reduced-motion: reduce){
  .view.is-enter, .view.is-exit{ animation: none !important; }
}

@media (hover:hover) and (pointer:fine){
  .cta:hover{
    transform: translateY(-1px);
    border-color: rgba(205,225,255,.42);
    background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.07));
    filter: brightness(1.05);
  }
  .ghost:hover{ border-color: rgba(245,245,255,.26); background: rgba(255,255,255,.06); }
  .link:hover{ border-bottom-color: rgba(245,245,245,.35); }
}

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

/* Compact spacing at bottom of login form */
.view--login.form{
  gap: 10px; /* was 14px */
}

/* Ensure footer doesn't add extra spacing */
.view--login .fineprint{
  margin-top: 10px; /* space after error */
}

/* Autoriser scroll uniquement si contenu dépasse vraiment */
@media (max-width:520px){
  body.allow-scroll{
    overflow-y:auto;
  }
}