/* ============================================
   SYSTÈME DE DESIGN - SAISONWORK
   Design System avec variables CSS
   ============================================ */

:root {
    /* Couleurs Primaires */
    --color-primary: #667eea;
    --color-primary-dark: #5568d3;
    --color-primary-light: #8b9ef0;

    /* Couleurs Secondaires */
    --color-secondary: #764ba2;
    --color-secondary-dark: #62398a;
    --color-secondary-light: #8b5aa3;

    /* Couleurs de Statut */
    --color-success: #2ecc71;
    --color-warning: #f39c12;
    --color-danger: #e74c3c;
    --color-info: #3498db;

    /* Couleurs Neutres */
    --color-dark: #2c3e50;
    --color-light: #ecf0f1;
    --color-white: #ffffff;
    --color-gray: #95a5a6;
    --color-gray-light: #f9f9f9;
    --color-gray-dark: #34495e;

    /* Espacements */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Typography */
    --font-family: 'Segoe UI', 'Tahoma', 'Geneva', 'Verdana', sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;

    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;

    /* Z-Index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-base); }
h5 { font-size: var(--font-size-sm); }
h6 { font-size: var(--font-size-sm); }

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-sm {
    max-width: 640px;
}

.container-md {
    max-width: 768px;
}

.container-lg {
    max-width: 1024px;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-md);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.grid-rows-2 { grid-template-rows: repeat(2, 1fr); }
.grid-rows-3 { grid-template-rows: repeat(3, 1fr); }

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-center { align-items: center; }
.items-stretch { align-items: stretch; }

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    user-select: none;
    gap: var(--space-sm);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Button Variants */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--color-gray);
    color: var(--color-white);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--color-gray-dark);
}

.btn-success {
    background-color: var(--color-success);
    color: var(--color-white);
}

.btn-success:hover:not(:disabled) {
    background-color: #27ae60;
}

.btn-danger {
    background-color: var(--color-danger);
    color: var(--color-white);
}

.btn-danger:hover:not(:disabled) {
    background-color: #c0392b;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover:not(:disabled) {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-lg);
}

.btn-block {
    width: 100%;
}

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

.card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-body {
    padding: var(--space-lg);
}

.card-header {
    padding: var(--space-lg);
    background-color: var(--color-gray-light);
    border-bottom: 1px solid var(--color-light);
}

.card-footer {
    padding: var(--space-lg);
    background-color: var(--color-gray-light);
    border-top: 1px solid var(--color-light);
}

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

.form-group {
    margin-bottom: var(--space-lg);
}

label {
    display: block;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-sm);
    color: var(--color-dark);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    border: 1px solid var(--color-light);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background-color: var(--color-white);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.form-text {
    font-size: var(--font-size-sm);
    color: var(--color-gray);
    margin-top: var(--space-xs);
}

.form-error {
    color: var(--color-danger);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
}

/* ============================================
   NAVIGATION
   ============================================ */

/*
   Charte des boutons de barre.

   Sur un dégradé clair, un bouton « fantôme » (fond transparent + fine bordure
   blanche) est invisible tant qu'on ne le survole pas, et le texte blanc y
   plafonne à 3,7:1 — sous le seuil WCAG AA de 4,5:1.
   D'où le voile SOMBRE : il assombrit le fond au lieu de l'éclaircir, donc le
   bouton se voit AU REPOS et le texte blanc repasse au-dessus de 4,5:1 sur les
   trois dégradés du site (candidat, employeur, admin).
*/
:root {
    --sw-scrim: rgba(29, 18, 66, 0.40);
    --sw-scrim-hover: rgba(29, 18, 66, 0.58);
    --sw-on-light-candidate: #5b3fa8;
    --sw-on-light-employer: #c2255c;
}

.navbar {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    padding: var(--space-md) 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.navbar-brand {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    border-radius: 10px;
    padding: 4px 8px;
    margin: -4px -8px;
    transition: background 160ms ease, transform 160ms ease;
}

.navbar-brand:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.navbar-brand:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    flex-wrap: wrap;
}

/* Pas de couleur imposée à tous les « a » de la barre : cette règle écrasait
   celle du menu de langues (noms blancs sur fond blanc, donc invisibles) et
   celle des boutons pleins. Chaque classe porte désormais sa propre couleur. */
.nav-links a { text-decoration: none; }

/* Icone discrete de la barre (cartes employeur) : pas de pastille, juste le
   pictogramme, legerement attenue au repos. */
.nav-iconlink {
    display: inline-block;
    padding: 6px 7px;
    border-radius: 8px;
    font-size: 1.05rem;
    line-height: 1;
    opacity: 0.72;
    transition: opacity 120ms ease, background 120ms ease;
}
.nav-iconlink:hover,
.nav-iconlink:focus-visible { opacity: 1; background: rgba(255, 255, 255, 0.16); outline: none; }

/* Séparateur entre la zone « navigation » et la zone « comptes ». */
.nav-sep {
    width: 1px;
    height: 26px;
    background: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

/* --- Liens de navigation (utilisateur connecté) --- */
.nav-link {
    display: inline-block;
    padding: 8px 13px;
    border-radius: 9px;
    color: var(--color-white);
    font-size: 0.93rem;
    font-weight: 600;
    transition: background 160ms ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--color-white);
}

.nav-link:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 2px;
}

/* La page courante est signalée : on sait toujours où l'on est. */
.nav-link.is-active {
    background: var(--sw-scrim);
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.85);
}

/* --- Boutons d'action de la barre --- */
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 2px solid transparent;
    font: inherit;
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease,
                transform 160ms ease, box-shadow 160ms ease;
}

.nav-btn:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 3px;
}

/* Contour : action secondaire (connexion, déconnexion). */
.nav-btn--ghost {
    background: var(--sw-scrim);
    border-color: rgba(255, 255, 255, 0.75);
    color: var(--color-white);
}

.nav-btn--ghost:hover {
    background: var(--sw-scrim-hover);
    border-color: var(--color-white);
    color: var(--color-white);
    transform: translateY(-1px);
}

/* Plein : action principale. La couleur du texte code le rôle,
   comme les dégradés des espaces candidat et employeur. */
.nav-btn--candidate,
.nav-btn--employer {
    background: var(--color-white);
    box-shadow: 0 6px 18px -8px rgba(9, 6, 30, 0.75);
}

/* Les deux écritures sont volontaires : si une ancienne feuille traîne encore en
   cache avec « .nav-links a { color: white } », la seconde règle, plus
   spécifique, empêche le texte blanc sur bouton blanc. */
.nav-btn--candidate { color: var(--sw-on-light-candidate); }
.nav-btn--employer { color: var(--sw-on-light-employer); }
.nav-links a.nav-btn--candidate { color: var(--sw-on-light-candidate); }
.nav-links a.nav-btn--employer { color: var(--sw-on-light-employer); }

.nav-btn--candidate:hover,
.nav-btn--employer:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 24px -8px rgba(9, 6, 30, 0.8);
}

.nav-btn--candidate:hover { color: #4a3190; }
.nav-btn--employer:hover { color: #a61e4d; }

@media (prefers-reduced-motion: reduce) {
    .navbar-brand,
    .nav-btn { transition: background 160ms ease, color 160ms ease; }
    .navbar-brand:hover,
    .nav-btn:hover { transform: none; }
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-white);
}

.table th {
    background-color: var(--color-gray-light);
    padding: var(--space-md);
    text-align: left;
    font-weight: var(--font-weight-semibold);
    border-bottom: 2px solid var(--color-light);
}

.table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-light);
}

.table tr:hover {
    background-color: var(--color-gray-light);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
}

.badge-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.badge-success {
    background-color: var(--color-success);
    color: var(--color-white);
}

.badge-warning {
    background-color: var(--color-warning);
    color: var(--color-white);
}

.badge-danger {
    background-color: var(--color-danger);
    color: var(--color-white);
}

.badge-info {
    background-color: var(--color-info);
    color: var(--color-white);
}

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

.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: var(--color-success);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: var(--color-danger);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: var(--color-warning);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: var(--color-info);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin: var(--space-2xl) 0;
    list-style: none;
}

.pagination a,
.pagination span {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-primary);
    transition: all var(--transition-fast);
}

.pagination a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.pagination .active {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-light);
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-light);
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

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

/* ============================================
   NAVIGATION MOBILE
   Barre d'onglets fixe en bas pour les espaces candidat et employeur,
   bouton d'inscription unique pour les visiteurs. Tout est inerte au-dela
   de 768 px : le bureau garde la barre du haut telle quelle.
   ============================================ */

/* Masques : .sw-desktop-only disparait sur telephone, .sw-mobile-only
   n'existe QUE sur telephone. */
.sw-mobile-only { display: none; }

.sw-tabbar { display: none; }

/* --- Bouton « S'inscrire » deroulant (visiteur, mobile) --- */
/*
   Le menu ne s'ancre PAS sur le bouton : sous 400 px la barre se replie et le
   bouton change de cote, un ancrage fixe sortirait de l'ecran (le menu des
   langues a eu exactement ce bug). Il s'etale donc sous TOUTE la barre,
   comme un petit volet : .navbar .container sert de repere, le menu prend
   la largeur disponible moins les marges.
*/
.navbar .container { position: relative; }
.sw-signup { position: static; }
.sw-signup__button {
    list-style: none;             /* pas de triangle natif de <summary> */
    cursor: pointer;
    background: var(--color-white);
    color: var(--sw-on-light-candidate);
    border: 0;
    font-weight: 700;
}
.sw-signup__button::-webkit-details-marker { display: none; }
.sw-signup[open] .sw-signup__button { background: #ede9fe; }
.sw-signup__menu {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    z-index: 90;
    background: #fff;
    border: 1px solid #d7dbe8;
    border-radius: 12px;
    box-shadow: 0 18px 40px -14px rgba(15, 23, 42, 0.45);
    padding: 6px;
    display: grid;
    gap: 4px;
}
.sw-signup__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
}
.sw-signup__item--candidate { color: var(--sw-on-light-candidate); background: #f5f3ff; }
.sw-signup__item--employer { color: var(--sw-on-light-employer); background: #fdf2f7; }
.sw-signup__item:focus-visible { outline: 3px solid #4338ca; outline-offset: 1px; }

/* --- Barre d'onglets (connecte, mobile) --- */
@media (max-width: 768px) {
    .sw-desktop-only { display: none !important; }
    .sw-mobile-only { display: block; }

    .sw-tabbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: var(--z-sticky);
        display: flex;
        background: #fff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
        /* L'encoche des iPhone : la barre remonte au-dessus de la zone systeme. */
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .sw-tabbar__item {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 2px 7px;
        text-decoration: none;
        color: #64748b;
        font-size: 0.66rem;
        font-weight: 700;
        line-height: 1.15;
        text-align: center;
    }

    .sw-tabbar__icon { font-size: 1.25rem; line-height: 1; }

    .sw-tabbar__label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* L'onglet actif prend la couleur de l'espace : violet candidat,
       rose employeur — la meme grammaire que les degrades du site. */
    .sw-tabbar--candidate .sw-tabbar__item.is-active { color: var(--sw-on-light-candidate); }
    .sw-tabbar--employer .sw-tabbar__item.is-active { color: var(--sw-on-light-employer); }
    .sw-tabbar__item.is-active { position: relative; }
    .sw-tabbar__item.is-active::before {
        content: "";
        position: absolute;
        top: 0;
        left: 20%;
        right: 20%;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: currentColor;
    }
    .sw-tabbar__item:focus-visible { outline: 3px solid #4338ca; outline-offset: -3px; }

    /* La page reserve la place de la barre : sans cela, le pied de page et
       le dernier bouton d'un formulaire finissent dessous. */
    body.sw-has-tabbar { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: var(--space-md);
    }

    /* Le logo prend toute la largeur qu'il veut, les actions passent dessous :
       sinon les pastilles débordent du cadre à droite. */
    .navbar .container {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .nav-links {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }

    .nav-btn { padding: 9px 15px; font-size: 0.88rem; }
    .nav-link { padding: 7px 10px; font-size: 0.88rem; }

    h1 { font-size: var(--font-size-xl); }
    h2 { font-size: var(--font-size-lg); }

    .table {
        font-size: var(--font-size-sm);
    }

    .table th,
    .table td {
        padding: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .flex-col-mobile {
        flex-direction: column;
    }

    .gap-sm {
        gap: var(--space-xs);
    }

    h1 { font-size: var(--font-size-lg); }
    h2 { font-size: var(--font-size-base); }

    .table {
        display: block;
        overflow-x: auto;
    }

    /* On garde une grille de pastilles qui s'enroulent plutôt qu'une colonne :
       le pouce atteint tout sans faire défiler la barre. */
    .nav-links {
        justify-content: flex-start;
        gap: 7px;
    }

    .nav-sep { display: none; }
    .nav-btn { padding: 9px 13px; }
    /* Les pastilles d'inscription pleine largeur ont disparu du mobile :
       le visiteur a un seul bouton deroulant, le connecte a la barre du bas. */
}

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

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted { color: var(--color-gray); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }

.hidden { display: none; }
.visible { display: block; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* ============================================
   Dashboards (candidat / employeur / admin)
   ============================================ */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius-lg, 8px);
    padding: var(--space-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--color-primary);
}

.stat-card--success { border-left-color: var(--color-success); }
.stat-card--warning { border-left-color: var(--color-warning); }
.stat-card--danger  { border-left-color: var(--color-danger); }
.stat-card--info    { border-left-color: var(--color-info); }

.stat-card__label {
    color: var(--color-gray);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-xs);
}

.stat-card__value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.1;
}

.stat-card__hint {
    color: var(--color-gray);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

.dash-section {
    background: var(--color-white);
    border-radius: var(--radius-lg, 8px);
    padding: var(--space-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: var(--space-xl);
}

.dash-section > h2 {
    font-size: var(--font-size-lg);
    color: var(--color-dark);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-light);
}

.progress {
    background: var(--color-light);
    border-radius: var(--radius-full, 999px);
    height: 10px;
    overflow: hidden;
}

.progress__bar {
    background: var(--color-primary);
    height: 100%;
    border-radius: var(--radius-full, 999px);
    transition: width 0.4s ease;
}

.match-score {
    display: inline-block;
    min-width: 3.2em;
    text-align: center;
    padding: 2px 8px;
    border-radius: var(--radius-full, 999px);
    font-weight: 700;
    font-size: var(--font-size-sm);
    background: var(--color-light);
    color: var(--color-dark);
}

.match-score--high { background: #e8f8f0; color: #1e8e5a; }
.match-score--mid  { background: #fdf3e3; color: #b26a00; }

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.quick-links a.card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quick-links a.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
}

.chart-wrap {
    position: relative;
    height: 320px;
}

@media (max-width: 640px) {
    .chart-wrap { height: 240px; }
}
