/* ═══════════════════════════════════════
     RESET & BASE
  ═══════════════════════════════════════ */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --blue-deep:  #020817;
    --blue-mid:   #050f2c;
    --blue-line:  #1a3a6e;
    --node-color: #4d9fff;
    --node-glow:  #2563eb;
    --accent:     #22c55e;
    --accent2:    #3b82f6;
    --card-bg:    rgba(3, 10, 28, 0.78);
    --border:     rgba(77, 159, 255, 0.22);
    --text:       #e8f0fe;
    --muted:      #6b8fa8;
    --red:        #f87171;
    --yellow:     #fbbf24;
    --green:      #22c55e;
  }

  html, body {
    height: 100%;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
    background: var(--blue-deep);
  }

  /* ═══════════════════════════════════════
     BACKGROUND — RÉSEAU DE NŒUDS ANIMÉ
     Style : image 1 (vector network, dark
     blue, interconnected nodes & lines)
  ═══════════════════════════════════════ */

  .bg {
    position: fixed;
    inset: 0;
    z-index: 0;
  }

  /* Dégradé de fond multi-couches */
  .bg-gradient {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 60% 50% at 15% 50%,  rgba(15,40,100,.7) 0%, transparent 70%),
      radial-gradient(ellipse 50% 60% at 85% 20%,  rgba(10,30,80,.8)  0%, transparent 60%),
      radial-gradient(ellipse 40% 40% at 60% 80%,  rgba(5,20,60,.6)   0%, transparent 60%),
      linear-gradient(160deg, #02091f 0%, #030d2a 40%, #010610 100%);
  }

  /* SVG principal : lignes + nœuds du réseau */
  .bg-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  /* Lignes de connexion */
  .net-line {
    stroke: var(--blue-line);
    stroke-width: .8;
    fill: none;
    opacity: 0;
    animation: line-appear 3s ease-in-out infinite;
  }
  .net-line.bright {
    stroke: rgba(77,159,255,.35);
    stroke-width: 1;
  }
  @keyframes line-appear {
    0%          { opacity: 0; stroke-dashoffset: 300; }
    15%         { opacity: 1; }
    70%         { opacity: 1; stroke-dashoffset: 0; }
    100%        { opacity: 0; stroke-dashoffset: -300; }
  }

  /* Nœuds — cercles lumineux */
  .net-node {
    fill: var(--node-color);
    filter: drop-shadow(0 0 6px var(--node-color));
    animation: node-pulse 4s ease-in-out infinite;
  }
  .net-node.large { fill: #7ab8ff; filter: drop-shadow(0 0 12px #4d9fff); }
  .net-node.small { fill: #2a5faa; filter: none; opacity: .6; }

  @keyframes node-pulse {
    0%,100% { r: var(--base-r, 3);  opacity: .8; }
    50%      { r: calc(var(--base-r, 3) * 1.6); opacity: 1; }
  }

  /* Anneau de propagation autour des gros nœuds */
  .net-ring {
    fill: none;
    stroke: rgba(77,159,255,.4);
    stroke-width: 1;
    animation: ring-expand 4s ease-out infinite;
    transform-origin: center;
  }
  @keyframes ring-expand {
    0%   { r: 6;  opacity: .8; stroke-width: 1.5; }
    100% { r: 30; opacity: 0;  stroke-width: .3; }
  }

  /* Particule voyageant le long d'une ligne */
  .net-packet {
    fill: #7ab8ff;
    filter: drop-shadow(0 0 4px #4d9fff);
    animation: packet-travel 5s linear infinite;
  }
  @keyframes packet-travel {
    0%   { opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { opacity: 0; }
  }

  /* Lueur globale centrée */
  .bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
  }
  .glow1 { width:500px; height:300px; background:rgba(30,80,200,.18); top:10%;  left:5%;   animation: glow-drift 20s ease-in-out infinite; }
  .glow2 { width:400px; height:400px; background:rgba(10,50,150,.14); bottom:0; right:10%; animation: glow-drift 26s ease-in-out infinite reverse 4s; }
  .glow3 { width:300px; height:200px; background:rgba(34,197,94,.07); top:40%;  left:40%;  animation: glow-drift 16s ease-in-out infinite 8s; }

  @keyframes glow-drift {
    0%,100% { transform: translate(0,0); }
    33%      { transform: translate(40px,-30px); }
    66%      { transform: translate(-25px,35px); }
  }

  /* Overlay flou — zone de droite sous le card */
  .bg-blur-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2,8,23,.25);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
  }

  /* ═══════════════════════════════════════
     MISE EN PAGE
  ═══════════════════════════════════════ */
  .page {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  /* ═══════════════════════════════════════
     CARD DE CONNEXION
  ═══════════════════════════════════════ */
  .card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    max-width: 430px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow:
      0 0 0 1px rgba(77,159,255,.08),
      0 24px 80px rgba(0,0,0,.7),
      inset 0 1px 0 rgba(255,255,255,.06),
      0 0 60px rgba(37,99,235,.12);
    animation: card-in .7s cubic-bezier(.4,0,.2,1) both;
  }
  @keyframes card-in {
    from { opacity: 0; transform: translateY(32px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
  }

  /* Logo dans la card */
  .card-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
  }
  .card-logo-icon {
    width: 46px; height: 46px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    box-shadow: 0 0 28px rgba(37,99,235,.4);
  }
  .card-logo-name {
    font-size: 20px; font-weight: 800;
    color: #fff; letter-spacing: -.3px; line-height: 1;
  }
  .card-logo-sub {
    font-size: 10px; font-family: 'Space Mono', monospace;
    color: var(--muted); letter-spacing: 1.5px; margin-top: 3px;
  }

  /* Titres */
  .card-title { font-size: 21px; font-weight: 700; color: #fff; margin-bottom: 4px; }
  .card-sub   { font-size: 13px; color: var(--muted); margin-bottom: 26px; line-height: 1.5; }

  /* ── Alertes ─────────────────────────── */
  .alert {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
  }
  .alert-err  { background: rgba(248,113,113,.1);  border:1px solid rgba(248,113,113,.3); color:#fca5a5; }
  .alert-ok   { background: rgba(34,197,94,.1);    border:1px solid rgba(34,197,94,.3);   color:#86efac; }
  .alert-warn { background: rgba(251,191,36,.1);   border:1px solid rgba(251,191,36,.3);  color:#fde68a; }

  /* ── Champs ──────────────────────────── */
  .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
  }
  .form-group label {
    font-size: 11px; font-weight: 700;
    color: var(--muted);
    text-transform: uppercase; letter-spacing: .8px;
  }
  .input-wrap { position: relative; }

  .input-wrap input {
    width: 100%;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(77,159,255,.15);
    border-radius: 10px;
    padding: 12px 42px 12px 14px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color .25s, box-shadow .25s, background .25s;
  }
  .input-wrap input:focus {
    border-color: rgba(77,159,255,.55);
    background: rgba(77,159,255,.06);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
  }
  .input-wrap input::placeholder { color: rgba(107,143,168,.45); }

  /* Icône champ */
  .input-icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    pointer-events: none;
  }
  .input-wrap.has-icon input { padding-left: 38px; }

  /* Bouton œil */
  .eye-btn {
    position: absolute;
    right: 11px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    cursor: pointer; color: var(--muted);
    font-size: 15px; padding: 4px;
    line-height: 1; transition: color .2s;
  }
  .eye-btn:hover { color: var(--text); }

  /* ── Option mot de passe oublié ──────── */
  .form-options {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
    margin-bottom: 20px;
  }
  .link-btn {
    font-size: 13px; color: #7ab8ff;
    background: none; border: none;
    cursor: pointer; font-family: 'Outfit', sans-serif;
    padding: 0; transition: color .2s;
    text-decoration: none;
  }
  .link-btn:hover { color: #fff; text-decoration: underline; }

  /* ── Bouton principal ────────────────── */
  .btn-submit {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none; border-radius: 10px;
    color: #fff; font-family: 'Outfit', sans-serif;
    font-size: 15px; font-weight: 700;
    cursor: pointer; letter-spacing: .3px;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 24px rgba(37,99,235,.4);
    display: flex; align-items: center; justify-content: center; gap: 8px;
  }
  .btn-submit:hover { opacity: .88; box-shadow: 0 6px 32px rgba(37,99,235,.55); }
  .btn-submit:active { transform: scale(.98); }
  .btn-submit:disabled { opacity: .45; cursor: not-allowed; }

  /* Spinner sur bouton */
  .spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .loading .btn-text { display: none; }
  .loading .spinner  { display: block; }

  /* ── Divider ─────────────────────────── */
  .divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0 18px;
  }
  .divider hr { flex: 1; border: none; border-top: 1px solid rgba(255,255,255,.08); }
  .divider span { font-size: 11px; color: var(--muted); font-family: 'Space Mono',monospace; }

  /* ── Hint démo ───────────────────────── */
  .demo-hint {
    margin-top: 22px;
    padding: 14px;
    background: rgba(37,99,235,.08);
    border: 1px solid rgba(37,99,235,.2);
    border-radius: 10px;
    font-size: 12px;
    color: var(--muted);
    font-family: 'Space Mono', monospace;
    text-align: center;
    line-height: 2;
  }
  .demo-hint strong { color: #93c5fd; }

  /* ── Back link ───────────────────────── */
  .back-link {
    text-align: center;
    margin-top: 18px;
  }

  /* ── Vues (login / forgot) ───────────── */
  .vue         { display: none; }
  .vue.active  { display: block; animation: fade-vue .3s ease; }
  @keyframes fade-vue { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

  /* ═══════════════════════════════════════
     RESPONSIVE
  ═══════════════════════════════════════ */
  @media (max-width: 500px) {
    html, body { overflow: auto; }
    .page { align-items: flex-start; padding: 16px; min-height: 100vh; height: auto; }
    .card { padding: 28px 20px; border-radius: 14px; }
    .card-logo-name { font-size: 17px; }
  }

