/* ============================================================
   Plateforme G.M.D - Ratoma
   Design system moderne avec animations
   ============================================================ */

:root {
    /* Couleurs officielles G.M.D : vert olive + or */
    --primary: #5d6e2e;        /* vert olive G.M.D */
    --primary-dark: #3e4a1e;   /* vert très foncé */
    --primary-light: #7a8e3d;  /* vert clair */
    --accent: #d4af3a;         /* or G.M.D */
    --accent-dark: #b8932b;    /* or foncé */
    --accent-light: #e6c862;   /* or clair */

    --success: #16a34a;
    --success-light: #22c55e;
    --danger: #dc2626;
    --danger-light: #ef4444;
    --warning: #d97706;
    --info: #0891b2;
    --purple: #7c3aed;
    --info-blue: #2563eb;

    --gradient-primary: linear-gradient(135deg, #5d6e2e 0%, #7a8e3d 100%);
    --gradient-accent: linear-gradient(135deg, #b8932b 0%, #d4af3a 100%);
    --gradient-gmd: linear-gradient(135deg, #5d6e2e 0%, #3e4a1e 60%, #d4af3a 100%);
    --gradient-success: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
    --gradient-danger: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --gradient-warning: linear-gradient(135deg, #b8932b 0%, #d4af3a 100%);
    --gradient-purple: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
    --gradient-dark: linear-gradient(135deg, #1a1f0c 0%, #2d3517 100%);
    --gradient-bg: linear-gradient(135deg, #f8fafc 0%, #e9ecd9 100%);

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    --shadow-glow: 0 0 0 4px rgba(122, 142, 61, 0.2);

    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, 'Inter', 'Helvetica Neue', sans-serif;
    background: var(--gradient-bg);
    background-attachment: fixed;
    color: var(--gray-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

body { line-height: 1.5; }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

h1, h2, h3, h4 { color: var(--gray-900); margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: 1.8rem; letter-spacing: -0.025em; }
h2 { font-size: 1.4rem; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; }

/* SVG icons : style commun */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.15em;
    fill: currentColor;
    flex-shrink: 0;
}
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-xl { width: 2em; height: 2em; }

/* ===================== ANIMATIONS ===================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(212, 175, 58, 0.3); }
    50% { box-shadow: 0 0 20px rgba(212, 175, 58, 0.6); }
}

.fade-in { animation: fadeIn 0.4s ease forwards; }
.fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.scale-in { animation: scaleIn 0.4s ease forwards; }
.slide-in-left { animation: slideInLeft 0.4s ease forwards; }

/* Animation staggered pour listes */
.stagger > * {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }
.stagger > *:nth-child(9) { animation-delay: 0.45s; }
.stagger > *:nth-child(10) { animation-delay: 0.5s; }

/* ===================== TOPBAR ===================== */

.topbar {
    background: var(--gradient-dark);
    color: #fff;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.brand {
    display: flex; align-items: center; gap: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}
.brand:hover { color: #fff; transform: translateY(-1px); }

.brand-logo {
    background: #fff;
    width: 46px; height: 46px;
    border-radius: 12px;
    display: grid; place-items: center;
    box-shadow: 0 4px 12px rgba(212, 175, 58, 0.45);
    transition: var(--transition);
    overflow: hidden;
    padding: 4px;
}
.brand-logo img {
    width: 100%; height: 100%;
    object-fit: contain;
}
.brand:hover .brand-logo { transform: rotate(-5deg) scale(1.05); }
.brand-text strong { display: block; font-size: 1rem; font-weight: 700; }
.brand-text small { opacity: 0.7; font-size: 0.72rem; letter-spacing: 0.3px; }

.topbar-nav {
    flex: 1;
    display: flex; gap: 0.25rem;
    margin-left: 1.5rem;
    flex-wrap: wrap;
}
.topbar-nav a {
    color: rgba(255, 255, 255, 0.75);
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
}
.topbar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-1px);
}
.topbar-nav a.active {
    background: rgba(212, 175, 58, 0.25);
    color: #fff;
}
.topbar-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%; transform: translateX(-50%);
    width: 20px; height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.topbar-user {
    display: flex; align-items: center; gap: 1rem;
}
.user-info { text-align: right; line-height: 1.2; }
.user-info strong { display: block; font-size: 0.88rem; color: #fff; }
.user-info small { opacity: 0.65; font-size: 0.72rem; }

.topbar-bureau-link {
    color: var(--accent-light);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.topbar-bureau-link:hover { color: #fff; }

/* Liens « fiche bureau » dans les formulaires et confirmations */
.bureau-title-link {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
}
.bureau-title-link:hover { color: var(--primary-dark); }

.bureau-subtitle-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.bureau-subtitle-link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: grid; place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.logout-form { margin: 0; }

/* Pulse "en ligne" */
.online-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--success-light);
    border-radius: 50%;
    margin-right: 0.35rem;
    animation: pulseDot 2s infinite;
    vertical-align: 0.1em;
}

/* ===================== MAIN ===================== */

.main-container {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    animation: fadeIn 0.4s ease;
}
.main-fullscreen {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(at top left, rgba(122, 142, 61, 0.45) 0%, transparent 50%),
        radial-gradient(at bottom right, rgba(212, 175, 58, 0.35) 0%, transparent 50%),
        var(--gradient-dark);
    position: relative;
    overflow: hidden;
}
.main-fullscreen::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(245,158,11,0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* ===================== BUTTONS ===================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    border: none;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gradient-primary);
    color: #fff;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(93, 110, 46, 0.3);
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}
.btn:hover::before { transform: translateX(0); }
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(93, 110, 46, 0.4);
    color: #fff;
}
.btn:active { transform: translateY(0); }
.btn > * { position: relative; z-index: 1; }

.btn-block { width: 100%; }
.btn-lg { padding: 0.9rem 1.6rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.82rem; }
.btn-xs { padding: 0.3rem 0.65rem; font-size: 0.75rem; }

.btn-success { background: var(--gradient-success); box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3); }
.btn-success:hover { box-shadow: 0 8px 20px rgba(22, 163, 74, 0.4); }
.btn-danger { background: var(--gradient-danger); box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3); }
.btn-danger:hover { box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4); }
.btn-warning { background: var(--gradient-warning); box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3); }
.btn-warning:hover { box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4); }
.btn-purple { background: var(--gradient-purple); box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3); }
.btn-secondary { background: var(--gray-600); box-shadow: 0 2px 8px rgba(71, 85, 105, 0.25); }
.btn-secondary:hover { background: var(--gray-700); }

.btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: none;
}
.btn-ghost::before { background: rgba(255, 255, 255, 0.1); }
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    box-shadow: none;
}
.btn-outline::before { background: var(--primary); }
.btn-outline:hover { color: #fff; box-shadow: 0 4px 12px rgba(93, 110, 46, 0.3); }

.btn-light {
    background: #fff;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.btn-light::before { background: var(--gray-100); }
.btn-light:hover { color: var(--gray-900); border-color: var(--gray-300); }

/* Floating action button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 10px 25px rgba(93, 110, 46, 0.45);
    border: none;
    cursor: pointer;
    z-index: 50;
    transition: var(--transition);
    font-size: 1.4rem;
}
.fab:hover { transform: scale(1.1) rotate(10deg); color: #fff; }

/* ===================== ALERTS ===================== */

.messages-wrapper {
    max-width: 1400px;
    margin: 1rem auto 0;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius);
    border-left: 4px solid;
    background: #fff;
    box-shadow: var(--shadow-md);
    display: flex; justify-content: space-between; align-items: center;
    animation: fadeInDown 0.4s ease;
    gap: 1rem;
}
.alert-content { display: flex; align-items: center; gap: 0.6rem; flex: 1; }
.alert-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.5rem; line-height: 1;
    color: var(--gray-400);
    padding: 0; width: 24px; height: 24px;
    border-radius: 50%;
    display: grid; place-items: center;
    transition: var(--transition);
}
.alert-close:hover { background: var(--gray-100); color: var(--gray-700); }

.alert-success { border-color: var(--success); color: #166534; background: #f0fdf4; }
.alert-info { border-color: var(--info); color: #155e75; background: #ecfeff; }
.alert-warning { border-color: var(--warning); color: #854d0e; background: #fefce8; }
.alert-danger, .alert-error { border-color: var(--danger); color: #991b1b; background: #fef2f2; }

/* ===================== CARDS ===================== */

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    animation: fadeInUp 0.4s ease;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--gray-200);
    gap: 1rem;
    flex-wrap: wrap;
}
.card-title {
    margin: 0;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-subtitle { color: var(--gray-500); font-size: 0.85rem; }

/* ===================== FORMS ===================== */

.form-group {
    margin-bottom: 1.15rem;
}
.form-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}
.form-input,
input[type='text'],
input[type='password'],
input[type='number'],
input[type='email'],
input[type='tel'],
select,
textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: #fff;
}
.form-input:hover,
input:hover, select:hover, textarea:hover {
    border-color: var(--gray-300);
}
.form-input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: var(--shadow-glow);
}
.form-input:disabled,
input:disabled {
    background: var(--gray-50);
    color: var(--gray-500);
    cursor: not-allowed;
}
.form-helptext {
    display: block;
    margin-top: 0.3rem;
    color: var(--gray-500);
    font-size: 0.78rem;
}
.form-errors { color: var(--danger); font-size: 0.85rem; margin-top: 0.3rem; font-weight: 500; }
.form-errors ul { list-style: none; padding: 0; margin: 0; }
.form-actions {
    display: flex; gap: 0.75rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--gray-200);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
}

/* —— Page formulaire admin (CRUD) —— */
.form-breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
.form-page {
    max-width: 920px;
    margin: 0 auto;
}
.form-editor-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.form-editor-hero-mark {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(74, 93, 55, 0.12) 0%, rgba(212, 175, 58, 0.08) 100%);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.form-editor-hero-mark img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
.form-editor-hero-text {
    flex: 1;
    min-width: 200px;
}
.form-editor-title {
    font-size: clamp(1.25rem, 2.5vw, 1.55rem);
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    line-height: 1.25;
}
.form-editor-lead {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 52ch;
}
.form-editor-back {
    margin-left: auto;
    flex-shrink: 0;
    align-self: center;
}

.form-card-editor {
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
}
.form-card-editor-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}
.form-card-editor-body {
    padding: 1.5rem 1.75rem 1.75rem;
}
.form-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 1.35rem;
    align-items: start;
}
.form-field-pro--full {
    grid-column: 1 / -1;
}
.form-field-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.88rem;
}
.form-field-label .icon {
    color: var(--primary);
    flex-shrink: 0;
}
.form-required {
    margin-left: 0.15rem;
    color: var(--danger);
    text-decoration: none;
    font-weight: 700;
}
.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}
.form-checkbox-label input[type='checkbox'] {
    margin-top: 0.25rem;
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--primary);
    flex-shrink: 0;
}
.form-checkbox-text {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.form-checkbox-text .icon {
    color: var(--primary);
}
.form-input-file {
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
    cursor: pointer;
    background: var(--gray-50);
}
.form-actions--card {
    margin-top: 1.5rem;
    padding-top: 1.35rem;
}

@media (max-width: 640px) {
    .form-fields-grid {
        grid-template-columns: 1fr;
    }
    .form-card-editor-body {
        padding: 1.15rem 1.1rem 1.35rem;
    }
    .form-editor-hero {
        gap: 0.9rem;
    }
}

/* Input with icon */
.input-with-icon {
    position: relative;
}
.input-with-icon input {
    padding-left: 2.6rem;
}
.input-with-icon .icon {
    position: absolute;
    left: 0.85rem;
    top: 50%; transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    font-size: 1.1rem;
}

/* ===================== LOGIN ===================== */

.login-wrapper {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: scaleIn 0.5s ease;
}
.login-header {
    background: var(--gradient-primary);
    color: #fff;
    padding: 2.25rem 2rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.login-header::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(245,158,11,0.3) 0%, transparent 70%);
    border-radius: 50%;
}
.login-logo-wrap {
    margin: 0 auto 1.25rem;
    width: 110px; height: 110px;
    background: #fff;
    border-radius: 24px;
    padding: 10px;
    display: grid; place-items: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1;
}
.login-logo-wrap img {
    width: 100%; height: 100%;
    object-fit: contain;
}
.login-header h1 { color: #fff; font-size: 1.5rem; margin-bottom: 0.35rem; position: relative; }
.login-header p { margin: 0; opacity: 0.92; font-size: 0.9rem; position: relative; }
.login-slogan {
    display: inline-block;
    margin-top: 0.85rem;
    padding: 0.35rem 0.9rem;
    background: rgba(212, 175, 58, 0.2);
    color: var(--accent-light);
    border-radius: 99px;
    font-size: 0.78rem;
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(212, 175, 58, 0.3);
    position: relative; z-index: 1;
}
.login-body { padding: 2rem; }
.login-footer {
    padding: 1.1rem 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-500);
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ===================== ELECTION CHOICE CARDS ===================== */

.election-choice {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.choice-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    border-top: 5px solid var(--primary);
    display: flex; flex-direction: column;
    position: relative;
    cursor: pointer;
}
.choice-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,0.5) 100%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}
.choice-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.choice-card:hover::before { opacity: 1; }

.choice-card-header {
    padding: 1.5rem;
    display: flex; align-items: center; gap: 1rem;
}
.choice-icon {
    width: 60px; height: 60px;
    border-radius: 14px;
    color: #fff;
    display: grid; place-items: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}
.choice-card:hover .choice-icon {
    transform: rotate(-8deg) scale(1.1);
}
.choice-icon .icon { font-size: 1.5rem; }
.choice-card-body { padding: 0 1.5rem 1.5rem; flex: 1; }
.choice-card-body p { color: var(--gray-600); font-size: 0.92rem; line-height: 1.55; }
.choice-card-footer {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    display: flex; justify-content: space-between; align-items: center;
}
.choice-badge {
    font-size: 0.72rem;
    padding: 0.3rem 0.65rem;
    border-radius: 99px;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-700);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.choice-badge.done { background: #dcfce7; color: #166534; }
.choice-badge.validated { background: #dbeafe; color: #1e40af; }

/* ===================== DASHBOARD STATS ===================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: #fff;
    padding: 1.35rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease forwards;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: -50%; right: -25%;
    width: 150px; height: 150px;
    background: var(--primary);
    opacity: 0.05;
    border-radius: 50%;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-card:hover::after { opacity: 0.1; transform: scale(1.2); }

.stat-card-content { position: relative; z-index: 1; }
.stat-card-icon {
    position: absolute;
    top: 1.35rem; right: 1.5rem;
    width: 42px; height: 42px;
    border-radius: 12px;
    background: rgba(93, 110, 46, 0.12);
    color: var(--primary);
    display: grid; place-items: center;
    font-size: 1.2rem;
}
.stat-label {
    font-size: 0.78rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
    font-weight: 700;
}
.stat-value {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    letter-spacing: -0.025em;
}
.stat-sub {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-top: 0.35rem;
}
.stat-trend {
    display: inline-flex; align-items: center; gap: 0.2rem;
    margin-top: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}
.stat-trend.up { background: #dcfce7; color: #166534; }
.stat-trend.down { background: #fee2e2; color: #991b1b; }
.stat-trend.neutral { background: var(--gray-100); color: var(--gray-600); }

.stat-card.success { border-color: var(--success); }
.stat-card.success::after { background: var(--success); }
.stat-card.success .stat-card-icon { background: rgba(22, 163, 74, 0.1); color: var(--success); }

.stat-card.warning { border-color: var(--warning); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.warning .stat-card-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

.stat-card.danger { border-color: var(--danger); }
.stat-card.danger::after { background: var(--danger); }
.stat-card.danger .stat-card-icon { background: rgba(220, 38, 38, 0.1); color: var(--danger); }

.stat-card.purple { border-color: var(--purple); }
.stat-card.purple::after { background: var(--purple); }
.stat-card.purple .stat-card-icon { background: rgba(124, 58, 237, 0.1); color: var(--purple); }

/* ===================== TYPE ELECTION OVERVIEW ===================== */

.type-overview {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--primary);
    transition: var(--transition);
    animation: fadeInUp 0.4s ease forwards;
}
.type-overview:hover { box-shadow: var(--shadow-md); }

.type-overview-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 1.25rem;
    flex-wrap: wrap; gap: 1rem;
}
.type-overview-title h2 {
    margin-bottom: 0.35rem;
    display: flex; align-items: center; gap: 0.6rem;
}
.type-overview-meta {
    display: flex; gap: 1.25rem; flex-wrap: wrap;
    color: var(--gray-600);
    font-size: 0.88rem;
}
.type-overview-meta strong { color: var(--gray-900); }
.type-overview-meta .meta-item {
    display: inline-flex; align-items: center; gap: 0.3rem;
}

.gagnant-banner {
    background: linear-gradient(120deg, #fef3c7, #fde68a);
    border-radius: var(--radius);
    padding: 1.1rem 1.35rem;
    margin: 1rem 0 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    border: 1px solid #fbbf24;
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.15);
}
.gagnant-banner .crown {
    width: 52px; height: 52px;
    background: var(--gradient-warning);
    border-radius: 50%;
    display: grid; place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    animation: bounce 2s infinite;
}
.gagnant-banner-content { flex: 1; }
.gagnant-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #92400e;
    font-weight: 700;
    margin-bottom: 0.2rem;
}
.gagnant-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Ranking bars */
.ranking-list { display: flex; flex-direction: column; gap: 0.7rem; }
.ranking-row {
    display: grid;
    grid-template-columns: 36px 1fr 100px;
    align-items: center;
    gap: 0.85rem;
    padding: 0.35rem 0;
    animation: slideInLeft 0.4s ease forwards;
}

/* Liste classement alimentée en temps réel : pas de ré-anim / opacité 0 (stagger) ni shimmer */
#live-ranking-list > .ranking-row {
    animation: none;
    opacity: 1;
}
#live-ranking-list .ranking-bar-fill::after {
    display: none;
}
.ranking-rank {
    width: 32px; height: 32px;
    background: var(--gray-200);
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--gray-700);
    flex-shrink: 0;
}
.ranking-rank.r1 {
    background: var(--gradient-warning);
    color: #fff;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}
.ranking-rank.r2 {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
    color: #fff;
}
.ranking-rank.r3 {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #fff;
}

.ranking-bar-wrap {
    position: relative;
    height: 32px;
    background: var(--gray-100);
    border-radius: 99px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.ranking-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    max-width: 100%;
    min-width: 0;
    background: var(--gradient-primary);
    border-radius: 99px;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 1;
    box-sizing: border-box;
}
.ranking-bar-fill .ranking-pct-label {
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.ranking-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
}
.ranking-meta {
    text-align: right;
    font-weight: 700;
    color: var(--gray-700);
    font-size: 0.95rem;
}
.ranking-meta small { display: block; font-size: 0.72rem; color: var(--gray-500); font-weight: 500; }

/* ===================== TABLES ===================== */

.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.table th, .table td {
    padding: 0.85rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
}
.table th {
    background: var(--gray-50);
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.74rem;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr {
    transition: var(--transition);
}
.table tbody tr:hover {
    background: var(--gray-50);
    transform: translateX(2px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.28rem 0.65rem;
    border-radius: 99px;
    font-size: 0.74rem;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-700);
    line-height: 1.2;
}
.badge.success { background: #dcfce7; color: #166534; }
.badge.warning { background: #fef3c7; color: #854d0e; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.badge.info { background: #cffafe; color: #155e75; }
.badge.purple { background: #ede9fe; color: #5b21b6; }
.badge.primary { background: #dbeafe; color: #1e40af; }

.badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

/* ===================== PAGE HEADER ===================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
    animation: fadeInDown 0.4s ease;
}
.page-header h1 {
    margin: 0;
    display: flex; align-items: center; gap: 0.6rem;
}
.page-header .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.breadcrumb {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--gray-300); }

/* ===================== REMONTEE FORM ===================== */

.remontee-hero {
    color: #fff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex; gap: 1.5rem; align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.remontee-hero::before {
    content: '';
    position: absolute;
    top: -30%; right: -10%;
    width: 250px; height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}
.remontee-hero::after {
    content: '';
    position: absolute;
    bottom: -50%; right: -20%;
    width: 300px; height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}
.remontee-hero > * { position: relative; z-index: 1; }
.remontee-hero h1 { color: #fff; margin-bottom: 0.3rem; font-size: 1.6rem; }
.remontee-hero p { margin: 0; opacity: 0.92; }
.remontee-hero-icon {
    width: 80px; height: 80px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    display: grid; place-items: center;
    font-size: 1.4rem;
    font-weight: 800;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1.75rem 0 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-title .section-number {
    background: var(--gradient-primary);
    color: #fff;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 0.78rem;
    font-weight: 800;
}

/* Assistant étape par étape — dépouillement */
.depouillement-wizard {
    margin-bottom: 0.5rem;
}
.wizard-progress {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.15rem;
}
.wizard-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--gray-300);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.wizard-dot:hover {
    background: var(--gray-400);
    transform: scale(1.12);
}
.wizard-dot.is-done {
    background: var(--primary-light);
}
.wizard-dot.is-active {
    background: var(--primary);
    transform: scale(1.35);
    box-shadow: 0 0 0 3px rgba(93, 110, 46, 0.22);
}
.wizard-steps-wrap {
    position: relative;
    margin-bottom: 1.25rem;
}
.wizard-step {
    display: none;
}
.wizard-step.is-active {
    display: block;
    animation: wizardStepIn 0.38s ease;
}
@keyframes wizardStepIn {
    from {
        opacity: 0;
        transform: translateX(14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.85rem;
    border-top: 1px solid var(--gray-200);
}

.wizard-validation-banner {
    display: none;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fef2f2, #fff);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    animation: wizardStepIn 0.3s ease;
}
.wizard-validation-banner.is-visible {
    display: flex;
}
.wizard-validation-banner .icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.form-input.field-coherence-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

/* Champ suffrages calculé automatiquement */
input#id_suffrages_exprimes[readonly] {
    background: var(--gray-50);
    color: var(--gray-700);
    cursor: default;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.voix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 0.85rem;
}

.voix-card {
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition);
}
.voix-card:focus-within {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}
.voix-card-header {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 0.55rem;
}
.voix-card-color {
    width: 18px; height: 18px;
    border-radius: 5px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.voix-card-label {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-700);
    line-height: 1.25;
}
.voix-card-label small { display: block; font-size: 0.75rem; color: var(--gray-500); font-weight: 500; }
.voix-card input {
    font-size: 1.05rem;
    font-weight: 600;
    text-align: right;
}
.voix-card-percent {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 0.4rem;
    text-align: right;
    font-weight: 600;
}

.voix-summary {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--gray-50), #fff);
    border-radius: var(--radius);
    border: 1.5px solid var(--gray-200);
    display: flex; justify-content: space-between;
    align-items: center;
    font-weight: 600;
    flex-wrap: wrap; gap: 0.75rem;
    transition: var(--transition);
}
.voix-summary.is-ok {
    background: linear-gradient(135deg, #f0fdf4, #fff);
    border-color: var(--success);
}
.voix-summary.is-error {
    background: linear-gradient(135deg, #fef2f2, #fff);
    border-color: var(--danger);
}
.voix-summary .status {
    font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 0.35rem;
}
.voix-summary .ok { color: var(--success); }
.voix-summary .err { color: var(--danger); }

/* Helper bar */
.helper-bar {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.helper-bar-icon {
    width: 38px; height: 38px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 10px;
    display: grid; place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.helper-bar-text { flex: 1; min-width: 200px; font-size: 0.88rem; color: var(--gray-700); }
.helper-bar-text strong { color: var(--gray-900); }
.helper-bar-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ===================== CHART CONTAINER ===================== */

.chart-wrap {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    min-height: 380px;
    position: relative;
}

/* ===================== EMPTY STATE ===================== */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}
.empty-state-icon {
    width: 80px; height: 80px;
    background: var(--gray-100);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: grid; place-items: center;
    color: var(--gray-400);
    font-size: 2rem;
}
.empty-state h3 { color: var(--gray-700); margin-bottom: 0.5rem; }

/* ===================== FOOTER ===================== */

.footer {
    background: var(--gradient-dark);
    color: var(--gray-300);
    margin-top: auto;
    position: relative;
    overflow: hidden;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--primary) 0%, var(--primary-light) 33%,
        var(--accent) 66%, var(--accent-light) 100%);
}
.footer::after {
    content: '';
    position: absolute;
    top: -20%; right: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(212, 175, 58, 0.08) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.footer-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 1.5rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.footer-brand {
    display: flex; flex-direction: column; gap: 0.85rem;
}
.footer-brand-row {
    display: flex; align-items: center; gap: 0.85rem;
}
.footer-brand-logo {
    width: 60px; height: 60px;
    background: #fff;
    border-radius: 14px;
    padding: 6px;
    display: grid; place-items: center;
    box-shadow: 0 6px 18px rgba(212, 175, 58, 0.3);
}
.footer-brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.footer-brand-text h3 {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}
.footer-brand-text small {
    color: var(--accent-light);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

.footer-slogan {
    background: linear-gradient(135deg, rgba(212, 175, 58, 0.15), rgba(212, 175, 58, 0.05));
    border-left: 3px solid var(--accent);
    padding: 0.85rem 1rem;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--accent-light);
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-description {
    color: var(--gray-400);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

.footer-column h4 {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.footer-column h4::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 175, 58, 0.4), transparent);
    margin-left: 0.5rem;
}

.footer-column ul {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column;
    gap: 0.55rem;
}
.footer-column li a,
.footer-column li {
    color: var(--gray-300);
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: var(--transition);
}
.footer-column li a:hover {
    color: var(--accent);
    transform: translateX(3px);
}
.footer-column li .icon {
    color: var(--accent);
    font-size: 0.9rem;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--gray-300);
}
.footer-contact-item .icon {
    color: var(--accent);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.1rem 0;
    position: relative;
    z-index: 1;
}
.footer-bottom-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
}
.footer-copy { color: var(--gray-400); }
.footer-copy strong { color: var(--accent); }

.footer-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.footer-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.footer-badge.tech {
    background: rgba(212, 175, 58, 0.12);
    color: var(--accent-light);
    border-color: rgba(212, 175, 58, 0.25);
}

@media (max-width: 900px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 600px) {
    .footer-main {
        grid-template-columns: 1fr;
        padding: 2rem 1.25rem 1rem;
    }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
}

/* ===================== UTILITIES ===================== */

.text-muted { color: var(--gray-500); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-bold { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.hide-mobile { }
.show-mobile { display: none !important; }
.hide-mobile-flex { display: flex !important; align-items: center; gap: 0.35rem; }

/* Loading spinner */
.spinner {
    width: 18px; height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
    vertical-align: -0.2em;
}

/* Progress bar */
.progress {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 99px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 99px;
    transition: width 0.6s ease;
}
.progress-fill.success { background: var(--gradient-success); }
.progress-fill.warning { background: var(--gradient-warning); }
.progress-fill.danger { background: var(--gradient-danger); }

/* ===================== RESPONSIVE ===================== */

@media (max-width: 768px) {
    .topbar-inner { flex-wrap: wrap; padding: 0.6rem 1rem; gap: 0.5rem; }
    .topbar-nav { width: 100%; margin: 0; order: 3; }
    .topbar-user { gap: 0.5rem; }
    .user-info { display: none; }
    .main-container { padding: 1rem; }
    .remontee-hero { flex-direction: column; text-align: center; padding: 1.5rem 1rem; }
    .page-header { flex-direction: column; align-items: stretch; }
    .ranking-row { grid-template-columns: 28px 1fr 80px; gap: 0.5rem; }
    h1 { font-size: 1.4rem; }
    .stat-value { font-size: 1.7rem; }
    .stat-card-icon { width: 36px; height: 36px; }
    .card { padding: 1.25rem; }
    .voix-grid { grid-template-columns: 1fr; }
    .hide-mobile { display: none !important; }
    .hide-mobile-flex { display: none !important; }
    .show-mobile { display: initial !important; }
}

/* --- Modal confirmation présence (jour J) --- */
.presence-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: presenceFadeIn 0.25s ease;
}

@keyframes presenceFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.presence-modal {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 420px;
    width: 100%;
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.presence-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: var(--radius);
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.presence-modal-title {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.presence-modal-text {
    margin: 0 0 1.25rem;
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.55;
}

.presence-modal-actions {
    margin: 0;
    display: flex;
    justify-content: center;
}

.presence-modal-btn {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    font-weight: 600;
}

.table tbody tr.row-pending {
    background: rgba(254, 226, 226, 0.35);
}
