/* ═══════════════════════════════════════════════════════════
   Planning Fraikin — Page de connexion front-office
   ═══════════════════════════════════════════════════════════ */

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

html, body {
    height: 100%;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: #1a2744;
    overflow: hidden;
}

/* ─── Fond ─────────────────────────────────────────────── */
.pf-login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1c3f 0%, #1a2744 50%, #0d2055 100%);
    padding: 20px;
    position: relative;
}

.pf-login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(26,87,180,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 20%, rgba(255,140,0,0.08) 0%, transparent 40%);
    pointer-events: none;
}

/* ─── Carte ─────────────────────────────────────────────── */
.pf-login-card {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.45);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ─── En-tête avec logo ─────────────────────────────────── */
.pf-login-header {
    background: linear-gradient(160deg, #1a56a0 0%, #0d2055 100%);
    padding: 32px 24px 24px;
    text-align: center;
}

.pf-login-logo {
    display: block;
    max-width: 200px;
    max-height: 100px;
    margin: 0 auto 16px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.pf-login-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.pf-login-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
    margin-top: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ─── Corps formulaire ──────────────────────────────────── */
.pf-login-body {
    padding: 32px 28px 28px;
}

/* Message d'erreur */
.pf-login-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 0.875rem;
    padding: 11px 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pf-login-error::before {
    content: '⚠';
    flex-shrink: 0;
    line-height: 1.3;
}

/* Message "accès refusé" */
.pf-login-denied {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 8px;
    color: #c2410c;
    font-size: 0.875rem;
    padding: 11px 14px;
    margin-bottom: 20px;
}

/* Champs */
.pf-form-group {
    margin-bottom: 18px;
}

.pf-form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pf-form-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    outline: none;
    -webkit-appearance: none;
}

.pf-form-input:focus {
    border-color: #1a56a0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,86,160,0.12);
}

.pf-form-input.error {
    border-color: #f87171;
    background: #fef2f2;
}

/* Bouton principal */
.pf-btn-login {
    display: block;
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #1a56a0 0%, #0d2055 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: opacity 0.15s, transform 0.1s;
    margin-top: 4px;
}

.pf-btn-login:hover { opacity: 0.92; transform: translateY(-1px); }
.pf-btn-login:active { opacity: 1; transform: translateY(0); }
.pf-btn-login:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* Loading state */
.pf-btn-login.loading {
    position: relative;
    color: transparent;
}
.pf-btn-login.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pf-spin 0.7s linear infinite;
}

@keyframes pf-spin { to { transform: rotate(360deg); } }

/* Pied de carte */
.pf-login-footer {
    border-top: 1px solid #f3f4f6;
    padding: 14px 28px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.75rem;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .pf-login-card { border-radius: 10px; }
    .pf-login-header { padding: 24px 16px 20px; }
    .pf-login-body { padding: 24px 16px 20px; }
    .pf-login-footer { padding: 12px 16px; }
}
