/* ═══════════════════════════════════════════════════════════════
   RAFALBOT v2.8.0 - CSS RESPONSIVE GLOBAL
   Fichier responsive unifié pour tout le projet
   Mobile First Approach
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   BREAKPOINTS STANDARDS
   ═══════════════════════════════════════════════════════════════
   - Mobile Small:  320px - 480px
   - Mobile:        481px - 767px
   - Tablet:        768px - 1023px
   - Desktop:       1024px - 1439px
   - Large Desktop: 1440px+
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   VARIABLES RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
:root {
    /* Spacing adaptatif */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Font sizes adaptatifs */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.5rem;
    --font-2xl: 2rem;
    --font-3xl: 3rem;
    
    /* Container widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITIES RESPONSIVE GLOBALES
   ═══════════════════════════════════════════════════════════════ */

/* Container responsive */
.container-responsive {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Flexbox responsive */
.flex-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

/* Grid responsive */
.grid-responsive {
    display: grid;
    gap: var(--spacing-md);
}

/* Grid 2 colonnes sur desktop, 1 sur mobile */
.grid-2-cols {
    grid-template-columns: 1fr;
}

/* Grid 3 colonnes */
.grid-3-cols {
    grid-template-columns: 1fr;
}

/* Grid 4 colonnes */
.grid-4-cols {
    grid-template-columns: 1fr;
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

/* Header responsive */
.header-responsive {
    padding: var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-logo {
    font-size: var(--font-xl);
    flex-shrink: 0;
}

.header-nav {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* Menu burger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.card-responsive {
    background: rgba(26, 31, 46, 0.95);
    border: 2px solid rgba(255, 140, 0, 0.3);
    border-radius: 16px;
    padding: var(--spacing-md);
    transition: all 0.3s ease;
}

.card-responsive:hover {
    transform: translateY(-5px);
    border-color: #FF8C00;
    box-shadow: 0 15px 40px rgba(255, 140, 0, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   TABLES RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.table-wrapper-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.table-responsive th,
.table-responsive td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid rgba(255, 140, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   FORMS RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.form-responsive {
    width: 100%;
}

.form-group-responsive {
    margin-bottom: var(--spacing-md);
}

.form-group-responsive label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: #aaa;
    font-weight: 600;
}

.form-group-responsive input,
.form-group-responsive select,
.form-group-responsive textarea {
    width: 100%;
    padding: var(--spacing-sm);
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid rgba(255, 140, 0, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: var(--font-base);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.btn-responsive {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-base);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-responsive-full {
    width: 100%;
    padding: var(--spacing-md);
    font-size: var(--font-lg);
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

.sidebar-responsive {
    width: 250px;
    min-height: 100vh;
    background: rgba(26, 31, 46, 0.98);
    border-right: 2px solid rgba(255, 140, 0, 0.3);
    transition: all 0.3s ease;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: linear-gradient(135deg, #FF8C00, #FFD700);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    color: #000;
    font-size: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITIES HIDE/SHOW
   ═══════════════════════════════════════════════════════════════ */

.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

.hide-tablet {
    display: block;
}

.show-tablet {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   TABLET (768px - 1023px)
   ═══════════════════════════════════════════════════════════════ */
@media screen and (min-width: 768px) {
    /* Grid 2 colonnes */
    .grid-2-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Grid 3 colonnes -> 2 colonnes sur tablet */
    .grid-3-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Grid 4 colonnes -> 2 colonnes sur tablet */
    .grid-4-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Container */
    .container-responsive {
        padding: 0 var(--spacing-lg);
    }
    
    /* Font sizes */
    :root {
        --font-xl: 1.75rem;
        --font-2xl: 2.5rem;
        --font-3xl: 3.5rem;
    }
    
    /* Hide/Show */
    .hide-tablet {
        display: none;
    }
    
    .show-tablet {
        display: block;
    }
}

/* ═══════════════════════════════════════════════════════════════
   DESKTOP (1024px+)
   ═══════════════════════════════════════════════════════════════ */
@media screen and (min-width: 1024px) {
    /* Grid 3 colonnes */
    .grid-3-cols {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Grid 4 colonnes */
    .grid-4-cols {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Container */
    .container-responsive {
        padding: 0 var(--spacing-xl);
    }
    
    /* Sidebar visible */
    .sidebar-responsive {
        display: block;
    }
    
    /* Navigation horizontale */
    .header-nav {
        flex-wrap: nowrap;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE (< 768px)
   ═══════════════════════════════════════════════════════════════ */
@media screen and (max-width: 767px) {
    /* Menu burger visible */
    .menu-toggle {
        display: block;
    }
    
    /* Navigation mobile */
    .header-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(10, 14, 39, 0.98);
        border-top: 2px solid rgba(255, 140, 0, 0.3);
        padding: var(--spacing-md);
    }
    
    .header-nav.active {
        display: flex;
    }
    
    /* Sidebar mobile */
    .sidebar-responsive {
        position: fixed;
        top: 0;
        left: -250px;
        z-index: 999;
        width: 250px;
    }
    
    .sidebar-responsive.active {
        left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    /* Overlay pour sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Cards stack */
    .card-responsive {
        margin-bottom: var(--spacing-md);
    }
    
    /* Tables scroll horizontal */
    .table-responsive {
        font-size: var(--font-sm);
    }
    
    /* Buttons full width */
    .btn-responsive {
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }
    
    /* Font sizes mobile */
    :root {
        --font-xl: 1.25rem;
        --font-2xl: 1.75rem;
        --font-3xl: 2.5rem;
    }
    
    /* Hide/Show */
    .hide-mobile {
        display: none;
    }
    
    .show-mobile {
        display: block;
    }
    
    /* Spacing réduit */
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE SMALL (< 480px)
   ═══════════════════════════════════════════════════════════════ */
@media screen and (max-width: 480px) {
    /* Spacing encore plus réduit */
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.25rem;
        --spacing-xl: 1.5rem;
    }
    
    /* Font sizes très petits écrans */
    :root {
        --font-xs: 0.7rem;
        --font-sm: 0.8rem;
        --font-base: 0.9rem;
        --font-xl: 1.1rem;
        --font-2xl: 1.5rem;
        --font-3xl: 2rem;
    }
    
    /* Padding réduit cards */
    .card-responsive {
        padding: var(--spacing-sm);
    }
    
    /* Header compact */
    .header-logo {
        font-size: var(--font-lg);
    }
}

/* ═══════════════════════════════════════════════════════════════
   LANDSCAPE MOBILE
   ═══════════════════════════════════════════════════════════════ */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .sidebar-responsive {
        overflow-y: auto;
    }
    
    .header-responsive {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════ */
@media print {
    .sidebar-responsive,
    .menu-toggle,
    .sidebar-toggle,
    .btn-responsive {
        display: none;
    }
    
    .container-responsive {
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
