@charset "UTF-8";
/* ==========================================================================
   CONSTELLATION 50 — Noyau
   Jetons de design, remise à zéro, composants partagés.
   Direction : nuit d'anniversaire. Encre indigo profonde, or champagne,
   fuchsia de fête, cyan de scintillement. Rien de gris, rien de plat.
   ========================================================================== */

:root {
  /* --- Encres ------------------------------------------------------------ */
  --nuit-900: #060314;
  --nuit-800: #0b0725;
  --nuit-700: #130b33;
  --nuit-600: #1c1046;
  --nuit-500: #2a1a63;

  /* --- Lumières ---------------------------------------------------------- */
  --or:        #f5c978;
  --or-clair:  #ffe9b8;
  --or-sombre: #b8873a;
  --fuchsia:   #ff3d8b;
  --cyan:      #5ee7f5;
  --violet:    #8b5cf6;
  --corail:    #ff7a59;
  --menthe:    #4ade9f;

  /* --- Textes ------------------------------------------------------------ */
  --lin:    #f4f0ff;
  --brume:  #b0a4d0;
  --brume-2:#7c6fa0;

  /* --- Surfaces ---------------------------------------------------------- */
  --verre:       rgba(255, 255, 255, 0.045);
  --verre-fort:  rgba(255, 255, 255, 0.075);
  --trait:       rgba(255, 255, 255, 0.10);
  --trait-or:    rgba(245, 201, 120, 0.28);

  /* --- Typographie ------------------------------------------------------- */
  --f-titre: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-ui:    "Outfit", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --f-data:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.175rem;
  --t-xl: 1.5rem;
  --t-2xl: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --t-3xl: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);

  /* --- Rythme ------------------------------------------------------------ */
  --e-1: 0.25rem;  --e-2: 0.5rem;   --e-3: 0.75rem;
  --e-4: 1rem;     --e-5: 1.5rem;   --e-6: 2rem;
  --e-7: 3rem;     --e-8: 4.5rem;   --e-9: 7rem;

  --r-sm: 8px;  --r-md: 14px;  --r-lg: 22px;  --r-xl: 30px;  --r-full: 999px;

  --largeur: 1220px;

  /* --- Ombres ------------------------------------------------------------ */
  --ombre-douce: 0 18px 50px -22px rgba(0, 0, 0, 0.85);
  --ombre-halo:  0 0 0 1px var(--trait), 0 26px 70px -30px rgba(0, 0, 0, 0.9);

  /* --- Mouvement --------------------------------------------------------- */
  --ressort: cubic-bezier(0.22, 1.4, 0.36, 1);
  --doux:    cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Remise à zéro
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--nuit-500) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-ui);
  font-size: var(--t-md);
  line-height: 1.62;
  color: var(--lin);
  background: var(--nuit-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }

/* Sans cette règle, un `display: flex` de composant l'emporte sur l'attribut
   hidden et un élément masqué reste visible. */
[hidden] { display: none !important; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--or); text-decoration: none; }
a:hover { color: var(--or-clair); }

::selection { background: var(--fuchsia); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--nuit-500);
  border-radius: var(--r-full);
  border: 3px solid var(--nuit-900);
}

/* ==========================================================================
   Typographie
   ========================================================================== */
.titre {
  font-family: var(--f-titre);
  font-weight: 600;
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 40;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.sourdine { color: var(--brume); }

.etiquette {
  font-family: var(--f-data);
  font-size: var(--t-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--or);
}

.donnee { font-family: var(--f-data); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Mise en page
   ========================================================================== */
.contenu {
  width: min(100% - 2.5rem, var(--largeur));
  margin-inline: auto;
}

.pile { display: flex; flex-direction: column; }
.rangee { display: flex; align-items: center; gap: var(--e-3); flex-wrap: wrap; }

.saut-contenu {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: var(--e-3) var(--e-5);
  background: var(--or);
  color: var(--nuit-900);
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 600;
}
.saut-contenu:focus { left: 0; top: 0; }

/* ==========================================================================
   Boutons
   ========================================================================== */
.btn {
  --btn-fond: var(--verre-fort);
  --btn-texte: var(--lin);
  --btn-trait: var(--trait);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--btn-trait);
  border-radius: var(--r-full);
  background: var(--btn-fond);
  color: var(--btn-texte);
  font-weight: 500;
  font-size: var(--t-sm);
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.28s var(--ressort), box-shadow 0.28s var(--doux),
              background 0.28s var(--doux), border-color 0.28s var(--doux);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Reflet qui balaie le bouton au survol */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,0.34) 50%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--doux);
}
.btn:hover::after { transform: translateX(120%); }

.btn-or {
  --btn-fond: linear-gradient(135deg, var(--or-clair), var(--or) 45%, #e0a94f);
  --btn-texte: #2a1a02;
  --btn-trait: transparent;
  font-weight: 650;
  box-shadow: 0 10px 34px -12px rgba(245, 201, 120, 0.85);
}
.btn-or:hover { box-shadow: 0 18px 46px -14px rgba(245, 201, 120, 0.95); }

.btn-fuchsia {
  --btn-fond: linear-gradient(135deg, #ff6aa6, var(--fuchsia) 60%, #d81f6c);
  --btn-texte: #fff;
  --btn-trait: transparent;
  box-shadow: 0 10px 34px -14px rgba(255, 61, 139, 0.9);
}

.btn-nu { --btn-fond: transparent; }
.btn-nu:hover { --btn-fond: var(--verre); --btn-trait: var(--trait-or); }

.btn-sm { padding: 0.5rem 1rem; font-size: var(--t-xs); }
.btn-icone { padding: 0.6rem; aspect-ratio: 1; border-radius: var(--r-full); }

/* ==========================================================================
   Champs de formulaire
   ========================================================================== */
.champ { display: flex; flex-direction: column; gap: var(--e-2); }

.champ > label {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--lin);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--e-3);
}
.champ .aide { font-size: var(--t-xs); color: var(--brume-2); font-weight: 400; }

.saisie {
  width: 100%;
  padding: 0.85rem 1.05rem;
  background: rgba(6, 3, 20, 0.55);
  border: 1px solid var(--trait);
  border-radius: var(--r-md);
  color: var(--lin);
  transition: border-color 0.24s var(--doux), box-shadow 0.24s var(--doux), background 0.24s var(--doux);
}
.saisie::placeholder { color: var(--brume-2); }
.saisie:hover { border-color: rgba(255,255,255,0.2); }
.saisie:focus {
  outline: none;
  border-color: var(--or);
  background: rgba(6, 3, 20, 0.8);
  box-shadow: 0 0 0 4px rgba(245, 201, 120, 0.14);
}
textarea.saisie { min-height: 9.5rem; resize: vertical; line-height: 1.65; }

select.saisie {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23b0a4d0' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.05rem center;
  padding-right: 2.6rem;
}
select.saisie option { background: var(--nuit-700); color: var(--lin); }

.champ-erreur .saisie { border-color: var(--fuchsia); box-shadow: 0 0 0 4px rgba(255,61,139,0.14); }
.message-erreur { font-size: var(--t-xs); color: #ff9dbf; }

/* Honeypot : invisible pour l'humain, tentant pour le robot */
.piege {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Bandeaux d'information
   ========================================================================== */
.bandeau {
  display: flex;
  gap: var(--e-3);
  align-items: flex-start;
  padding: var(--e-4) var(--e-5);
  border-radius: var(--r-md);
  border: 1px solid var(--trait);
  background: var(--verre);
  font-size: var(--t-sm);
}
.bandeau-succes { border-color: rgba(74,222,159,0.4); background: rgba(74,222,159,0.09); }
.bandeau-erreur { border-color: rgba(255,61,139,0.45); background: rgba(255,61,139,0.10); }
.bandeau-info   { border-color: var(--trait-or); background: rgba(245,201,120,0.08); }
.bandeau b { font-weight: 600; }

/* ==========================================================================
   Fond nocturne animé — commun à toutes les pages
   ========================================================================== */
.ciel {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(120% 90% at 50% -10%, #1b0f47 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 0%, #2a0d3d 0%, transparent 50%),
    linear-gradient(180deg, var(--nuit-800) 0%, var(--nuit-900) 55%, #04020e 100%);
}

/* Aurores : trois voiles colorés qui dérivent lentement */
.aurore {
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.55;
}
.aurore span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}
.aurore span:nth-child(1) {
  width: 46vw; height: 46vw; left: 4%; top: 8%;
  background: radial-gradient(circle, rgba(139,92,246,0.85), transparent 66%);
  animation: derive-a 26s ease-in-out infinite alternate;
}
.aurore span:nth-child(2) {
  width: 40vw; height: 40vw; right: 2%; top: 22%;
  background: radial-gradient(circle, rgba(255,61,139,0.62), transparent 66%);
  animation: derive-b 32s ease-in-out infinite alternate;
}
.aurore span:nth-child(3) {
  width: 52vw; height: 52vw; left: 26%; bottom: -14%;
  background: radial-gradient(circle, rgba(94,231,245,0.35), transparent 68%);
  animation: derive-c 38s ease-in-out infinite alternate;
}

@keyframes derive-a { to { transform: translate3d(9vw, 7vh, 0) scale(1.16); } }
@keyframes derive-b { to { transform: translate3d(-11vw, 10vh, 0) scale(0.86); } }
@keyframes derive-c { to { transform: translate3d(7vw, -9vh, 0) scale(1.12); } }

/* Grain léger : casse les dégradés en bandes */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23b)'/%3E%3C/svg%3E");
}

/* Couche des festivités : confettis, feux d'artifice, poussière d'or */
#toile-fete {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

/* ==========================================================================
   Notifications éphémères
   ========================================================================== */
.plateau-notes {
  position: fixed;
  right: var(--e-5);
  bottom: var(--e-5);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
  max-width: min(90vw, 24rem);
}
.note {
  display: flex;
  gap: var(--e-3);
  align-items: center;
  padding: var(--e-3) var(--e-4);
  border-radius: var(--r-md);
  border: 1px solid var(--trait);
  background: rgba(19, 11, 51, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: var(--ombre-douce);
  font-size: var(--t-sm);
  animation: note-entre 0.42s var(--ressort) both;
}
.note-succes { border-color: rgba(74,222,159,0.5); }
.note-erreur { border-color: rgba(255,61,139,0.5); }
.note.sort { animation: note-sort 0.3s var(--doux) forwards; }

@keyframes note-entre { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes note-sort  { to   { opacity: 0; transform: translateX(24px); } }

/* ==========================================================================
   Accessibilité — mouvement réduit
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .aurore { opacity: 0.4; }
}
