@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── Variables globales ──────────────────────────────────────── */
:root {
    --bg-color: #f0f4f8;
    --card-bg: #ffffff;
    --card-border: #dde3ec;
    --text-primary: #1a2536;
    --text-secondary: #5a6a82;
    --primary: #1d4ed8;
    --primary-glow: rgba(29, 78, 216, 0.15);
    --accent: #0369a1;
    --accent-glow: rgba(3, 105, 161, 0.15);
    --card-hover-border: #1d4ed8;
    --badge-bg: #dbeafe;
    --badge-text: #1e40af;
    --badge-accent-bg: #e0f2fe;
    --badge-accent-text: #0369a1;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

/* ── Body ────────────────────────────────────────────────────── */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ── Décor de fond ───────────────────────────────────────────── */
.bg-glow-1 {
    position: absolute;
    top: -15%;
    left: -15%;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(219, 234, 254, 0.6) 0%, rgba(219, 234, 254, 0) 70%);
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
}

.bg-glow-2 {
    position: absolute;
    bottom: -15%;
    right: -15%;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 242, 254, 0.5) 0%, rgba(224, 242, 254, 0) 70%);
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
}

/* ── Header ──────────────────────────────────────────────────── */
header {
    position: relative;
    z-index: 10;
    background: #1a2536;
    border-bottom: 1px solid #0f172a;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@media (min-width: 640px) {
    header { padding: 16px 24px; }
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.logo-icon svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

@media (min-width: 640px) {
    .logo-icon { width: 40px; height: 40px; border-radius: 12px; }
    .logo-icon svg { width: 20px; height: 20px; }
}

.logo-text {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
}

@media (min-width: 640px) {
    .logo-text { font-size: 20px; }
}

.header-actions {
    display: flex;
    align-items: center;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 8px 10px;
    color: #fca5a5;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 40px;
}

@media (min-width: 480px) {
    .logout-btn { padding: 10px 18px; gap: 8px; }
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

/* Texte masqué sur petits écrans — SVG reste visible */
.btn-label {
    display: none;
}

@media (min-width: 480px) {
    .btn-label { display: inline; }
}

/* ── Flash messages ──────────────────────────────────────────── */
.flash-container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0 24px;
}

.flash-alert {
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

.flash-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.flash-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
