/* ==========================================================================
   Dimiyori — systeme de design
   Blanc doux et verre depoli. Le fond n'est jamais #fff pur : un blanc pur
   sur un ecran lumineux fatigue l'oeil, et surtout le verre n'a alors rien a
   refracter. On travaille donc sur un gris-bleu tres clair, anime de halos
   colores diffus qui donnent au flou quelque chose a saisir.
   ========================================================================== */

:root {
  /* Fond */
  --bg: #eaeef6;
  --bg-deep: #dfe5f2;

  /* Verre */
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-hover: rgba(255, 255, 255, 0.68);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-blur: 22px;

  /* Texte : jamais de noir pur, trop dur sur fond clair */
  --text: #222839;
  --text-soft: #59617a;
  --text-muted: #8b93a8;

  /* Accent */
  --accent: #5865f2;
  --accent-deep: #4752c4;
  --accent-wash: rgba(88, 101, 242, 0.1);

  --success: #2fa36b;
  --warning: #c98a12;
  --danger: #d64550;

  /* Profondeur */
  --stroke: rgba(28, 36, 68, 0.08);
  --shadow-sm: 0 2px 8px rgba(31, 38, 80, 0.06);
  --shadow: 0 8px 32px rgba(31, 38, 80, 0.1);
  --shadow-lg: 0 20px 60px rgba(31, 38, 80, 0.14);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Halos de fond -------------------------------------------------------
   Places derriere tout le reste. Ce sont eux que le verre refracte : sans
   eux, backdrop-filter n'aurait qu'un aplat uniforme a flouter et l'effet
   serait invisible. */
.ambiance {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}

.halo--1 {
  width: 44vw;
  height: 44vw;
  top: -12vw;
  left: -8vw;
  background: radial-gradient(circle, #8ea6ff 0%, rgba(142, 166, 255, 0) 70%);
  animation: derive 26s var(--ease) infinite alternate;
}

.halo--2 {
  width: 38vw;
  height: 38vw;
  bottom: -14vw;
  right: -6vw;
  background: radial-gradient(circle, #c7a8ff 0%, rgba(199, 168, 255, 0) 70%);
  animation: derive 32s var(--ease) infinite alternate-reverse;
}

.halo--3 {
  width: 30vw;
  height: 30vw;
  top: 38%;
  left: 46%;
  background: radial-gradient(circle, #9fd9f5 0%, rgba(159, 217, 245, 0) 70%);
  animation: derive 38s var(--ease) infinite alternate;
}

@keyframes derive {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4vw, 3vw, 0) scale(1.12);
  }
}

/* --- Surface de verre ---------------------------------------------------- */
.verre {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(175%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(175%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

/* Filet lumineux sur l'arete haute : c'est lui qui donne l'illusion
   d'epaisseur, la ou une simple bordure resterait plate. */
.verre::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 45%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* --- Typographie --------------------------------------------------------- */
h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h1 {
  font-size: 1.6rem;
}
h2 {
  font-size: 1.15rem;
}
h3 {
  font-size: 0.95rem;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.muted {
  color: var(--text-muted);
}
.soft {
  color: var(--text-soft);
}

.etiquette {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Boutons ------------------------------------------------------------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease);
}

.bouton:hover {
  background: var(--glass-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.bouton:active {
  transform: translateY(0);
}

.bouton:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.bouton--discord {
  width: 100%;
  padding: 14px 22px;
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.32);
}

.bouton--discord:hover {
  background: var(--accent-deep);
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.4);
}

.bouton--discret {
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-soft);
  background: transparent;
  border-color: var(--stroke);
  box-shadow: none;
}

.bouton--discret:hover {
  color: var(--danger);
  background: rgba(214, 69, 80, 0.08);
  border-color: rgba(214, 69, 80, 0.2);
}

/* --- Alerte -------------------------------------------------------------- */
.alerte {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: #8e2f38;
  background: rgba(214, 69, 80, 0.1);
  border: 1px solid rgba(214, 69, 80, 0.22);
  border-radius: var(--radius-sm);
}

.alerte svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Accessibilite ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .halo {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
