/**
 * MMAS - Styles Mobile (LEGACY, en cours de migration vers mobile-polish.css)
 *
 * ORDRE DE CHARGEMENT (cf. _partials/head.html) :
 *   1. tokens.css            — variables CSS
 *   2. style.css             — desktop + mobile partagés
 *   3. desktop-enhancements  — enrichissements desktop
 *   4. mobile.css            — CE FICHIER (legacy)
 *   5. mobile-polish.css     — surcharge tout ce qui précède
 *
 * STATUT (2026-05-30) :
 * - 27 sélecteurs ici sont déjà couverts par mobile-polish.css (qui gagne).
 *   Liste : .app-container, .badge, .bottom-nav, .btn, .btn-primary,
 *   .btn-sm, .card, .card-actions, .card-body, .card-header, .empty-state,
 *   .form-control, .form-group, .form-input, .form-select, .main-content,
 *   .main-header, .mobile-menu-btn, .modal-footer, .page-content, .sidebar,
 *   .sidebar-overlay, .stat-card, .stats-grid, .table-scroll-wrapper,
 *   .toast, .toast-container.
 * - Les règles utiles encore exclusives à ce fichier : RESET html/body,
 *   touch-action, scroll-snap, certains layouts hérités.
 *
 * PLAN DE MIGRATION (à faire dans un sprint dédié, avec tests visuels) :
 *   1. Identifier les sections exclusives → les déplacer dans mobile-polish.css
 *   2. Supprimer les blocs doublons (mobile-polish gagne déjà via specificity/order)
 *   3. Retirer la ligne <link> mobile.css dans head.html
 *   4. Supprimer ce fichier
 *
 * Préfixe `body` augmente la spécificité — utile mais évitable depuis qu'on
 * utilise systématiquement `body.page-X` dans mobile-polish.css.
 */


/* ==========================================
   VARIABLES MOBILE
   ========================================== */
@media (max-width: 768px) {
    :root {
        --mobile-padding: 16px;
        --mobile-gap: 12px;
        --mobile-radius: 16px;
        --mobile-header-height: 60px;
        --mobile-bottom-nav-height: 70px;
        --safe-area-bottom: env(safe-area-inset-bottom, 20px);
    }

    /* ==========================================
       RESET MOBILE - Base propre
       ========================================== */
    html, body {
        overflow: visible !important;
        height: auto !important;
        position: static !important;
        touch-action: manipulation !important;
        -webkit-overflow-scrolling: touch !important;
    }

    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* ==========================================
       LAYOUT PRINCIPAL
       ========================================== */
    .app-container {
        display: block !important;
        overflow: visible !important;
        min-height: auto !important;
    }

    /* Sidebar cachee sur mobile */
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        width: 280px;
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Zone principale */
    .main-wrapper {
        margin-left: 0;
        width: 100%;
        min-height: 100vh;
    }

    /* ==========================================
       HEADER MOBILE - Design MMAS
       ========================================== */
    .main-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--mobile-header-height);
        display: flex;
        align-items: center;
        padding: 0 var(--mobile-padding);
        gap: 12px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        z-index: 100;
        box-shadow: 0 2px 15px rgba(71, 68, 178, 0.3);
    }

    /* Bouton menu */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        background: rgba(255,255,255,0.15);
        border: none;
        border-radius: 12px;
        color: white;
        font-size: 1.25rem;
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-menu-btn:active {
        transform: scale(0.95);
        background: rgba(255,255,255,0.25);
    }

    /* Titre page */
    .main-header .header-left,
    .main-header .page-title,
    #pageTitle {
        flex: 1;
        min-width: 0;
    }

    .main-header h2,
    .main-header .page-title,
    #pageTitle {
        font-size: 1.15rem;
        font-weight: 600;
        color: white;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Cacher la plupart des boutons du header */
    .main-header .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }

    .main-header .global-search-container,
    .main-header .notification-bell-container,
    .main-header .search-box,
    .main-header #mainActionBtn,
    .main-header button[onclick="showReportsModal()"] {
        display: none;
    }

    /* ==========================================
       CONTENU PRINCIPAL
       ========================================== */
    .main-content {
        margin-top: var(--mobile-header-height);
        padding: var(--mobile-padding);
        padding-bottom: calc(var(--mobile-bottom-nav-height) + var(--safe-area-bottom) + 20px);
        overflow: visible !important;
        min-height: auto !important;
        display: block !important;
    }

    .page-content {
        overflow: visible !important;
    }

    /* ==========================================
       NAVIGATION BOTTOM - Design flottant MMAS
       ========================================== */
    /* Cacher la bottom nav sur la page login */
    .login-page ~ .bottom-nav,
    .login-page:not(.hidden) ~ .bottom-nav,
    body:has(.login-page:not(.hidden)) .bottom-nav {
        display: none;
    }

    /* Afficher uniquement quand l'app principale est visible */
    .app-container:not(.hidden) ~ .bottom-nav,
    body:has(.app-container:not(.hidden)) .bottom-nav {
        display: flex;
    }

    .bottom-nav {
        display: none; /* Cache par defaut */
        position: fixed;
        bottom: calc(var(--safe-area-bottom) + 10px);
        left: var(--mobile-padding);
        right: var(--mobile-padding);
        height: 64px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        border-radius: 20px;
        box-shadow: 0 4px 20px rgba(0, 156, 198, 0.4);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px;
    }

    .bottom-nav .bottom-nav-item,
    .bottom-nav .nav-item,
    .bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 4px;
        color: rgba(255,255,255,0.7);
        text-decoration: none;
        border-radius: 12px;
        transition: all 0.2s ease;
        min-width: 0;
    }

    .bottom-nav .bottom-nav-item.active,
    .bottom-nav .nav-item.active,
    .bottom-nav a.active {
        color: white;
        background: rgba(255,255,255,0.15);
    }

    .bottom-nav .bottom-nav-item i,
    .bottom-nav .nav-item i,
    .bottom-nav a i {
        font-size: 1.25rem;
        margin-bottom: 4px;
    }

    .bottom-nav .bottom-nav-item span,
    .bottom-nav .nav-item span,
    .bottom-nav a span {
        font-size: 0.65rem;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* ==========================================
       CARTES - Design moderne
       ========================================== */
    .card {
        border-radius: var(--mobile-radius);
        margin-bottom: var(--mobile-gap);
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border: none;
        overflow: hidden;
    }

    .card-header {
        padding: 14px var(--mobile-padding);
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .card-header .card-title {
        font-size: 1rem;
        font-weight: 600;
    }

    .card-body {
        padding: var(--mobile-padding);
    }

    /* Card header responsive pour page familles */
    #page-families .card-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    #page-families .card-header .card-title {
        justify-content: center;
    }

    .card-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .card-actions .form-input,
    .card-actions .form-select {
        flex: 1 1 calc(50% - 4px);
        min-width: 120px;
        font-size: 0.875rem;
    }

    #familySearch {
        flex: 1 1 100%;
        width: 100%;
    }

    /* ==========================================
       STATS DASHBOARD
       ========================================== */
    .stats-grid,
    .dashboard-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: var(--mobile-gap);
    }

    .stat-card {
        padding: 16px;
        border-radius: var(--mobile-radius);
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border-left: 4px solid var(--secondary);
    }

    .stat-card .stat-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 8px;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--gray-900);
        line-height: 1.2;
    }

    .stat-card .stat-label {
        font-size: 0.75rem;
        color: var(--gray-600);
        margin-top: 4px;
    }

    /* Couleurs stats */
    .stat-card.success { border-left-color: var(--success); }
    .stat-card.warning { border-left-color: var(--warning); }
    .stat-card.danger { border-left-color: var(--danger); }
    .stat-card.info { border-left-color: var(--secondary); }

    .stat-card.success .stat-icon { background: rgba(16, 185, 129, 0.1); color: var(--success); }
    .stat-card.warning .stat-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
    .stat-card.danger .stat-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
    .stat-card.info .stat-icon { background: rgba(0, 156, 198, 0.1); color: var(--secondary); }

    /* ==========================================
       GRAPHIQUES
       ========================================== */
    .dashboard-charts {
        display: flex;
        flex-direction: column;
        gap: var(--mobile-gap);
    }

    .chart-container {
        height: 200px;
    }

    /* ==========================================
       PAGE FAMILLES
       ========================================== */
    #page-families {
        width: 100%;
        overflow-x: hidden;
    }

    /* Barre de filtres simplifiee */
    #page-families > .card.mb-4 {
        margin-bottom: 12px;
    }

    #page-families > .card.mb-4 .card-body {
        padding: 12px;
    }

    #page-families > .card.mb-4 .flex {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Ligne recherche + bouton nouveau */
    #page-families .flex.items-center.gap-3:last-child {
        flex-direction: row;
        justify-content: space-between;
    }

    /* Champ recherche */
    #page-families .search-box {
        width: 100%;
    }

    #familySearch {
        width: 100%;
        padding: 12px 12px 12px 40px;
        font-size: 16px;
        border-radius: 12px;
    }

    /* Cacher filtres avances et boutons sur mobile */
    #familyStatusFilter,
    #activityFilter,
    #countryFilter,
    #page-families .btn-success,
    #page-families .btn-secondary[title="Actualiser"],
    #familyCounter {
        display: none;
    }

    /* Bouton nouvelle famille */
    #page-families .btn-primary[onclick*="showFamilyModal"] {
        padding: 12px 16px;
        border-radius: 12px;
        font-weight: 600;
    }

    /* Grille familles */
    #familiesGrid,
    .families-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    /* Carte famille */
    .family-card {
        width: 100%;
        border-radius: var(--mobile-radius);
        overflow: hidden;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .family-card-header {
        padding: 14px 16px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    }

    .family-card-name {
        font-size: 1rem;
        font-weight: 600;
        color: white;
        display: flex;
        align-items: center;
        gap: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .family-card-name i {
        font-size: 0.9rem;
        opacity: 0.8;
    }

    .family-card-body {
        padding: 14px 16px;
    }

    .family-contact-row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 6px 0;
        font-size: 0.85rem;
        overflow: hidden;
    }

    .family-contact-row i {
        width: 16px;
        color: var(--gray-400);
        flex-shrink: 0;
    }

    .family-contact-row a {
        color: var(--secondary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .country-badge {
        font-size: 0.6rem;
        padding: 2px 6px;
        border-radius: 4px;
        flex-shrink: 0;
    }

    /* Section enfants */
    .family-children-section {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--gray-100);
    }

    .child-block {
        padding: 10px 12px;
        margin-bottom: 8px;
        background: var(--gray-50);
        border-radius: 10px;
        border-left: 3px solid var(--secondary);
    }

    .child-block:hover {
        transform: none;
    }

    .child-block-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
    }

    .child-block-header .child-name {
        font-size: 0.9rem;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 60%;
    }

    .child-tag-amount {
        font-size: 0.75rem;
        padding: 3px 8px;
        border-radius: 10px;
        background: var(--secondary);
        color: white;
    }

    .child-activities {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .activity-badge-small {
        font-size: 0.7rem;
        padding: 3px 8px;
        border-radius: 8px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Footer famille */
    .family-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        background: var(--gray-50);
        border-top: 1px solid var(--gray-100);
    }

    .family-status-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
        border-radius: 20px;
        font-weight: 600;
    }

    .family-status-badge.paid {
        background: rgba(16, 185, 129, 0.1);
        color: var(--success);
    }

    .family-status-badge.unpaid {
        background: rgba(239, 68, 68, 0.1);
        color: var(--danger);
    }

    .family-amount {
        font-size: 1rem;
        font-weight: 700;
        color: var(--gray-900);
    }

    /* Actions famille */
    .family-card-actions {
        display: flex;
        padding: 10px 12px;
        gap: 8px;
        background: white;
        border-top: 1px solid var(--gray-100);
    }

    .family-card-actions .btn {
        flex: 1;
        padding: 12px 8px;
        border-radius: 10px;
        font-size: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .family-card-actions .btn i {
        font-size: 1.1rem;
    }

    .family-card-actions .btn span {
        display: none;
    }

    /* ==========================================
       PAGE PAIEMENTS
       ========================================== */
    #page-payments .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    #page-payments .card-header .flex {
        flex-direction: column;
        gap: 10px;
    }

    #paymentMonthFilter {
        width: 100%;
        padding: 12px;
        border-radius: 12px;
        font-size: 16px;
    }

    /* Tableau paiements en cartes */
    #paymentsTableBody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #page-payments table {
        display: block;
    }

    #page-payments thead {
        display: none;
    }

    #page-payments tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #page-payments tr {
        display: flex;
        flex-direction: column;
        background: white;
        border-radius: var(--mobile-radius);
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    #page-payments td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid var(--gray-100);
    }

    #page-payments td:last-child {
        border-bottom: none;
    }

    #page-payments td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-600);
        font-size: 0.8rem;
    }

    /* ==========================================
       PAGE PLANNING
       ========================================== */
    #page-planning .card-header {
        flex-direction: column;
        gap: 12px;
    }

    #planningDate {
        width: 100%;
        padding: 12px;
        border-radius: 12px;
        font-size: 16px;
    }

    .planning-grid {
        gap: 12px;
    }

    .room-card {
        border-radius: var(--mobile-radius);
    }

    .room-header {
        padding: 14px;
    }

    .room-slots {
        padding: 12px;
    }

    .slot-item {
        padding: 12px;
        border-radius: 10px;
        margin-bottom: 8px;
    }

    /* ==========================================
       BOUTONS
       ========================================== */
    .btn {
        padding: 12px 20px;
        border-radius: 12px;
        font-size: 0.9rem;
        font-weight: 500;
    }

    .btn-sm {
        padding: 8px 14px;
    }

    .btn-xs {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* ==========================================
       MODALES
       ========================================== */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
        z-index: 2000; /* Au-dessus de bottom-nav (1000) */
    }

    .modal {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        margin: 0;
        border-radius: 24px 24px 0 0;
        animation: slideUpModal 0.3s ease;
    }

    @keyframes slideUpModal {
        from { transform: translateY(100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }

    .modal-header {
        padding: 18px 20px;
        border-radius: 24px 24px 0 0;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .modal-header h3 {
        font-size: 1.15rem;
    }

    .modal-body {
        padding: 20px;
        max-height: calc(90vh - 160px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer {
        padding: 16px 20px;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid var(--gray-200);
        gap: 10px;
    }

    .modal-footer .btn {
        flex: 1;
    }

    /* ==========================================
       FORMULAIRES
       ========================================== */
    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 8px;
        display: block;
    }

    .form-control,
    .form-select,
    .form-input,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
        border: 1px solid var(--gray-200);
        background: white;
        min-height: 50px;
        -webkit-appearance: none;
    }

    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(71, 68, 178, 0.1);
    }

    /* ==========================================
       TABLES EN CARTES
       ========================================== */
    .table-responsive {
        overflow-x: visible;
    }

    table.table-mobile-cards {
        display: block;
    }

    table.table-mobile-cards thead {
        display: none;
    }

    table.table-mobile-cards tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    table.table-mobile-cards tr {
        display: flex;
        flex-direction: column;
        background: white;
        border-radius: var(--mobile-radius);
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    table.table-mobile-cards td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid var(--gray-100);
    }

    table.table-mobile-cards td:last-child {
        border-bottom: none;
    }

    /* ==========================================
       ACTIVITES BADGES
       ========================================== */
    .activities-badges {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .activity-badge {
        padding: 14px;
        border-radius: 14px;
        text-align: center;
    }

    .activity-count {
        font-size: 1.4rem;
        font-weight: 700;
    }

    .activity-name {
        font-size: 0.75rem;
        margin-top: 4px;
    }

    .activity-revenue {
        font-size: 0.7rem;
        opacity: 0.8;
    }

    /* ==========================================
       ALERTES
       ========================================== */
    .alerts-card {
        border-left: 4px solid var(--danger);
    }

    .alerts-summary {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 14px;
    }

    .alert-badge {
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
    }

    .alerts-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .alert-item {
        padding: 12px;
        border-radius: 10px;
    }

    /* Dashboard Alerts Panel - Card layout on mobile */
    #dashboardAlertsPanel {
        margin: 0 calc(-1 * var(--mobile-padding));
        border-radius: 0;
    }

    #dashboardAlertsPanel .card-header {
        padding: 12px var(--mobile-padding);
        flex-wrap: wrap;
        gap: 8px;
    }

    #dashboardAlertsPanel .dashboard-alerts-badges {
        width: 100%;
        justify-content: flex-start;
    }

    /* Table scroll wrapper for alerts */
    .table-scroll-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        padding: 0;
    }

    /* Card layout for alerts table on mobile */
    #dashboardAlertsPanel table,
    #dashboardAlertsPanel thead {
        display: none;
    }

    #dashboardAlertsPanel tbody {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: var(--mobile-padding);
    }

    #dashboardAlertsPanel tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 12px;
        padding: 12px;
        background: white;
        border-radius: var(--mobile-radius);
        box-shadow: var(--shadow-sm);
        border-left: 3px solid var(--danger);
        align-items: center;
    }

    #dashboardAlertsPanel tbody tr.critical {
        border-left-color: var(--danger);
        background: rgba(220, 38, 38, 0.03);
    }

    #dashboardAlertsPanel tbody tr.warning {
        border-left-color: var(--warning);
        background: rgba(245, 158, 11, 0.03);
    }

    #dashboardAlertsPanel tbody td {
        display: flex;
        flex-direction: column;
        border: none;
        padding: 2px 0;
        font-size: 0.85rem;
    }

    #dashboardAlertsPanel tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.7rem;
        color: var(--gray-500);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Status badge - first cell */
    #dashboardAlertsPanel tbody td:first-child {
        width: 100%;
        order: -1;
    }

    #dashboardAlertsPanel tbody td:first-child::before {
        display: none;
    }

    /* Family name - prominent */
    #dashboardAlertsPanel tbody td:nth-child(2) {
        width: 100%;
        font-size: 1rem;
    }

    #dashboardAlertsPanel tbody td:nth-child(2)::before {
        display: none;
    }

    /* Contact info compact */
    #dashboardAlertsPanel tbody td .contact-info-compact {
        display: flex;
        flex-direction: column;
        gap: 2px;
        font-size: 0.8rem;
    }

    /* Amount - prominent */
    #dashboardAlertsPanel tbody td:nth-child(6) {
        flex: 1;
    }

    /* Actions - full width at bottom */
    #dashboardAlertsPanel tbody td:last-child {
        width: 100%;
        order: 10;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--gray-100);
    }

    #dashboardAlertsPanel tbody td:last-child::before {
        display: none;
    }

    #dashboardAlertsPanel tbody td:last-child .btn-group {
        display: flex;
        gap: 8px;
        justify-content: flex-end;
    }

    #dashboardAlertsPanel tbody td:last-child .btn {
        flex: 1;
        max-width: 100px;
    }

    /* ==========================================
       TOAST NOTIFICATIONS
       ========================================== */
    .toast-container {
        bottom: calc(var(--mobile-bottom-nav-height) + var(--safe-area-bottom) + 20px);
        left: var(--mobile-padding);
        right: var(--mobile-padding);
    }

    .toast {
        border-radius: 12px;
        padding: 14px 18px;
    }

    /* ==========================================
       UTILITAIRES
       ========================================== */
    .hidden-mobile {
        display: none;
    }

    .flex-mobile-column {
        flex-direction: column;
    }

    .text-center-mobile {
        text-align: center;
    }

    .w-full-mobile {
        width: 100%;
    }

    /* Espacement page */
    .mb-4 {
        margin-bottom: 12px;
    }

    .p-4 {
        padding: 14px;
    }

    .gap-3 {
        gap: 10px;
    }

    /* ==========================================
       PAGE LOGIN - Optimisee mobile
       ========================================== */
    .login-page {
        padding: 20px;
        min-height: 100vh;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    }

    .login-card {
        padding: 24px;
        border-radius: 20px;
        max-width: 100%;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    }

    .login-header {
        margin-bottom: 24px;
    }

    .login-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 16px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    .login-form .form-group {
        margin-bottom: 16px;
    }

    .login-form .form-input {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
    }

    .login-form .btn {
        padding: 14px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .login-divider {
        margin: 20px 0;
    }

    #microsoftLoginBtn {
        padding: 14px;
        border-radius: 12px;
    }

    /* ==========================================
       PAGE DASHBOARD - Optimisee mobile
       ========================================== */
    #page-dashboard {
        padding-bottom: 20px;
    }

    /* En-tete dashboard avec date */
    .dashboard-header {
        margin-bottom: 16px;
    }

    .dashboard-header h2 {
        font-size: 1.1rem;
    }

    /* Graphiques Dashboard */
    .dashboard-charts .card {
        margin-bottom: 12px;
    }

    .dashboard-charts .card-header {
        padding: 12px 14px;
    }

    .dashboard-charts .card-title {
        font-size: 0.9rem;
    }

    .chart-container {
        height: 180px;
        padding: 8px;
    }

    /* Legende graphique */
    .chart-container canvas {
        max-height: 160px;
    }

    /* Section activites */
    .activities-card .card-body {
        padding: 12px;
    }

    /* Section alertes */
    .alerts-card {
        border-left-width: 4px;
    }

    .alerts-card .card-header {
        padding: 12px 14px;
    }

    .alert-item {
        font-size: 0.85rem;
    }

    /* ==========================================
       PAGE FAMILLES - Optimisee mobile
       ========================================== */
    #page-families {
        padding-bottom: 20px;
    }

    /* Barre d'outils familles */
    #page-families > .card:first-child {
        margin-bottom: 12px;
    }

    #page-families > .card:first-child .card-body {
        padding: 12px;
    }

    /* Recherche et filtres en colonne */
    #page-families .flex.justify-between {
        flex-direction: column;
        gap: 12px;
    }

    #page-families .flex.items-center.gap-3 {
        width: 100%;
        flex-wrap: wrap;
    }

    /* Champ recherche pleine largeur */
    #page-families .search-box {
        width: 100%;
        order: 1;
    }

    #page-families .search-box input {
        width: 100%;
    }

    /* Filtres en ligne */
    #page-families .form-select {
        flex: 1;
        min-width: 80px;
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    /* Cacher certains elements sur mobile */
    #page-families .btn-success,
    #page-families .btn-secondary[title="Actualiser"],
    #familyCounter {
        display: none;
    }

    /* Bouton nouvelle famille */
    #page-families .btn-primary {
        width: 100%;
        order: 2;
        margin-top: 8px;
    }

    /* ==========================================
       PAGE PAIEMENTS - Optimisee mobile
       ========================================== */
    #page-payments {
        padding-bottom: 20px;
    }

    #page-payments .card-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    #page-payments .card-header .flex {
        flex-direction: column;
        gap: 10px;
    }

    #page-payments .card-title {
        font-size: 1rem;
    }

    #paymentMonthFilter {
        width: 100%;
    }

    /* Stats paiements */
    .payment-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 16px;
    }

    .payment-stat-card {
        padding: 12px;
        border-radius: 12px;
        text-align: center;
    }

    .payment-stat-value {
        font-size: 1.2rem;
    }

    .payment-stat-label {
        font-size: 0.7rem;
    }

    /* Liste paiements en cartes */
    #page-payments .table-responsive {
        overflow-x: visible;
    }

    #page-payments table {
        display: block;
    }

    #page-payments thead {
        display: none;
    }

    #page-payments tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #page-payments tbody tr {
        display: flex;
        flex-direction: column;
        background: white;
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border-left: 4px solid var(--secondary);
    }

    #page-payments tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid var(--gray-100);
        font-size: 0.85rem;
    }

    #page-payments tbody td:last-child {
        border-bottom: none;
        padding-top: 12px;
    }

    #page-payments tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-500);
        font-size: 0.75rem;
    }

    /* Boutons actions paiement */
    #page-payments tbody td .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    /* ==========================================
       PAGE PLANNING/CALENDAR - Design Mobile Premium
       ========================================== */
    #page-planning,
    #page-calendar {
        padding-bottom: 20px;
        width: 100%;
        overflow-x: hidden;
    }

    /* Indicateur de chargement Planning */
    .calendar-loading {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 60px 20px;
        background: white;
        border-radius: 20px;
        margin: 16px;
        box-shadow: 0 4px 20px rgba(71, 68, 178, 0.1);
    }

    .calendar-loading.hidden {
        display: none;
    }

    .calendar-loading .loading-spinner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        color: var(--primary);
    }

    .calendar-loading .loading-spinner i {
        font-size: 2.5rem;
        animation: spinPulse 1s ease-in-out infinite;
    }

    .calendar-loading .loading-spinner span {
        font-size: 1rem;
        font-weight: 500;
        color: var(--gray-500);
    }

    @keyframes spinPulse {
        0%, 100% { transform: rotate(0deg) scale(1); opacity: 1; }
        50% { transform: rotate(180deg) scale(1.1); opacity: 0.8; }
    }

    /* Header calendrier - Design compact et moderne */
    .calendar-header {
        margin-bottom: 16px;
    }

    .calendar-header > .card {
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(71, 68, 178, 0.15);
        border: none;
    }

    .calendar-header .card-body {
        padding: 0;
    }

    .calendar-header .card-body > .flex {
        flex-direction: column;
        gap: 0;
    }

    .calendar-header .flex.justify-between {
        flex-direction: column;
        align-items: stretch;
    }

    /* Zone titre et navigation - Fond gradient */
    .calendar-header .flex.items-center.gap-3:first-child {
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        padding: 16px;
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 10px;
    }

    /* Titre semaine - Style premium */
    .calendar-week-title,
    #calendarWeekTitle {
        font-size: 0.95rem;
        font-weight: 600;
        text-align: center;
        color: white;
        flex: 1;
        order: 0;
        margin: 0;
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    /* Boutons navigation calendrier - Style pill */
    .calendar-header .flex.items-center.gap-3:first-child > .btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        background: rgba(255,255,255,0.2);
        border: none;
        border-radius: 12px;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .calendar-header .flex.items-center.gap-3:first-child > .btn:active {
        background: rgba(255,255,255,0.3);
        transform: scale(0.95);
    }

    .calendar-header .flex.items-center.gap-3:first-child > .btn i {
        font-size: 0.9rem;
    }

    /* Cacher le texte "Aujourd'hui" sur mobile, garder l'icone */
    .calendar-header .flex.items-center.gap-3:first-child > .btn:nth-child(2) {
        font-size: 0;
    }
    .calendar-header .flex.items-center.gap-3:first-child > .btn:nth-child(2) i {
        font-size: 1rem;
    }

    /* Zone boutons vue - Fond blanc */
    .calendar-header .flex.items-center.gap-3:last-child {
        background: white;
        padding: 12px;
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    /* Groupe de boutons vue - Segmented control style */
    .calendar-header .btn-group {
        display: flex;
        width: 100%;
        gap: 0;
        background: var(--gray-100);
        border-radius: 12px;
        padding: 4px;
    }

    .calendar-header .btn-group .btn {
        flex: 1;
        min-width: 0;
        padding: 10px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
        background: transparent;
        border: none;
        border-radius: 10px;
        color: var(--gray-500);
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .calendar-header .btn-group .btn.active {
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        color: white;
        box-shadow: 0 2px 8px rgba(71, 68, 178, 0.3);
    }

    .calendar-header .btn-group .btn i {
        display: none;
    }

    /* Bouton nouveau creneau - Fab style */
    .calendar-header .btn-primary.admin-only {
        width: 100%;
        margin: 0;
        padding: 12px;
        border-radius: 12px;
        font-size: 0.85rem;
        font-weight: 600;
    }

    /* Stats calendrier - Cards modernes */
    .calendar-stats {
        margin-bottom: 16px;
    }

    .stats-mini-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .stat-mini {
        padding: 12px 8px;
        border-radius: 14px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .stat-mini-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
    }

    .stat-mini-info {
        text-align: center;
    }

    .stat-mini-value {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--gray-800);
        line-height: 1.2;
    }

    .stat-mini-label {
        font-size: 0.6rem;
        color: var(--gray-500);
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    #planningDate {
        width: 100%;
    }

    /* Container des cartes salles */
    .rooms-cards-container,
    .planning-grid,
    .rooms-grid,
    .rooms-view {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    /* Carte salle - Design premium */
    .room-card,
    .rooms-cards-container > .card {
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        width: 100%;
        border: none;
        background: white;
    }

    /* Header salle avec gradient */
    .room-card .card-header,
    .rooms-cards-container > .card > .card-header,
    .room-header {
        padding: 16px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
    }

    .room-card .card-header h4,
    .room-card .card-header .card-title,
    .rooms-cards-container > .card .card-title,
    .room-header h4,
    .room-name {
        color: white;
        font-size: 1.05rem;
        margin: 0;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .room-card .card-header h4 i,
    .rooms-cards-container > .card .card-title i {
        font-size: 0.9rem;
        opacity: 0.9;
    }

    /* Badge capacite */
    .room-capacity,
    .room-info,
    .room-card .card-header .badge,
    .rooms-cards-container > .card .card-header .badge {
        background: rgba(255,255,255,0.2);
        color: white;
        font-size: 0.75rem;
        padding: 6px 12px;
        border-radius: 20px;
        font-weight: 500;
    }

    /* Body salle */
    .room-card .card-body,
    .rooms-cards-container > .card > .card-body,
    .room-body,
    .room-slots,
    .room-content {
        padding: 16px;
        background: white;
    }

    /* Creneaux - Design moderne */
    .room-card .slot-item,
    .slot-item,
    .time-slot,
    .calendar-slot {
        padding: 14px;
        margin-bottom: 10px;
        border-radius: 14px;
        background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
        border-left: 4px solid var(--secondary);
        box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    }

    .slot-item:last-child,
    .time-slot:last-child,
    .calendar-slot:last-child {
        margin-bottom: 0;
    }

    .slot-time,
    .slot-header {
        font-weight: 600;
        font-size: 0.9rem;
        color: var(--gray-800);
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .slot-time i,
    .slot-header i {
        color: var(--secondary);
        font-size: 0.85rem;
    }

    .slot-info,
    .slot-details {
        font-size: 0.8rem;
        color: var(--gray-500);
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 8px;
    }

    .slot-info i {
        font-size: 0.75rem;
        color: var(--gray-400);
    }

    .slot-actions {
        display: flex;
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--gray-200);
    }

    .slot-actions .btn {
        padding: 8px 14px;
        font-size: 0.75rem;
        border-radius: 8px;
        flex: 1;
    }

    /* Creneau avec activite */
    .slot-item.has-activity,
    .time-slot.has-activity {
        border-left-color: var(--primary);
        background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    }

    /* Creneau disponible */
    .slot-item.available,
    .time-slot.available {
        border-left-color: var(--success);
        background: linear-gradient(135deg, #ecfdf5 0%, var(--success-light) 100%);
    }

    /* Badge occupation dans slot */
    .slot-occupancy {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: rgba(0, 156, 198, 0.1);
        color: var(--secondary);
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.7rem;
        font-weight: 600;
    }

    /* ========================================
       ROOMS VIEW V2 - Mobile Optimized
       ========================================*/
    .rooms-grid-v2 {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 0;
    }

    .room-card-v2 {
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        border-top: none;
    }

    .room-card-v2 .room-card-header {
        padding: 14px 16px;
        background: linear-gradient(135deg, var(--room-color, var(--primary)) 0%, color-mix(in srgb, var(--room-color, var(--primary)) 70%, var(--secondary)) 100%);
    }

    .room-card-v2 .room-info h4 {
        color: white;
        font-size: 1rem;
        margin: 0;
    }

    .room-card-v2 .room-info span {
        color: rgba(255,255,255,0.85);
        font-size: 0.75rem;
    }

    .room-card-v2 .room-rate {
        background: rgba(255,255,255,0.15);
        padding: 8px 12px;
        border-radius: 12px;
    }

    .room-card-v2 .room-rate .rate-value {
        color: white;
        font-size: 1.1rem;
    }

    .room-card-v2 .room-rate .rate-detail {
        color: rgba(255,255,255,0.8);
        font-size: 0.7rem;
    }

    .room-card-v2 .room-card-body {
        padding: 0;
        max-height: none;
        overflow: visible;
    }

    /* Table slots mobile */
    .room-card-v2 .slots-table {
        font-size: 0.8rem;
    }

    .room-card-v2 .slots-table thead {
        display: none;
    }

    .room-card-v2 .slots-table tbody {
        display: flex;
        flex-direction: column;
        gap: 1px;
        background: #e5e7eb;
    }

    .room-card-v2 .slot-row {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        gap: 4px 12px;
        padding: 12px 16px;
        background: white;
        align-items: center;
    }

    .room-card-v2 .slot-row.row-active { background: #f0fdf4; }
    .room-card-v2 .slot-row.row-full { background: #fffbeb; }
    .room-card-v2 .slot-row.row-over { background: #fef2f2; }

    .room-card-v2 .slot-time {
        grid-column: 1;
        grid-row: 1;
        font-weight: 600;
        font-size: 0.85rem;
        color: var(--gray-800);
        white-space: nowrap;
        padding: 0;
    }

    .room-card-v2 .slot-activity {
        grid-column: 2;
        grid-row: 1;
        font-size: 0.85rem;
        padding: 0;
    }

    .room-card-v2 .slot-places {
        grid-column: 3;
        grid-row: 1 / 3;
        text-align: center;
        padding: 0;
    }

    .room-card-v2 .slot-enrollees {
        grid-column: 1 / 3;
        grid-row: 2;
        font-size: 0.75rem;
        color: var(--gray-500);
        padding: 0;
    }

    .room-card-v2 .badge-places {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 48px;
    }

    /* Notice messages mobile */
    .rooms-notice {
        margin: 16px;
        border-radius: 20px;
        padding: 40px 20px;
    }

    .rooms-notice i {
        font-size: 3rem;
    }

    /* Vue jour */
    .day-navigation {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        padding: 12px;
        background: white;
        border-radius: 14px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .day-title,
    #dayViewTitle {
        font-size: 1rem;
        font-weight: 600;
        color: var(--gray-800);
    }

    .day-navigation .btn {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 10px;
    }

    .day-slots-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 16px;
    }

    /* Vue semaine mobile */
    .week-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Vue mois mobile */
    .month-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }

    .month-day {
        aspect-ratio: 1;
        padding: 4px;
        text-align: center;
        font-size: 0.75rem;
        border-radius: 8px;
    }

    .month-day.today {
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        color: white;
    }

    .month-day.has-slots {
        background: #ecfdf5;
        color: var(--success-dark);
        font-weight: 600;
    }

    /* ==========================================
       SIDEBAR MOBILE - Menu lateral
       ========================================== */
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        padding: 16px;
    }

    .sidebar-logo h1 {
        font-size: 1.2rem;
    }

    .btn-close-sidebar {
        display: flex;
    }

    .sidebar-nav {
        padding: 12px;
    }

    .nav-item {
        padding: 12px 14px;
        border-radius: 10px;
        margin-bottom: 4px;
    }

    .nav-section-title {
        font-size: 0.7rem;
        padding: 0 14px;
        margin-bottom: 8px;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    /* ==========================================
       MODALES - Optimisees mobile
       ========================================== */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        margin: 0;
        border-radius: 20px 20px 0 0;
        animation: slideUpModal 0.3s ease-out;
    }

    .modal-header {
        padding: 16px 20px;
        border-radius: 20px 20px 0 0;
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .modal-header h3 {
        font-size: 1.1rem;
        color: white;
    }

    .modal-header .btn-close {
        color: white;
        opacity: 0.8;
    }

    .modal-body {
        padding: 20px;
        max-height: calc(92vh - 140px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer {
        padding: 16px 20px;
        padding-bottom: calc(16px + var(--safe-area-bottom));
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid var(--gray-200);
        gap: 10px;
        display: flex;
    }

    .modal-footer .btn {
        flex: 1;
        padding: 14px;
    }

    /* Modal famille details */
    .family-detail-modal .modal-body {
        padding: 16px;
    }

    .family-detail-section {
        margin-bottom: 16px;
        padding: 14px;
        background: var(--gray-50);
        border-radius: 12px;
    }

    .family-detail-section h4 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    /* ==========================================
       FORMULAIRES - Optimises tactile
       ========================================== */
    .form-group {
        margin-bottom: 16px;
    }

    .form-group label,
    .form-label {
        font-size: 0.85rem;
        font-weight: 500;
        margin-bottom: 8px;
        display: block;
    }

    .form-control,
    .form-select,
    .form-input,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
        border: 2px solid var(--gray-200);
        background: white;
        min-height: 50px;
        transition: border-color 0.2s ease;
    }

    .form-control:focus,
    .form-input:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: var(--secondary);
        box-shadow: 0 0 0 3px rgba(0, 156, 198, 0.1);
    }

    textarea {
        min-height: 100px;
        resize: vertical;
    }

    /* Checkbox et radio tactiles */
    input[type="checkbox"],
    input[type="radio"] {
        width: 22px;
        height: 22px;
        min-height: auto;
    }

    /* ==========================================
       BOUTONS - Tactiles et accessibles
       ========================================== */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        border-radius: 12px;
        font-size: 0.9rem;
        font-weight: 500;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.2s ease;
    }

    .btn:active {
        transform: scale(0.98);
    }

    .btn-sm {
        min-height: 36px;
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .btn-xs {
        min-height: 30px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .btn-primary {
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        border: none;
    }

    .btn-whatsapp {
        background: var(--whatsapp);
    }

    /* ==========================================
       BADGES ET TAGS
       ========================================== */
    .badge {
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.7rem;
        font-weight: 600;
    }

    .tag {
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 0.75rem;
    }

    /* ==========================================
       EMPTY STATES
       ========================================== */
    .empty-state {
        padding: 40px 20px;
        text-align: center;
    }

    .empty-state i {
        font-size: 3rem;
        color: var(--gray-300);
        margin-bottom: 16px;
    }

    .empty-state p {
        font-size: 0.9rem;
        color: var(--gray-500);
    }
}

/* ==========================================
   PETITS ECRANS (< 375px)
   ========================================== */
@media (max-width: 375px) {
    :root {
        --mobile-padding: 12px;
    }

    .stats-grid,
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .activities-badges {
        grid-template-columns: 1fr;
    }

    .bottom-nav .nav-item span {
        font-size: 0.6rem;
    }
}
