/* ==========================================
   WISH LISTES PARTAGÉES - MOBILE FIRST
   CSS optimisé pour mobile-first avec UX tactile
   ========================================== */

/* ==========================================
   VARIABLES CSS
   ========================================== */
:root {
    --primary-color: #1976d2;
    --primary-hover: #1565c0;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;

    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;

    --border-color: #424242;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #9e9e9e;

    --touch-target: 44px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

/* ==========================================
   LIGHT MODE SUPPORT
   ========================================== */
@media (prefers-color-scheme: light) {
    :root:not(.force-dark) {
        --bg-primary: #ffffff;
        --bg-secondary: #f8f9fa;
        --bg-tertiary: #e9ecef;

        --border-color: #dee2e6;
        --text-primary: #000000;
        --text-secondary: #212529;
        --text-muted: #6c757d;
    }
}

/* Force light mode */
.force-light {
    --bg-primary: #ffffff !important;
    --bg-secondary: #f8f9fa !important;
    --bg-tertiary: #e9ecef !important;

    --border-color: #dee2e6 !important;
    --text-primary: #000000 !important;
    --text-secondary: #212529 !important;
    --text-muted: #6c757d !important;
}

/* Force dark mode */
.force-dark {
    --bg-primary: #121212 !important;
    --bg-secondary: #1e1e1e !important;
    --bg-tertiary: #2d2d2d !important;

    --border-color: #424242 !important;
    --text-primary: #ffffff !important;
    --text-secondary: #e0e0e0 !important;
    --text-muted: #9e9e9e !important;
}

/* ==========================================
   VIEW TRANSITIONS - PAGE LOADING ANIMATIONS
   ========================================== */
@view-transition {
    navigation: auto;
}

/* Animation d'entrée pour les pages */
::view-transition-old(root) {
    animation: slide-out 0.3s ease-in-out;
}

::view-transition-new(root) {
    animation: slide-in 0.3s ease-in-out;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================
   RESET & BASE - MOBILE FIRST
   ========================================== */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    animation: fadeIn 0.3s ease-in-out;
}

/* ==========================================
   TYPOGRAPHIE MOBILE-FIRST
   ========================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 0;
    line-height: 1.2;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

h4 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

h5 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

h6 {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

@media (min-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

/* ==========================================
   BOUTONS - TACTILE OPTIMISÉ (MOBILE FIRST)
   ========================================== */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    min-height: var(--touch-target);
    min-width: var(--touch-target);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Feedback tactile pour mobile */
.btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Hover uniquement sur desktop */
@media (min-width: 768px) {
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .btn:active {
        transform: translateY(0) scale(0.98);
    }
}

.btn:focus {
    outline: 3px solid rgba(100, 181, 246, 0.5);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 40px;
}

@media (min-width: 768px) {
    .btn-sm {
        min-height: 36px;
    }
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    min-height: 52px;
}

@media (min-width: 768px) {
    .btn-lg {
        min-height: 48px;
    }
}

.btn-block,
.w-100 {
    width: 100%;
}

/* ==========================================
   FORMULAIRES - MOBILE OPTIMISÉ
   ========================================== */
.form-control {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 6px;
    min-height: var(--touch-target);
    width: 100%;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
    .form-control {
        border-radius: 8px;
    }
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

/* Light mode focus */
.force-light .form-control:focus {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15) !important;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.form-select {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 6px;
    min-height: var(--touch-target);
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
    .form-select {
        border-radius: 8px;
    }
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ==========================================
   CARTES - RESPONSIVE
   ========================================== */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    margin-bottom: var(--spacing-sm);
}

@media (min-width: 768px) {
    .card {
        border-radius: 12px;
        margin-bottom: var(--spacing-md);
    }
}

/* Hover uniquement sur desktop */
@media (min-width: 768px) {
    .card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
        transform: translateY(-2px);
    }
}

/* Light mode card shadows */
.force-light .card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .force-light .card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }
}

.card-body {
    padding: 0.75rem;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .card-body {
        padding: 1rem;
    }
}

@media (min-width: 992px) {
    .card-body {
        padding: 1.5rem;
    }
}

.card-header {
    background-color: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px 8px 0 0;
}

@media (min-width: 768px) {
    .card-header {
        padding: 1rem 1.5rem;
        border-radius: 12px 12px 0 0;
    }
}

.card-title {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-secondary);
}

/* ==========================================
   SIDEBAR NAVIGATION - DESKTOP ONLY
   ========================================== */
.sidebar-nav {
    background-color: #1a252f;
    color: white;
    width: 280px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

/* Desktop: sidebar toujours visible */
@media (min-width: 992px) {
    .sidebar-nav.offcanvas-lg {
        transform: translateX(0) !important;
        visibility: visible !important;
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1040;
        display: block !important;
        width: 280px;
    }

    .offcanvas-backdrop.show {
        display: none !important;
    }

    main {
        margin-left: 280px;
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
    }
}

/* Mobile: sidebar cachée */
@media (max-width: 991.98px) {
    .sidebar-nav {
        display: none !important;
    }

    main {
        margin-left: 0;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
        padding-bottom: 80px;
        /* Espace pour la navigation en bas */
    }
}

/* ==========================================
   BOTTOM NAVIGATION - MOBILE FIRST
   ========================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
    z-index: 1060;
    height: 72px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
    min-width: 60px;
    min-height: 60px;
    border-radius: 12px;
}

.bottom-nav-item:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    background-color: rgba(25, 118, 210, 0.1);
}

.bottom-nav-item.active {
    color: var(--primary-color);
    background-color: rgba(25, 118, 210, 0.15);
}

.bottom-nav-item i {
    font-size: 1.5rem;
    transition: transform 0.2s ease;
}

.bottom-nav-item.active i {
    transform: scale(1.15);
}

.bottom-nav-item.active .bottom-nav-label {
    color: var(--primary-color);
}

.bottom-nav-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bottom-nav-item-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 100%;
}

.bottom-nav-item-inner:hover {
    color: var(--primary-color);
}

.bottom-nav .dropdown-menu {
    bottom: 80px;
    transform: translateY(0);
    margin-bottom: 0.5rem;
}

.bottom-nav .dropdown-item {
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
}

.bottom-nav .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Desktop: masquer la navigation en bas */
@media (min-width: 992px) {
    .bottom-nav {
        display: none !important;
    }

    main {
        padding-bottom: 0;
    }
}

/* Navigation links */
.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 0.25rem 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
    min-height: var(--touch-target);
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(5px);
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.sidebar-nav .nav-link i,
.sidebar-nav .nav-link span:first-child {
    width: 24px;
    text-align: center;
    margin-right: 0.5rem;
}

.sidebar-nav .border-bottom,
.sidebar-nav .border-top {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.sidebar-nav .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.sidebar-nav .offcanvas-title {
    color: white;
    font-weight: 600;
}

.sidebar-nav .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar-nav .fw-bold {
    color: white !important;
}

/* ==========================================
   BADGES & ALERTES - MOBILE FIRST
   ========================================== */
.badge {
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    font-size: 0.875rem;
    border-radius: 4px;
    display: inline-block;
}

@media (min-width: 768px) {
    .badge {
        border-radius: 6px;
    }
}

.bg-primary {
    background-color: #0066cc !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
    color: #212529 !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.alert {
    border-width: 2px;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9375rem;
}

@media (min-width: 768px) {
    .alert {
        padding: 1rem 1.25rem;
        border-radius: 8px;
        margin-bottom: var(--spacing-md);
        font-size: 1rem;
    }
}

.alert-info {
    background-color: #1a237e;
    border-color: #3f51b5;
    color: #e3f2fd;
}

.alert-success {
    background-color: #1b5e20;
    border-color: #4caf50;
    color: #e8f5e9;
}

.alert-danger {
    background-color: #b71c1c;
    border-color: #f44336;
    color: #ffebee;
}

.alert-warning {
    background-color: #f57c00;
    border-color: #ff9800;
    color: #fff3e0;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* ==========================================
   LIENS
   ========================================== */
a {
    color: #64b5f6;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #90caf9;
    text-decoration: underline;
}

a:focus {
    outline: 2px solid #64b5f6;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ==========================================
   TABLEAUX
   ========================================== */
.table {
    color: var(--text-secondary);
    width: 100%;
}

.table th {
    background-color: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem;
}

.table td {
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem;
}

.table-hover tbody tr:hover {
    background-color: var(--bg-tertiary);
}

/* ==========================================
   TEXT UTILITY
   ========================================== */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: #64b5f6 !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

/* ==========================================
   SPACING & LAYOUT
   ========================================== */
.container {
    width: 100%;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

main {
    padding: var(--spacing-sm) 0;
    min-height: calc(100vh - 72px);
    /* Hauteur minimum pour que la navigation ne cache pas le contenu */
}

/* Sur mobile, ajouter padding-bottom pour la navigation */
@media (max-width: 991.98px) {
    main {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
        padding-bottom: 80px;
    }
}

@media (min-width: 768px) {
    main {
        padding: var(--spacing-md) 0;
    }
}

@media (min-width: 992px) {
    main {
        padding: var(--spacing-lg) 0;
        padding-bottom: 0;
        /* Pas de padding-bottom sur desktop */
        padding-left: 0;
        padding-right: 0;
    }
}

/* ==========================================
   GIFT CARDS - LISTE DE SOUHAITS
   ========================================== */
.gift-card {
    transition: all 0.2s ease;
    border-left: 4px solid var(--border-color);
}

.gift-card:hover {
    border-left-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.gift-card .card-body {
    padding: 0.75rem;
}

@media (min-width: 768px) {
    .gift-card .card-body {
        padding: 1rem;
    }
}

@media (min-width: 992px) {
    .gift-card .card-body {
        padding: 1.25rem;
    }
}

.reserved {
    opacity: 0.75;
}

.badge-reserved {
    background-color: var(--success-color);
}

.badge-available {
    background-color: #6c757d;
}

/* Cartes clickables pour modal - Mobile First */
.gift-card-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 200px;
}

.gift-card-clickable:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .gift-card-clickable:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    }

    .gift-card-clickable:active {
        transform: translateY(-2px) scale(0.99);
    }
}

.gift-card-clickable .position-absolute {
    z-index: 1;
}

.gift-card-clickable .card-body {
    position: relative;
}

/* Style spécial pour les favoris */
.gift-card-clickable.favorite {
    border: 2px solid var(--warning-color);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.gift-card-clickable.favorite:hover {
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

/* Animation pour l'icône cadeau */
.gift-card-clickable:hover .bi-gift {
    animation: bounce 0.6s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ==========================================
   LIST CARDS - DASHBOARD
   ========================================== */
.list-card {
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    cursor: pointer;
    background-color: var(--bg-secondary);
}

.list-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.list-card-link {
    color: inherit;
    text-decoration: none;
}

.list-card-link:hover {
    color: inherit;
}

.list-card .card-body {
    padding: 1rem;
}

.list-card .card-title {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* ==========================================
   RESERVATION CARDS - SHOPPING
   ========================================== */
.reservation-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.2s ease;
}

.reservation-card:hover {
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.purchased-card {
    border-left: 4px solid var(--success-color);
    opacity: 0.85;
}

/* ==========================================
   FORMULAIRES D'AJOUT
   ========================================== */
.add-wish-form {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: var(--spacing-lg);
}

.add-wish-toggle {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease;
    margin-bottom: var(--spacing-md);
    min-height: var(--touch-target);
}

.add-wish-toggle:hover {
    background-color: var(--primary-hover);
}

.add-wish-toggle:active {
    transform: scale(0.98);
}

/* ==========================================
   FLOATING ACTION BUTTON
   ========================================== */
.share-btn-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.share-btn-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.share-btn-float:active {
    transform: scale(0.95);
}

/* ==========================================
   SHARE SIDEBAR
   ========================================== */
.share-sidebar {
    position: fixed;
    top: 50%;
    right: -100%;
    transform: translateY(-50%);
    width: 320px;
    max-height: 70vh;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    z-index: 1050;
    overflow-y: auto;
    padding: 1.5rem;
}

.share-sidebar.show {
    right: 20px;
}

@media (max-width: 575.98px) {
    .share-sidebar {
        width: calc(100% - 40px);
        max-width: 320px;
    }

    .share-sidebar.show {
        right: 20px;
    }
}

.share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   INPUT GROUP - MOBILE FIRST
   ========================================== */
.input-group {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.input-group .form-control {
    flex: 1 1 auto;
    border-radius: 6px 0 0 6px;
}

@media (min-width: 768px) {
    .input-group .form-control {
        border-radius: 8px 0 0 8px;
    }
}

.input-group-text {
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-left: none;
    color: var(--text-secondary);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    border-radius: 0 6px 6px 0;
}

@media (min-width: 768px) {
    .input-group-text {
        border-radius: 0 8px 8px 0;
    }
}

.input-group-sm .form-control,
.input-group-sm .input-group-text {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 100px 0;
    }
}

.feature-card {
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

/* ==========================================
   DASHBOARD STATISTICS - MOBILE FIRST
   ========================================== */
.dashboard-stat-card {
    padding: 0.75rem;
    text-align: center;
}

@media (min-width: 768px) {
    .dashboard-stat-card {
        padding: 1rem 1.25rem;
    }
}

.dashboard-stat-card h6 {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .dashboard-stat-card h6 {
        font-size: 0.875rem;
    }
}

.dashboard-stat-card h2,
.dashboard-stat-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0;
    font-weight: 700;
}

@media (min-width: 768px) {

    .dashboard-stat-card h2,
    .dashboard-stat-card h3 {
        font-size: 2rem;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-center {
    text-align: center;
}

.text-start {
    text-align: left;
}

.text-end {
    text-align: right;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.align-items-start {
    align-items: flex-start;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-circle {
    border-radius: 50%;
}

.shadow {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* ==========================================
   FOCUS & ACCESSIBILITY
   ========================================== */
*:focus {
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(100, 181, 246, 0.5);
    outline-offset: 2px;
}

/* ==========================================
   LIGHT MODE ADAPTATIONS
   ========================================== */
/* Shadow adaptations for light mode */
.force-light .card,
.force-light .modal-content {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.force-light .card:hover,
.force-light .list-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

/* Sidebar adaptations for light mode */
.force-light .sidebar-nav {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05) !important;
}

.force-light .sidebar-nav .nav-link {
    color: #495057 !important;
}

.force-light .sidebar-nav .nav-link:hover {
    background-color: #e9ecef !important;
    color: #212529 !important;
}

.force-light .sidebar-nav .nav-link.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.force-light .sidebar-nav .text-muted {
    color: #6c757d !important;
}

.force-light .sidebar-nav .fw-bold {
    color: #212529 !important;
}

.force-light .sidebar-nav .border-bottom,
.force-light .sidebar-nav .border-top {
    border-color: #dee2e6 !important;
}

.force-light .sidebar-nav .offcanvas-header {
    border-bottom: 1px solid #dee2e6 !important;
}

.force-light .sidebar-nav .offcanvas-title {
    color: #212529 !important;
}

/* Bottom nav adaptations for light mode */
.force-light .bottom-nav {
    background-color: #f8f9fa !important;
    border-top: 2px solid #dee2e6 !important;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.05) !important;
}

.force-light .bottom-nav .bottom-nav-item {
    color: #495057 !important;
}

.force-light .bottom-nav .bottom-nav-item i {
    color: #495057 !important;
}

.force-light .bottom-nav .bottom-nav-item:hover {
    background-color: #e9ecef !important;
    color: var(--primary-color) !important;
}

.force-light .bottom-nav .bottom-nav-item:hover i {
    color: var(--primary-color) !important;
}

.force-light .bottom-nav .bottom-nav-item.active {
    color: var(--primary-color) !important;
    background-color: #e3f2fd !important;
}

.force-light .bottom-nav .bottom-nav-item.active i,
.force-light .bottom-nav .bottom-nav-item.active .bottom-nav-label {
    color: var(--primary-color) !important;
}

/* Fix bottom-nav-item-inner (button inside dropdown) */
.force-light .bottom-nav .bottom-nav-item-inner {
    color: #495057 !important;
}

.force-light .bottom-nav .bottom-nav-item-inner:hover {
    color: var(--primary-color) !important;
}

.force-light .bottom-nav .bottom-nav-item-inner i,
.force-light .bottom-nav .bottom-nav-item-inner .bottom-nav-label {
    color: #495057 !important;
}

.force-light .bottom-nav .bottom-nav-item-inner:hover i,
.force-light .bottom-nav .bottom-nav-item-inner:hover .bottom-nav-label {
    color: var(--primary-color) !important;
}

/* Icône "Plus" en gris par défaut - VISIBLE EN LIGHT ET DARK MODE */
.bottom-nav-item-inner i.bi-three-dots-vertical {
    color: #6c757d !important;
}

.bottom-nav-item.dropdown:hover i.bi-three-dots-vertical {
    color: var(--primary-color) !important;
}

/* Exception: icône "Plus" toujours grise par défaut en light mode */
.force-light .bottom-nav-item-inner i.bi-three-dots-vertical {
    color: #6c757d !important;
}

.force-light .bottom-nav-item.dropdown:hover i.bi-three-dots-vertical {
    color: var(--primary-color) !important;
}

.force-light .bottom-nav .dropdown-menu {
    background-color: white !important;
    border: 1px solid #dee2e6 !important;
}

.force-light .bottom-nav .dropdown-item {
    color: #495057 !important;
}

.force-light .bottom-nav .dropdown-item:hover {
    background-color: #f5f5f5 !important;
    color: #212529 !important;
}

.force-light .bottom-nav .dropdown-menu-dark {
    background-color: white !important;
}

.force-light .bottom-nav .dropdown-menu-dark .text-white,
.force-light .bottom-nav .dropdown-menu-dark small.text-muted,
.force-light .bottom-nav .dropdown-menu-dark a {
    color: #495057 !important;
}

.force-light .bottom-nav .dropdown-menu-dark .fw-bold {
    color: #212529 !important;
}

.force-light .bottom-nav .dropdown-menu-dark .dropdown-divider {
    background-color: #dee2e6 !important;
}

/* Input group adaptations for light mode */
.force-light .input-group-text {
    background-color: #e9ecef !important;
    border: 2px solid #dee2e6 !important;
    color: #495057 !important;
}

/* Modal backdrop for light mode */
.force-light .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Text color utilities for light mode */
.force-light .text-muted {
    color: #6c757d !important;
}

.force-light .text-primary {
    color: var(--primary-color) !important;
}

.force-light .text-secondary {
    color: #495057 !important;
}

/* Links for light mode */
.force-light a {
    color: var(--primary-color) !important;
}

.force-light a:hover {
    color: var(--primary-hover) !important;
}

/* Alerts for light mode */
.force-light .alert-info {
    background-color: #e3f2fd !important;
    border-color: #64b5f6 !important;
    color: #1565c0 !important;
}

.force-light .alert-success {
    background-color: #e8f5e9 !important;
    border-color: #81c784 !important;
    color: #1b5e20 !important;
}

.force-light .alert-danger {
    background-color: #ffebee !important;
    border-color: #ef5350 !important;
    color: #b71c1c !important;
}

.force-light .alert-warning {
    background-color: #fff3e0 !important;
    border-color: #ffb74d !important;
    color: #e65100 !important;
}

/* Tables for light mode */
.force-light .table th {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-bottom: 2px solid #dee2e6 !important;
}

.force-light .table td {
    border-bottom: 1px solid #e9ecef !important;
}

.force-light .table-hover tbody tr:hover {
    background-color: #f5f5f5 !important;
}

/* Badges for light mode */
.force-light .badge {
    color: white !important;
}

/* Form control focus for light mode */
.force-light .form-control:focus {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15) !important;
}

/* Button close for light mode */
.force-light .btn-close {
    filter: none !important;
    opacity: 0.5 !important;
}

.force-light .btn-close:hover {
    opacity: 0.75 !important;
}

/* Additional light mode improvements */
.force-light .dropdown-divider {
    background-color: #dee2e6 !important;
}

.force-light .border-top,
.force-light .border-bottom {
    border-color: #e9ecef !important;
}

/* Fix hardcoded text colors in light mode */
.force-light .text-white {
    color: #212529 !important;
}

.force-light .text-white-50 {
    color: #6c757d !important;
}

.force-light .text-white-75 {
    color: #495057 !important;
}

/* Fix list group items in light mode */
.force-light .list-group-item.bg-transparent {
    background-color: transparent !important;
}

.force-light .list-group-item.bg-transparent .text-white {
    color: #212529 !important;
}

.force-light .list-group-item.bg-transparent .text-muted {
    color: #6c757d !important;
}

/* Fix badges and labels */
.force-light .badge.bg-secondary {
    color: white !important;
}

/* Fix primary color text */
.force-light .text-primary,
.force-light code.text-primary {
    color: var(--primary-color) !important;
}

.force-light .text-success,
.force-light i.text-success {
    color: var(--success-color) !important;
}

.force-light .text-danger {
    color: var(--danger-color) !important;
}

.force-light .text-info {
    color: var(--info-color) !important;
}

/* Fix links in cards */
.force-light .list-group-item-action {
    color: #212529 !important;
}

.force-light .list-group-item-action:hover {
    background-color: #f8f9fa !important;
    color: var(--primary-color) !important;
}

/* Fix form text hints */
.force-light .form-text {
    color: #6c757d !important;
}

/* Fix code blocks */
.force-light code {
    color: var(--primary-color) !important;
    background-color: #f1f3f5 !important;
    padding: 0.2em 0.4em !important;
    border-radius: 3px !important;
}

/* Fix icons and small elements */
.force-light small.text-muted {
    color: #6c757d !important;
}

/* Make outline buttons VERY visible in light mode - mobile first! */
.force-light .btn-outline-danger {
    color: #c82333 !important;
    border-color: #c82333 !important;
    border-width: 2px !important;
    background-color: #fff5f5 !important;
    font-weight: 600 !important;
}

.force-light .btn-outline-danger:hover {
    background-color: #c82333 !important;
    color: white !important;
}

.force-light .btn-outline-danger i,
.force-light .btn-outline-danger * {
    color: #c82333 !important;
}

.force-light .btn-outline-danger:hover i,
.force-light .btn-outline-danger:hover * {
    color: white !important;
}

.force-light .btn-outline-secondary {
    color: #495057 !important;
    border-color: #495057 !important;
    border-width: 2px !important;
    background-color: #f8f9fa !important;
    font-weight: 600 !important;
}

.force-light .btn-outline-secondary:hover {
    background-color: #495057 !important;
    color: white !important;
}

.force-light .btn-outline-secondary i,
.force-light .btn-outline-secondary * {
    color: #495057 !important;
}

.force-light .btn-outline-secondary:hover i,
.force-light .btn-outline-secondary:hover * {
    color: white !important;
}

.force-light .btn-outline-primary {
    color: #1565c0 !important;
    border-color: #1565c0 !important;
    border-width: 2px !important;
    background-color: #e3f2fd !important;
    font-weight: 600 !important;
}

.force-light .btn-outline-primary:hover {
    background-color: #1565c0 !important;
    color: white !important;
}

.force-light .btn-outline-primary i,
.force-light .btn-outline-primary * {
    color: #1565c0 !important;
}

.force-light .btn-outline-primary:hover i,
.force-light .btn-outline-primary:hover * {
    color: white !important;
}

/* Make small outline buttons even more visible */
.force-light .btn-sm.btn-outline-secondary,
.force-light .btn-sm.btn-outline-primary,
.force-light .btn-sm.btn-outline-danger {
    font-weight: 700 !important;
    border-width: 2.5px !important;
}

/* Make icons darker and more visible in light mode */
.force-light i.bi,
.force-light [class*="bi-"] {
    color: #212529 !important;
}

/* Except for colored icons that should keep their colors */
.force-light i.bi.text-primary,
.force-light [class*="bi-"].text-primary {
    color: var(--primary-color) !important;
}

.force-light i.bi.text-success,
.force-light [class*="bi-"].text-success {
    color: var(--success-color) !important;
}

.force-light i.bi.text-danger,
.force-light [class*="bi-"].text-danger {
    color: var(--danger-color) !important;
}

.force-light i.bi.text-warning,
.force-light [class*="bi-"].text-warning {
    color: var(--warning-color) !important;
}

.force-light i.bi.text-info,
.force-light [class*="bi-"].text-info {
    color: var(--info-color) !important;
}

.force-light i.bi.text-muted,
.force-light [class*="bi-"].text-muted {
    color: #6c757d !important;
}

/* But keep white icons on colored backgrounds */
.force-light .btn i.bi,
.force-light .badge i.bi,
.force-light .btn-success i,
.force-light .btn-primary i,
.force-light .btn-danger i,
.force-light .btn-info i {
    color: white !important;
}

/* Force dark icons on outline buttons for better visibility */
.force-light .btn-outline-primary i,
.force-light .btn-outline-primary [class*="bi-"] {
    color: #1565c0 !important;
}

.force-light .btn-outline-secondary i,
.force-light .btn-outline-secondary [class*="bi-"] {
    color: #495057 !important;
}

.force-light .btn-outline-danger i,
.force-light .btn-outline-danger [class*="bi-"] {
    color: #c82333 !important;
}

/* Keep icons white on hover for outline buttons */
.force-light .btn-outline-primary:hover i,
.force-light .btn-outline-primary:hover [class*="bi-"],
.force-light .btn-outline-secondary:hover i,
.force-light .btn-outline-secondary:hover [class*="bi-"],
.force-light .btn-outline-danger:hover i,
.force-light .btn-outline-danger:hover [class*="bi-"] {
    color: white !important;
}

/* Card hover improvements for light mode */
.force-light .card-header {
    background-color: var(--bg-tertiary) !important;
}

.force-light .list-group-flush .list-group-item {
    border-color: var(--border-color) !important;
}

/* Fix list-group items with text-white and bg-transparent */
.force-light .list-group-item.text-white {
    color: #212529 !important;
}

.force-light .list-group-item.text-white a.text-white {
    color: #212529 !important;
}

.force-light .list-group-item.text-white a.text-white:hover {
    color: var(--primary-color) !important;
}

.force-light .list-group-item.text-white a.text-info {
    color: var(--info-color) !important;
}

.force-light .list-group-item.text-white .text-muted {
    color: #6c757d !important;
}

/* Fix cards with bg-primary and opacity */
.force-light .card.bg-primary {
    background-color: #e3f2fd !important;
    border-color: var(--primary-color) !important;
}

.force-light .bg-primary {
    background-color: #e3f2fd !important;
}

.force-light .bg-primary.bg-opacity-10 {
    background-color: #e3f2fd !important;
}

.force-light .border-primary {
    border-color: var(--primary-color) !important;
}

/* Fix badge bg-info */
.force-light .badge.bg-info {
    color: white !important;
}

/* Fix button text colors - buttons should always have white text regardless of mode */
.force-light .btn-success,
.force-light .btn-primary,
.force-light .btn-info,
.force-light .btn-danger,
.force-light .btn-warning {
    color: white !important;
}

.force-light .btn-success:hover,
.force-light .btn-primary:hover,
.force-light .btn-info:hover,
.force-light .btn-danger:hover,
.force-light .btn-warning:hover {
    color: white !important;
}

/* Fix button icons */
.force-light .btn i,
.force-light .btn-success i,
.force-light .btn-primary i,
.force-light .btn-info i {
    color: white !important;
}

/* Force white text on all solid buttons in light mode */
.force-light button.btn-success,
.force-light button.btn-primary,
.force-light button.btn-info,
.force-light a.btn-success,
.force-light a.btn-primary,
.force-light a.btn-info,
.force-light input.btn-success,
.force-light input.btn-primary,
.force-light input.btn-info {
    color: white !important;
}

.force-light button.btn-success *,
.force-light button.btn-primary *,
.force-light button.btn-info *,
.force-light a.btn-success *,
.force-light a.btn-primary *,
.force-light a.btn-info *,
.force-light input.btn-success *,
.force-light input.btn-primary *,
.force-light input.btn-info * {
    color: white !important;
}

/* ==========================================
   MODAL IMPROVEMENTS - MOBILE FIRST
   ========================================== */
.modal-dialog {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
}

/* Sur très petits écrans (< 576px) - modals plus petits */
@media (max-width: 575.98px) {
    .modal-dialog {
        max-width: calc(100% - 1rem);
        margin: 0.5rem auto;
        max-height: 85vh;
    }
}

@media (min-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        max-height: calc(100% - 1rem);
        height: auto;
    }
}

@media (min-width: 768px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
}

/* Réduire modal-lg sur mobile */
@media (max-width: 575.98px) {
    .modal-dialog.modal-lg {
        max-width: calc(100% - 1rem);
        margin: 0.5rem auto;
        max-height: 85vh;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .modal-dialog.modal-lg {
        max-width: calc(100% - 1rem);
        margin: 0.5rem;
    }
}

@media (min-width: 768px) {
    .modal-dialog.modal-lg {
        max-width: 800px;
        margin: 1.75rem auto;
    }
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--text-secondary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-height: 100vh;
}

/* Sur très petits écrans - plus compacts */
@media (max-width: 575.98px) {
    .modal-content {
        border-radius: 12px;
        min-height: auto;
        max-height: 85vh;
    }

    .modal-body {
        overflow-y: auto;
        max-height: calc(85vh - 120px);
    }
}

@media (min-width: 576px) {
    .modal-content {
        border-radius: 12px;
        min-height: auto;
        max-height: 90vh;
    }

    .modal-body {
        overflow-y: auto;
        max-height: calc(90vh - 150px);
    }
}

.modal-header {
    background-color: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 0;
}

@media (max-width: 575.98px) {
    .modal-header {
        padding: 0.75rem 1rem;
        border-radius: 12px 12px 0 0;
    }
}

@media (min-width: 576px) {
    .modal-header {
        padding: 1.25rem;
        border-radius: 12px 12px 0 0;
    }
}

.modal-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

@media (min-width: 768px) {
    .modal-title {
        font-size: 1.25rem;
    }
}

.modal-body {
    padding: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

@media (min-width: 576px) {
    .modal-body {
        padding: 1rem;
        font-size: 1rem;
        line-height: 1.6;
    }
}

@media (min-width: 768px) {
    .modal-body {
        padding: 1.5rem;
    }
}

.modal-body h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

@media (min-width: 576px) {
    .modal-body h6 {
        font-size: 1rem;
    }
}

.modal-body p {
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (min-width: 576px) {
    .modal-body p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

.modal-footer {
    background-color: var(--bg-tertiary);
    border-top: 2px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (min-width: 576px) {
    .modal-footer {
        border-radius: 0 0 12px 12px;
        padding: 1rem;
    }
}

.modal-footer .btn {
    flex: 1 1 auto;
    min-width: 100px;
}

@media (min-width: 768px) {
    .modal-footer .btn {
        min-width: 120px;
    }

    .modal-body {
        padding: 2rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}

/* Amélioration de la lisibilité des alertes dans les modals */
.modal-body .alert {
    font-size: 0.875rem;
    line-height: 1.4;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 576px) {
    .modal-body .alert {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 0.75rem 1rem;
    }
}

/* Réduire les gros textes dans les modals sur mobile */
@media (max-width: 575.98px) {
    .modal-body p {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }

    .modal-body .mb-0 {
        font-size: 0.875rem !important;
    }

    /* Prix et autres éléments avec de grandes tailles */
    .modal-body>div>p {
        font-size: 1rem !important;
    }

    /* Réduire les espacements entre sections */
    .modal-body>.mb-4 {
        margin-bottom: 1rem !important;
    }

    /* Réduire la taille des icônes */
    .modal-body .bi {
        font-size: 1em;
    }

    /* Réduire la taille des titres de section */
    .modal-body h6 {
        font-size: 0.875rem !important;
    }

    /* Réduire les liens */
    .modal-body a {
        font-size: 0.875rem !important;
    }

    /* Réduire les input groups */
    .modal-body .input-group {
        flex-direction: column;
    }

    .modal-body .input-group .form-control {
        border-radius: 6px !important;
        margin-bottom: 0.5rem;
    }

    .modal-body .input-group .input-group-text,
    .modal-body .input-group .btn {
        border-radius: 6px !important;
        width: 100%;
    }
}

/* Tablettes - ajustements moyens */
@media (min-width: 576px) and (max-width: 767.98px) {
    .modal-body .input-group {
        flex-direction: row;
    }

    .modal-body .input-group .form-control {
        border-radius: 6px 0 0 6px !important;
    }

    .modal-body .input-group .input-group-text,
    .modal-body .input-group .btn {
        border-radius: 0 6px 6px 0 !important;
        width: auto;
    }
}

/* Boutons de fermeture améliorés */
.btn-close {
    filter: invert(1);
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

/* Assurer que les modals ne débordent pas sur mobile */
@media (max-width: 575.98px) {
    .modal-backdrop {
        background-color: rgba(0, 0, 0, 0.75);
    }

    .modal {
        padding: 1rem 0.5rem !important;
    }

    .modal-dialog-centered {
        display: flex;
        align-items: center;
        min-height: 100%;
        margin: 0;
    }

    .modal.show {
        display: block !important;
        padding: 1rem 0.5rem !important;
    }

    /* Empêcher le scroll du body quand modal est ouvert */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* ==========================================
   RESPONSIVE GRID IMPROVEMENTS - MOBILE FIRST
   ========================================== */
/* Responsive grid for cards - Very small screens (< 576px) */
@media (max-width: 575.98px) {
    .col-6.col-md-4.col-lg-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Reduce spacing on mobile */
    .row.g-2,
    .row.g-3 {
        margin: 0 -0.25rem;
    }

    .row.g-2>[class*="col-"],
    .row.g-3>[class*="col-"] {
        padding: 0 0.25rem;
        margin-bottom: 0.5rem;
    }
}

/* Small screens (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .col-6.col-md-4.col-lg-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* Medium screens (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .col-6.col-md-4.col-lg-3 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

/* Large screens (992px+) */
@media (min-width: 992px) {
    .col-6.col-md-4.col-lg-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .bottom-nav,
    .share-btn-float,
    .sidebar-nav {
        display: none !important;
    }
}