﻿/* ─── RESET & BASE ─────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f4f4f4;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}

a {
    color: #2d7dd2;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* ─── NAVBAR ────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: #2d7dd2;
    letter-spacing: -0.5px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

    .navbar-links a {
        font-size: 12px;
        font-weight: 600;
        color: #555;
        letter-spacing: .5px;
        text-decoration: none;
    }

        .navbar-links a:hover {
            color: #2d7dd2;
        }

/* ─── BURGER MOBILE ─────────────────────────────────────── */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

    .burger span {
        display: block;
        width: 24px;
        height: 2px;
        background: #333;
        border-radius: 2px;
    }

/* ─── PAGE CONTENT ──────────────────────────────────────── */
.page-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 32px 40px;
}

/* ─── CARDS ─────────────────────────────────────────────── */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

/* ─── STATS ─────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    border: 1px solid #e5e5e5;
}

/* ─── BOUTONS ───────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary {
    background: #2d7dd2;
    color: #fff;
}

    .btn-primary:hover {
        background: #1a5fa8;
        color: #fff;
    }

.btn-secondary {
    background: #eee;
    color: #333;
}

    .btn-secondary:hover {
        background: #ddd;
        color: #333;
    }

.btn-danger {
    background: #e53935;
    color: #fff;
}

    .btn-danger:hover {
        background: #b71c1c;
        color: #fff;
    }

.btn-success {
    background: #2e7d32;
    color: #fff;
}

    .btn-success:hover {
        background: #1b5e20;
        color: #fff;
    }

/* ─── FORMULAIRES ───────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

    .form-group label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        color: #555;
        margin-bottom: 6px;
    }

    .form-group input:not([type="checkbox"]):not([type="radio"]),
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 9px 14px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        font-family: 'Segoe UI', sans-serif;
        outline: none;
        transition: border 0.2s;
        background: #fff;
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: #2d7dd2;
        }

/* ─── BADGES ────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-blue {
    background: #e8f0fb;
    color: #1a5fa8;
}

.badge-green {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-orange {
    background: #fff3e0;
    color: #e65100;
}

.badge-red {
    background: #fdecea;
    color: #b71c1c;
}

.badge-gray {
    background: #f0f0f0;
    color: #555;
}

/* ─── STATUTS CANDIDATURES ──────────────────────────────── */
.statut-a-contacter {
    background: #f0f0f0;
    color: #555;
}

.statut-contacte {
    background: #e8f0fb;
    color: #1a5fa8;
}

.statut-relance {
    background: #fff3e0;
    color: #e65100;
}

.statut-en-attente {
    background: #fff8e1;
    color: #f57f17;
}

.statut-refus {
    background: #fdecea;
    color: #b71c1c;
}

.statut-accord {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ─── ALERTES ───────────────────────────────────────────── */
.alert-error {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 13px;
    margin-bottom: 20px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 13px;
    margin-bottom: 20px;
}

/* ─── TABLEAUX ──────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    table th {
        text-align: left;
        padding: 10px 14px;
        font-size: 12px;
        font-weight: 600;
        color: #888;
        text-transform: uppercase;
        letter-spacing: .4px;
        border-bottom: 1px solid #e5e5e5;
    }

    table td {
        padding: 12px 14px;
        border-bottom: 1px solid #f0f0f0;
        vertical-align: middle;
    }

    table tr:hover td {
        background: #fafafa;
    }

/* ─── RESPONSIVE MOBILE ─────────────────────────────────── */
@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .navbar-links {
        display: none;
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 24px;
        gap: 16px;
        border-bottom: 1px solid #e5e5e5;
        z-index: 9999;
    }

        .navbar-links.open {
            display: flex;
        }

    .page-content {
        padding: 20px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── RESPONSIVE TABLEAU ────────────────────────────────── */
@media (max-width: 768px) {

    table.table-responsive {
        border: none;
    }

        table.table-responsive colgroup {
            display: none;
        }

        table.table-responsive thead {
            display: none;
        }

        table.table-responsive tbody tr {
            display: block;
            border: 1px solid #e5e5e5;
            border-radius: 8px;
            margin-bottom: 12px;
            background: #fff;
            overflow: hidden;
        }

        table.table-responsive tbody td {
            display: block;
            padding: 6px 14px;
            border-bottom: 1px solid #f0f0f0;
            font-size: 13px;
        }

            table.table-responsive tbody td::before {
                display: none;
            }

            table.table-responsive tbody td:last-child {
                border-bottom: none;
                display: flex;
                gap: 8px;
                justify-content: flex-end;
                padding: 10px 14px;
                background: #f9f9f9;
            }

    /* Filtres — 1 colonne */
    #panneauFiltres .card {
        height: auto !important;
        resize: none !important;
    }

    #panneauFiltres [style*="grid-template-columns:"] {
        grid-template-columns: 1fr !important;
    }
}


/* Stats compactes sur mobile */
.stats-grid {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 0px;
    -webkit-overflow-scrolling: touch;
}

.stat-card {
    min-width: 80px;
    flex-shrink: 0;
    padding: 12px;
    text-align: center;
}

    .stat-card div:first-child {
        font-size: 22px !important;
    }

    .stat-card div:last-child {
        font-size: 11px !important;
        margin-top: 2px !important;
    }

/* Responsive Profil */
.profil-formations-mobile {
    display: none;
}

@media (max-width: 768px) {
    .profil-formations-desktop {
        display: none;
    }

    .profil-formations-mobile {
        display: block;
    }

    /* Grille 1 colonne sur mobile */
    form > div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}