/**
 * CSS Responsive - Learn2Gether
 * Fichier: public/css/responsive.css
 * VERSION COMPLÈTE FINALE : Menu mobile + Toggle responsive + Tous vos styles
 */

/* ===================================
   BREAKPOINTS
   =================================== */

/* 
   Mobile first approach :
   - Mobile : < 768px
   - Tablette : 768px - 992px  
   - Desktop : > 992px
   - Large desktop : > 1200px
*/

/* ===================================
   TABLETTES (max 992px)
   =================================== */

@media screen and (max-width: 992px) {
    /* ===== AJUSTEMENTS GÉNÉRAUX ===== */
    .container {
        padding: 0 15px;
    }
    
    /* Typographie */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Espacements */
    section {
        padding: 60px 0;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    /* ===== NAVIGATION ===== */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 1rem;
        height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-menu a,
    .nav-link {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu a:hover,
    .nav-link:hover {
        background: var(--bg-light);
        color: var(--primary-color);
    }
    
    .hamburger {
        display: flex;
    }
    
    .btn-connexion {
        margin: 1rem 2rem !important;
        border-radius: 25px !important;
        border: none !important;
        display: block;
    }
    
    /* ===== HERO SECTION ===== */
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image {
        order: 1;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* ===== GRILLES ===== */
    .levels-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* ===== FOOTER ===== */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* ===== TOGGLE THÈME TABLETTE ===== */
    .theme-toggle-professional {
        bottom: 70px;
        left: 15px;
        width: 42px;
        height: 42px;
    }
    
    .theme-toggle-professional i {
        font-size: 15px;
    }
}

/* ===================================
   MOBILE (max 768px)
   =================================== */

@media screen and (max-width: 768px) {
    /* ===== AJUSTEMENTS GÉNÉRAUX ===== */
    .container {
        padding: 0 10px;
    }
    
    /* Typographie mobile */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    /* Espacements mobiles */
    section {
        padding: 40px 0;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* ===== NAVIGATION MOBILE ===== */
    .main-header {
        padding: 0;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo,
    .logo-link {
        font-size: 1.25rem;
    }
    
    .logo i,
    .logo-link i {
        font-size: 1.5rem;
        margin-right: 8px;
    }
    
    /* Menu mobile ajustements */
    .nav-menu {
        top: 60px;
        height: calc(100vh - 60px);
        padding: 1.5rem 0;
    }
    
    .nav-menu a,
    .nav-link {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .hamburger {
        padding: 0.25rem;
    }
    
    .hamburger span {
        width: 22px;
        height: 2.5px;
    }
    
    /* ===== HERO MOBILE ===== */
    .hero {
        padding: 80px 0 40px;
        text-align: center;
    }
    
    .hero .container {
        gap: 30px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* ===== GRILLES MOBILES ===== */
    .levels-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* ===== CARTES MOBILES ===== */
    .level-card,
    .feature-card,
    .article-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .level-icon {
        font-size: 2.5rem;
    }
    
    /* ===== FOOTER MOBILE ===== */
    .main-footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .footer-section ul {
        text-align: center;
    }
    
    /* ===== BOUTONS MOBILES ===== */
    .btn {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .btn-lg {
        padding: 14px 30px;
        font-size: 16px;
    }
    
    /* ===== TOGGLE THÈME MOBILE ===== */
    .theme-toggle-professional {
        bottom: 60px;
        left: 10px;
        width: 40px;
        height: 40px;
    }
    
    .theme-toggle-professional i {
        font-size: 14px;
    }
    
    /* ===== FORMULAIRES MOBILES ===== */
    .newsletter-form input {
        padding: 0.625rem;
        font-size: 14px;
    }
    
    .newsletter-form button {
        padding: 0.625rem 1.25rem;
        font-size: 14px;
    }
    
    /* ===== ARTICLES MOBILES ===== */
    .article-image {
        height: 180px;
    }
    
    .article-content {
        padding: 1.25rem;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
    
    .article-meta {
        font-size: 0.8rem;
        gap: 0.5rem;
    }
    
    /* ===== NOTIFICATIONS MOBILES ===== */
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* ===================================
   TRÈS PETIT MOBILE (max 480px)
   =================================== */

@media screen and (max-width: 480px) {
    /* ===== AJUSTEMENTS FINS ===== */
    .container {
        padding: 0 8px;
    }
    
    /* Typographie très petite */
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.4;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    /* ===== NAVIGATION TRÈS PETITE ===== */
    .logo,
    .logo-link {
        font-size: 1.1rem;
    }
    
    .logo i,
    .logo-link i {
        font-size: 1.25rem;
        margin-right: 6px;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .nav-menu {
        top: 55px;
        height: calc(100vh - 55px);
        padding: 1rem 0;
    }
    
    .nav-menu a,
    .nav-link {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    /* ===== HERO TRÈS PETIT ===== */
    .hero {
        padding: 60px 0 30px;
    }
    
    .hero .container {
        gap: 20px;
    }
    
    .hero-title {
        margin-bottom: 0.75rem;
    }
    
    .hero-description {
        margin-bottom: 1.25rem;
    }
    
    /* ===== CARTES TRÈS PETITES ===== */
    .level-card,
    .feature-card,
    .article-card {
        padding: 1.25rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .level-icon {
        font-size: 2rem;
    }
    
    /* ===== TOGGLE TRÈS PETIT ===== */
    .theme-toggle-professional {
        bottom: 50px;
        left: 8px;
        width: 36px;
        height: 36px;
    }
    
    .theme-toggle-professional i {
        font-size: 12px;
    }
    
    /* ===== ESPACEMENTS ===== */
    section {
        padding: 30px 0;
    }
    
    .section-padding {
        padding: 30px 0;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    /* ===== FOOTER TRÈS PETIT ===== */
    .main-footer {
        padding: 1.5rem 0 0.75rem;
    }
    
    .footer-content {
        gap: 1rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* ===================================
   LARGE DESKTOP (min 1200px)
   =================================== */

@media screen and (min-width: 1200px) {
    .container {
        max-width: 1400px;
        padding: 0 30px;
    }
    
    /* Typographie large */
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    /* Hero étendu */
    .hero {
        padding: 140px 0 100px;
    }
    
    .hero .container {
        gap: 80px;
    }
    
    /* Grilles étendues */
    .levels-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Footer étendu */
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Toggle positionné pour large écran */
    .theme-toggle-professional {
        bottom: 30px;
        left: 30px;
        width: 50px;
        height: 50px;
    }
    
    .theme-toggle-professional i {
        font-size: 18px;
    }
}

/* ===================================
   LANDSCAPE MOBILE (orientation)
   =================================== */

@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 40px 0 20px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .nav-menu {
        height: calc(100vh - 50px);
        top: 50px;
    }
    
    .theme-toggle-professional {
        bottom: 10px;
        left: 10px;
        width: 35px;
        height: 35px;
    }
    
    .theme-toggle-professional i {
        font-size: 12px;
    }
    
    section {
        padding: 20px 0;
    }
}

/* ===================================
   AJUSTEMENTS SPÉCIAUX POUR LE TOGGLE
   =================================== */

/* Éviter les conflits avec le bouton de retour en haut */
@media screen and (max-width: 768px) {
    .back-to-top {
        bottom: 120px !important; /* Plus haut que le toggle */
        right: 10px !important;
    }
}

/* Éviter les conflits avec les notifications */
@media screen and (max-width: 480px) {
    .notification {
        bottom: 100px; /* Au-dessus du toggle */
        top: auto;
    }
}

/* Position alternative du toggle pour éviter les conflits */
.theme-toggle-alt-position {
    bottom: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: 0 !important;
    border-radius: 0 12px 12px 0 !important;
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .main-header,
    .theme-toggle-professional,
    .hamburger,
    .nav-menu,
    .footer-bottom,
    .social-links,
    .newsletter-form {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .hero {
        padding: 20px 0;
        background: none !important;
    }
    
    .hero-title {
        font-size: 24pt;
        color: black !important;
    }
    
    .section-title {
        font-size: 18pt;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
    
    .btn {
        border: 1px solid black !important;
        background: none !important;
        color: black !important;
    }
}

/* ===================================
   PRÉFÉRENCES UTILISATEUR
   =================================== */

/* Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    .nav-menu {
        transition: none;
    }
    
    .hamburger span {
        transition: none;
    }
    
    .theme-toggle-professional {
        transition: none;
    }
    
    .theme-toggle-professional i {
        transition: none;
    }
    
    .hero-content,
    .hero-image {
        animation: none;
    }
    
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Contraste élevé */
@media (prefers-contrast: high) {
    .nav-menu a:hover,
    .nav-link:hover {
        background: black;
        color: white;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .theme-toggle-professional {
        border: 2px solid white;
    }
}

/* ===================================
   UTILITAIRES RESPONSIVE
   =================================== */

/* Classes d'affichage responsive */
.d-mobile-none {
    display: none;
}

.d-tablet-none {
    display: block;
}

.d-desktop-none {
    display: block;
}

@media screen and (min-width: 768px) {
    .d-mobile-none {
        display: block;
    }
    
    .d-tablet-none {
        display: none;
    }
    
    .d-desktop-none {
        display: block;
    }
}

@media screen and (min-width: 992px) {
    .d-mobile-none {
        display: block;
    }
    
    .d-tablet-none {
        display: block;
    }
    
    .d-desktop-none {
        display: none;
    }
}

/* Alignement responsive */
.text-center-mobile {
    text-align: center;
}

@media screen and (min-width: 768px) {
    .text-center-mobile {
        text-align: left;
    }
}

/* Flexbox responsive */
.flex-mobile-column {
    flex-direction: column;
}

@media screen and (min-width: 768px) {
    .flex-mobile-column {
        flex-direction: row;
    }
}