/* 
 * GEM Orthez - Feuille de style responsive
 * Ce fichier contient toutes les règles CSS pour rendre le site responsive
 * Organisé par breakpoints et par composants
*/

/* ================ RÈGLES GÉNÉRALES MOBILE-FIRST ================ */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* ================ HEADER & NAVIGATION ================ */
header {
    background-position: center;
    background-size: cover;
    height: 60vh; /* Hauteur réduite sur mobile */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
}

header h1 {
    font-size: 2rem;
    text-align: center;
}

header p {
    font-size: 1rem;
    text-align: center;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

.logos {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
}

.navbar {
    padding: 0.5rem 1rem;
}

.navbar-brand {
    font-size: 1.2rem;
}

.nav-link {
    font-size: 0.9rem;
    text-align: center;
    margin: 0.3rem 0;
}

/* ================ PARTENAIRES ================ */
.partenaires {
    padding: 1.5rem;
    overflow: hidden;
}

.partenaires h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.logos-partenaires {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
}

#kpmg {
    width: 70px;
    height: 60px;
}

/* ================ SECTIONS ================ */
section {
    padding: 2rem 1rem;
}

section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

/* ================ CAROUSEL ================ */
.carousel img {
    height: 250px;
}

/* ================ PLANNING TABLE ================ */
.planning-table {
    padding: 1rem;
    overflow-x: auto;
}

.table {
    min-width: 600px;
}

.table-dark td {
    padding: 0.5rem;
    font-size: 0.8rem;
}

.horaire {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
}

/* ================ CARDS & CONTENT ================ */
.card {
    margin-bottom: 1.5rem;
}

#fontParagraphes {
    font-size: 1rem;
    padding: 0 1rem;
}

/* ================ VIDÉO ET MÉDIA ================ */
.video-container video {
    width: 100%;
}

.imgFull {
    width: 100%;
    max-width: 300px;
}

/* ================ FORMULAIRES ================ */
input, textarea, select {
    font-size: 1rem;
    padding: 0.5rem;
}

/* ================ BOUTONS FLOTTANTS ================ */
#music-control {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    bottom: 70px;
}

/* ================ FOOTER ================ */
footer {
    padding: 2rem 1rem;
}

footer p, footer a {
    font-size: 0.9rem;
}

footer iframe {
    width: 100%;
    height: 200px;
}

/* ================ TABLETTE (576px et plus) ================ */
@media (min-width: 576px) {
    header {
        height: 70vh;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    header p {
        font-size: 1.2rem;
    }
    
    .logos {
        width: 150px;
    }
    
    #fontParagraphes {
        font-size: 1.1rem;
    }
    
    .carousel img {
        height: 350px;
    }
    
    .imgFull {
        max-width: 400px;
    }
    
    .table-dark td {
        font-size: 0.9rem;
    }
    
    .horaire {
        font-size: 1rem;
    }
}

/* ================ TABLETTE PAYSAGE (768px et plus) ================ */
@media (min-width: 768px) {
    header {
        height: 80vh;
    }
    
    header h1 {
        font-size: 3rem;
    }
    
    .header {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 2rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .nav-link {
        font-size: 1rem;
        margin: 0 0.5rem;
    }
    
    section {
        padding: 3rem 2rem;
    }
    
    section h2 {
        font-size: 2.2rem;
    }
    
    .carousel img {
        height: 400px;
    }
    
    .partenaires h2 {
        font-size: 1.8rem;
    }
    
    #kpmg {
        width: 80px;
        height: 70px;
    }
    
    .table-dark td {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    #fontParagraphes {
        font-size: 1.2rem;
    }
    
    .imgFull {
        max-width: 450px;
    }
}

/* ================ PETIT DESKTOP (992px et plus) ================ */
@media (min-width: 992px) {
    header {
        height: 90vh;
    }
    
    header h1 {
        font-size: 3.5rem;
    }
    
    header p {
        font-size: 1.5rem;
    }
    
    .logos {
        width: 180px;
    }
    
    section {
        padding: 4rem 3rem;
    }
    
    .carousel img {
        height: 450px;
    }
    
    .table {
        min-width: unset; /* Annuler la largeur minimale */
    }
    
    .table-dark td {
        padding: 1rem;
    }
    
    #fontParagraphes {
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .imgFull {
        max-width: 500px;
    }
    
    footer iframe {
        height: 250px;
    }
}

/* ================ GRAND DESKTOP (1200px et plus) ================ */
@media (min-width: 1200px) {
    .container, .container-lg, .container-xl {
        max-width: 1140px;
    }
    
    header h1 {
        font-size: 3.8rem;
    }
    
    .carousel img {
        height: 500px;
    }
    
    #fontParagraphes {
        width: 70%;
        font-size: 1.3rem;
    }
    
    footer iframe {
        height: 300px;
    }
}

/* ================ ÉCRANS TRÈS LARGES (1400px et plus) ================ */
@media (min-width: 1400px) {
    .container, .container-lg, .container-xl, .container-xxl {
        max-width: 1320px;
    }
    
    #fontParagraphes {
        width: 60%;
    }
}

/* ================ CORRECTIFS SPÉCIFIQUES ================ */

/* Fix pour la table de planning sur petits écrans */
@media (max-width: 767px) {
    .planning-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .planning-table::after {
        content: "← Faites défiler →";
        display: block;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.8rem;
        color: #666;
    }
}

/* Fix pour le menu hamburger */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: rgba(0, 0, 0, 0.9);
        padding: 1rem;
        border-radius: 0 0 10px 10px;
    }
    
    .nav-links {
        margin-left: 0;
        text-align: center;
        margin: 0.5rem auto;
    }
}

/* Animation optimisée sur mobile */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Améliorations d'accessibilité */
@media (prefers-contrast: more) {
    body {
        --contrast-bg: #fff;
        --contrast-text: #000;
        background-color: var(--contrast-bg) !important;
        color: var(--contrast-text) !important;
    }
    
    a {
        color: #0000EE !important;
        text-decoration: underline !important;
    }
}
