/* Styles propres à client/accueil.php (déplacés du <style> inline pour être mis en cache).
   Chargé au même emplacement que l'ancien bloc : l'ordre de priorité CSS est inchangé. */
    /* Failsafe carrousel horizontal des candidats et modales */
    .vote-cands-section {
        margin: 1.25rem 0 1rem;
    }

    .vote-cands-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .vote-cands-header-title {
        font-size: 0.95rem;
        font-weight: 800;
        color: var(--navy, var(--navy-surface));
        margin: 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .vote-cands-nav {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .vote-carousel-btn {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #ffffff;
        border: 1px solid var(--line);
        color: var(--navy, var(--navy-surface));
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .vote-carousel-btn:hover {
        background: var(--navy, var(--navy-surface));
        color: #ffffff;
        border-color: var(--navy, var(--navy-surface));
        transform: scale(1.06);
    }

    .vote-cands-carousel-wrap {
        position: relative;
        width: 100%;
    }

    .vote-cands-horizontal-track {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding: 4px 4px 14px;
        scrollbar-width: thin;
        scrollbar-color: var(--line-dark) transparent;
    }

    .vote-cands-horizontal-track::-webkit-scrollbar {
        height: 5px;
    }

    .vote-cands-horizontal-track::-webkit-scrollbar-track {
        background: var(--line-light);
        border-radius: 999px;
    }

    .vote-cands-horizontal-track::-webkit-scrollbar-thumb {
        background: var(--line-dark);
        border-radius: 999px;
    }

    .vote-cand-card {
        flex: 0 0 215px;
        width: 215px;
        scroll-snap-align: start;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 12px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: all 0.25s ease;
        position: relative;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    }

    .vote-cand-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.12);
        border-color: var(--line-dark);
    }

    .vote-cand-photo-wrap {
        position: relative;
        width: 100%;
        height: 230px;
        background: var(--navy-surface);
        overflow: hidden;
        cursor: pointer;
    }

    .vote-cand-photo {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        transition: transform 0.35s ease;
        display: block;
    }

    .vote-cand-card:hover .vote-cand-photo {
        transform: scale(1.05);
    }

    .vote-cand-badge {
        position: absolute;
        top: 8px;
        left: 8px;
        font-family: var(--font-family);
        font-size: 0.72rem;
        font-weight: 700;
        background: rgba(15, 23, 42, 0.85);
        backdrop-filter: blur(4px);
        color: #ffffff;
        padding: 2px 7px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        z-index: 2;
    }

    .vote-cand-badge.top-1 {
        background: #FF4A0D;
        border-color: transparent;
    }

    .vote-cand-body {
        padding: 10px 12px 12px;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .vote-cand-nom {
        font-size: 0.92rem;
        font-weight: 800;
        color: var(--navy, var(--navy-surface));
        margin: 0 0 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.25;
    }

    .vote-cand-stats {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        font-size: 0.74rem;
        font-family: var(--font-family);
        font-weight: 700;
        margin-bottom: 4px;
    }

    .vote-cand-gauge-bg {
        height: 5px;
        background: var(--line);
        border-radius: 999px;
        overflow: hidden;
        margin-bottom: 9px;
    }

    .vote-cand-gauge-fill {
        height: 100%;
        background: linear-gradient(90deg, #FF4A0D, var(--primary-light));
        border-radius: 999px;
        transition: width 0.4s ease;
    }

    .vote-cand-actions {
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        gap: 6px;
        margin-top: auto;
    }

    .btn-cand-detail {
        background: var(--canvas);
        color: var(--navy, var(--navy-surface));
        border: 1px solid var(--line-dark);
        font-weight: 700;
        font-size: 0.74rem;
        padding: 6px 4px;
        border-radius: 6px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        transition: all 0.15s ease;
        text-decoration: none;
    }

    .btn-cand-detail:hover {
        background: var(--line);
        color: var(--navy, var(--navy-surface));
    }

    .btn-cand-vote {
        background: #FF4A0D;
        color: #ffffff;
        border: none;
        font-weight: 700;
        font-size: 0.74rem;
        padding: 6px 4px;
        border-radius: 6px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        transition: all 0.15s ease;
        text-decoration: none;
    }

    .btn-cand-vote:hover {
        background: #E03E05;
        transform: translateY(-1px);
    }

    .btn-cand-vote.voted {
        background: var(--navy-surface);
        color: #ffffff;
    }

    .candidat-modal-box {
        max-width: 520px !important;
        width: 100% !important;
        max-height: 88vh !important;
        max-height: 88dvh !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding: 0 !important;
        border-radius: 16px !important;
    }

    .candidat-detail-hero {
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;
        align-items: center;
    }

    .candidat-detail-photo-wrap {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
        border-radius: 12px;
        overflow: hidden;
        position: relative;
        background: var(--navy-surface);
        border: 1px solid var(--line);
    }

    .candidat-detail-photo {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .candidat-detail-meta {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1;
        min-width: 0;
    }

    .candidat-detail-nom {
        font-size: 1.25rem;
        font-weight: 800;
        color: var(--navy, var(--navy-surface));
        margin: 0 0 0.25rem;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .candidat-detail-event {
        font-size: 0.8rem;
        color: var(--muted);
        display: flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 0.4rem;
    }

    .candidat-detail-kpi-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .candidat-detail-kpi {
        background: var(--canvas);
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 0.55rem 0.75rem;
    }

    .candidat-detail-kpi small {
        display: block;
        font-size: 0.68rem;
        text-transform: uppercase;
        color: var(--muted);
        font-weight: 700;
        letter-spacing: 0.04em;
    }

    .candidat-detail-kpi strong {
        font-family: var(--font-family);
        font-size: 1.15rem;
        font-weight: 900;
        color: var(--navy, var(--navy-surface));
    }

    .candidat-detail-desc-box {
        background: var(--canvas);
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 0.85rem 1rem;
        margin-bottom: 1.15rem;
        max-height: 140px;
        overflow-y: auto;
    }

    .candidat-detail-desc-box h4 {
        margin: 0 0 0.35rem;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--muted);
        font-weight: 800;
    }

    .candidat-detail-desc-text {
        font-size: 0.88rem;
        line-height: 1.55;
        color: var(--ink-soft);
        margin: 0;
        white-space: pre-line;
    }

    /* Alignement vertical des candidats sur mobile */
    @media (max-width: 768px) {
        .vote-cands-nav {
            display: none !important;
        }

        .vote-cands-horizontal-track {
            flex-direction: column !important;
            overflow-x: visible !important;
            overflow-y: visible !important;
            scroll-snap-type: none !important;
            align-items: center !important;
            gap: 1.25rem !important;
            padding: 0.5rem 0 1.5rem !important;
        }

        .vote-cand-card {
            flex: 0 0 auto !important;
            width: 100% !important;
            max-width: 340px !important;
            scroll-snap-align: none !important;
            border-radius: 14px !important;
        }

        .vote-cand-photo-wrap {
            height: 320px !important;
            min-height: 280px !important;
        }

        .vote-cand-photo {
            object-fit: contain !important;
            object-position: center !important;
        }

        .candidat-detail-hero {
            display: flex;
            align-items: center;
            gap: 0.85rem;
        }

        .candidat-detail-photo-wrap {
            width: 80px;
            height: 80px;
        }
    }

    .poster-floating-share-btn,
    .btn-card-share {
        display: none !important;
    }

    /* Poignée tactile mobile pour Bottom-Sheets (Menu mobile) */
    .mobile-sheet-handle {
        display: none;
    }

    @media (max-width: 768px) {
        .mobile-sheet-handle {
            display: block;
            width: 42px;
            height: 4px;
            background: var(--line-dark);
            border-radius: 999px;
            margin: -4px auto 14px;
        }
    }

    /* Modale Vote Événement : Focus Prioritaire sur les Candidats */
    .vote-modal-box {
        max-width: 860px !important;
        width: min(96vw, 860px) !important;
        max-height: 92vh;
        padding: 1.25rem clamp(1rem, 3vw, 1.5rem) !important;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .vote-modal-compact-hero {
        display: flex;
        gap: 1rem;
        align-items: center;
        margin-bottom: 0.85rem;
        padding-bottom: 0.85rem;
        border-bottom: 1px solid var(--line);
    }

    .vote-modal-hero-thumb {
        width: 68px;
        height: 68px;
        border-radius: 10px;
        object-fit: cover;
        flex-shrink: 0;
        border: 1px solid var(--line);
        background: var(--navy-surface);
    }

    .vote-modal-title {
        margin: 0.15rem 0 0.35rem;
        font-size: clamp(1.15rem, 2.4vw, 1.4rem);
        color: var(--navy, var(--navy-surface));
        font-weight: 800;
        line-height: 1.25;
    }

    .vote-modal-meta-pills {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }

    .vote-meta-pill {
        background: var(--canvas);
        border: 1px solid var(--line);
        border-radius: 999px;
        padding: 2px 9px;
        font-size: 0.76rem;
        color: var(--navy, var(--navy-surface));
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    @media (max-width: 550px) {
        .vote-modal-compact-hero {
            align-items: flex-start;
        }

        .vote-modal-hero-thumb {
            width: 52px;
            height: 52px;
        }
    }

    /* ==========================================================================
       BULLES DE CHOIX DE CATÉGORIES (.category-chips)
       ========================================================================== */
    .category-chips {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px 2px 14px;
        margin-top: 1.25rem;
        margin-bottom: 1.75rem;
        scroll-snap-type: x mandatory;
    }

    .category-chips::-webkit-scrollbar {
        display: none;
    }

    @keyframes chipActivePulse {
        0% { transform: scale(0.95); }
        60% { transform: scale(1.03); }
        100% { transform: scale(1); }
    }

    .category-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        padding: 0.5rem 1.05rem;
        background: #ffffff !important;
        border: 1px solid var(--line) !important;
        border-radius: 9999px;
        color: var(--navy-surface) !important;
        -webkit-text-fill-color: var(--navy-surface) !important;
        forced-color-adjust: none !important;
        font-family: var(--font-family);
        font-size: 0.84rem;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
        scroll-snap-align: start;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        flex-shrink: 0;
        cursor: pointer;
    }

    .category-chip i {
        color: var(--navy-surface) !important;
        -webkit-text-fill-color: var(--navy-surface) !important;
        forced-color-adjust: none !important;
        font-size: 0.88rem;
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
    }

    .category-chip:hover {
        background: #FFF7ED !important;
        border-color: #FED7AA !important;
        transform: translateY(-2px);
        color: #FF4A0D !important;
        -webkit-text-fill-color: #FF4A0D !important;
        box-shadow: 0 4px 14px rgba(255, 74, 13, 0.16);
    }

    .category-chip:hover i {
        transform: scale(1.2) rotate(-6deg);
        color: #FF4A0D !important;
        -webkit-text-fill-color: #FF4A0D !important;
    }

    .category-chip:active {
        transform: scale(0.96);
    }

    .category-chip.active {
        background: #FF4A0D !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        border-color: #FF4A0D !important;
        box-shadow: 0 4px 14px rgba(255, 74, 13, 0.32);
        animation: chipActivePulse 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .category-chip.active i {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }

    .hero-category-select {
        width: 100%;
        border: none;
        outline: none;
        background: transparent;
        font-family: inherit;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--navy, var(--navy-surface));
        cursor: pointer;
        padding-right: 1.25rem;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right center;
        background-size: 13px 13px;
    }

    .hero-category-select:focus {
        outline: none;
    }
