/* ============================================================
   POINTEUSE ORPC CHAMPAGNE - Stylesheet
   ============================================================ */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0f172a;
    background: #f8fafc;
    line-height: 1.5;
}

a { color: #d97706; text-decoration: none; }
a:hover { text-decoration: underline; }

hr { border: none; border-top: 1px solid #e2e8f0; margin: 24px 0; }

/* ============================================================
   PAGES DE LOGIN
   ============================================================ */

.login-body {
    background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.login-container { width: 100%; max-width: 440px; }

.login-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    padding: 32px;
    border-top: 4px solid #f59e0b;
}
.login-card-wide { max-width: 520px; }

.login-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.login-shield {
    background: #f59e0b;
    color: white;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    font-size: 22px;
}
.login-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}
.login-header p {
    margin: 0;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-card h2 {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 16px;
}

.login-help {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px;
}

.login-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}

/* Formulaires */
label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin: 12px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="time"], input[type="date"], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.otp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 0.5em;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-weight: 600;
}

.btn-primary {
    width: 100%;
    background: #0f172a;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.15s;
}
.btn-primary:hover { background: #1e293b; }

.btn-amber {
    background: #f59e0b;
}
.btn-amber:hover { background: #d97706; }

/* Alertes */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 13px;
}
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Setup 2FA */
.setup-steps {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px 16px 16px 36px;
    font-size: 13px;
    color: #475569;
    margin: 16px 0;
}
.setup-steps li { margin: 4px 0; }

.qr-container {
    text-align: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}
.qr-container img { display: block; margin: 0 auto; }

.manual-secret {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 13px;
}
.manual-secret summary {
    cursor: pointer;
    color: #d97706;
    font-weight: 600;
}
.secret-code {
    display: block;
    background: #0f172a;
    color: #f59e0b;
    padding: 12px;
    border-radius: 4px;
    margin-top: 8px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 14px;
    text-align: center;
    letter-spacing: 0.05em;
}

/* ============================================================
   APP MAIN (à étendre dans la vague 3)
   ============================================================ */

.header-bar {
    background: #0f172a;
    color: white;
    padding: 12px 16px;
}
.header-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-brand strong { font-size: 14px; }
.header-brand .sub { font-size: 11px; color: #94a3b8; }
.header-icons {
    display: flex;
    gap: 4px;
    align-items: center;
}
.header-icons a, .header-icons button {
    color: white;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}
.header-icons a:hover, .header-icons button:hover { background: #1e293b; }
.header-user {
    text-align: right;
    margin-right: 8px;
    font-size: 13px;
}
.header-user .name { font-weight: 600; }
.header-user .role { font-size: 11px; color: #94a3b8; }

main.app-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
}

@media (max-width: 600px) {
    .login-card { padding: 24px 20px; }
    main.app-main { padding: 12px; }
    .header-user { display: none; }
}
