/* ═══════════════════════════════════════════════════════════════
   SEARCH PAGE — SaaS Pro 2026 v5.0
   ═══════════════════════════════════════════════════════════════
   
   Design premium : fond blanc, typographie forte, accent menthe.
   Hero gradient immersif, barre de recherche au centre,
   sidebar filtres sticky, cards résultats avec accent couleur.
   
   Mobile-first, transitions fluides, animations en cascade.
   
   Structure :
     1.  Reset & Base
     2.  Header (Sticky glassmorphism)
     3.  Hero (Gradient + Search intégré)
     4.  Content Layout
     5.  Sidebar Filtres
     6.  Type Grid (micro-cards)
     7.  Filter Inputs & Selects
     8.  Results Header & Active Badges
     9.  Results Grid / Cards
     10. Pagination
     11. Empty State
     12. Footer
     13. Mobile Filter Toggle
     14. Animations
     15. Responsive (Tablet)
     16. Responsive (Mobile)
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   1. RESET & BASE
   ═══════════════════════════════════════════════════════════════ */

/* Reset complet de la page recherche */
.search-page,
.search-page *,
.search-page *::before,
.search-page *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Override du overflow:hidden global (carte homepage) + scroll-lock JS */
html:has(.search-page),
html:has(.search-page) body,
body.search-page,
body.search-page.antigravity-scroll-lock {
    overflow: visible !important;
    overflow-y: auto !important;
    height: auto !important;
    overscroll-behavior-y: auto !important;
}

.search-page {
    min-height: 100vh;
    background: #f8f9fb;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: auto;
}


/* ═══════════════════════════════════════════════════════════════
   2. HEADER — Sticky blanc glassmorphism
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   2. HEADER — Modification du header standard pour look premium
   ═══════════════════════════════════════════════════════════════ */

/* Override du header standard sur la page recherche */
/* Le header utilise les mêmes styles que les autres pages frontend
   On ne surcharge que le strict nécessaire pour le z-index et la largeur */
.search-page .header {
    width: 100% !important;
    max-width: 100vw !important;
    left: 0;
    right: 0;
}

/* Alignement du contenu interne — calé à gauche comme les contrôles Leaflet */
/* Le header-content utilise le même padding que le header standard */
.search-page .header-content {
    max-width: 100% !important;
    width: 100% !important;
}

/* Le logo+titre hérite du style standard du header partagé — aucun override */


/* ═══════════════════════════════════════════════════════════════
   3. HERO — Gradient immersif + Search intégré
   ═══════════════════════════════════════════════════════════════ */

.s-hero {
    position: relative;
    overflow: hidden;
    padding: 60px 24px 52px;
}

.s-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(165deg,
            #0f172a 0%,
            #1e293b 20%,
            #0f4c35 45%,
            #0a3d5c 70%,
            #1e293b 85%,
            #0f172a 100%);
    background-size: 300% 300%;
    animation: heroGradientShift 15s ease-in-out infinite;
    z-index: 0;
}

.s-hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 163, 127, 0.2) 0%, transparent 70%);
    pointer-events: none;
    animation: heroGlowDrift 12s ease-in-out infinite alternate;
}

.s-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: heroGlowDrift 10s ease-in-out infinite alternate-reverse;
}

.s-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
}

.s-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(16, 163, 127, 0.15);
    border: 1px solid rgba(16, 163, 127, 0.25);
    border-radius: 50rem;
    font-size: 12px;
    font-weight: 600;
    color: #6ee7b7;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.s-hero-badge i {
    font-size: 10px;
    color: #34d399;
}

.s-hero h1 {
    font-size: 46px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.08;
    color: #ffffff;
    margin-bottom: 16px;
}

.s-hero h1 span {
    background: linear-gradient(135deg, #34d399, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.s-hero-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    max-width: 520px;
    margin-bottom: 32px;
}

.s-hero-subtitle strong {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
}

/* — Search bar intégrée au hero — */
.s-search-form {
    margin-bottom: 32px;
    max-width: 680px;
}

.s-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 6px 8px 6px 22px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.s-search-bar:focus-within {
    border-color: #10b981;
    box-shadow: 0 8px 40px rgba(16, 163, 127, 0.15), 0 0 0 4px rgba(16, 163, 127, 0.08);
}

.s-search-bar .search-icon {
    color: #bbb;
    font-size: 16px;
    flex-shrink: 0;
}

.s-search-bar input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 0;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    background: transparent;
    min-width: 0;
}

.s-search-bar input::placeholder {
    color: #b0b0b0;
}

.s-search-submit {
    padding: 14px 28px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
    white-space: nowrap;
    flex-shrink: 0;
}

.s-search-submit:hover {
    background: #333;
    transform: scale(1.02);
}

.s-search-submit:active {
    transform: scale(0.97);
}

/* — Stats rapides hero — */
.s-hero-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.s-hero-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.s-hero-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.s-hero-stat strong {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    display: block;
    line-height: 1.1;
}

.s-hero-stat span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}


/* ═══════════════════════════════════════════════════════════════
   4. CONTENT LAYOUT — Full width
   ═══════════════════════════════════════════════════════════════ */

.s-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 80px;
}

.s-layout-full {
    width: 100%;
}


/* ═══════════════════════════════════════════════════════════════
   5. BARRE DE FILTRES HORIZONTALE
   ═══════════════════════════════════════════════════════════════ */

.s-filters-bar {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef0f3;
    padding: 20px 24px;
    margin-bottom: 28px;
    transition: box-shadow 0.3s;
}

.s-filters-bar:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.s-filters-form-horizontal {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Catégories : ligne scrollable de chips ── */
.s-filter-row-types {
    display: flex;
    align-items: center;
    gap: 14px;
}

.s-filter-label-inline {
    font-size: 11px;
    font-weight: 700;
    color: #8b8fa3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.s-filter-label-inline i {
    font-size: 10px;
    color: #10b981;
}

.s-type-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
    -webkit-overflow-scrolling: touch;
}

.s-type-scroll::-webkit-scrollbar {
    height: 4px;
}

.s-type-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.s-type-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

.s-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 50rem;
    border: 1.5px solid #eef0f3;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
}

.s-type-chip:hover {
    border-color: #d0d3da;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.s-type-chip.active {
    border-color: #10b981;
    font-weight: 600;
}

.s-type-chip input[type="checkbox"] {
    display: none;
}

.s-type-chip-emoji {
    font-size: 14px;
    line-height: 1;
}

.s-type-chip-label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
}

.s-type-chip.active .s-type-chip-label {
    color: #1a1a1a;
    font-weight: 700;
}

/* ── Filtres inline : ville, dept, tri, ordre ── */
.s-filter-row-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.s-filter-inline-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fb;
    border: 1.5px solid #eef0f3;
    border-radius: 10px;
    padding: 0 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.s-filter-inline-group:focus-within {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.08);
    background: #ffffff;
}

.s-filter-inline-label {
    color: #b0b4c7;
    font-size: 13px;
    flex-shrink: 0;
}

.s-filter-inline-input {
    border: none;
    outline: none;
    background: transparent;
    padding: 10px 4px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    width: 130px;
    min-width: 0;
}

.s-filter-inline-input::placeholder {
    color: #bbb;
}

.s-filter-inline-select {
    border: none;
    outline: none;
    background: transparent;
    padding: 10px 4px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.s-btn-apply-inline {
    padding: 10px 20px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s;
    white-space: nowrap;
    flex-shrink: 0;
}

.s-btn-apply-inline:hover {
    background: #333;
    transform: translateY(-1px);
}

.s-btn-apply-inline:active {
    transform: scale(0.97);
}

.s-btn-reset-inline {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f8;
    color: #ef4444;
    border: 1px solid #eef0f3;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.s-btn-reset-inline:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}


/* ═══════════════════════════════════════════════════════════════
   6. TYPE GRID — legacy (gardé pour mobile)
   ═══════════════════════════════════════════════════════════════ */

.s-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.s-type-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1.5px solid #eef0f3;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.s-type-card:hover {
    border-color: #d0d3da;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.s-type-card.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf7 0%, #ecfdf5 100%);
}

.s-type-card.active::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 9px;
    font-weight: 800;
    color: #10b981;
}

.s-type-card input[type="checkbox"] {
    display: none;
}

.s-type-card-emoji {
    font-size: 17px;
    line-height: 1;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f5f6f8;
    transition: background 0.2s;
}

.s-type-card.active .s-type-card-emoji {
    background: rgba(16, 163, 127, 0.12);
}

.s-type-card-label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.s-type-card.active .s-type-card-label {
    color: #1a1a1a;
    font-weight: 700;
}


/* ═══════════════════════════════════════════════════════════════
   7. FILTER INPUTS & SELECTS
   ═══════════════════════════════════════════════════════════════ */

.s-filter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #eef0f3;
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    background: #ffffff;
    outline: none;
    transition: all 0.2s;
}

.s-filter-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.08);
}

.s-filter-input::placeholder {
    color: #bbb;
}

.s-filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #eef0f3;
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    background: #ffffff;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px;
    transition: all 0.2s;
}

.s-filter-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.08);
}

.s-filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.s-btn-apply {
    flex: 2;
    padding: 12px 16px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s;
}

.s-btn-apply:hover {
    background: #333;
    transform: translateY(-1px);
}

.s-btn-apply:active {
    transform: scale(0.97);
}

.s-btn-reset {
    flex: 1;
    padding: 12px;
    background: #f5f6f8;
    color: #666;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.s-btn-reset:hover {
    background: #e8e9ec;
    color: #1a1a1a;
}


/* ═══════════════════════════════════════════════════════════════
   8. RESULTS HEADER & ACTIVE BADGES
   ═══════════════════════════════════════════════════════════════ */

.s-results {
    min-width: 0;
}

.s-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.s-results-count {
    font-size: 14px;
    font-weight: 600;
    color: #888;
}

.s-results-count strong {
    color: #1a1a1a;
    font-weight: 800;
    font-size: 16px;
}

.s-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.s-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    transition: all 0.2s;
}

.s-active-badge:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.s-active-badge i {
    font-size: 10px;
    color: #10b981;
}


/* ═══════════════════════════════════════════════════════════════
   9. RESULTS GRID / FICHES DISTRIBUTEUR (style premium)
   ═══════════════════════════════════════════════════════════════ */

/* ── Toggle Vue Grille / Liste ── */
.s-view-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.s-view-btn {
    width: 36px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #94a3b8;
    transition: all 0.2s;
}

.s-view-btn:hover {
    color: #475569;
}

.s-view-btn.active {
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ── Grille résultats ── */
.s-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ── Fiche distributeur premium ── */
.sr-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    animation: fadeSlideUp 0.4s ease both;
}

.sr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

/* ── Header gradient ── */
.sr-card-header {
    height: 72px;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.sr-card-header-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: 0.6;
}

.sr-card-badges {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 12px 14px;
}

.sr-card-badge {
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Float Row : Avatar + Badge Type ── */
.sr-card-float-row {
    padding: 0 16px;
    margin-top: -30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 5;
    height: 60px;
}

.sr-card-avatar-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffffff;
    padding: 3px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
    display: block;
    flex-shrink: 0;
}

.sr-card-avatar-wrap:hover {
    transform: scale(1.05);
}

.sr-card-avatar-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sr-card-avatar-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    background: #f1f5f9;
}

.sr-card-type-float {
    padding: 4px 12px;
    border-radius: 99px;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 2px solid white;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ── Body ── */
.sr-card-body {
    padding: 6px 16px 16px 16px;
    flex: 1;
}

.sr-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.3;
    text-decoration: none;
    display: block;
}

.sr-card-name:hover {
    color: #10b981;
}

/* ── Badge distance utilisateur ── */
.sr-card-distance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 6px;
    animation: fadeSlideUp 0.3s ease;
}

.sr-card-distance i {
    font-size: 10px;
    color: #3b82f6;
}

.sr-card-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    margin-bottom: 10px;
    margin-top: 10px;
}

.sr-card-info-item {
    display: flex;
    flex-direction: column;
}

.sr-card-info-item.full {
    grid-column: 1 / -1;
}

.sr-card-info-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.sr-card-info-value {
    font-size: 12px;
    color: #1a1a1a;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-card-description {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* ── Footer Actions ── */
.sr-card-actions {
    padding: 8px 16px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.sr-card-payments {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.sr-payment-pill {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #64748b;
    transition: all 0.2s;
}

.sr-payment-pill:hover {
    border-color: #94a3b8;
    color: #1a1a1a;
}

.sr-card-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sr-btn-itineraire {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
}

.sr-btn-itineraire:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
}

.sr-btn-view {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sr-btn-view:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   9b. MODE LISTE — Fiches horizontales compactes
   ═══════════════════════════════════════════════════════════════ */

.s-results-grid.s-results-list {
    grid-template-columns: 1fr;
    gap: 12px;
}

.s-results-list .sr-card {
    flex-direction: row;
    border-radius: 12px;
    position: relative;
}

.s-results-list .sr-card-header {
    width: 160px;
    height: auto;
    min-height: 100%;
    flex-shrink: 0;
    border-radius: 12px 0 0 12px;
}

/* Photo/avatar visible en mode liste : superposé au header gradient */
.s-results-list .sr-card-float-row {
    position: absolute;
    left: 0;
    top: 0;
    width: 160px;
    height: 100%;
    margin-top: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px;
    z-index: 5;
}

.s-results-list .sr-card-avatar-wrap {
    width: 52px;
    height: 52px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.s-results-list .sr-card-type-float {
    padding: 2px 8px;
    font-size: 9px;
    gap: 4px;
    border-width: 1.5px;
}

.s-results-list .sr-card-body {
    padding: 12px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.s-results-list .sr-card-name {
    font-size: 16px;
    margin-bottom: 4px;
}

.s-results-list .sr-card-info-grid {
    margin-top: 6px;
    padding-top: 6px;
    margin-bottom: 6px;
}

.s-results-list .sr-card-actions {
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    width: 140px;
    flex-shrink: 0;
    border-top: none;
    border-left: 1px solid #f1f5f9;
    padding: 12px 16px;
    gap: 10px;
}

.s-results-list .sr-card-payments {
    justify-content: flex-end;
}


/* ═══════════════════════════════════════════════════════════════
   10. PAGINATION
   ═══════════════════════════════════════════════════════════════ */

.s-pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.s-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.s-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1.5px solid #eef0f3;
    background: #ffffff;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.s-page-btn:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.s-page-btn.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.s-page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.s-page-dots {
    padding: 0 6px;
    color: #ccc;
    font-size: 13px;
}


/* ═══════════════════════════════════════════════════════════════
   11. EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */

.s-empty {
    text-align: center;
    padding: 80px 24px 60px;
}

.s-empty-illustration {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.s-empty-circle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0fdf7, #ecfdf5);
    animation: emptyPulse 3s ease-in-out infinite;
}

.s-empty-illustration.warning .s-empty-circle {
    background: linear-gradient(135deg, #fefce8, #fff7ed);
}

.s-empty-illustration i {
    position: relative;
    z-index: 1;
    font-size: 28px;
    color: #10b981;
}

.s-empty-illustration.warning i {
    color: #f59e0b;
}

@keyframes emptyPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.8;
    }
}

.s-empty h3 {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
    letter-spacing: -0.4px;
}

.s-empty p {
    font-size: 14px;
    color: #888;
    max-width: 420px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* Suggestions rapides */
.s-empty-suggestions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.s-empty-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1.5px solid #eef0f3;
    border-radius: 50rem;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.25s;
}

.s-empty-tag:hover {
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 163, 127, 0.10);
    transform: translateY(-2px);
}

.s-empty-tag i {
    font-size: 12px;
    color: #10b981;
}

/* Reset button dans no results */
.s-empty-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #1a1a1a;
    color: white;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
}

.s-empty-reset:hover {
    background: #333;
    transform: translateY(-1px);
    color: white;
}


/* ═══════════════════════════════════════════════════════════════
   12. FOOTER
   ═══════════════════════════════════════════════════════════════ */

.s-footer {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
    border-top: 1px solid #eef0f3;
    text-align: center;
}

.s-footer p {
    font-size: 12px;
    color: #bbb;
    font-weight: 500;
}

.s-footer a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.s-footer a:hover {
    color: #10b981;
}


/* ═══════════════════════════════════════════════════════════════
   13. MOBILE FILTER TOGGLE
   ═══════════════════════════════════════════════════════════════ */

.s-mobile-toggle {
    display: none;
    width: 100%;
    padding: 14px 20px;
    background: #ffffff;
    border: 1.5px solid #eef0f3;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    cursor: pointer;
    margin-bottom: 20px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
}

.s-mobile-toggle:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.08);
}

.s-mobile-toggle .badge-count {
    background: #10b981;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}


/* ═══════════════════════════════════════════════════════════════
   14. ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Animation gradient hero — mouvement fluide et vivant ── */
@keyframes heroGradientShift {
    0% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 50% 0%;
    }

    50% {
        background-position: 100% 50%;
    }

    75% {
        background-position: 50% 100%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ── Animation halos lumineux — dérive subtile ── */
@keyframes heroGlowDrift {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(30px, -20px) scale(1.15);
        opacity: 1;
    }

    100% {
        transform: translate(-20px, 15px) scale(0.95);
        opacity: 0.7;
    }
}

.s-hero-content {
    animation: heroFadeIn 0.6s ease-out;
}

/* Cards cascade — animation-delay défini inline via PHP */


/* ═══════════════════════════════════════════════════════════════
   15. RESPONSIVE — TABLET (≤ 960px)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 960px) {
    .s-layout {
        grid-template-columns: 1fr;
    }

    /* Barre de filtres masquée en mobile — toggle via JS */
    .s-filters-bar {
        display: none;
    }

    .s-filters-bar.open {
        display: block;
        animation: fadeSlideDown 0.3s ease;
    }

    .s-mobile-toggle {
        display: flex;
    }

    .s-nav .nav-text {
        display: none;
    }

    .s-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ═══════════════════════════════════════════════════════════════
   16. RESPONSIVE — MOBILE (≤ 640px)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .s-header {
        padding: 0 16px;
        height: 56px;
    }

    .s-logo span {
        font-size: 15px;
    }

    .s-nav {
        gap: 12px;
    }

    .s-nav a.nav-text {
        display: none;
    }

    .s-hero {
        padding: 36px 16px 32px;
    }

    .s-hero h1 {
        font-size: 30px;
        letter-spacing: -0.03em;
    }

    .s-hero-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .s-search-bar {
        border-radius: 12px;
        padding: 4px 5px 4px 16px;
    }

    .s-search-bar input[type="text"] {
        font-size: 14px;
        padding: 12px 0;
    }

    .s-search-submit {
        padding: 12px 18px;
        font-size: 13px;
        border-radius: 10px;
    }

    .s-search-submit span {
        display: none;
    }

    .s-hero-stats {
        gap: 16px;
    }

    .s-hero-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .s-hero-stat strong {
        font-size: 15px;
    }

    .s-content {
        padding: 20px 16px 60px;
    }

    .s-results-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Forcer grille simple sur mobile (pas de mode liste horizontal) */
    .s-results-grid.s-results-list {
        grid-template-columns: 1fr;
    }

    .s-results-list .sr-card {
        flex-direction: column;
    }

    .s-results-list .sr-card-header {
        width: 100%;
        height: 72px;
    }

    .s-results-list .sr-card-float-row {
        display: flex;
    }

    .s-results-list .sr-card-actions {
        flex-direction: row;
        width: 100%;
        border-left: none;
        border-top: 1px solid #f1f5f9;
    }

    .sr-card-type-float span {
        font-size: 9px;
    }


    .s-page-btn {
        min-width: 42px;
        height: 42px;
    }

    .s-type-grid {
        grid-template-columns: 1fr 1fr;
    }

    .s-type-card {
        padding: 8px 10px;
        gap: 6px;
    }

    .s-type-card-emoji {
        font-size: 16px;
        width: 26px;
        height: 26px;
        border-radius: 7px;
    }

    .s-type-card-label {
        font-size: 10px;
    }

    .s-empty {
        padding: 50px 16px 40px;
    }

    .s-empty-suggestions {
        gap: 8px;
    }

    .s-empty-tag {
        padding: 8px 16px;
        font-size: 12px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   17. DARK MODE — Intégration ThemeManager SaaS
   Palette : #1e2130 / #252940 / #353a52 / #6b7094 / #a0a4b8 / #e4e6f0
   Accent  : #10b981 / #5dd9a8
   ═══════════════════════════════════════════════════════════════ */

/* Body */
[data-theme="dark"] .search-page {
    background: #0f1117;
    color: #e4e6f0;
}

/* Header */
[data-theme="dark"] .s-header {
    background: rgba(30, 33, 48, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .s-logo span {
    color: #e4e6f0;
}

[data-theme="dark"] .s-nav a {
    color: #6b7094;
}

[data-theme="dark"] .s-nav a:hover,
[data-theme="dark"] .s-nav a.active {
    color: #e4e6f0;
}

[data-theme="dark"] .s-nav-icons a {
    color: #a0a4b8;
}

[data-theme="dark"] .s-nav-icons a:hover {
    background: #252940;
    color: #e4e6f0;
}

/* Hero */
[data-theme="dark"] .s-hero {
    background: linear-gradient(170deg, #1e2130 0%, #151725 50%, #0f1117 100%);
}

[data-theme="dark"] .s-hero h1 {
    color: #e4e6f0;
}

[data-theme="dark"] .s-hero-subtitle {
    color: #6b7094;
}

[data-theme="dark"] .s-hero-badge {
    background: rgba(16, 163, 127, 0.1);
    border-color: rgba(16, 163, 127, 0.2);
    color: #5dd9a8;
}

[data-theme="dark"] .s-hero-stat-icon {
    background: rgba(255, 255, 255, 0.05);
    color: #6b7094;
}

[data-theme="dark"] .s-hero-stat strong {
    color: #e4e6f0;
}

[data-theme="dark"] .s-hero-stat span {
    color: #6b7094;
}

/* Search Bar */
[data-theme="dark"] .s-search-bar {
    background: rgba(37, 41, 64, 0.95);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .s-search-bar:focus-within {
    border-color: #10b981;
    box-shadow: 0 8px 40px rgba(16, 163, 127, 0.12), 0 0 0 4px rgba(16, 163, 127, 0.06);
}

[data-theme="dark"] .s-search-bar .search-icon {
    color: #6b7094;
}

[data-theme="dark"] .s-search-bar input[type="text"] {
    color: #e4e6f0;
}

[data-theme="dark"] .s-search-bar input[type="text"]::placeholder {
    color: #4a4e68;
}

/* Filters Sidebar */
[data-theme="dark"] .s-filters {
    background: #1e2130;
    border-color: #2a2e42;
}

[data-theme="dark"] .s-filters-header {
    border-bottom-color: #2a2e42;
}

[data-theme="dark"] .s-filters-title {
    color: #e4e6f0;
}

[data-theme="dark"] .s-filters-reset-link {
    color: #f87171;
}

[data-theme="dark"] .s-filter-group {
    border-bottom-color: #2a2e42;
}

[data-theme="dark"] .s-filter-label {
    color: #a0a4b8;
}

[data-theme="dark"] .s-type-card {
    background: #252940;
    border-color: #353a52;
}

[data-theme="dark"] .s-type-card:hover {
    border-color: #4a4e68;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .s-type-card.active {
    border-color: #10b981;
    background: rgba(16, 163, 127, 0.1);
}

[data-theme="dark"] .s-type-card-label {
    color: #a0a4b8;
}

[data-theme="dark"] .s-type-card.active .s-type-card-label {
    color: #5dd9a8;
}

[data-theme="dark"] .s-filter-input {
    background: #252940;
    border-color: #353a52;
    color: #e4e6f0;
}

[data-theme="dark"] .s-filter-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.06);
}

[data-theme="dark"] .s-filter-input::placeholder {
    color: #4a4e68;
}

[data-theme="dark"] .s-filter-select {
    background: #252940;
    border-color: #353a52;
    color: #e4e6f0;
}

[data-theme="dark"] .s-btn-apply {
    background: #10b981;
}

[data-theme="dark"] .s-btn-apply:hover {
    background: #10b981;
}

[data-theme="dark"] .s-btn-reset {
    background: #252940;
    color: #a0a4b8;
}

[data-theme="dark"] .s-btn-reset:hover {
    background: #353a52;
    color: #e4e6f0;
}

/* Results */
[data-theme="dark"] .s-results-count {
    color: #6b7094;
}

[data-theme="dark"] .s-results-count strong {
    color: #e4e6f0;
}

[data-theme="dark"] .s-active-badge {
    background: #252940;
    border-color: #353a52;
    color: #a0a4b8;
}

[data-theme="dark"] .s-active-badge:hover {
    border-color: #4a4e68;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .s-active-badge i {
    color: #5dd9a8;
}

/* Fiches distributeur — Dark Mode */
[data-theme="dark"] .sr-card {
    background: #1e2130;
    border-color: #2a2e42;
}

[data-theme="dark"] .sr-card:hover {
    border-color: #353a52;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .sr-card-name {
    color: #e4e6f0;
}

[data-theme="dark"] .sr-card-name:hover {
    color: #5dd9a8;
}

[data-theme="dark"] .sr-card-info-label {
    color: #6b7094;
}

[data-theme="dark"] .sr-card-info-value {
    color: #a0a4b8;
}

[data-theme="dark"] .sr-card-description {
    color: #6b7094;
    border-top-color: #2a2e42;
}

[data-theme="dark"] .sr-card-distance {
    background: linear-gradient(135deg, #1e2940 0%, #1e2d4a 100%);
    border-color: #2a3d5a;
    color: #60a5fa;
}

[data-theme="dark"] .sr-card-distance i {
    color: #60a5fa;
}

[data-theme="dark"] .sr-card-info-grid {
    border-top-color: #2a2e42;
}

[data-theme="dark"] .sr-card-actions {
    background: #181b2a;
    border-top-color: #2a2e42;
}

[data-theme="dark"] .sr-card-avatar-wrap {
    background: #1e2130;
}

[data-theme="dark"] .sr-card-avatar-initial {
    background: #252940;
}

[data-theme="dark"] .sr-payment-pill {
    background: #252940;
    border-color: #353a52;
    color: #6b7094;
}

[data-theme="dark"] .sr-btn-view {
    background: #252940;
    border-color: #353a52;
}

[data-theme="dark"] .sr-btn-itineraire {
    background: #1e2940;
    border-color: #2a3d5a;
}

[data-theme="dark"] .s-view-toggle {
    background: #252940;
}

[data-theme="dark"] .s-view-btn {
    color: #6b7094;
}

[data-theme="dark"] .s-view-btn.active {
    background: #1e2130;
    color: #e4e6f0;
}

/* Pagination */
[data-theme="dark"] .s-page-btn {
    background: #1e2130;
    border-color: #2a2e42;
    color: #a0a4b8;
}

[data-theme="dark"] .s-page-btn:hover {
    border-color: #10b981;
    color: #5dd9a8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .s-page-btn.active {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

[data-theme="dark"] .s-page-dots {
    color: #353a52;
}

/* Empty State */
[data-theme="dark"] .s-empty-circle {
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.1), rgba(16, 163, 127, 0.05));
}

[data-theme="dark"] .s-empty h3 {
    color: #e4e6f0;
}

[data-theme="dark"] .s-empty p {
    color: #6b7094;
}

[data-theme="dark"] .s-empty-tag {
    background: #1e2130;
    border-color: #2a2e42;
    color: #a0a4b8;
}

[data-theme="dark"] .s-empty-tag:hover {
    border-color: #10b981;
    color: #5dd9a8;
}

[data-theme="dark"] .s-empty-reset {
    background: #10b981;
}

[data-theme="dark"] .s-empty-reset:hover {
    background: #10b981;
}

/* Footer */
[data-theme="dark"] .s-footer {
    border-top-color: #2a2e42;
}

[data-theme="dark"] .s-footer p {
    color: #4a4e68;
}

[data-theme="dark"] .s-footer a {
    color: #6b7094;
}

[data-theme="dark"] .s-footer a:hover {
    color: #5dd9a8;
}

/* Mobile Toggle */
[data-theme="dark"] .s-mobile-toggle {
    background: #1e2130;
    border-color: #2a2e42;
    color: #e4e6f0;
}

[data-theme="dark"] .s-mobile-toggle:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.06);
}

/* =====================================================
   HEADER USER BUTTON (Icon Only)
   ===================================================== */
.header-user-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    text-decoration: none;
}

.header-user-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    color: #10b981;
}

/* Dark Mode for Header User Button */
[data-theme="dark"] .header-user-btn {
    background: #1e2130;
    border-color: #353a52;
    color: #e4e6f0;
}

[data-theme="dark"] .header-user-btn:hover {
    background: #252940;
    border-color: #10b981;
    color: #10b981;
}


/* =====================================================
   AUTH MODAL & USER DROPDOWN (Ported from Home)
===================================================== */
.user-avatar-container {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: var(--dd-surface, #fff);
    border: 1px solid var(--dd-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    animation: ddSlideUp 0.2s ease-out;
}

.user-dropdown.active {
    display: flex;
}

.user-dropdown a {
    padding: 12px 16px;
    text-decoration: none;
    color: var(--dd-text, #333);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: var(--dd-surface-alt, #f8fafc);
}

.user-dropdown a i {
    width: 18px;
    text-align: center;
    color: var(--dd-text-secondary, #64748b);
}

.user-dropdown .logout-link {
    border-top: 1px solid var(--dd-border, #e2e8f0);
    color: #ef4444;
}

.user-dropdown .logout-link:hover {
    background: rgba(239, 68, 68, 0.05);
}

.user-dropdown .logout-link i {
    color: #ef4444;
}

/* Auth Btn */
.btn-auth {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 99px;
    background: var(--dd-surface, #fff);
    border: 1px solid var(--dd-border, #e2e8f0);
    color: var(--dd-text, #333);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--dd-shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.05));
}

.btn-auth:hover {
    border-color: var(--dd-primary, #10b981);
    color: var(--dd-primary, #10b981);
    transform: translateY(-1px);
}

/* Auth Modal Specifics */
.auth-tabs {
    display: flex;
    background: var(--dd-surface-alt, #f1f5f9);
    padding: 4px;
    border-radius: 10px;
    margin-right: auto;
}

.tab-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--dd-text-secondary, #64748b);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--dd-surface, #fff);
    color: var(--dd-text, #333);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    color: var(--dd-text, #333);
}

.tab-btn.pro-tab.active {
    color: #f59e0b;
}

.auth-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-tab-content.active {
    display: block;
}

.pro-warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    gap: 12px;
}

.pro-warning i {
    color: #f59e0b;
    margin-top: 3px;
}

.pro-warning p {
    font-size: 13px;
    color: #92400e;
    margin: 0;
    line-height: 1.4;
}

/* Modal Base if not present */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--dd-surface, #fefefe);
    padding: 0;
    border: 1px solid var(--dd-border, #888);
    width: 90%;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.3s ease-out;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--dd-border, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--dd-text-secondary, #64748b);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--dd-surface-alt, #f1f5f9);
    color: var(--dd-text, #333);
}

.modal-body {
    padding: 24px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ddSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Header icons réduits sur mobile ── */
@media (max-width: 768px) {
    .header-user-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .user-menu {
        gap: 6px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITÉ — Réduction des animations
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {

    .s-hero-bg,
    .s-hero-bg::before,
    .s-hero-bg::after {
        animation: none !important;
    }
}