/* ══════════════════════════════════════════════════════════════════════
   login.css — Chapitre « La porte du restaurant »
   Refonte éditoriale double colonne, palette vert signature Night Kitchen
   ══════════════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════════════
   1. TOKENS SPÉCIFIQUES AUX PAGES AUTH
   (les tokens communs --g1/--g2/--g3/--bg-page/... viennent de night_kitchen.css)
   ══════════════════════════════════════════════════════════════════════ */
:root,
[data-theme="dark"] {
    /* Colonne visuelle — gris anthracite éditorial (dark) */
    --auth-visual-bg-a:       #1a1d22;
    --auth-visual-bg-b:       #0f1216;
    --auth-visual-tint:       rgba(255,255,255,0.05);
    --auth-visual-shade:      rgba(0,0,0,0.35);
    --auth-visual-ink:        #f5f5f4;
    --auth-visual-ink-soft:   rgba(245,245,244,0.70);
    --auth-visual-ornament:   #ffffff;
    --auth-visual-pulse-bg:   rgba(0,0,0,0.30);
    --auth-visual-pulse-border: rgba(255,255,255,0.10);

    /* Bandeau d'erreur — ton éditorial */
    --auth-err-bg:            rgba(239,68,68,0.10);
    --auth-err-border:        rgba(239,68,68,0.30);
    --auth-err-text:          #fca5a5;
}

[data-theme="light"] {
    /* Colonne visuelle — gris papier éditorial (light) */
    --auth-visual-bg-a:       #f3f4f6;
    --auth-visual-bg-b:       #e5e7eb;
    --auth-visual-tint:       rgba(255,255,255,0.45);
    --auth-visual-shade:      rgba(10,31,18,0.05);
    --auth-visual-ink:        #1f2937;
    --auth-visual-ink-soft:   rgba(31,41,55,0.70);
    --auth-visual-ornament:   #1f2937;
    --auth-visual-pulse-bg:   rgba(255,255,255,0.70);
    --auth-visual-pulse-border: rgba(31,41,55,0.12);

    --auth-err-bg:            rgba(239,68,68,0.08);
    --auth-err-border:        rgba(239,68,68,0.30);
    --auth-err-text:          #b91c1c;
}


/* ══════════════════════════════════════════════════════════════════════
   2. RESET DE LA PAGE AUTH (s'affranchit des styles globaux navbar/footer)
   ══════════════════════════════════════════════════════════════════════ */
.auth-body {
    margin: 0;
    padding: 0;
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--tr), color var(--tr);
}
.auth-body * { box-sizing: border-box; }
.auth-body button { font-family: inherit; }
.auth-body a { text-decoration: none; color: inherit; }


/* ══════════════════════════════════════════════════════════════════════
   3. HEADER MINIMAL — logo à gauche, toggle thème à droite
   ══════════════════════════════════════════════════════════════════════ */
.auth-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 32px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.auth-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--tr-spring);
}
.auth-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.auth-logo:hover .auth-logo-icon {
    transform: rotate(6deg) scale(1.08);
}

.auth-wordmark {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.4px;
    line-height: 1;
    color: var(--text-primary);
}
.auth-wordmark-accent {
    color: var(--g1);
}
[data-theme="light"] .auth-wordmark-accent {
    color: var(--g3);
}

.auth-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--bg-element);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--tr);
}
.auth-theme-toggle:hover {
    background: rgba(52,211,153,0.10);
    border-color: rgba(52,211,153,0.25);
    color: var(--g1);
}
.auth-theme-toggle svg {
    width: 18px;
    height: 18px;
}
/* Icônes sun/moon — affichage géré par theme.js (display inline) */
.auth-theme-toggle .nk-theme-icon-sun,
.auth-theme-toggle .nk-theme-icon-moon {
    display: none;
}

@media (max-width: 767px) {
    .auth-header {
        padding: 16px 20px;
    }
    .auth-wordmark {
        font-size: 15px;
    }
    .auth-logo-icon {
        width: 24px;
        height: 24px;
    }
}


/* ══════════════════════════════════════════════════════════════════════
   4. SHELL DOUBLE COLONNE
   ══════════════════════════════════════════════════════════════════════ */
.auth-shell {
    display: grid;
    grid-template-columns: 60% 40%;
    min-height: 100vh;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .auth-shell {
        grid-template-columns: 50% 50%;
    }
}

@media (max-width: 767px) {
    .auth-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }
}


/* ══════════════════════════════════════════════════════════════════════
   5. COLONNE VISUELLE (gauche)
   ══════════════════════════════════════════════════════════════════════ */
.auth-visual {
    position: relative;
    background: linear-gradient(135deg, var(--auth-visual-bg-a) 0%, var(--auth-visual-bg-b) 100%);
    color: var(--auth-visual-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 64px;
    overflow: hidden;
    isolation: isolate;
}

/* Voile radial subtil — évite l'aplat plat */
.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 20%, var(--auth-visual-tint), transparent 55%),
        radial-gradient(ellipse at 75% 85%, var(--auth-visual-shade), transparent 60%);
    z-index: 0;
}

/* Ornement SVG de fond — très discret */
.auth-visual-ornament {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.07;
    pointer-events: none;
    color: var(--auth-visual-ornament);
}
[data-theme="light"] .auth-visual-ornament {
    opacity: 0.09;
}
.auth-visual-ornament svg {
    width: 100%;
    height: 100%;
}

.auth-visual-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 560px;
    width: 100%;
}

/* Citation principale — Playfair Display italic, vert signature */
.auth-quote {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.5px;
    color: var(--g1);
}
[data-theme="light"] .auth-quote {
    color: var(--g3);
}

/* Sous-citation — DM Sans neutre */
.auth-quote-sub {
    margin-top: 22px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--auth-visual-ink-soft);
    letter-spacing: 0.2px;
    max-width: 420px;
}

/* Pouls du jour — indicateur vivant en bas de colonne */
.auth-pulse {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--auth-visual-pulse-bg);
    border: 1px solid var(--auth-visual-pulse-border);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-visual-ink-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.auth-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--g1);
    box-shadow: 0 0 0 0 rgba(52,211,153,0.7);
    animation: auth-pulse-ring 2s ease-out infinite;
}
@keyframes auth-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(52,211,153,0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(52,211,153,0); }
    100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
@media (prefers-reduced-motion: reduce) {
    .auth-pulse-dot { animation: none; }
}

/* Mobile — la colonne visuelle disparaît, le header porte la marque */
@media (max-width: 767px) {
    .auth-visual { display: none; }
}


/* ══════════════════════════════════════════════════════════════════════
   6. COLONNE FORMULAIRE (droite)
   ══════════════════════════════════════════════════════════════════════ */
.auth-form-col {
    position: relative;
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 64px;
}

/* Glow très discret en haut à droite */
.auth-form-col::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(52,211,153,0.06), transparent 65%);
    pointer-events: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .auth-form-col { padding: 72px 40px; }
}

@media (max-width: 767px) {
    .auth-form-col { padding: 72px 24px 48px; }
}

.auth-form-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

/* Titre principal */
.auth-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(32px, 3.2vw, 44px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.05;
    color: var(--text-primary);
    margin: 0 0 12px;
}
.auth-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 32px;
}
@media (max-width: 767px) {
    .auth-title { font-size: 28px; }
    .auth-subtitle { font-size: 14px; margin-bottom: 24px; }
}

/* Bandeau d'erreur éditorial */
.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 24px;
    background: var(--auth-err-bg);
    border: 1px solid var(--auth-err-border);
    border-radius: 14px;
    color: var(--auth-err-text);
    font-family: 'DM Sans', sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
}
.auth-error svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}


/* ══════════════════════════════════════════════════════════════════════
   7. BOUTON GOOGLE — pattern officiel, fond blanc même en dark
   ══════════════════════════════════════════════════════════════════════ */
.auth-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: #ffffff;
    border: 1px solid rgba(10,31,18,0.14);
    border-radius: 14px;
    color: #1f1f1f;
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tr);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.auth-google:hover {
    transform: translateY(-1px);
    border-color: rgba(10,31,18,0.25);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    color: #1f1f1f;
}
.auth-google:focus-visible {
    outline: none;
    border-color: var(--g2);
    box-shadow: 0 0 0 3px rgba(52,211,153,0.25);
}
.auth-google svg {
    width: 20px;
    height: 20px;
}


/* ══════════════════════════════════════════════════════════════════════
   8. SÉPARATEUR ÉDITORIAL
   ══════════════════════════════════════════════════════════════════════ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0 24px;
}
.auth-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), var(--border-subtle));
}
.auth-divider-line:last-child {
    background: linear-gradient(90deg, var(--border-subtle), var(--border-subtle), transparent);
}
.auth-divider-text {
    font-family: 'Poppins', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}


/* ══════════════════════════════════════════════════════════════════════
   9. FORMULAIRE
   ══════════════════════════════════════════════════════════════════════ */
.auth-form {
    margin: 0;
}

.auth-field {
    margin-bottom: 18px;
}
.auth-field:last-of-type {
    margin-bottom: 10px;
}

.auth-label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-label);
    margin-bottom: 8px;
}
[data-theme="light"] .auth-label {
    color: rgba(16,185,129,0.75);
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: 14px;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 14.5px;
    font-weight: 500;
    transition: all var(--tr);
    outline: none;
}
.auth-input::placeholder {
    color: var(--text-placeholder);
}
.auth-input:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(52,211,153,0.12);
}
.auth-input.has-toggle {
    padding-right: 48px;
}


/* ══════════════════════════════════════════════════════════════════════
   10. TOGGLE ŒIL MOT DE PASSE
   Pilote l'affichage des SVG .eye-open / .eye-closed via la classe .hidden
   (comportement préservé de login.js existant)
   ══════════════════════════════════════════════════════════════════════ */
.auth-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--tr);
}
.auth-eye:hover {
    color: var(--g1);
    background: var(--bg-element);
}
.auth-eye:focus-visible {
    outline: none;
    color: var(--g1);
    box-shadow: 0 0 0 2px rgba(52,211,153,0.35);
}
.auth-eye svg {
    width: 18px;
    height: 18px;
}
.auth-eye .hidden {
    display: none;
}


/* ══════════════════════════════════════════════════════════════════════
   11. LIEN « MOT DE PASSE OUBLIÉ »
   ══════════════════════════════════════════════════════════════════════ */
.auth-forgot-wrap {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 24px;
}
.auth-forgot {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--tr);
}
.auth-forgot:hover {
    color: var(--g1);
}
.auth-forgot:focus-visible {
    outline: none;
    color: var(--g1);
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* ══════════════════════════════════════════════════════════════════════
   12. BOUTON SUBMIT
   ══════════════════════════════════════════════════════════════════════ */
.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    border: none;
    border-radius: 14px;
    color: var(--on-accent);
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all var(--tr);
    box-shadow: 0 4px 20px rgba(52,211,153,0.25);
}
.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(52,211,153,0.45);
}
.auth-submit:active {
    transform: translateY(0);
}
.auth-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(52,211,153,0.30), 0 4px 20px rgba(52,211,153,0.25);
}
.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.auth-submit svg {
    width: 16px;
    height: 16px;
}


/* ══════════════════════════════════════════════════════════════════════
   13. FOOTER DU FORMULAIRE — lien vers inscription
   ══════════════════════════════════════════════════════════════════════ */
.auth-footer {
    margin-top: 36px;
    padding-top: 28px;
    position: relative;
    text-align: center;
}
.auth-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}
.auth-footer-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}
.auth-footer-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--g1);
    transition: color var(--tr);
}
[data-theme="light"] .auth-footer-link {
    color: var(--g3);
}
.auth-footer-link:hover {
    color: var(--g2);
    text-decoration: underline;
    text-underline-offset: 3px;
}
