:root {
    /* Vert = couleur de marque et de toutes les actions (boutons, en-têtes, navigation active). */
    --primary: #15803d;
    --primary-dark: #116a30;
    --primary-light: #e3f5ea;
    --accent: #15803d;
    --accent-dark: #116a30;
    --accent-light: #e3f5ea;
    /* Dégradé de marque (bannière d'accueil, icône de marque, en-tête d'inscription uniquement) */
    --gradient: linear-gradient(135deg, #1a9448 0%, var(--primary-dark) 100%);
    --gradient-soft: var(--primary-light);
    --gradient-warm: linear-gradient(135deg, #f0a83a 0%, #c8790f 100%);
    --gradient-violet: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    /* Couleurs d'accent (catégories, statistiques) — distinctes du vert principal, comme sur les maquettes */
    --purple: #7c3aed;
    --purple-light: #f0eafd;
    --orange: #d97706;
    --orange-light: #fdf1de;
    --teal: #0284c7;
    --teal-light: #e2f2fc;
    --rose: #e11d67;
    --rose-light: #fde5ef;
    --amber: #ca8a04;
    --amber-light: #fbf3d6;
    --danger: #e11d48;
    --danger-light: #fdecef;
    --warning: #d97706;
    --warning-light: #fef3e0;
    --success: #15803d;
    --success-light: #e3f5ea;
    --info: var(--primary);
    --bg: #f3f5fb;
    --card-bg: #ffffff;
    --text: #16192b;
    --text-muted: #7c8299;
    --border: #eef0f6;
    --radius: 20px;
    --radius-sm: 14px;
    --shadow-sm: 0 2px 10px rgba(20, 30, 70, .05);
    --shadow-md: 0 10px 30px rgba(20, 30, 70, .08);
    --shadow-lg: 0 16px 40px rgba(20, 30, 70, .12);
    --sidebar-width: 250px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* icon helper */
.ico { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: #12172f;
    color: #eef6f2;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 40;
    transition: transform .25s ease;
}
.sidebar .brand {
    padding: 24px 22px;
    font-weight: 800;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-close { display: none; }
.sidebar .brand .dot {
    width: 34px; height: 34px; border-radius: 11px; background: var(--gradient);
    display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(21,128,61,.35);
}
.sidebar nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.sidebar nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; margin-bottom: 4px; border-radius: 12px;
    color: rgba(255,255,255,.72); font-size: .92rem; font-weight: 500;
    transition: background .15s, color .15s;
}
.sidebar nav a .ico { font-size: 1.05rem; width: 20px; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a.active { background: var(--gradient); color: #fff; box-shadow: 0 6px 16px rgba(21,128,61,.3); }
.sidebar nav .section-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; opacity: .45; padding: 16px 14px 6px; font-weight: 700; }
.sidebar .sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: .82rem; opacity: .85; }

.main-area { margin-left: var(--sidebar-width); flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 26px;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 1.15rem; margin: 0; font-weight: 800; }
.topbar .topbar-right { display: flex; align-items: center; gap: 16px; }
.burger { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--primary); }
.topbar .bell-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--text); }

.content { padding: 24px 26px 40px; flex: 1; }

/* ---------- Mobile header (style "Mon espace") ---------- */
.mobile-hello { display: none; }
@media (max-width: 900px) {
    .mobile-hello {
        display: flex; align-items: center; justify-content: space-between;
        padding: 6px 2px 20px;
        position: relative;
    }
    .mobile-hello .left { display: flex; align-items: center; gap: 12px; }
    .mobile-hello .avatar {
        width: 46px; height: 46px; border-radius: 16px; background: var(--primary); color: #fff;
        display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.05rem; flex-shrink: 0;
        box-shadow: 0 6px 16px rgba(21,128,61,.35), 0 0 0 3px #fff, 0 0 0 5px rgba(21,128,61,.18);
        overflow: hidden;
    }
    .mobile-hello .title { font-size: 1.2rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
    .mobile-hello .sub { color: var(--text-muted); font-size: .86rem; margin: 2px 0 0; }
    .mobile-hello .alert-btn {
        width: 44px; height: 44px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm);
        display: flex; align-items: center; justify-content: center; font-size: 1.15rem; position: relative; flex-shrink: 0; color: var(--text);
        transition: transform .15s;
    }
    .mobile-hello .alert-btn:active { transform: scale(.92); }
    .mobile-hello .mobile-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
}

/* ---------- Slider des domaines les plus demandés (page d'accueil) ---------- */
.secteurs-slider-wrap { margin: 0 -26px 20px; padding: 0 26px; }
.secteurs-slider {
    display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 10px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.secteurs-slider::-webkit-scrollbar { height: 5px; }
.secteurs-slider::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.secteur-card {
    scroll-snap-align: start; flex: 0 0 auto; width: 108px;
    background: var(--card-bg); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
    padding: 14px 10px; text-align: center; transition: transform .15s ease, box-shadow .15s ease;
}
.secteur-card:active { transform: scale(.96); }
.secteur-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.secteur-card .pic {
    width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 12px; background: var(--primary-light);
    color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.secteur-card .pic.c0 { background: var(--primary-light); color: var(--primary); }
.secteur-card .pic.c1 { background: var(--orange-light); color: var(--orange); }
.secteur-card .pic.c2 { background: var(--purple-light); color: var(--purple); }
.secteur-card .pic.c3 { background: var(--teal-light); color: var(--teal); }
.secteur-card .pic.c4 { background: var(--rose-light); color: var(--rose); }
.secteur-card .pic.c5 { background: var(--amber-light); color: var(--amber); }
.secteur-card .nom { font-size: .78rem; font-weight: 700; color: var(--text); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.1em; }
.secteur-card .nb { font-size: .68rem; color: var(--text-muted); margin-top: 4px; font-weight: 600; }
@media (max-width: 900px) {
    .secteurs-slider-wrap { margin: 0 -18px 18px; padding: 0 18px; }
}

/* ---------- Bannière d'accès : état "essai gratuit" ---------- */
.access-banner.essai { background: var(--gradient-warm); color: #fff; }
.access-banner.essai .fleche { background: rgba(255,255,255,.25); }

/* ---------- Bouton mobile d'activation des notifications push ---------- */
.push-prompt-mobile {
    display: none; align-items: center; justify-content: center; gap: 8px; width: 100%;
    background: var(--gradient-soft); color: var(--accent-dark); border: none; border-radius: var(--radius-sm);
    padding: 12px 14px; font-weight: 700; font-size: .82rem; margin-bottom: 16px; cursor: pointer;
}
.push-prompt-mobile:active { transform: scale(.98); }

/* ---------- Avatar (photo de profil) ---------- */
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.access-banner .badge-icon { overflow: hidden; }
.avatar-preview {
    width: 72px; height: 72px; border-radius: 20px; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.4rem;
    flex-shrink: 0; overflow: hidden; box-shadow: 0 6px 16px rgba(21,128,61,.3);
}

/* ---------- Page profil simplifiée ---------- */
.profil-entete { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profil-entete-photo { position: relative; flex-shrink: 0; }
.avatar-preview-lg { width: 84px; height: 84px; border-radius: 24px; font-size: 1.7rem; }
.profil-photo-edit {
    position: absolute; bottom: -4px; right: -4px; width: 30px; height: 30px; border-radius: 50%;
    background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: .78rem; box-shadow: 0 3px 8px rgba(0,0,0,.25); cursor: pointer; border: 2px solid #fff;
}
.profil-entete-nom { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.profil-entete-role { color: var(--text-muted); font-size: .84rem; margin-top: 2px; font-weight: 600; }
.profil-email-statut { font-size: .78rem; font-weight: 700; margin-top: 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.profil-email-statut.ok { color: var(--primary); }
.profil-email-statut.warn { color: #b45309; }
.profil-email-statut.warn a { color: var(--primary); text-decoration: underline; }
.btn-lien-discret { background: none; border: none; color: var(--text-muted); font-size: .78rem; font-weight: 700; cursor: pointer; padding: 4px; }
.btn-lien-discret:hover { color: var(--danger); }

.profil-force-mini { background: var(--card-bg); box-shadow: var(--shadow-sm); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; }
.profil-force-mini .barre { height: 7px; border-radius: 20px; background: var(--bg); overflow: hidden; margin-bottom: 8px; }
.profil-force-mini .rempli { height: 100%; border-radius: 20px; background: var(--gradient-violet); transition: width .4s ease; }
.profil-force-mini .texte { font-size: .8rem; color: var(--text-muted); }
.profil-force-mini .texte b { color: var(--text); }

.profil-onglets { display: flex; gap: 6px; background: var(--bg); border-radius: 14px; padding: 4px; margin-bottom: 18px; overflow-x: auto; }
.profil-onglets .tab-btn {
    flex: 1; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 10px; border-radius: 11px; font-weight: 700; font-size: .82rem; color: var(--text-muted);
    background: none; border: none; cursor: pointer;
}
.profil-onglets .tab-btn.active { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-sm); }

/* ---------- Cards ---------- */
.card { background: var(--card-bg); border: none; box-shadow: var(--shadow-sm); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card-title { font-weight: 800; font-size: 1.02rem; margin: 0 0 16px; letter-spacing: -.01em; }
.section-heading { font-weight: 800; font-size: 1.02rem; margin: 4px 0 12px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; color: var(--text); }
.section-heading i { color: var(--primary); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.stat-card { background: var(--card-bg); border-radius: var(--radius); border: none; box-shadow: var(--shadow-sm); padding: 20px; display: flex; align-items: center; gap: 14px; transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card .icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: var(--primary-light); color: var(--primary); flex-shrink: 0; }
.stat-card.green .icon { background: var(--accent-light); color: var(--accent-dark); }
.stat-card.purple .icon { background: var(--purple-light); color: var(--purple); }
.stat-card.orange .icon { background: var(--orange-light); color: var(--orange); }
.stat-card .value { font-size: 1.5rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.stat-card .label { color: var(--text-muted); font-size: .82rem; margin-top: 4px; }

/* ---------- Bannière d'accès (statut abonnement chercheur) ---------- */
.access-banner {
    border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 14px; justify-content: space-between;
    box-shadow: var(--shadow-md);
    position: relative; overflow: hidden;
}
.access-banner.actif { background: var(--primary); color: #fff; }
.access-banner.verrouille { background: var(--card-bg); color: var(--text); box-shadow: var(--shadow-sm); }
.access-banner .left { display: flex; align-items: center; gap: 14px; }
.access-banner .badge-icon { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.access-banner.verrouille .badge-icon { background: var(--primary-light); color: var(--primary); }
.access-banner .titre { font-weight: 800; font-size: .98rem; }
.access-banner .sous-titre { font-size: .82rem; opacity: .9; margin-top: 2px; }
.access-banner .fleche { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.access-banner.verrouille .fleche { background: var(--primary-light); color: var(--primary); }

/* ---------- Premium (upsell contextuel) ---------- */
.premium-locked {
    border: none; border-radius: var(--radius); padding: 26px; text-align: center; background: var(--purple-light);
}
.premium-locked .picto { font-size: 1.9rem; margin-bottom: 10px; color: var(--purple); }
.premium-locked p { color: var(--text-muted); font-size: .88rem; margin: 6px 0 16px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border-radius: 14px; border: none; cursor: pointer;
    font-weight: 700; font-size: .9rem; text-align: center; transition: filter .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }
/* .btn-primary : actions courantes (naviguer, filtrer, ouvrir un formulaire) — bleu */
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(21,128,61,.25); }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(21,128,61,.35); filter: brightness(1.04); }
/* .btn-accent : actions de VALIDATION uniquement (enregistrer, payer, confirmer, se connecter, s'inscrire) — vert, jamais utilisé ailleurs */
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(21,128,61,.28); }
.btn-accent:hover { box-shadow: 0 8px 20px rgba(21,128,61,.38); filter: brightness(1.04); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-voir-plus { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); font-weight: 700; }
.btn-voir-plus:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-light { background: var(--primary-light); color: var(--primary); }
.btn:hover { filter: brightness(.97); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .8rem; border-radius: 10px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 7px; color: var(--text); }
input, select, textarea {
    width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border);
    font-size: .92rem; font-family: inherit; background: #fbfbfe; color: var(--text);
    transition: border-color .15s, background .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.role-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.role-choice label {
    border: 1.5px solid var(--border); border-radius: var(--radius); padding: 18px 12px; text-align: center;
    cursor: pointer; font-weight: 700; color: var(--text-muted); position: relative; background: #fbfbfe;
}
.role-choice .ico { font-size: 1.4rem; display: block; margin-bottom: 6px; }
.role-choice input { position: absolute; opacity: 0; }
.role-choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-light); color: var(--accent-dark); box-shadow: var(--shadow-sm); }

/* Champ avec icône (style mobile) */
.input-icon { position: relative; }
.input-icon .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 1rem; color: var(--text-muted); }
.input-icon input { padding-left: 42px; }
.input-icon .toggle-pass { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; }

/* Zone d'upload (CV / photos) */
.upload-zone {
    border: 1.5px dashed #c7d0ef; border-radius: var(--radius-sm); padding: 22px; text-align: center;
    background: #f7f8fd; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.upload-zone:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.upload-zone .picto { font-size: 1.7rem; color: var(--primary); }
.upload-zone input[type=file] { display: none; }
.fichier-actuel { display: flex; align-items: center; gap: 10px; background: var(--primary-light); border-radius: var(--radius-sm); padding: 11px 14px; font-size: .85rem; margin-bottom: 10px; }
.galerie-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-top: 12px; }
.galerie-photos .photo-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: var(--bg); }
.galerie-photos .photo-item img { width: 100%; height: 100%; object-fit: cover; }
.galerie-photos .photo-item .suppr { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .7rem; border: none; cursor: pointer; }

/* ---------- Badges & alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: .74rem; font-weight: 700; }
.badge-success { background: var(--success-light); color: var(--accent-dark); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--primary-light); color: var(--primary); }
.badge-primary { background: var(--primary); color: #fff; }
.badge-neutre { background: var(--bg); color: var(--text-muted); }
.badge-premium { background: #fff5df; color: #a15c00; }

/* ---------- Page détail (mission / poste) ---------- */
.detail-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-weight: 700; font-size: .84rem; margin-bottom: 14px; }
.detail-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.detail-titre { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin: 10px 0 12px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-distance { color: var(--primary); background: var(--primary-light); padding: 6px 12px; border-radius: 20px; font-weight: 700; font-size: .78rem; white-space: nowrap; flex-shrink: 0; }
.detail-prix { display: flex; align-items: center; gap: 10px; background: var(--primary-light); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; }
.detail-prix .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex-shrink: 0; }
.detail-prix .montant { font-size: 1.15rem; font-weight: 800; color: var(--primary-dark); }
.detail-prix .label { font-size: .74rem; color: var(--text-muted); font-weight: 600; }
.detail-meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.detail-meta .item { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--text); }
.detail-meta .item i { width: 30px; height: 30px; border-radius: 9px; background: var(--bg); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: .92rem; flex-shrink: 0; }
.detail-section-titre { font-weight: 800; font-size: .95rem; margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; }
.detail-section-titre i { color: var(--primary); }
.contact-card { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; }
.contact-card .avatar-preview { width: 46px; height: 46px; border-radius: 13px; font-size: .95rem; box-shadow: none; }
.contact-card .infos { flex: 1; min-width: 0; }
.contact-card .nom { font-weight: 800; font-size: .92rem; }
.contact-card .contacts { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.contact-card .contacts a { font-size: .82rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.contact-card .contacts a:active { color: var(--primary); }

.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 16px; font-size: .88rem; display: flex; align-items: center; gap: 10px; }
.alert-success { background: var(--success-light); color: var(--accent-dark); }
.alert-danger { background: var(--danger-light); color: var(--danger); }
.alert-warning { background: var(--warning-light); color: var(--warning); }
.alert-info { background: var(--primary-light); color: var(--primary); }

/* ---------- Poste cards ---------- */
.poste-card { position: relative; background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--shadow-sm); border-radius: var(--radius); padding: 20px 20px 20px 24px; margin-bottom: 14px; transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; overflow: hidden; }
.poste-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary-light); transition: background .18s ease; }
.poste-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.poste-card:hover::before { background: var(--primary); }
.poste-card .top-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.poste-card h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.poste-card .top-row > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.poste-card .top-row > div:first-child > h3 { flex-basis: 100%; }
.poste-card .meta { color: var(--text-muted); font-size: .82rem; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.poste-card .meta .ico { color: var(--text-muted); margin-right: 3px; }
.poste-card .distance { color: var(--accent-dark); background: var(--accent-light); padding: 5px 10px; border-radius: 20px; font-weight: 700; font-size: .78rem; white-space: nowrap; }
.poste-card .desc { color: var(--text-muted); font-size: .88rem; margin-top: 12px; line-height: 1.55; }
.poste-card .cta-row { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); }
.poste-card .cta-row .btn { flex-shrink: 0; }

.locked-wrap { position: relative; }
.locked-wrap .blurred { filter: blur(5px); user-select: none; pointer-events: none; }
.lock-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(255,255,255,.5); backdrop-filter: blur(1px); border-radius: var(--radius); text-align: center; padding: 10px;
}
.lock-overlay .lock-icon { font-size: 1.7rem; margin-bottom: 8px; color: var(--primary); }

/* ---------- Auth pages — design KOBSIL LEGUI (bienvenue / connexion / inscription) ---------- */
.auth-wrap {
    min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
    background: var(--bg); padding: 24px;
}
.auth-card { background: #fff; border-radius: 26px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-switch { text-align: center; margin-top: 20px; font-size: .88rem; color: var(--text-muted); padding-bottom: 4px; }

/* Lien "Mot de passe oublié ?" aligné à droite sous le champ mot de passe */
.auth-forgot { text-align: right; margin: -6px 0 18px; }
.auth-forgot button { background: none; border: none; padding: 0; color: var(--primary); font-weight: 700; font-size: .82rem; cursor: pointer; }

/* Séparateur "ou continuer avec" */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--text-muted); font-size: .78rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Boutons de connexion sociale (visuels — l'action réelle arrive bientôt) */
.social-row { display: flex; gap: 12px; }
.social-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 14px; border: 1.5px solid var(--border); background: #fff;
    font-weight: 700; font-size: .86rem; color: var(--text); cursor: pointer; transition: background .15s, transform .1s;
}
.social-btn:active { transform: scale(.97); background: var(--bg); }
.social-btn i { font-size: 1.05rem; }
.social-btn i.bi-google { color: #ea4335; }
.social-btn i.bi-facebook { color: #1877f2; }
.social-btn i.bi-apple { color: #111; }

/* Bannière "Connexion sécurisée" */
.secure-banner { display: flex; align-items: center; gap: 12px; background: var(--primary-light); color: var(--primary-dark); border-radius: 14px; padding: 14px 16px; margin-top: 22px; font-size: .8rem; line-height: 1.4; }
.secure-banner .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.secure-banner strong { display: block; font-size: .84rem; }

/* Case à cocher "J'accepte les conditions" (inscription) */
.check-conditions { display: flex; align-items: flex-start; gap: 10px; font-size: .8rem; color: var(--text-muted); line-height: 1.4; margin: 4px 0 18px; cursor: pointer; font-weight: 500; }
.check-conditions input { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; accent-color: var(--primary); }
.check-conditions a { color: var(--primary); font-weight: 700; }

/* ---- Écran plein écran commun (bienvenue / connexion / inscription) ---- */
body.ecran-bienvenue .auth-wrap,
body.ecran-connexion .auth-wrap,
body.ecran-inscription .auth-wrap { padding: 0; align-items: stretch; background: #08301a; }
body.ecran-bienvenue .auth-card,
body.ecran-connexion .auth-card,
body.ecran-inscription .auth-card { max-width: none; border-radius: 0; box-shadow: none; min-height: 100vh; min-height: 100dvh; }

/* ---- Écran de bienvenue (onboarding) ---- */
.kobsil-onboarding {
    min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
    background: radial-gradient(120% 70% at 50% 0%, #1d8a49 0%, #0c4223 55%, #08301a 100%);
    color: #fff; padding: calc(38px + env(safe-area-inset-top)) 26px calc(26px + env(safe-area-inset-bottom));
    text-align: center;
}
.kobsil-onboarding .spacer { flex: 1; min-height: 10px; }

/* ---- Écran d'accueil avec photo plein écran en dégradé ---- */
.kobsil-onboarding-photo { position: relative; padding: 0; overflow: hidden; background: #08301a; }
.kobsil-bg-photo { position: absolute; inset: 0; z-index: 0; }
.kobsil-bg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kobsil-bg-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(6,26,15,.78) 0%, rgba(8,26,16,.35) 30%, rgba(7,26,16,.55) 62%, rgba(5,20,12,.96) 100%),
        linear-gradient(105deg, rgba(6,32,18,.5) 0%, rgba(6,32,18,0) 55%);
}
.kobsil-onboarding-contenu {
    position: relative; z-index: 1; display: flex; flex-direction: column;
    min-height: 100vh; min-height: 100dvh;
    padding: calc(28px + env(safe-area-inset-top)) 26px calc(26px + env(safe-area-inset-bottom));
}
.kobsil-kicker {
    align-self: center; font-size: .72rem; font-weight: 800; letter-spacing: .14em;
    color: rgba(255,255,255,.85); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
    padding: 6px 14px; border-radius: 20px; margin-bottom: 18px; backdrop-filter: blur(4px);
}
.kobsil-kicker span { color: #a4e878; }
.kobsil-headline {
    font-size: 2rem; line-height: 1.18; font-weight: 900; letter-spacing: -.01em;
    margin: 0 0 12px; text-shadow: 0 4px 18px rgba(0,0,0,.35);
}
.kobsil-headline span { color: #a4e878; }
.kobsil-onboarding-contenu .kobsil-tagline { font-size: .96rem; line-height: 1.55; color: rgba(255,255,255,.92); max-width: 320px; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.kobsil-cta-row { display: flex; gap: 12px; margin-bottom: 20px; }
.kobsil-cta { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px 8px; border-radius: 18px; font-weight: 800; font-size: .82rem; letter-spacing: .01em; box-shadow: 0 12px 24px rgba(0,0,0,.22); border: none; cursor: pointer; text-decoration: none; }
.kobsil-cta.chercheur { background: linear-gradient(135deg,#22a854,#136b34); color: #fff; }
.kobsil-cta.employeur { background: linear-gradient(135deg,#f2b53a,#c8790f); color: #241800; }
.kobsil-cta .cta-ic { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.kobsil-onboarding .secure-banner-onboarding { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.1); border-radius: 14px; padding: 13px 16px; font-size: .76rem; text-align: left; color: rgba(255,255,255,.85); }
.kobsil-onboarding .secure-banner-onboarding .ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .95rem; }
.kobsil-onboarding .secure-banner-onboarding a { color: #a4e878; font-weight: 700; }
.kobsil-onboarding .deja-compte { margin-top: 16px; font-size: .82rem; color: rgba(255,255,255,.78); }
.kobsil-onboarding .deja-compte a { color: #fff; font-weight: 800; text-decoration: underline; }

/* ---- En-tête vert connexion / inscription ---- */
.kobsil-hero {
    background: radial-gradient(140% 100% at 50% -10%, #1d8a49 0%, #0d4a26 60%, #073019 100%);
    color: #fff; padding: calc(24px + env(safe-area-inset-top)) 26px 30px; text-align: center; position: relative; overflow: hidden; flex-shrink: 0;
}
.kobsil-hero .kobsil-back { position: absolute; left: 18px; top: calc(18px + env(safe-area-inset-top)); width: 36px; height: 36px; border-radius: 11px; background: rgba(255,255,255,.16); color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 1.05rem; }
.kobsil-hero .kobsil-logo { width: 64px; height: 64px; margin: 4px auto 12px; border-radius: 18px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; }
.kobsil-hero .kobsil-wordmark { font-size: 1.4rem; font-weight: 900; margin-bottom: 6px; letter-spacing: -.01em; }
.kobsil-hero .kobsil-wordmark span { color: #8be36a; }
.kobsil-hero .kobsil-tagline { font-size: .85rem; color: rgba(255,255,255,.9); max-width: 260px; margin: 0 auto; }
.kobsil-hero .kobsil-tagline b { color: #a4e878; font-weight: 700; }
.kobsil-hero .kobsil-photo-deco { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.kobsil-hero .kobsil-photo-deco .pd { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.32); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }

/* ---- Feuille blanche (onglets + formulaire) ---- */
.kobsil-sheet { background: #fff; border-radius: 24px 24px 0 0; margin-top: -22px; position: relative; z-index: 2; padding: 22px 24px calc(20px + env(safe-area-inset-bottom)); flex: 1; }
.kobsil-tabs { display: flex; background: var(--bg); border-radius: 14px; padding: 4px; margin-bottom: 22px; gap: 4px; }
.kobsil-tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 8px; border-radius: 11px; font-weight: 700; font-size: .84rem; text-decoration: none; color: var(--text-muted); }
.kobsil-tabs a.active { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-sm); }
.kobsil-sheet h2 { text-align: left; margin: 0 0 4px; font-size: 1.22rem; font-weight: 800; }
.kobsil-sheet .sub { text-align: left; color: var(--text-muted); font-size: .84rem; margin-bottom: 20px; }

@media (min-width: 561px) {
    body.ecran-bienvenue .auth-wrap, body.ecran-connexion .auth-wrap, body.ecran-inscription .auth-wrap { padding: 24px; background: var(--bg); }
    body.ecran-bienvenue .auth-card, body.ecran-connexion .auth-card, body.ecran-inscription .auth-card { max-width: 400px; border-radius: 28px; box-shadow: var(--shadow-lg); min-height: 0; animation: auth-sheet-in .35s cubic-bezier(.2,.8,.2,1); }
    .kobsil-onboarding, .kobsil-hero { border-radius: 28px 28px 0 0; }
}
@media (max-width: 560px) {
    input, select, textarea { padding: 14px 14px; font-size: 1rem; border-radius: 14px; }
    .input-icon input { padding-left: 44px; }
    .btn-block { padding: 15px 20px; font-size: .95rem; border-radius: 16px; }
}
@keyframes auth-sheet-in {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* =====================================================================
   ---------- Auth v2 — écran de connexion "app native" ----------
   Ajouts non destructifs : n'écrasent rien, s'activent via .kobsil-v2
   ===================================================================== */
@keyframes kv2-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes kv2-pop { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }
@keyframes kv2-blob-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(14px, -18px) scale(1.08); }
    66% { transform: translate(-12px, 10px) scale(.94); }
}
@keyframes kv2-spin { to { transform: rotate(360deg); } }
@keyframes kv2-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* -- Hero : fond mesh animé + halo derrière le logo -- */
.kobsil-v2.kobsil-hero { isolation: isolate; }
.kobsil-v2.kobsil-hero::before,
.kobsil-v2.kobsil-hero::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(38px); z-index: 0; pointer-events: none;
    animation: kv2-blob-drift 9s ease-in-out infinite;
}
.kobsil-v2.kobsil-hero::before { width: 200px; height: 200px; top: -60px; right: -40px; background: rgba(164,232,120,.35); }
.kobsil-v2.kobsil-hero::after { width: 180px; height: 180px; bottom: -70px; left: -50px; background: rgba(139,227,106,.22); animation-delay: 2.4s; }
.kobsil-v2.kobsil-hero > * { position: relative; z-index: 1; }
.kobsil-v2 .kobsil-back { backdrop-filter: blur(6px); transition: transform .15s, background .15s; }
.kobsil-v2 .kobsil-back:active { transform: scale(.9); background: rgba(255,255,255,.28); }
.kobsil-v2 .kobsil-logo {
    box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.25);
    animation: kv2-pop .5s cubic-bezier(.2,.8,.2,1) both;
}
.kobsil-v2 .kobsil-wordmark { animation: kv2-fade-up .5s .05s cubic-bezier(.2,.8,.2,1) both; }
.kobsil-v2 .kobsil-tagline { animation: kv2-fade-up .5s .12s cubic-bezier(.2,.8,.2,1) both; }

/* -- Feuille -- */
.kobsil-v2.kobsil-sheet { box-shadow: 0 -12px 32px rgba(8,48,26,.08); }
.kobsil-v2 .kobsil-tabs { position: relative; animation: kv2-fade-up .45s .1s cubic-bezier(.2,.8,.2,1) both; }
.kobsil-v2 .kobsil-tabs a { position: relative; z-index: 1; transition: color .2s; }
.kobsil-v2 .kobsil-tabs a.active { animation: kv2-pop .3s cubic-bezier(.2,.8,.2,1) both; }
.kobsil-v2 h2, .kobsil-v2 .sub { animation: kv2-fade-up .45s .16s cubic-bezier(.2,.8,.2,1) both; }
.kobsil-v2 form { animation: kv2-fade-up .5s .22s cubic-bezier(.2,.8,.2,1) both; }

/* -- Champs modernisés : pilule, focus glow, label qui s'anime -- */
.kobsil-v2 .form-group label { font-size: .8rem; letter-spacing: .01em; color: var(--text-muted); font-weight: 700; }
.kobsil-v2 .input-icon { border-radius: 16px; transition: box-shadow .2s ease; }
.kobsil-v2 .input-icon input {
    border-radius: 16px; padding: 15px 14px 15px 46px; border: 1.5px solid var(--border);
    background: #f7f9fc; font-size: .96rem; transition: border-color .2s, background .2s, box-shadow .2s;
}
.kobsil-v2 .input-icon .ic { left: 16px; font-size: 1.05rem; transition: color .2s, transform .2s; }
.kobsil-v2 .input-icon:focus-within .ic { color: var(--primary); transform: translateY(-50%) scale(1.08); }
.kobsil-v2 .input-icon input:focus {
    border-color: var(--primary); background: #fff;
    box-shadow: 0 0 0 4px rgba(21,128,61,.12), 0 4px 14px rgba(21,128,61,.08);
}
.kobsil-v2 .input-icon .toggle-pass { right: 14px; transition: color .15s, transform .15s; border-radius: 8px; padding: 4px; }
.kobsil-v2 .input-icon .toggle-pass:active { transform: translateY(-50%) scale(.85); }

.kobsil-v2 .auth-forgot a { transition: color .15s; }
.kobsil-v2 .auth-forgot a:active { color: var(--primary-dark); }

/* -- Bouton principal : dégradé, relief, état de chargement -- */
.kobsil-v2 .btn-accent.btn-block {
    position: relative; overflow: hidden; padding: 16px 20px; border-radius: 16px; font-size: .98rem;
    background: linear-gradient(135deg, #1a9448 0%, var(--primary-dark) 100%);
    box-shadow: 0 10px 24px rgba(17,106,48,.32);
    transition: box-shadow .2s, transform .1s, filter .15s;
}
.kobsil-v2 .btn-accent.btn-block:active { transform: scale(.98); box-shadow: 0 6px 16px rgba(17,106,48,.28); }
.kobsil-v2 .btn-accent.btn-block::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.22) 48%, transparent 66%);
    background-size: 220% 100%; animation: kv2-shimmer 3.2s ease-in-out infinite;
}
.kobsil-v2 .btn-accent.btn-block.is-loading { pointer-events: none; color: transparent; }
.kobsil-v2 .btn-accent.btn-block.is-loading::before {
    content: ''; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
    border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
    animation: kv2-spin .7s linear infinite; z-index: 2;
}

/* -- Séparateur, social, bannière sécurité -- */
.kobsil-v2 .auth-divider,
.kobsil-v2 .social-row,
.kobsil-v2 .secure-banner,
.kobsil-v2 .auth-switch { animation: kv2-fade-up .5s .3s cubic-bezier(.2,.8,.2,1) both; }
.kobsil-v2 .social-btn { border-radius: 16px; }
.kobsil-v2 .social-btn:active { transform: scale(.93); }
.kobsil-v2 .secure-banner { border-radius: 16px; }

/* -- Petits écrans très étroits (≤360px) -- */
@media (max-width: 360px) {
    .kobsil-v2.kobsil-hero { padding-left: 18px; padding-right: 18px; padding-bottom: 22px; }
    .kobsil-v2.kobsil-sheet { padding-left: 18px; padding-right: 18px; }
    .kobsil-v2 .kobsil-wordmark { font-size: 1.25rem; }
    .kobsil-v2 h2 { font-size: 1.1rem; }
}

/* -- Confort tablette / desktop : la carte reste centrée et respire -- */
@media (min-width: 561px) {
    .kobsil-v2.kobsil-hero::before, .kobsil-v2.kobsil-hero::after { opacity: .8; }
}

/* -- Respecte les utilisateurs qui réduisent les animations -- */
@media (prefers-reduced-motion: reduce) {
    .kobsil-v2 *, .kobsil-v2 *::before, .kobsil-v2 *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* =====================================================================
   ---------- Home v2 — page d'accueil (tableau de bord chercheur) ----------
   ===================================================================== */
.home-v2 .home-search { animation: kv2-fade-up .4s cubic-bezier(.2,.8,.2,1) both; }
.home-v2 .home-search form { transition: box-shadow .2s; }
.home-v2 .home-search form:focus-within { box-shadow: 0 0 0 4px rgba(21,128,61,.12), var(--shadow-md); }
.home-v2 .home-search .filtre-btn { transition: transform .15s, box-shadow .2s; }
.home-v2 .home-search .filtre-btn:active { transform: scale(.9); }

.home-v2 .hero-slider-wrap { animation: kv2-fade-up .45s .05s cubic-bezier(.2,.8,.2,1) both; }
.home-v2 .home-hero, .home-v2 .hero-promo { position: relative; isolation: isolate; box-shadow: 0 14px 30px rgba(8,48,26,.18); }
.home-v2 .home-hero::before, .home-v2 .hero-promo::before {
    content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%;
    background: rgba(255,255,255,.14); filter: blur(30px); top: -50px; right: -30px; z-index: 0;
    animation: kv2-blob-drift 10s ease-in-out infinite;
}
.home-v2 .home-hero .fleche { transition: transform .15s, background .15s; }
.home-v2 .home-hero .fleche:active { transform: scale(.88); background: rgba(255,255,255,.32); }
.home-v2 .hero-promo .btn { transition: transform .15s, box-shadow .2s; }
.home-v2 .hero-promo .btn:active { transform: scale(.95); }

.home-v2 .mini-stats-row { animation: kv2-fade-up .45s .1s cubic-bezier(.2,.8,.2,1) both; }
.home-v2 .mini-stat-card { transition: transform .15s ease, box-shadow .2s ease; }
.home-v2 .mini-stat-card:active { transform: scale(.95); }
.home-v2 .mini-stat-card .ic { transition: transform .2s; }
.home-v2 a.mini-stat-card:hover .ic { transform: scale(1.08) rotate(-4deg); }

.home-v2 .section-heading { animation: kv2-fade-up .4s cubic-bezier(.2,.8,.2,1) both; }
.voir-tout-pill {
    display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 800;
    color: var(--primary); background: var(--primary-light); padding: 6px 12px; border-radius: 999px;
    transition: background .15s, transform .15s;
}
.voir-tout-pill:active { transform: scale(.94); }
.voir-tout-pill i { font-size: .68rem; transition: transform .15s; }
.voir-tout-pill:hover i { transform: translateX(2px); }

.home-v2 .cat-grid { animation: kv2-fade-up .45s .12s cubic-bezier(.2,.8,.2,1) both; }
.home-v2 .cat-grid .secteur-card {
    transition: transform .18s ease, box-shadow .18s ease;
    animation: kv2-fade-up .4s cubic-bezier(.2,.8,.2,1) both;
    animation-delay: calc(var(--stagger, 0) * 55ms + 160ms);
}
.home-v2 .cat-grid .secteur-card:active { transform: scale(.94); }
.home-v2 .cat-grid .secteur-card .pic { transition: transform .2s; }
.home-v2 .cat-grid .secteur-card:hover .pic { transform: scale(1.1); }

.home-v2 .horiz-scroll { animation: kv2-fade-up .45s .16s cubic-bezier(.2,.8,.2,1) both; }
.home-v2 .mini-card {
    transition: transform .18s ease, box-shadow .2s ease;
    animation: kv2-fade-up .4s cubic-bezier(.2,.8,.2,1) both;
    animation-delay: calc(var(--stagger, 0) * 60ms + 200ms);
}
.home-v2 .mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.home-v2 .mini-card:active { transform: scale(.97); }
.home-v2 .mini-card .btn-outline { transition: background .15s, color .15s, border-color .15s; }
.home-v2 .mini-card:hover .btn-outline { background: var(--primary); color: #fff; border-color: var(--primary); }

.empty-state-v2 {
    text-align: center; padding: 34px 20px; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    margin-bottom: 20px; animation: kv2-fade-up .4s cubic-bezier(.2,.8,.2,1) both;
}
.empty-state-v2 .ic {
    width: 56px; height: 56px; border-radius: 18px; background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 14px;
}
.empty-state-v2 p { color: var(--text-muted); font-size: .88rem; margin: 0 0 14px; }

@media (prefers-reduced-motion: reduce) {
    .home-v2 *, .home-v2 *::before, .home-v2 *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* =====================================================================
   ---------- Detail v2 — fiche détaillée (mission / offre) ----------
   ===================================================================== */
.detail-v2 { padding: 0; overflow: hidden; animation: kv2-fade-up .4s cubic-bezier(.2,.8,.2,1) both; }

.detail-v2-banner {
    position: relative; isolation: isolate; overflow: hidden;
    padding: 24px 22px 46px; color: #fff;
    background: radial-gradient(130% 130% at 15% -10%, #1d8a49 0%, #0d4a26 55%, #073019 100%);
}
.detail-v2-banner.urgent {
    background: radial-gradient(130% 130% at 15% -10%, #d6482f 0%, #8a2c1c 55%, #4a160d 100%);
}
.detail-v2-banner::before, .detail-v2-banner::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(34px); z-index: 0; pointer-events: none;
    animation: kv2-blob-drift 9s ease-in-out infinite;
}
.detail-v2-banner::before { width: 180px; height: 180px; top: -60px; right: -50px; background: rgba(255,255,255,.14); }
.detail-v2-banner::after { width: 140px; height: 140px; bottom: -60px; left: 10%; background: rgba(255,255,255,.08); animation-delay: 2s; }
.detail-v2-banner > * { position: relative; z-index: 1; }

.detail-v2-banner-icon {
    width: 60px; height: 60px; border-radius: 20px; background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin-bottom: 16px; animation: kv2-pop .5s cubic-bezier(.2,.8,.2,1) both;
}
.detail-v2-fav {
    position: absolute; top: 20px; right: 20px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
    background: rgba(255,255,255,.16); backdrop-filter: blur(6px); color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
    transition: transform .15s, background .15s, color .15s;
}
.detail-v2-fav:active { transform: scale(.86); }
.detail-v2-fav.actif { background: #fff; color: var(--danger); }

.detail-v2-banner-badges { display: flex; flex-wrap: wrap; gap: 6px; animation: kv2-fade-up .4s .08s cubic-bezier(.2,.8,.2,1) both; }
.badge-glass { background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(4px); }
.badge-glass-urgent { background: rgba(255,255,255,.92); color: #b3341c; animation: kv2-pop .5s .15s cubic-bezier(.2,.8,.2,1) both; }

.detail-v2-body {
    position: relative; z-index: 2; background: var(--card-bg); border-radius: 26px 26px 0 0;
    margin-top: -26px; padding: 22px; box-shadow: 0 -10px 24px rgba(8,48,26,.05);
}
.detail-v2 .detail-titre { animation: kv2-fade-up .4s .05s cubic-bezier(.2,.8,.2,1) both; }

.detail-v2-prix {
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 120%);
    border: 1.5px solid var(--primary-light); animation: kv2-fade-up .4s .1s cubic-bezier(.2,.8,.2,1) both;
}
.detail-v2-prix .ic { background: linear-gradient(135deg, #1a9448, var(--primary-dark)); box-shadow: 0 6px 16px rgba(21,128,61,.35); }

.detail-v2-meta { position: relative; padding-left: 2px; animation: kv2-fade-up .4s .14s cubic-bezier(.2,.8,.2,1) both; }
.detail-v2-meta::before { content: ''; position: absolute; left: 14px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.detail-v2-meta .item { position: relative; z-index: 1; }
.detail-v2-meta .item i { background: #fff; border: 1.5px solid var(--border); box-shadow: 0 2px 6px rgba(20,30,70,.05); }

.detail-v2-contact {
    background: linear-gradient(135deg, #fff 0%, var(--bg) 160%); border: 1.5px solid var(--border);
    animation: kv2-fade-up .4s .18s cubic-bezier(.2,.8,.2,1) both;
}
.detail-v2-contact .avatar-preview { box-shadow: 0 0 0 3px var(--primary-light); }
.detail-v2-contact .qa-actions { display: flex; gap: 8px; flex-shrink: 0; margin-left: auto; }
.qa-btn {
    width: 40px; height: 40px; border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.05rem;
    transition: transform .15s, box-shadow .15s;
}
.qa-btn:active { transform: scale(.9); }
.qa-btn-accent { background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(21,128,61,.3); }

.detail-v2-cta {
    margin-top: 18px; padding: 16px; border-radius: var(--radius); background: var(--bg);
    animation: kv2-fade-up .45s .22s cubic-bezier(.2,.8,.2,1) both;
}
.detail-v2-cta .form-group:last-of-type { margin-bottom: 14px; }
.trust-note { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: .76rem; color: var(--text-muted); margin: 10px 0 0; }
.trust-note i { color: var(--primary); }

@media (max-width: 480px) {
    .detail-v2-body { padding: 18px; }
    .detail-v2-contact { flex-wrap: wrap; }
    .detail-v2-contact .qa-actions { margin-left: 58px; }
}

@media (prefers-reduced-motion: reduce) {
    .detail-v2 *, .detail-v2 *::before, .detail-v2 *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 13px 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.table-wrap { overflow-x: auto; }

/* ---------- Wave payment ---------- */
.plan-card { border: 1.5px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; cursor: pointer; transition: border-color .15s, box-shadow .15s; background: #fff; }
.plan-card:hover, .plan-card.selected { border-color: var(--accent); background: var(--accent-light); box-shadow: var(--shadow-sm); }
.plan-card .prix { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin: 8px 0; }
.wave-instructions { background: var(--gradient-soft); border-radius: var(--radius); padding: 20px; }
.wave-instructions ol { margin: 10px 0 0; padding-left: 20px; }
.wave-instructions li { margin-bottom: 8px; font-size: .9rem; }
.wave-numero { font-size: 1.35rem; font-weight: 800; color: var(--primary); letter-spacing: .03em; }

/* ---------- Barre de recherche accueil ---------- */
.home-search { display: flex; gap: 10px; margin-bottom: 18px; }
.home-search form { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--card-bg); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 12px 16px; }
.home-search form i.bi-search { color: var(--text-muted); font-size: 1.05rem; }
.home-search input { flex: 1; border: none; outline: none; background: transparent; font-size: .92rem; color: var(--text); }
.home-search input::placeholder { color: var(--text-muted); }
.home-search .filtre-btn { width: 46px; height: 46px; flex-shrink: 0; border-radius: var(--radius-sm); background: var(--card-bg); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.05rem; }

/* ---------- Pastilles d'action rapide ---------- */
.quick-pills { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.quick-pills::-webkit-scrollbar { display: none; }
.quick-pills a { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; font-weight: 700; font-size: .82rem; background: var(--card-bg); color: var(--text); box-shadow: var(--shadow-sm); }
.quick-pills a i { font-size: .95rem; }
.quick-pills a.pill-primary { background: var(--primary); color: #fff; }
.quick-pills a.pill-accent { background: var(--accent); color: #fff; }

/* ---------- Grille de catégories (accueil) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.cat-grid .secteur-card { min-width: 0; background: var(--card-bg); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 13px 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; overflow: hidden; }
.cat-grid .secteur-card .pic { width: 36px; height: 36px; border-radius: 11px; font-size: 1rem; flex-shrink: 0; }
.cat-grid .secteur-card .nom { width: 100%; }
.cat-grid .secteur-card .nb { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-grid .voir-tout { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; border: 1.5px dashed var(--border); box-shadow: none; }
.cat-grid .voir-tout .pic { background: var(--bg); color: var(--text-muted); }
@media (max-width: 480px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 340px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Menu rapide (page profil, remplace la sidebar sur mobile) ---------- */
.menu-rapide { display: flex; flex-direction: column; }
.menu-rapide a { display: flex; align-items: center; gap: 12px; padding: 14px 10px; font-weight: 700; font-size: .88rem; color: var(--text); border-bottom: 1px solid var(--border); }
.menu-rapide a:last-child { border-bottom: none; }
.menu-rapide a i:first-child { font-size: 1.05rem; color: var(--primary); width: 20px; }
.menu-rapide a .fleche { margin-left: auto; color: var(--text-muted); font-size: .85rem; }
.menu-rapide a.lien-danger i:first-child { color: #dc2626; }
.menu-rapide a.lien-danger { color: #dc2626; }

/* ---------- Messagerie ---------- */
.conv-row { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 14px; }
.conv-row:active { background: var(--bg); }
.conv-info { flex: 1; min-width: 0; }
.conv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conv-nom { font-weight: 800; font-size: .92rem; }
.conv-sujet { font-size: .78rem; color: var(--primary); font-weight: 600; margin-top: 1px; }
.conv-apercu { font-size: .82rem; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-header { display: flex; align-items: center; gap: 12px; padding: 4px 4px 16px; }
.chat-retour { width: 38px; height: 38px; border-radius: 12px; background: var(--card-bg); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-nom { font-weight: 800; font-size: 1rem; }
.chat-sujet { font-size: .78rem; color: var(--text-muted); }
.chat-fil { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 16px; max-height: 60vh; overflow-y: auto; }
.bulle-wrap { max-width: 78%; align-self: flex-start; }
.bulle-wrap.moi { align-self: flex-end; }
.bulle { background: var(--card-bg); box-shadow: var(--shadow-sm); padding: 10px 14px; border-radius: 16px 16px 16px 4px; font-size: .88rem; line-height: 1.4; }
.bulle-wrap.moi .bulle { background: var(--primary); color: #fff; border-radius: 16px 16px 4px 16px; }
.bulle-heure { font-size: .66rem; color: var(--text-muted); margin-top: 3px; padding: 0 4px; }
.bulle-wrap.moi .bulle-heure { text-align: right; }
.chat-form { display: flex; gap: 8px; position: sticky; bottom: calc(78px + env(safe-area-inset-bottom)); background: var(--bg); padding-top: 8px; }
.chat-form input { flex: 1; border: none; border-radius: 999px; padding: 12px 16px; background: var(--card-bg); box-shadow: var(--shadow-sm); font-size: .88rem; outline: none; }
.chat-form .btn-envoyer { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; border: none; flex-shrink: 0; font-size: 1.05rem; }
@media (min-width: 901px) { .chat-form { position: static; } }

/* ---------- Carrousel horizontal (offres / missions à proximité) ---------- */
.horiz-scroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 -26px 20px; padding: 2px 26px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.horiz-scroll::-webkit-scrollbar { display: none; }
.mini-card { position: relative; flex-shrink: 0; width: 240px; background: var(--card-bg); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.mini-card h3 { margin: 0; font-size: .92rem; font-weight: 800; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.4em; padding-right: 26px; }
.mini-card .badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.mini-card .badges .badges-gauche { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-card .meta { font-size: .78rem; color: var(--text-muted); }
.mini-card .bas { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.mini-card .distance { font-size: .72rem; font-weight: 700; color: var(--primary); background: var(--primary-light); padding: 3px 9px; border-radius: 999px; }
.fav-btn {
    width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: none;
    display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: .92rem;
    flex-shrink: 0; cursor: pointer; transition: transform .15s, background .15s, color .15s;
}
.fav-btn:active { transform: scale(.88); }
.fav-btn.actif { color: var(--danger); background: var(--danger-light); }
.fav-btn.actif i::before { content: "\f415"; } /* bi-heart-fill */
.poste-card .top-row .fav-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.poste-card .top-row .fav-btn { width: 34px; height: 34px; font-size: 1rem; }
@media (max-width: 900px) { .horiz-scroll { margin: 0 -18px 18px; padding: 2px 18px 6px; } }

/* ---------- Bandeau d'accueil (hero) ---------- */
/* ---------- Carrousel d'accueil (glissable, 2 volets réels : statut d'accès + mise en avant) ---------- */
.hero-slider-wrap { margin-bottom: 16px; }
.hero-slider {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px;
}
.hero-slider::-webkit-scrollbar { display: none; }
.hero-slide { scroll-snap-align: start; flex: 0 0 100%; min-width: 100%; }
.home-hero { position: relative; overflow: hidden; background: var(--gradient); color: #fff; border-radius: var(--radius); padding: 20px; height: 100%; box-sizing: border-box; margin-bottom: 18px; }
.hero-img { position: absolute; top: -14px; right: -14px; width: 108px; height: 108px; object-fit: contain; opacity: .30; pointer-events: none; z-index: 0; }
.home-hero > *:not(.hero-img), .hero-promo > *:not(.hero-img) { position: relative; z-index: 1; }
.home-hero .titre { font-weight: 800; font-size: 1.02rem; }
.home-hero .sous-titre { font-size: .82rem; opacity: .92; margin-top: 3px; }
.home-hero .fleche { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.home-hero .stats-row { display: flex; gap: 10px; margin-top: 16px; }
.home-hero .stat-chip { flex: 1; background: rgba(255,255,255,.14); border-radius: 14px; padding: 10px 12px; }
.home-hero .stat-chip .val { font-size: 1.15rem; font-weight: 800; line-height: 1; }
.home-hero .stat-chip .lab { font-size: .68rem; opacity: .9; margin-top: 3px; }
.hero-promo { background: var(--gradient); border-radius: var(--radius); padding: 20px; height: 100%; box-sizing: border-box; color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hero-promo .badge-nouveau { display: inline-flex; background: rgba(255,255,255,.22); color: #fff; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; width: fit-content; }
.hero-promo .titre { font-weight: 800; font-size: 1.15rem; line-height: 1.25; max-width: 72%; }
.hero-promo .sous-titre { font-size: .82rem; opacity: .92; margin-top: 6px; max-width: 72%; }
.hero-promo .btn { margin-top: 14px; background: #fff; color: var(--primary-dark); width: fit-content; }
.hero-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.hero-dots .pt { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: background .2s, width .2s; }
.hero-dots .pt.actif { background: var(--primary); width: 16px; border-radius: 4px; }

/* ---------- Cartes de statistiques rapides (sous la bannière) ---------- */
.mini-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.mini-stat-card { background: var(--card-bg); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 12px 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.mini-stat-card .ic { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .98rem; flex-shrink: 0; }
.mini-stat-card .val { font-weight: 800; font-size: 1.05rem; line-height: 1; letter-spacing: -.01em; }
.mini-stat-card .lab { font-size: .64rem; color: var(--text-muted); font-weight: 600; line-height: 1.25; }
.mini-stat-card.c-vert .ic { background: var(--primary-light); color: var(--primary); }
.mini-stat-card.c-orange .ic { background: var(--orange-light); color: var(--orange); }
.mini-stat-card.c-violet .ic { background: var(--purple-light); color: var(--purple); }
.mini-stat-card.c-bleu .ic { background: var(--teal-light); color: var(--teal); }
@media (max-width: 380px) { .mini-stats-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Écran de choix "Publier" ---------- */
.publier-choix { display: flex; flex-direction: column; gap: 14px; }
.choix-card { display: flex; align-items: center; gap: 16px; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.choix-card:active { transform: scale(.98); }
.choix-card .pic { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.choix-card .pic.c0 { background: var(--primary-light); color: var(--primary); }
.choix-card .pic.c1 { background: var(--orange-light); color: var(--orange); }
.choix-card .txt h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 800; }
.choix-card .txt p { margin: 0; font-size: .82rem; color: var(--text-muted); }
.choix-card .fleche { margin-left: auto; color: var(--text-muted); flex-shrink: 0; }

/* ---------- Popup minimal d'installation de l'app ---------- */
.install-popup {
    display: none; position: fixed; inset: 0; z-index: 70;
    align-items: center; justify-content: center;
    background: rgba(15,20,15,.45); backdrop-filter: blur(1px);
    padding: 20px;
}
.install-popup.show { display: flex; }
.install-popup-carte {
    background: #fff; border-radius: 20px; padding: 28px 24px 20px;
    max-width: 300px; width: 100%; text-align: center;
    box-shadow: 0 20px 50px rgba(10,20,15,.25);
    display: flex; flex-direction: column; align-items: center;
}
.install-popup-carte img { width: 60px; height: 60px; border-radius: 16px; margin-bottom: 14px; }
.install-popup-carte strong { font-size: 1.05rem; font-weight: 800; }
.install-popup-carte span { font-size: .82rem; color: var(--text-muted); margin: 6px 0 20px; line-height: 1.4; }
.install-popup-carte .btn { width: 100%; }
.install-popup-carte .plus-tard { margin-top: 10px; background: none; border: none; color: var(--text-muted); font-size: .82rem; font-weight: 700; padding: 6px; }
@media (min-width: 901px) { .install-popup { align-items: flex-end; justify-content: flex-end; background: transparent; padding: 24px; } .install-popup-carte { box-shadow: 0 10px 30px rgba(10,20,15,.18); } }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #ffffff;
    box-shadow: 0 -2px 16px rgba(20,30,70,.08);
    padding: 8px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
    border-top: 1px solid var(--border);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
.bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: .6rem; color: var(--text-muted); padding: 6px 2px 4px; font-weight: 700;
    position: relative; flex: 1; min-width: 0; border-radius: 14px; transition: background .15s, color .15s;
}
.bottom-nav a:active { background: var(--bg); }
.bottom-nav a.active { color: var(--accent-dark); }
.bottom-nav a.active .ic { background: var(--accent-light); transform: translateY(-1px); }
.bottom-nav .ic { font-size: 1.15rem; width: 34px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 10px; transition: background .15s, transform .15s; }
.bottom-nav .ic-central {
    width: 46px; height: 46px; border-radius: 16px; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-top: -26px;
    box-shadow: 0 8px 18px rgba(21,128,61,.4);
}
.bottom-nav a.active .ic.ic-central { background: var(--primary); transform: none; }
.bottom-nav .badge-pastille { position: absolute; top: -2px; right: 0; background: var(--danger); color: #fff; font-size: .6rem; font-weight: 700; border-radius: 10px; padding: 1px 5px; box-shadow: 0 0 0 2px #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .overlay-backdrop { display: none !important; }
    .main-area { margin-left: 0; padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
    .bottom-nav { display: flex; }
    .topbar { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .role-choice { grid-template-columns: 1fr 1fr; }
    .content { padding: 14px 16px 32px; }
}

@media (max-width: 480px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .content { padding: 12px 14px 30px; }
    .card { padding: 18px; border-radius: 18px; }
}

.overlay-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,20,45,.45); z-index: 35; backdrop-filter: blur(1px); }
.overlay-backdrop.show { display: block; }

/* ---------- Landing (public) ---------- */
.landing-hero { background: var(--gradient); color: #fff; padding: 64px 22px; text-align: center; }
.landing-hero h1 { font-size: 2rem; margin-bottom: 10px; font-weight: 800; letter-spacing: -.02em; }
.landing-hero p { opacity: .92; max-width: 480px; margin: 0 auto 24px; }
.landing-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =====================================================================
   ---------- Progression de profil (dashboard candidat) ----------
   ===================================================================== */
.profile-progress-card { display: flex; align-items: center; gap: 16px; }
.profile-progress-card .txt { flex: 1; }
.profile-progress-card .txt strong { display: block; margin-bottom: 6px; font-size: .92rem; }
.profile-progress-track { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 6px; }
.profile-progress-fill { height: 100%; border-radius: 999px; background: var(--gradient); transition: width .5s ease; }
.profile-progress-pct { font-weight: 800; font-size: 1.3rem; color: var(--primary); flex-shrink: 0; }

/* =====================================================================
   ---------- Regroupement visuel des formulaires (sections numérotées) ----------
   ===================================================================== */
.form-section-title {
    display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: .78rem;
    letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted);
    margin: 26px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.form-section-title:first-of-type { margin-top: 0; }
.form-section-title .num {
    width: 22px; height: 22px; border-radius: 50%; background: var(--primary-light); color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; flex-shrink: 0;
}

/* =====================================================================
   ---------- CTA mobile "sticky" (fiches détail) ----------
   ===================================================================== */
.sticky-cta-mobile { display: none; }
@media (max-width: 768px) {
    .sticky-cta-mobile {
        display: block; position: fixed; left: 0; right: 0;
        bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 35;
        padding: 10px 14px; background: var(--card-bg); box-shadow: 0 -8px 24px rgba(20,30,70,.09);
    }
    .sticky-cta-mobile-spacer { height: 78px; }
}

.date-ago { color: var(--text-muted); font-size: .8rem; }

/* ---------- Listing search & filters (postes/index, missions/index) ---------- */
.search-hero-v2 { margin-bottom: 18px; animation: kv2-fade-up .4s cubic-bezier(.2,.8,.2,1) both; }
.search-bar-v2 { display: flex; align-items: center; gap: 10px; background: var(--card-bg); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 6px 8px 6px 16px; transition: box-shadow .2s; }
.search-bar-v2:focus-within { box-shadow: 0 0 0 4px rgba(21,128,61,.12), var(--shadow-md); }
.search-bar-v2 i.bi-search { color: var(--text-muted); font-size: 1.05rem; }
.search-bar-v2 input { flex: 1; border: none; outline: none; background: transparent; font-size: .92rem; color: var(--text); padding: 10px 0; }
.search-bar-v2 input::placeholder { color: var(--text-muted); }
.search-bar-v2 .search-go { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--primary); color: #fff; border: none; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: filter .15s; }
.search-bar-v2 .search-go:active { filter: brightness(.92); }

.filtre-chips-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px;
    background: var(--card-bg); box-shadow: var(--shadow-sm); border: 1.5px solid transparent; color: var(--text);
    font-size: .82rem; font-weight: 700; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.chip-btn:active { transform: scale(.96); }
.chip-btn.actif { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(21,128,61,.25); }
.chip-btn .chip-count { background: rgba(255,255,255,.28); color: #fff; border-radius: 999px; font-size: .68rem; padding: 1px 7px; }
.chip-btn:not(.actif) .chip-count { background: var(--primary); color: #fff; }
.chip-btn.chip-reset { background: transparent; box-shadow: none; color: var(--danger); text-decoration: none; }

/* Filter overlay + sheet: bottom sheet on mobile, centered modal on desktop */
.filtres-overlay { display: none; position: fixed; inset: 0; z-index: 60; background: rgba(15,20,15,.45); backdrop-filter: blur(1px); }
.filtres-overlay.show { display: block; }
.filtres-sheet {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
    background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(10,20,15,.2);
    max-height: 88vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom);
    animation: kv2-sheet-up .25s cubic-bezier(.2,.8,.2,1) both;
}
.filtres-sheet.show { display: block; }
@keyframes kv2-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.filtres-sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.filtres-sheet-header strong { font-size: 1.02rem; font-weight: 800; }
.filtres-sheet-header button { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--bg); color: var(--text-muted); display: flex; align-items: center; justify-content: center; }
.filtres-sheet-body { padding: 8px 20px 4px; }
.filtres-sheet-footer { padding: 14px 20px 20px; position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); }
.filtres-sheet::before { content: ""; display: block; width: 40px; height: 4px; background: var(--border); border-radius: 4px; margin: 10px auto 0; }

@media (min-width: 640px) {
    .filtres-sheet {
        left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%);
        width: 100%; max-width: 480px; border-radius: 22px; animation: kv2-pop .2s cubic-bezier(.2,.8,.2,1) both;
    }
    .filtres-sheet::before { display: none; }
}

/* ---------- Formulaire par étapes (publication mission / poste) ---------- */
.wizard-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.wizard-progress-track { flex: 1; height: 5px; background: var(--border); border-radius: 6px; overflow: hidden; }
.wizard-progress-fill { height: 100%; background: var(--primary); width: 0%; border-radius: 6px; transition: width .3s ease; }
.wizard-progress-label { font-size: .76rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.wizard-dots { display: flex; gap: 6px; margin-bottom: 22px; }
.wizard-dot { flex: 1; height: 5px; border-radius: 6px; background: var(--border); transition: background .25s ease, flex-grow .25s ease; }
.wizard-dot.active, .wizard-dot.done { background: var(--primary); }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: kv2-fade-up .3s cubic-bezier(.2,.8,.2,1) both; }
.wizard-step-title { font-weight: 800; font-size: 1.08rem; margin: 0 0 4px; letter-spacing: -.01em; }
.wizard-step-sub { color: var(--text-muted); font-size: .85rem; margin: 0 0 20px; }
.wizard-actions { display: flex; gap: 10px; margin-top: 26px; }
.wizard-actions .btn { flex: 1; }
.wizard-summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .86rem; }
.wizard-summary-row span { color: var(--text-muted); }
.wizard-summary-row strong { text-align: right; font-weight: 700; }
.wizard-summary-empty { color: var(--text-muted); font-size: .85rem; }

/* ---------- Notifications ---------- */
.notif-item { display: flex; gap: 12px; padding: 14px 8px; border-bottom: 1px solid var(--border); position: relative; }
.notif-item:last-child { border-bottom: none; }
.notif-item.non-lue { background: var(--primary-light); border-radius: 14px; padding: 14px 12px; }
.notif-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.notif-ic.type-success { background: var(--success-light); color: var(--success); }
.notif-ic.type-danger { background: var(--danger-light); color: var(--danger); }
.notif-ic.type-warning { background: var(--warning-light); color: var(--warning); }
.notif-ic.type-info { background: var(--primary-light); color: var(--primary); }
.notif-body { flex: 1; min-width: 0; }
.notif-titre-row { display: flex; align-items: center; gap: 8px; }
.notif-titre-row strong { font-size: .92rem; font-weight: 800; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.notif-msg { color: var(--text-muted); font-size: .85rem; margin-top: 3px; line-height: 1.45; }
.notif-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.notif-meta small { color: var(--text-muted); font-size: .74rem; }
.notif-meta a { font-size: .78rem; font-weight: 700; color: var(--primary); }

/* ---------- Candidatures reçues : cartes sur mobile, tableau sur desktop ---------- */
.cand-table-wrap { display: none; }
.cand-cards { display: block; }
@media (min-width: 901px) {
    .cand-table-wrap { display: block; }
    .cand-cards { display: none; }
}
.cand-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 12px; }
.cand-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cand-card-top strong { font-size: .96rem; font-weight: 800; }
.cand-card .cand-contact { color: var(--text-muted); font-size: .82rem; margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.cand-card .cand-msg { font-size: .85rem; margin-top: 10px; padding: 10px 12px; background: var(--bg); border-radius: 12px; }
.cand-card .cand-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: .78rem; color: var(--text-muted); }
.cand-card select { margin-top: 12px; width: 100%; }

/* ---------- Auth v3 : mise en page dédiée desktop pour connexion / inscription ---------- */
.auth-side-panel { display: none; }
@media (min-width: 901px) {
    body.ecran-connexion .auth-wrap,
    body.ecran-inscription .auth-wrap {
        display: flex; align-items: stretch; padding: 0; background: #08301a;
    }
    body.ecran-connexion .auth-card,
    body.ecran-inscription .auth-card {
        width: 480px; max-width: 480px; min-height: 100vh; border-radius: 0;
        box-shadow: none; margin: 0; animation: none; display: flex; flex-direction: column;
    }
    body.ecran-connexion .kobsil-hero,
    body.ecran-inscription .kobsil-hero { display: none; }
    body.ecran-connexion .kobsil-sheet,
    body.ecran-inscription .kobsil-sheet {
        margin-top: 0; border-radius: 0; flex: 1; display: flex; flex-direction: column; justify-content: center;
        padding: 40px 52px; max-width: 420px; margin-left: auto; margin-right: auto; width: 100%; box-sizing: border-box;
    }
    .auth-side-panel {
        display: flex; flex-direction: column; justify-content: space-between; flex: 1;
        background: var(--gradient); color: #fff; padding: 56px; position: relative; overflow: hidden; isolation: isolate;
    }
    .auth-side-panel::before, .auth-side-panel::after {
        content: ""; position: absolute; border-radius: 50%; animation: kv2-blob-float 7s ease-in-out infinite;
    }
    .auth-side-panel::before { width: 320px; height: 320px; top: -100px; right: -100px; background: rgba(164,232,120,.28); }
    .auth-side-panel::after { width: 260px; height: 260px; bottom: -90px; left: -60px; background: rgba(139,227,106,.18); animation-delay: 2.6s; }
    .auth-side-panel > * { position: relative; z-index: 1; }
    .auth-side-brand { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 1.3rem; letter-spacing: -.01em; }
    .auth-side-brand span { color: #a4e878; }
    .auth-side-brand .kobsil-logo { width: 46px; height: 46px; margin: 0; border-radius: 14px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; }
    .auth-side-headline { font-size: 2rem; font-weight: 800; line-height: 1.25; max-width: 420px; margin: 0; letter-spacing: -.01em; }
    .auth-side-headline b { color: #a4e878; }
    .auth-side-features { display: flex; flex-direction: column; gap: 18px; margin-top: 32px; }
    .auth-side-feature { display: flex; align-items: center; gap: 14px; }
    .auth-side-feature .ic { width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
    .auth-side-feature div { font-size: .92rem; line-height: 1.4; color: rgba(255,255,255,.92); }
    .auth-side-feature strong { display: block; font-size: .96rem; margin-bottom: 1px; }
    .auth-side-quote { background: rgba(255,255,255,.1); border-radius: 18px; padding: 18px 20px; font-size: .88rem; line-height: 1.55; color: rgba(255,255,255,.92); backdrop-filter: blur(6px); }
    .auth-side-quote strong { display: block; margin-top: 8px; color: #a4e878; font-size: .82rem; }
}
@keyframes kv2-blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-14px, 14px) scale(1.05); }
}
@media (min-width: 1200px) {
    body.ecran-connexion .auth-card, body.ecran-inscription .auth-card { width: 520px; max-width: 520px; }
    .auth-side-headline { font-size: 2.3rem; }
}
