/* ======================================================================
   Tâmbour — Design System Moderne (Noir & Blanc avec Accents Ciblés)
   - Fond de page immaculé / gris perle : #F8F9FA, #FFFFFF
   - Noir profond & ébène pure : #0A0A0A, #000000
   - Gris neutres & contours nets : #E5E7EB, #F3F4F6, #D1D5DB
   - Typographie : #0A0A0A (titres et texte), #6B7280 (secondaire)
   - Accents ciblés : Vert WhatsApp officiel #25D366, Rouge SOS #EF4444, Or #F59E0B
====================================================================== */

:root {
    --color-bg-page: #F8F9FA;
    --color-surface: #FFFFFF;
    --color-surface-subtle: #F3F4F6;
    --color-border: #E5E7EB;
    --color-border-hover: #0A0A0A;

    --color-black: #0A0A0A;
    --color-black-pure: #000000;
    --color-black-hover: #262626;

    /* Accents de mise en évidence */
    --color-signal: #E7542C;
    --color-signal-hover: #D4471F;
    --color-signal-dark: #B93612;
    --color-signal-text: #FFFFFF;

    --color-brand-noir: #151515;
    --color-gris-50: #FAFAFA;
    --color-gris-100: #F6F6F6;
    --color-gris-200: #EBEBEB;

    --color-wa: #25D366;
    --color-wa-hover: #20BA5A;
    --color-sos: #EF4444;
    --color-gold: #F59E0B;

    --color-text-main: #0A0A0A;
    --color-text-muted: #6B7280;
    --color-text-light: #9CA3AF;
}

/* ======================================================================
   Tâmbour — Système Typographique & Règles Globales (Inter Tight)
   - Toutes les polices : Inter Tight
   - H1 : 45px (34px mobile), SemiBold 600, -3% (-0.03em)
   - H2 : 30px (24px mobile), SemiBold 600, -2% (-0.02em)
   - H3 : 18px, SemiBold 600, 0%
   - Paragraphes : 16px, Medium 500, line-height 1.55
   - Plancher absolu de taille : 15px minimum
   - Plancher absolu de poids : Medium 500
   - Plafond absolu de poids : SemiBold 600 (jamais Bold 700+)
   ====================================================================== */

*, *::before, *::after {
    font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-page);
    color: var(--color-text-main);
    font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    letter-spacing: 0;
    line-height: 1.55;
    -webkit-tap-highlight-color: transparent;
}

/* Préservation du ratio et protection anti-écrasement des icônes SVG sur tous les écrans */
svg {
    flex-shrink: 0;
}

/* Surlignage & Sélection de Texte Signature Tâmbour (#E7542C) */
::selection {
    background-color: var(--color-signal);
    color: #FFFFFF;
}
::-moz-selection {
    background-color: var(--color-signal);
    color: #FFFFFF;
}

/* Lueur d'interaction subtile sur les champs de saisie actifs */
input:focus, textarea:focus, select:focus {
    border-color: var(--color-signal) !important;
    box-shadow: 0 0 0 3px rgba(231, 84, 44, 0.25) !important;
}

/* Plafond absolu de poids : Jamais au-dessus de SemiBold (600) */
b, strong, th,
h1, h2, h3, h4, h5, h6,
.font-bold, .font-extrabold, .font-black,
[class*="font-bold"], [class*="font-black"], [class*="font-extrabold"] {
    font-weight: 600 !important;
}

/* Plancher absolu de poids : Jamais en-dessous de Medium (500) */
.font-normal, .font-light, .font-thin,
[class*="font-normal"], [class*="font-light"], [class*="font-thin"] {
    font-weight: 500 !important;
}

/* Plancher absolu de taille : 15px minimum sur tout le site */
small,
.text-xs, .text-2xs, .text-sm,
.text-\[8px\], .text-\[9px\], .text-\[10px\], .text-\[11px\], .text-\[12px\], .text-\[13px\], .text-\[14px\] {
    font-size: 15px !important;
    line-height: 1.45 !important;
}

/* Préservation de la taille proportionnelle des indices et exposants */
sub, sup {
    font-size: 0.8em !important;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}
sup { top: -0.45em; }
sub { bottom: -0.25em; }

/* H1 Standard Héros & Pages Générales : 45px (34px mobile), SemiBold 600, -3% */
h1:not(.fiche-title):not(.title-etab):not([class*="fiche-title"]):not(.cockpit-sidebar-title), .text-hero-title, .h1 {
    font-size: clamp(34px, 5vw, 45px) !important;
    font-weight: 600 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.12 !important;
}

/* Titre d'Établissement dans la barre latérale du Cockpit (18px SemiBold calibré) */
.cockpit-sidebar-title, h1.cockpit-sidebar-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
}

/* Titre de Fiche Établissement & Service Public (Calibré, Élégant, Lisible : 24px - 28px) */
.fiche-title, h1.fiche-title, h1[class*="fiche-title"] {
    font-size: clamp(22px, 3.2vw, 28px) !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.25 !important;
}

/* H2 : 30px (24px mobile), SemiBold 600, -2% */
h2, .text-section-title, .h2 {
    font-size: clamp(24px, 3.5vw, 30px) !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

/* H3 : 18px, SemiBold 600, 0% */
h3, .text-card-title, .h3 {
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
}

/* H4 : 16px, SemiBold 600, 0% */
h4, .text-subtitle, .h4 {
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    line-height: 1.35 !important;
}

/* Paragraphes : 16px, Medium 500, 0% */
p, .text-base, .body-lead, .text-body-lead {
    font-size: 16px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    line-height: 1.55 !important;
}

/* ======================================================================
   Tâmbour Design System — Composants & Cartes Atmosphériques
   ====================================================================== */
.card-premium {
    background-color: #FFFFFF;
    border-radius: 1.5rem; /* 24px */
    border: 1px solid #EBEBEB;
    box-shadow: 0 1px 3px rgba(21, 21, 21, 0.04), 0 6px 18px -4px rgba(21, 21, 21, 0.05);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-premium:hover {
    border-color: rgba(21, 21, 21, 0.12);
    box-shadow: 0 2px 6px rgba(21, 21, 21, 0.05), 0 12px 28px -6px rgba(21, 21, 21, 0.09);
}

/* ======================================================================
   Tâmbour — Composants Boutons Canoniques Unifiés (Design System)
   ====================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.625rem 1.25rem;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    border-radius: 9999px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #0A0A0A;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 1. Bouton Primaire (Noir Ébène) */
.btn-primary {
    background-color: var(--color-black);
    color: #FFFFFF !important;
    border: 1px solid var(--color-black);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-primary:hover {
    background-color: #262626;
    border-color: #262626;
}

/* 2. Bouton WhatsApp Accessible (Vert officiel avec texte sombre AAA) */
.btn-whatsapp {
    background-color: var(--color-wa);
    color: #052E16 !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-whatsapp:hover {
    background-color: #20BA5A;
}
.btn-whatsapp:focus-visible {
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #1EA952;
}

/* 3. Bouton Secondaire / Outline */
.btn-outline {
    background-color: #FFFFFF;
    color: var(--color-black) !important;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.btn-outline:hover {
    border-color: var(--color-black);
    background-color: var(--color-surface-subtle);
}

/* 4. Bouton Accent Signal (Contraste maximal texte blanc #FFFFFF AAA) */
.btn-signal {
    background-color: var(--color-signal);
    color: var(--color-signal-text) !important;
    border: 1px solid var(--color-signal);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-signal:hover {
    background-color: var(--color-signal-hover);
    border-color: var(--color-signal-hover);
    color: var(--color-signal-text) !important;
}
.btn-signal:focus-visible {
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--color-signal);
}

/* Utilitaires & Composants Signal */
.bg-signal {
    background-color: var(--color-signal) !important;
    color: var(--color-signal-text) !important;
}
.text-signal {
    color: var(--color-signal) !important;
}
.border-signal {
    border-color: var(--color-signal) !important;
}
.badge-signal {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background-color: var(--color-signal);
    color: var(--color-signal-text) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 9999px;
    letter-spacing: -0.01em;
}

/* Carte Spotlight Bento (Inspirations Directives v1.0 & Benchmarks) */
.card-spotlight-signal {
    background-color: var(--color-signal);
    color: var(--color-signal-text) !important;
    border-radius: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px -2px rgba(231, 84, 44, 0.25), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-spotlight-signal:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -4px rgba(231, 84, 44, 0.4), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
}

/* Bouton Circulaire Fléché Canonique */
.btn-circle-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background-color: #FFFFFF;
    color: var(--color-signal) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}
.btn-circle-action:hover {
    transform: scale(1.06);
    background-color: #FAFAFA;
    color: var(--color-signal-dark) !important;
}
.card-spotlight-signal:hover .btn-circle-action {
    transform: scale(1.08);
}

/* Utilitaires Cartes Captivantes Tâmbour */
.border-l-signal {
    border-left-width: 4px !important;
    border-left-style: solid !important;
    border-left-color: var(--color-signal) !important;
}
.bg-signal-subtle {
    background-color: rgba(231, 84, 44, 0.12) !important;
    color: var(--color-signal) !important;
}
.border-signal-subtle {
    border-color: rgba(231, 84, 44, 0.25) !important;
}
.card-captivante {
    background-color: #FFFFFF;
    border-radius: 28px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-captivante:hover {
    border-color: rgba(0, 0, 0, 0.35);
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
    transform: translateY(-3px);
}

/* Pastille statut dynamique avec pulsation Signal Green */
.pulse-dot-signal {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: var(--color-signal);
    position: relative;
    display: inline-block;
}
.pulse-dot-signal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background-color: var(--color-signal);
    animation: ping-signal 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping-signal {
    75%, 100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.bg-aurora {
    background: radial-gradient(at 0% 0%, rgba(224, 231, 255, 0.45) 0px, transparent 50%),
                radial-gradient(at 100% 0%, rgba(224, 242, 254, 0.45) 0px, transparent 50%),
                radial-gradient(at 50% 100%, rgba(254, 243, 199, 0.3) 0px, transparent 50%),
                #FFFFFF;
}

.bg-aurora-subtle {
    background: radial-gradient(at 0% 0%, rgba(238, 242, 255, 0.5) 0px, transparent 40%),
                radial-gradient(at 100% 0%, rgba(240, 249, 255, 0.5) 0px, transparent 40%),
                #F8F9FA;
}

/* Pastille statut dynamique avec onde pulsante verte WhatsApp */
.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background-color: #25D366;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background-color: #25D366;
    animation: ripple 1.8s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

/* Pilules de catégories tactiles */
.category-pill {
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (hover: hover) and (pointer: fine) {
    .category-pill:hover {
        transform: translateY(-1px);
    }
}
.category-pill:active {
    transform: scale(0.96);
}

/* Animation douce d'apparition de fragments HTMX */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ======================================================================
   Cockpit Commerçant Tâmbour Pro — Menu Vertical Gauche + Espace Droite
   ====================================================================== */
.cockpit-wrapper {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

.cockpit-layout-flex {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 1.5rem !important;
    box-sizing: border-box !important;
}

@media (min-width: 1024px) {
    .cockpit-layout-flex {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 2rem !important;
    }
    .cockpit-sidebar-panel {
        display: block !important;
        width: 290px !important;
        min-width: 290px !important;
        max-width: 290px !important;
        flex-shrink: 0 !important;
        position: sticky !important;
        top: 5.5rem !important;
    }
    .cockpit-main-panel {
        display: block !important;
        flex: 1 1 0% !important;
        min-width: 0 !important;
        width: calc(100% - 322px) !important;
    }
    .cockpit-mobile-nav {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .cockpit-sidebar-panel {
        display: none !important;
    }
    .cockpit-mobile-nav {
        display: block !important;
    }
    .cockpit-main-panel {
        width: 100% !important;
    }
}

.cockpit-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
    width: 100% !important;
}

@media (max-width: 767.98px) {
    .cockpit-kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

.cockpit-kpi-card {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* ======================================================================
   Tâmbour — Hero Immersif avec Arrière-Plan Plein Écran (Mockup Fidèle)
   ====================================================================== */
.home-immersive-header {
    width: 100%;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-immersive-header.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(11, 15, 20, 0.96) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero-nav-pill {
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hero-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 42%, rgba(0, 0, 0, 0.2) 75%, transparent 100%);
    pointer-events: none;
}

.hero-overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.25) 60%, transparent 100%);
    pointer-events: none;
}

.hero-white-title {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.hero-white-subtitle {
    color: rgba(255, 255, 255, 0.92) !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.hero-white-slogan {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* ======================================================================
   Tâmbour — Système d'Animation Fluide du Hero (Ken Burns & Cascade)
   ====================================================================== */
@keyframes heroKenBurns {
    0% {
        transform: scale(1.0) translate3d(0, 0, 0);
    }
    50% {
        transform: scale(1.06) translate3d(-1%, -0.5%, 0);
    }
    100% {
        transform: scale(1.0) translate3d(0, 0, 0);
    }
}

.hero-bg-animated {
    animation: heroKenBurns 32s ease-in-out infinite alternate;
    transform-origin: center 40%;
    will-change: transform;
}

@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(22px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFadeDown {
    0% {
        opacity: 0;
        transform: translateY(-16px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-down {
    animation: heroFadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fade-up {
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

.hero-card-interactive {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s ease;
    will-change: transform, box-shadow;
}

@media (hover: hover) and (pointer: fine) {
    .hero-card-interactive:hover {
        transform: translateY(-6px) scale(1.012);
        box-shadow: 0 24px 40px -8px rgba(0, 0, 0, 0.22), 0 12px 20px -6px rgba(0, 0, 0, 0.1);
    }

    .hero-card-interactive:hover .hero-icon-bubble {
        transform: scale(1.15) rotate(-3deg);
        background-color: #000000 !important;
        color: #ffffff !important;
    }
}

.hero-search-bar {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-search-bar:focus-within {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(255, 255, 255, 0.4);
}

@keyframes heroGlowPulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.38; transform: scale(1.06); }
}

.hero-ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(16, 185, 129, 0.08) 45%, transparent 70%);
    top: 10%;
    right: 5%;
    pointer-events: none;
    animation: heroGlowPulse 14s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg-animated,
    .animate-fade-up,
    .animate-fade-down,
    .hero-ambient-glow {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Grille Résiliente 12 colonnes Tâmbour */
@media (min-width: 1024px) {
    .lg\:grid-cols-12 {
        display: grid !important;
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    }
    .lg\:col-span-8 {
        grid-column: span 8 / span 8 !important;
    }
    .lg\:col-span-7 {
        grid-column: span 7 / span 7 !important;
    }
    .lg\:col-span-5 {
        grid-column: span 5 / span 5 !important;
    }
    .lg\:col-span-4 {
        grid-column: span 4 / span 4 !important;
    }
}

/* Utilitaires Responsifs d'Affichage Résilients */
@media (min-width: 640px) {
    .sm\:hidden {
        display: none !important;
    }
}
@media (max-width: 639px) {
    .max-sm\:hidden {
        display: none !important;
    }
}

/* Blocs Sombres & Cockpit Bento Tâmbour (Résilience Totale) */
.bg-ebene,
.bg-brand-noir,
.bg-\[\#151515\],
.bg-\[\#0B0F17\] {
    background-color: #151515 !important;
    color: #FFFFFF !important;
}

.border-ebene,
.border-neutral-800,
.border-\[\#262626\] {
    border-color: #262626 !important;
}



