  :root {
    --bg:           #F7F5F2;
    --bg2:          #EDEAE5;
    --ink:          #1A1A18;
    --ink-soft:     #6B6860;
    --accent:       #D4521A;
    --accent-light: #F0E8E1;
    --white:        #FFFFFF;
    --border:       #E0DDD8;
    --border-focus: #1A1A18;
    --error:        #C0392B;
    --success:      #2E7D32;
    --radius:       4px;
    --radius-lg:    12px;
    --panel-w:      440px;
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  /* ── CÔTÉ GAUCHE décoratif ── */
  .auth-deco {
    background: var(--ink);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    position: relative;
    overflow: hidden;
  }

  .auth-deco::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.08;
    top: -100px; left: -100px;
  }

  .auth-deco::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.06;
    bottom: -60px; right: -60px;
  }

  .deco-logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
    color: var(--bg);
    text-decoration: none;
    position: relative;
    z-index: 1;
  }
  .deco-logo span { color: var(--accent); }

  .deco-content {
    position: relative;
    z-index: 1;
  }

  .deco-content h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    color: var(--bg);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
  }

  .deco-content h2 em {
    font-style: normal;
    color: var(--accent);
  }

  .deco-content p {
    color: rgba(247,245,242,0.5);
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 320px;
  }

  .deco-perks {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
  }

  .deco-perk {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(247,245,242,0.7);
    font-size: 0.85rem;
  }

  .deco-perk-icon {
    width: 32px; height: 32px;
    background: rgba(247,245,242,0.06);
    border: 1px solid rgba(247,245,242,0.1);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  /* ── CÔTÉ DROIT formulaires ── */
  .auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    overflow: hidden;
    position: relative;
  }

  /* ── SLIDER wrapper ── */
  .forms-slider {
    width: 100%;
    max-width: var(--panel-w);
    overflow: hidden;
    position: relative;
  }

  .forms-track {
    display: flex;
    width: 200%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .forms-track.show-register {
    transform: translateX(-50%);
  }

  .form-pane {
    width: 50%;
    padding: 0 2px; /* évite le clip des focus rings */
    flex-shrink: 0;
  }

  /* ── TABS ── */
  .auth-tabs {
    display: flex;
    background: var(--bg2);
    border-radius: var(--radius);
    padding: 3px;
    margin-bottom: 36px;
    width: 100%;
    max-width: var(--panel-w);
  }

  .auth-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    border-radius: calc(var(--radius) - 1px);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 0.25s;
  }

  .auth-tab.active {
    background: var(--white);
    color: var(--ink);
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }

  /* ── FORM ELEMENTS ── */
  .form-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
  }

  .form-subtitle {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 28px;
    line-height: 1.5;
  }

  .field {
    margin-bottom: 16px;
  }

  .field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    margin-bottom: 6px;
  }

  .field input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    font-weight: 300;
    color: var(--ink);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
  }

  .field input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(26,26,24,0.06);
  }

  .field input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
  }

  .field input.valid {
    border-color: var(--success);
  }

  .field-error {
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 4px;
    display: none;
  }
  .field-error.visible { display: block; }

  /* Champ mot de passe avec œil */
  .field-password {
    position: relative;
  }

  .field-password input {
    padding-right: 44px;
  }

  .toggle-pwd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-soft);
    font-size: 1rem;
    padding: 2px;
    transition: color 0.2s;
  }
  .toggle-pwd:hover { color: var(--ink); }

  /* Indicateur force MDP */
  .pwd-strength {
    margin-top: 6px;
    display: flex;
    gap: 4px;
    align-items: center;
  }

  .pwd-bar {
    height: 3px;
    flex: 1;
    background: var(--border);
    border-radius: 2px;
    transition: background 0.3s;
  }

  .pwd-bar.weak   { background: var(--error); }
  .pwd-bar.medium { background: #E67E22; }
  .pwd-bar.strong { background: var(--success); }

  .pwd-label {
    font-size: 0.7rem;
    color: var(--ink-soft);
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
  }

  /* Row 2 colonnes */
  .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Lien mot de passe oublié */
  .forgot-link {
    display: block;
    text-align: right;
    font-size: 0.78rem;
    color: var(--ink-soft);
    text-decoration: none;
    margin-top: -10px;
    margin-bottom: 20px;
    transition: color 0.2s;
  }
  .forgot-link:hover { color: var(--accent); }

  /* Checkbox */
  .field-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
  }

  .field-check input[type="checkbox"] {
    width: 16px; height: 16px;
    margin-top: 2px;
    accent-color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
  }

  .field-check label {
    font-size: 0.78rem;
    color: var(--ink-soft);
    line-height: 1.5;
    cursor: pointer;
  }

  .field-check label a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  /* Bouton submit */
  .btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--ink);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
  }

  .btn-submit:hover { background: var(--accent); }

  .btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  /* Loading state */
  .btn-submit.loading .btn-text { opacity: 0; }
  .btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    border: 2px solid rgba(247,245,242,0.3);
    border-top-color: var(--bg);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 0.7s linear infinite;
  }

  @keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

  /* Séparateur */
  .divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--ink-soft);
    font-size: 0.75rem;
  }
  .divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  /* Commande invité */
  .btn-guest {
    width: 100%;
    padding: 12px;
    background: none;
    color: var(--ink-soft);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: block;
  }
  .btn-guest:hover { border-color: var(--ink); color: var(--ink); }

  /* Message alerte global */
  .form-alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    margin-bottom: 16px;
    display: none;
  }
  .form-alert.error   { background: #FDF0EF; border: 1px solid #F5C6C2; color: var(--error); display: block; }
  .form-alert.success { background: #EFF7F0; border: 1px solid #C3E6CB; color: var(--success); display: block; }

  /* ── RESPONSIVE ── */
  @media (max-width: 780px) {
    body { grid-template-columns: 1fr; }
    .auth-deco { display: none; }
    .auth-panel { padding: 32px 24px; }
  }

  /* ── Animation d'entrée ── */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .auth-tabs   { animation: fadeUp 0.4s ease both; }
  .forms-slider { animation: fadeUp 0.4s 0.1s ease both; }