/* ═══════════════════════════════════════════════════════════════
   ÜTOPIYA · espace-client.utopiya.fr
   DA v2.1 · Jungle · Montserrat · Uicons regular
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Couleurs — palette ÜTOPIYA préservée ─────────────────── */
  --noir:          #0A0E0C;
  --noir-2:        #0F1512;
  --velours:       #141A16;
  --vert-jungle:   #14231C;
  --vert-jungle-2: #1A2B22;

  /* ─── Palette ÜTOPIYA officielle · sauge / noir / blanc uniquement ─── */
  --blanc:         #FFFFFF;
  --creme:         #FFFFFF;   /* alias — plus de crème, blanc pur */
  --creme-soft:    rgba(255,255,255,0.72);

  --sauge:         #B2CDC1;   /* couleur ÜTOPIYA officielle */
  --sauge-2:       #7DA89A;
  --sauge-soft:    rgba(178,205,193,0.14);
  --sauge-line:    rgba(178,205,193,0.20);

  /* Neutralisés — pointent tous vers sauge pour éviter les visuels dorés/terracotta */
  --or:            #B2CDC1;
  --or-soft:       rgba(178,205,193,0.14);
  --or-line:       rgba(178,205,193,0.20);

  --terracotta:    #B2CDC1;
  --terracotta-soft: rgba(178,205,193,0.14);

  --brume:         #A5AFAB;
  --brume-soft:    #8B948F;   /* UI-1 : remonté pour passer WCAG AA (~5.6:1 sur noir) */
  --sepulture:     rgba(255,255,255,0.08);
  --sepulture-2:   rgba(255,255,255,0.14);
  --urgent:        #D67560;

  /* ─── Alias historiques (rétro-compat pour ~60 usages dans le code) ─── */
  --accent:        var(--sauge);         /* couleur d'accent = sauge */
  --accent-text:   var(--noir);          /* texte sur fond sauge = noir */
  --text:          var(--blanc);         /* texte principal = blanc */
  --text-muted:    var(--brume-soft);    /* texte secondaire = brume-soft */

  /* ── Typographie ──────────────────────────────────────────── */
  --font: 'Montserrat', system-ui, -apple-system, sans-serif;

  /* ── Radius ───────────────────────────────────────────────── */
  --r-sm:    12px;
  --r-2:     14px;
  --r-md:    18px;
  --r-3:     20px;
  --r-lg:    24px;
  --r-4:     28px;
  --r-xl:    32px;
  --r-2xl:   44px;
  --r-full:  999px;

  /* ── Transitions ──────────────────────────────────────────── */
  --tr-fast: 150ms cubic-bezier(.16,1,.3,1);
  --tr-base: 250ms cubic-bezier(.4,0,.2,1);

  /* ── Ombres ───────────────────────────────────────────────── */
  --sh-1:     0 4px 14px rgba(0,0,0,0.20);
  --sh-2:     0 12px 40px rgba(0,0,0,0.35);
  --sh-3:     0 20px 60px rgba(0,0,0,0.45);
  --sh-inner: inset 0 1px 0 rgba(255,255,255,0.06);
  --elev-glass: 0 20px 60px -20px rgba(0,0,0,0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--creme);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    linear-gradient(180deg, rgba(10,14,12,0.72) 0%, rgba(15,21,18,0.86) 55%, rgba(10,14,12,0.94) 100%),
    url('/assets/jungle-bg.jpg') center center / cover no-repeat fixed,
    var(--noir);
}

/* Voile ambiant subtil pour profondeur */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(178,205,193,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(178,205,193,0.10) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: var(--sauge); text-decoration: none; transition: color var(--tr-fast); }
a:hover { color: var(--creme); }

/* SVG icônes inline (via helper PHP svg_icon()) — plus de dépendance CDN Uicons */
.u-icon { flex-shrink: 0; display: inline-block; vertical-align: -0.15em; }
svg.u-icon path, svg.u-icon circle, svg.u-icon rect, svg.u-icon line, svg.u-icon polyline { stroke: currentColor; }

/* ═════════════════════════════════════════════════════════════ */
/* HEADER GLASSY (page login + landing)                             */
/* ═════════════════════════════════════════════════════════════ */
.app-header {
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,14,12,0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--creme);
}
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sauge), var(--or));
  color: var(--noir);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 18px rgba(178,205,193,0.28);
}
.tag-line {
  font-family: var(--font);
  font-size: 11px;
  color: var(--brume);
  text-align: right;
  line-height: 1.7;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ═════════════════════════════════════════════════════════════ */
/* MAIN CENTRÉ (login)                                              */
/* ═════════════════════════════════════════════════════════════ */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

/* ═════════════════════════════════════════════════════════════ */
/* CARTE LOGIN — glassmorphism                                      */
/* ═════════════════════════════════════════════════════════════ */
.login-card {
  background: rgba(20,28,24,0.62);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-lg);
  padding: 44px 48px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--elev-glass), var(--sh-inner);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 40px;
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--sauge), var(--or));
  box-shadow: 0 0 14px rgba(178,205,193,0.5);
}

/* ═════════════════════════════════════════════════════════════ */
/* EYEBROW + TITRES (Montserrat light 300 + italic sauge)          */
/* ═════════════════════════════════════════════════════════════ */
.eyebrow {
  font-family: var(--font);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sauge);
  font-weight: 700;
  margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--sauge); }

h1 {
  font-family: var(--font);
  font-weight: 300;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
  color: var(--creme);
}
h1 .sauge { color: var(--sauge); font-weight: 300; font-style: italic; }
h1 strong { font-weight: 700; }

h2 {
  font-family: var(--font);
  font-weight: 300;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--creme);
}
h2 em { font-style: italic; color: var(--sauge); font-weight: 300; }

.lead {
  font-family: var(--font);
  font-size: 13.5px; font-weight: 400;
  color: var(--brume);
  line-height: 1.65;
  margin-bottom: 28px;
}

/* ═════════════════════════════════════════════════════════════ */
/* FORMS                                                             */
/* ═════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-family: var(--font);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brume);
  margin-bottom: 8px;
  font-weight: 700;
}
.form-input {
  width: 100%;
  background: rgba(10,14,12,0.6);
  border: 1.5px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  color: var(--creme);
  padding: 13px 16px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 13.5px;
  transition: all var(--tr-base);
  backdrop-filter: blur(8px);
}
.form-input::placeholder { color: rgba(255,255,255,0.30); font-weight: 400; }
.form-input:focus {
  outline: none;
  border-color: var(--sauge);
  background: rgba(10,14,12,0.78);
  box-shadow: 0 0 0 3px var(--sauge-soft);
}

/* Champs génériques dans les pages (.field .field label input) */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brume);
  margin-bottom: 8px;
  font-weight: 700;
}
.field label .req { color: var(--terracotta); }
.field label .optional { text-transform: none; letter-spacing: 0; color: var(--brume-soft); font-style: italic; font-size: 11px; margin-left: 6px; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  background: rgba(10,14,12,0.6);
  border: 1.5px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  color: var(--creme);
  font-family: var(--font);
  font-weight: 500;
  font-size: 13.5px;
  outline: none;
  transition: all var(--tr-base);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--sauge);
  background: rgba(10,14,12,0.78);
  box-shadow: 0 0 0 3px var(--sauge-soft);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.6; font-family: var(--font); }

/* ═════════════════════════════════════════════════════════════ */
/* METHOD TABS (switcher)                                           */
/* ═════════════════════════════════════════════════════════════ */
.method-tabs {
  display: flex;
  background: rgba(10,14,12,0.55);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-full);
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
}
.method-tab {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--brume);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all var(--tr-fast);
}
.method-tab.active {
  background: var(--sauge);
  color: var(--noir);
  box-shadow: 0 4px 12px rgba(178,205,193,0.28);
}
.method-tab:hover:not(.active) { color: var(--creme); background: rgba(255,255,255,0.04); }

/* ═════════════════════════════════════════════════════════════ */
/* BOUTONS — Montserrat + arrondis pill                             */
/* ═════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: none;
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--tr-base);
  white-space: nowrap;
  line-height: 1;
}
.btn i { font-size: 13px; }

.btn-primary {
  background: var(--sauge);
  color: var(--noir);
  box-shadow: 0 6px 20px rgba(178,205,193,0.28);
}
.btn-primary:hover {
  background: var(--creme);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(178,205,193,0.36);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--creme);
  border: 1px solid rgba(255,255,255,0.10);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.16);
}

.btn-or {
  background: var(--or);
  color: var(--noir);
  box-shadow: 0 6px 20px rgba(178,205,193,0.28);
}
.btn-or:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(178,205,193,0.36); }

.btn-dark {
  background: var(--noir-2);
  color: var(--creme);
  border: 1px solid rgba(255,255,255,0.10);
}
.btn-dark:hover { background: rgba(255,255,255,0.05); }

.btn-danger {
  background: var(--urgent);
  color: var(--noir);
  box-shadow: 0 6px 20px rgba(214,117,96,0.30);
}

/* Boutons compact */
.btn.btn-sm { padding: 9px 16px; font-size: 11.5px; }
.btn.btn-lg { padding: 15px 28px; font-size: 13.5px; }

/* Ancien style login (full-width) — legacy */
.login-card .btn { width: 100%; }

/* ═════════════════════════════════════════════════════════════ */
/* FLASHES                                                          */
/* ═════════════════════════════════════════════════════════════ */
.flash {
  padding: 14px 18px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  display: flex; align-items: flex-start; gap: 10px;
  backdrop-filter: blur(12px);
  border-left: 3px solid transparent;
}
.flash.success, .flash-success {
  background: var(--sauge-soft);
  color: var(--sauge);
  border-left-color: var(--sauge);
}
.flash.error, .flash-error {
  background: rgba(214,117,96,0.18);
  color: #FFD9CC;
  border-left-color: var(--urgent);
}
.flash.info, .flash-info {
  background: rgba(255,255,255,0.06);
  color: var(--creme);
  border-left-color: rgba(255,255,255,0.30);
}
.flash.warning, .flash-warning {
  background: var(--or-soft);
  color: var(--or);
  border-left-color: var(--or);
}

/* ═════════════════════════════════════════════════════════════ */
/* PILLS (badges arrondis)                                          */
/* ═════════════════════════════════════════════════════════════ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  line-height: 1;
}
.pill i { font-size: 10px; }
.pill-sauge { background: var(--sauge-soft); color: var(--sauge); }
.pill-or    { background: var(--or-soft); color: var(--or); }
.pill-terra { background: var(--terracotta-soft); color: var(--terracotta); }
.pill-brume { background: rgba(165,175,171,0.15); color: var(--brume); }
.pill-noir  { background: var(--noir-2); color: var(--creme); border: 1px solid rgba(255,255,255,0.10); }

/* ═════════════════════════════════════════════════════════════ */
/* FOOTER GLASSY                                                    */
/* ═════════════════════════════════════════════════════════════ */
.app-footer {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font);
  font-size: 10.5px;
  letter-spacing: 0.20em;
  color: var(--brume);
  text-transform: uppercase;
  font-weight: 600;
  background: rgba(10,14,12,0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.app-footer .live { display: inline-flex; align-items: center; gap: 8px; }
.app-footer .live::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sauge);
  box-shadow: 0 0 0 4px rgba(178,205,193,0.18);
  animation: livedot 2s ease-in-out infinite;
}
@keyframes livedot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(178,205,193,0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(178,205,193,0.06); }
}

/* ═════════════════════════════════════════════════════════════ */
/* HELPERS TEXTE                                                    */
/* ═════════════════════════════════════════════════════════════ */
.muted-link {
  margin-top: 28px;
  font-size: 12px;
  color: var(--brume);
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.text-sauge { color: var(--sauge); }
.text-or    { color: var(--or); }
.text-terra { color: var(--terracotta); }
.text-brume { color: var(--brume); }
.text-mute  { color: var(--brume-soft); }
.font-light { font-weight: 300; }
.font-semi  { font-weight: 600; }
.font-bold  { font-weight: 700; }

.compass-mini {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(178,205,193,0.25));
}

/* ═════════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                       */
/* ═════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .app-header { padding: 18px 22px; flex-direction: column; gap: 8px; }
  .tag-line { text-align: center; font-size: 10px; }
  .login-card { padding: 34px 28px; border-radius: 20px; }
  h1 { font-size: 26px; }
  .app-footer { padding: 18px 22px; flex-direction: column; gap: 8px; text-align: center; }
}

/* Fallback sans backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
  .login-card, .app-header, .app-footer { background: rgba(15,21,18,0.92); }
}
