/* =============================================
   CyberLogic - Styles principaux
   Dark/Light mode avec Bootstrap 5.3
   ============================================= */

/* === READING PROGRESS BAR === */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #0f3460, #3b82f6, #e94560);
    z-index: 9999999;
    pointer-events: none;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(59,130,246,0.4);
    border-radius: 0 2px 2px 0;
}

/* === PAGE LOADING OVERLAY === */
.page-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    pointer-events: all;
}
.page-loading-overlay.active {
    display: flex;
    animation: loaderFadeIn 0.2s ease;
}
@keyframes loaderFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Spinner */
.page-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(59,130,246,0.15);
    border-top-color: #3b82f6;
    animation: loaderSpin 0.7s linear infinite;
    position: relative;
}
.page-spinner::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #e94560;
    animation: loaderSpin 1.2s linear infinite reverse;
}
@keyframes loaderSpin { to { transform: rotate(360deg); } }

.page-loading-text {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Barre de progression en haut */
.page-loader-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #0f3460, #3b82f6, #60a5fa);
    z-index: 9999999;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(59,130,246,0.6);
}
.page-loader-bar.active {
    animation: loaderBarGrow 2s cubic-bezier(0.1, 0.5, 0.3, 1) forwards, loaderBarShimmer 1s linear infinite;
}
@keyframes loaderBarGrow { 0% { width: 0; } 100% { width: 90%; } }
@keyframes loaderBarShimmer { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }

:root {
    --cl-primary: #1a1a2e;
    --cl-secondary: #16213e;
    --cl-accent: #0f3460;
    --cl-highlight: #e94560;
    --cl-success: #00b894;
    --cl-text: #2d3436;
    --cl-text-light: #636e72;
    --cl-bg: #ffffff;
    --cl-bg-alt: #f8f9fa;
    --cl-card-bg: #ffffff;
    --cl-border: #dee2e6;
    --cl-shadow: rgba(0,0,0,0.08);
    --cl-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --cl-transition: 0.3s ease;
}

[data-bs-theme="dark"] {
    --cl-text: #ecf0f1;
    --cl-text-light: #b2bec3;
    --cl-bg: #0d1117;
    --cl-bg-alt: #161b22;
    --cl-card-bg: #1c2333;
    --cl-border: #30363d;
    --cl-shadow: rgba(0,0,0,0.3);
    --cl-gradient: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1c2333 100%);
}

/* === GLOBAL === */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--cl-text);
    background-color: var(--cl-bg);
    transition: background-color var(--cl-transition), color var(--cl-transition);
}

a { transition: color var(--cl-transition); }

.bg-cl-primary { background-color: var(--cl-primary) !important; }
.bg-cl-dark { background: var(--cl-gradient) !important; }
.text-cl-highlight { color: var(--cl-highlight) !important; }
.text-cl-success { color: var(--cl-success) !important; }

/* === THEME TOGGLE === */
.theme-toggle {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--cl-transition), transform var(--cl-transition);
    color: #fff;
    font-size: 1.1rem;
}
.theme-toggle:hover {
    border-color: var(--cl-highlight);
    color: var(--cl-highlight);
    transform: rotate(30deg);
}

/* === NAVBAR === */
.navbar-cl {
    background: var(--cl-gradient);
    padding: 1rem 0;
    box-shadow: 0 2px 15px var(--cl-shadow);
}
.navbar-cl .navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 1px;
}
.navbar-cl .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color var(--cl-transition);
}
.navbar-cl .nav-link:hover,
.navbar-cl .nav-link.active {
    color: #ffffff !important;
}
.navbar-logo {
    height: 40px;
    filter: brightness(0) invert(1);
}

/* === HERO === */
.hero-section {
    background: var(--cl-gradient);
    color: #fff;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233,69,96,0.15) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15,52,96,0.3) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite reverse;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}
.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}
.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    position: relative;
    z-index: 1;
}
.hero-cta {
    position: relative;
    z-index: 1;
}

/* === SECTIONS === */
.section { padding: 5rem 0; }
.section-alt { background-color: var(--cl-bg-alt); }
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--cl-highlight);
    margin-top: 0.5rem;
    border-radius: 2px;
}

/* === CARDS LOGICIELS === */
.card-logiciel {
    background: var(--cl-card-bg);
    border: 1px solid var(--cl-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform var(--cl-transition), box-shadow var(--cl-transition), border-color var(--cl-transition);
    height: 100%;
}
.card-logiciel:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--cl-shadow);
    border-color: var(--cl-highlight);
}
.card-logiciel .card-img-top {
    height: 200px;
    object-fit: cover;
    background: var(--cl-bg-alt);
}
.card-logiciel .card-body { padding: 1.5rem; }
.card-logiciel .card-title { font-weight: 700; font-size: 1.2rem; }
.card-logiciel .badge-tech {
    background: var(--cl-bg-alt);
    color: var(--cl-text);
    border: 1px solid var(--cl-border);
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
}

/* === AVIS / TÉMOIGNAGES === */
.card-avis {
    background: var(--cl-card-bg);
    border: 1px solid var(--cl-border);
    border-radius: 16px;
    padding: 2rem;
    transition: box-shadow var(--cl-transition);
}
.card-avis:hover {
    box-shadow: 0 10px 30px var(--cl-shadow);
}
.stars { color: #f1c40f; font-size: 1.1rem; }
.avis-source {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
}
.avis-source.google { background: #e8f5e9; color: #2e7d32; }
.avis-source.pagesjaunes { background: #fff8e1; color: #f57f17; }
.avis-source.manuel { background: #e3f2fd; color: #1565c0; }
[data-bs-theme="dark"] .avis-source.google { background: rgba(46,125,50,0.2); }
[data-bs-theme="dark"] .avis-source.pagesjaunes { background: rgba(245,127,23,0.2); }
[data-bs-theme="dark"] .avis-source.manuel { background: rgba(21,101,192,0.2); }

/* === CLIENTS / ENTREPRISES === */
.logo-client {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter var(--cl-transition), opacity var(--cl-transition);
    max-height: 60px;
    max-width: 150px;
}
.logo-client:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* === FOOTER === */
.footer {
    background: var(--cl-gradient);
    color: rgba(255,255,255,0.85);
    padding: 3rem 0 1.5rem;
}
.footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-logo {
    height: 45px;
    filter: brightness(0) invert(1);
}

/* === BUTTONS === */
.btn-cl-primary {
    background: var(--cl-highlight);
    color: #fff;
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background var(--cl-transition), transform var(--cl-transition), box-shadow var(--cl-transition);
}
.btn-cl-primary:hover {
    background: #c0392b;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233,69,96,0.4);
}
.btn-cl-outline {
    border: 2px solid #fff;
    color: #fff;
    padding: 0.7rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    background: transparent;
    transition: background var(--cl-transition), color var(--cl-transition);
}
.btn-cl-outline:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* === CERT-FR ALERTS === */
.cert-item:hover {
    background: var(--cl-card-bg) !important;
    transform: translateX(4px);
    box-shadow: 0 2px 10px var(--cl-shadow);
}
.cert-item code {
    background: transparent;
    padding: 0;
}
.cert-ai-box {
    background: linear-gradient(135deg, #f0e6ff, #e8f4fd);
    color: #2d3436;
}
.cert-reco-box {
    background: #dcfce7;
    color: #2d3436;
}
[data-bs-theme="dark"] .cert-ai-box {
    background: linear-gradient(135deg, #2a1f3d, #1a2a3d);
    color: #ecf0f1;
}
[data-bs-theme="dark"] .cert-reco-box {
    background: #1a2e1a;
    color: #ecf0f1;
}
[data-bs-theme="dark"] #certModal .modal-body {
    color: var(--cl-text);
}

/* === STATS COUNTER === */
.stat-card {
    text-align: center;
    padding: 2rem;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--cl-highlight);
}
.stat-label {
    color: var(--cl-text-light);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* === LOGIN === */
.login-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--cl-card-bg);
    border: 1px solid var(--cl-border);
    border-radius: 16px;
    padding: 2.5rem;
}
.login-logo {
    height: 60px;
    margin-bottom: 1.5rem;
}

/* === ADMIN / CLIENT PANELS === */
.sidebar {
    background: var(--cl-gradient);
    height: 100vh;
    max-height: 100vh;
    padding: 1.5rem;
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1000;
    scrollbar-width: thin;
    scrollbar-color: rgba(233,69,96,0.4) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(233,69,96,0.4); border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(233,69,96,0.7); }
.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: color var(--cl-transition), background var(--cl-transition), transform 0.2s ease;
    font-weight: 500;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.sidebar .nav-link i { width: 24px; text-align: center; margin-right: 0.5rem; }
.main-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
    background: var(--cl-bg);
}
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--cl-border);
}

/* === TABLES === */
.table-cl {
    background: var(--cl-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--cl-shadow);
}
.table-cl thead th {
    background: var(--cl-primary);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 0.9rem 1rem;
}
.table-cl tbody td {
    padding: 0.8rem 1rem;
    vertical-align: middle;
    border-color: var(--cl-border);
}

/* === STATUS BADGES === */
.badge-statut { padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.badge-brouillon { background: #f1f3f5; color: #495057; }
.badge-envoyee { background: #dbeafe; color: #1d4ed8; }
.badge-payee { background: #dcfce7; color: #16a34a; }
.badge-annulee { background: #fee2e2; color: #dc2626; }
.badge-active { background: #dcfce7; color: #16a34a; }
.badge-expiree { background: #fef3c7; color: #d97706; }
.badge-revoquee { background: #fee2e2; color: #dc2626; }
.badge-en_attente { background: #e0e7ff; color: #4f46e5; }
.badge-en_cours { background: #dbeafe; color: #1d4ed8; }
.badge-accepte { background: #dcfce7; color: #16a34a; }
.badge-envoye { background: #e0e7ff; color: #4f46e5; }
.badge-termine { background: #f0fdf4; color: #15803d; }
.badge-resilie { background: #fee2e2; color: #dc2626; }
.badge-a_payer { background: #dbeafe; color: #1d4ed8; }

/* === SCROLL REVEAL ANIMATIONS === */
.reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}
.reveal { transform: translateY(40px); }
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-scale { transform: scale(0.85); }
.reveal.revealed, .reveal-left.revealed, .reveal-right.revealed, .reveal-scale.revealed {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}
.reveal-group .reveal-child {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-group.revealed .reveal-child {
    opacity: 1;
    transform: translateY(0);
}

/* === RIPPLE EFFECT === */
@keyframes rippleEffect {
    to { transform: scale(4); opacity: 0; }
}

/* === CUSTOM CURSOR === */
.custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #e94560;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
    mix-blend-mode: difference;
}
.custom-cursor-follower {
    position: fixed;
    width: 32px;
    height: 32px;
    border: 2px solid rgba(233,69,96,0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}
.custom-cursor.cursor-hover {
    width: 16px;
    height: 16px;
    background: rgba(233,69,96,0.6);
}
.custom-cursor-follower.cursor-hover {
    width: 48px;
    height: 48px;
    border-color: rgba(233,69,96,0.6);
}

/* === NAVBAR SCROLL TRANSITION === */
.navbar-cl {
    transition: padding 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

/* === TYPING CURSOR === */
.typed-text { border-right: 2px solid #e94560; padding-right: 4px; }
@keyframes blink { 0%, 100% { border-color: #e94560; } 50% { border-color: transparent; } }
.typed-text { animation: blink 1s step-end infinite; }

/* === GRADIENT TEXT EFFECT === */
.gradient-text {
    background: linear-gradient(135deg, #e94560, #ff6b6b, #e94560);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === GLOWING BORDER ON CARDS HOVER === */
.card-logiciel::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: linear-gradient(135deg, transparent, #e94560, transparent);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.card-logiciel { position: relative; z-index: 1; }
.card-logiciel:hover::after { opacity: 0.6; }

/* === HERO PARALLAX GLOW === */
.hero-section {
    overflow: hidden;
}
.hero-particles { opacity: 0.8; }

/* === BUTTON SHINE EFFECT === */
.btn-cl-primary {
    position: relative;
    overflow: hidden;
}
.btn-cl-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-cl-primary:hover::before {
    left: 100%;
}

/* === SMOOTH PAGE TRANSITION === */
body {
    animation: pageIn 0.5s ease;
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === FLOATING ANIMATION === */
.float-anim {
    animation: floatUpDown 4s ease-in-out infinite;
}
@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* === PULSE GLOW === */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(233,69,96,0.2); }
    50% { box-shadow: 0 0 25px rgba(233,69,96,0.5); }
}

/* =============================================
   RESPONSIVE - MOBILE FIRST
   ============================================= */

/* === TABLETTE (max 992px) === */
@media (max-width: 992px) {
    .hero-title { font-size: 2.4rem; }
    .hero-section { padding: 4rem 0 3rem; }
    .section { padding: 3.5rem 0; }
    .section-title { font-size: 1.8rem; }
    .navbar-logo { height: 32px; }
    .stat-number { font-size: 2rem; }

    /* Sidebar overlay */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
        box-shadow: none;
    }
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 5px 0 30px rgba(0,0,0,0.4);
    }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .sidebar-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    /* Cacher curseur custom sur tablette */
    .custom-cursor, .custom-cursor-follower { display: none !important; }
}

/* === MOBILE (max 768px) === */
@media (max-width: 768px) {
    .hero-title { font-size: 1.8rem; line-height: 1.3; }
    .hero-subtitle { font-size: 1rem; }
    .hero-section { padding: 3rem 0 2rem; }
    .hero-cta .btn { width: 100%; }
    .section { padding: 2.5rem 0; }
    .section-title { font-size: 1.5rem; }

    /* Navbar mobile */
    .navbar-cl { padding: 0.6rem 0; }
    .navbar-cl .navbar-brand span { font-size: 1.1rem; }
    .navbar-logo { height: 28px; }

    /* Stats compact */
    .stat-card { padding: 1rem; }
    .stat-number { font-size: 1.6rem; }
    .stat-label { font-size: 0.75rem; }

    /* Cards */
    .card-logiciel .card-img-top { height: 150px; }
    .card-avis { padding: 1.2rem; }
    .card-avis p { font-size: 0.85rem; }

    /* Footer */
    .footer { padding: 2rem 0 1rem; text-align: center; }
    .footer .row > div { margin-bottom: 1.5rem; }

    /* Logo clients */
    .logo-client { max-height: 40px; max-width: 100px; }

    /* Login */
    .login-card { padding: 1.5rem; margin: 1rem; }

    /* Tables responsive */
    .table-cl { font-size: 0.82rem; }
    .table-cl thead th { padding: 0.6rem 0.5rem; font-size: 0.75rem; }
    .table-cl tbody td { padding: 0.5rem 0.5rem; }

    /* Hide non-essential columns on mobile */
    .hide-mobile { display: none !important; }

    /* Contact form */
    .card-avis form .row .col-md-6 { margin-bottom: 0; }

    /* Avis source */
    .avis-source { font-size: 0.7rem; }
}

/* === PETIT MOBILE (max 480px) === */
@media (max-width: 480px) {
    .hero-title { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .section { padding: 2rem 0; }
    .section-title { font-size: 1.3rem; }

    .stat-number { font-size: 1.3rem; }
    .stat-card { padding: 0.75rem; }

    .btn-lg { font-size: 0.95rem; padding: 0.6rem 1.5rem; }

    .card-logiciel .card-body { padding: 1rem; }
    .card-logiciel .card-title { font-size: 1rem; }

    .navbar-cl .container { padding-left: 0.75rem; padding-right: 0.75rem; }
}

/* =============================================
   BACKOFFICE APP MOBILE
   ============================================= */

/* Bottom Navigation Bar (app-like) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cl-card-bg);
    border-top: 1px solid var(--cl-border);
    z-index: 1060;
    padding: 0;
    box-shadow: 0 -2px 15px var(--cl-shadow);
}
.bottom-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}
.bottom-nav li {
    flex: 1;
}
.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px 6px;
    text-decoration: none;
    color: var(--cl-text-light);
    font-size: 0.65rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}
.bottom-nav a i {
    font-size: 1.2rem;
    margin-bottom: 2px;
    transition: transform 0.2s;
}
.bottom-nav a.active {
    color: #e94560;
}
.bottom-nav a.active i {
    transform: scale(1.15);
}
.bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #e94560;
    border-radius: 0 0 3px 3px;
}

@media (max-width: 992px) {
    .bottom-nav { display: block; }

    /* Safe area for bottom nav */
    .main-content {
        padding-bottom: 70px;
        min-height: calc(100vh - 60px);
    }

    /* Top bar mobile */
    .top-bar {
        position: sticky;
        top: 0;
        z-index: 1020;
        background: var(--cl-bg);
        margin: -1rem -1rem 1rem;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--cl-border);
        box-shadow: 0 2px 8px var(--cl-shadow);
    }
    .top-bar h5 { font-size: 1.1rem; }

    /* Stat cards mobile grid */
    .stat-card-admin {
        padding: 1rem;
        border-radius: 12px;
    }
    .stat-card-admin .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    .stat-value { font-size: 1.4rem; }
    .stat-label-admin { font-size: 0.72rem; }

    /* Card admin compact */
    .card-admin {
        padding: 1rem;
        border-radius: 12px;
    }

    /* Quick stat compact */
    .quick-stat {
        padding: 1rem;
    }
    .quick-stat h3 { font-size: 1.5rem; }

    /* Swipe hint */
    .swipe-hint {
        text-align: center;
        padding: 0.5rem;
        font-size: 0.75rem;
        color: var(--cl-text-light);
        opacity: 0.6;
    }

    /* Pull to refresh indicator */
    .pull-indicator {
        text-align: center;
        padding: 0.5rem;
        font-size: 0.8rem;
        color: var(--cl-text-light);
        display: none;
    }

    /* Mobile form adjustments */
    .form-control, .form-select {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }

    /* Chatbot mobile */
    .ai-chat {
        bottom: 70px;
        right: 10px;
        width: calc(100vw - 20px);
        height: calc(100vh - 140px);
        max-height: none;
        border-radius: 12px;
    }
    .ai-bubble {
        bottom: 76px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    /* Hamburger mobile visible */
    .mobile-hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: none;
        color: var(--cl-text);
        font-size: 1.3rem;
        cursor: pointer;
    }
}

/* === LANDSCAPE MOBILE === */
@media (max-width: 992px) and (orientation: landscape) {
    .hero-section { padding: 2rem 0 1.5rem; }
    .hero-title { font-size: 1.6rem; }
    .bottom-nav a { padding: 6px 4px 4px; }
    .bottom-nav a i { font-size: 1rem; }
    .ai-chat { height: calc(100vh - 100px); }
}

/* === TOUCH OPTIMIZATIONS === */
@media (hover: none) and (pointer: coarse) {
    /* Plus gros touch targets */
    .btn { min-height: 44px; }
    .nav-link { min-height: 44px; display: flex; align-items: center; }
    .form-check-input { width: 1.2em; height: 1.2em; }
    .btn-group-sm .btn { min-height: 36px; min-width: 36px; }
    .table-animate tbody tr td { padding: 0.75rem 0.5rem; }

    /* Désactiver hover effects sur touch */
    .card-logiciel:hover { transform: none; }
    .card-logiciel:hover::after { opacity: 0; }
    .custom-cursor, .custom-cursor-follower { display: none !important; }
}

/* === PRINT === */
@media print {
    .sidebar, .bottom-nav, .top-bar, .ai-bubble, .ai-chat, .navbar-cl { display: none !important; }
    .main-content { margin: 0; padding: 0; }
    body { background: white; }
}
