
@media screen and (min-width: 1024px) {

/* ============================================================
   HEADER + NAVIGATION + SOCIAL
   ============================================================ */

header {
    height: 70px; /* Hauteur fixe pour prévoir l'espacement du main */
}

.nav-center {
    position: absolute;
	display: flex;
	justify-self: center;
    gap: 30px;
}

.social {
  position: absolute;
  display: flex;
  right:40px;
}

/* ============================================================
   PAGE GALLERY
   ============================================================ */ 

.gallery {
    display: grid;
    grid-template-columns: repeat(12, 1fr); 
    gap: 10px;
    padding: 14% 2% 50px 2%; /* Padding réduit pour plus d'espace */
    width: 100%;
    max-width: 100%; 
    margin: 0 auto;
    box-sizing: border-box;
}

.gallery img,
.gallery video {
    width: 100%;
    aspect-ratio: 1 / 1; /* ou 1 / 1 si tu veux du carré */
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.3s;
	background-color: rgba(255,255,255,0.25); /* cadre visible */
}

/* ============================================================
   PAGE CALENDRIER
   ============================================================ */ 

.map-legend {
    position: fixed; /* fixe par rapport à la fenêtre */
    top: 15px;       /* hauteur du header (ajuster selon ton header) */
    left: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #000;
    font-size: 14px;
    background-color: #fff; /* fond bleu clair */
    color: #000;           /* texte bleu */
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    max-width: 250px;
    z-index: 10000; /* plus haut que la carte */
	display: block;
}

.map-filter {
	transform: translateX(50%);
    position: absolute;
    color: #007BFF;
    top: 15px;
    left: 120px;
}

.map-filter select {
	width: auto;
}

/* ============================================================
   PAGE RESULTAT
   ============================================================ */ 

.results-season {
    padding-top: 100px;
    padding-bottom: 50px;
}

.results-title {
    margin-bottom: 50px;
}

.results-title::after {
    top: -100px;
    height: 300px;
}

.results-title h2 {
    font-size: 50px; /* Retour à la grande taille */
}

.results-table-wrapper {
    width: 95%;
    max-width: 1200px;
    padding: 20px;
}

.results-table td, 
.results-table thead th {
    padding: 14px 16px;
    font-size: 14px;
}

.results-table-total {
    font-size: 18px;
}

/* ============================================================
   STRUCTURE DES PAGES SPONSORING
   ============================================================ */   
   
.page {
    padding-top: 10vh; 
    justify-content: center;
}    

.page-frame {
    width: 95vw;      
    height: 85vh;     
    max-width: none;   
    padding: 3vh 10vw;
    gap: 4vh;        
    border: none;
}

/* ============================================================
   PAGE 1 : ACCUEIL MOBILE (Conversion VH/VW)
   ============================================================ */	
    
.dossier-title { 
    font-size: 5vh; 
}

.saison-title { 
    font-size: 4vh; 
}
    
.gradient-title { 
    font-size: 8vh; 
    margin-bottom: 3vh; 
}

.intro-text, .biography-text, .partnership-text {
    font-size: 2.5vh; /* Texte très lisible même à 1 mètre de l'écran */
    max-width: 70%;   /* On limite la largeur du texte au centre pour le confort de lecture */
    line-height: 1.7;
}

.pilot-name .lastname { 
    font-size: 8vh; 
}

.pilot-name .firstname { 
    font-size: 5vh; 
}
.img-flag-fr { 
    height: 10vh; 
}

.main-logo-container {
    top: 70%; /* On le descend un peu plus pour laisser de la place au grand nom */
}
	
.main-logo-mpk {
    height: 30vh; /* Ajustement proportionnel pour le plein écran */
}

.contact-footer {
    font-size: 2vh;
}
	
	/* Agrandissement des bandes de couleurs pour le plein écran */
.corner-stripes-left, 
.corner-stripes-right {
    width: 40vw;  /* On augmente la taille pour le 27" */
    height: 40vh;
}

.corner-stripes-left {
    background: linear-gradient(45deg, 
    #a288ff 0%, #a288ff 10%, 
    #7baaff 10%, #7baaff 20%, 
    black 20%, black 30%, 
    transparent 30%);
}

.corner-stripes-right {
    background: linear-gradient(-45deg, 
    #a288ff 0%, #a288ff 10%, 
    #7baaff 10%, #7baaff 20%, 
    black 20%, black 30%, 
    transparent 30%);
}

/* ============================================================
   PAGE 2 : PRESENTATION
   ============================================================ */

.img-double-drapeau {
    height: 8vh; 
}   
   
 /* ============================================================
   PAGE 3 : RÉSULTATS
   ============================================================ */  
 
.result-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; 
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2vh 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
 
    /* Bloc MILIEU : On sature le centrage */
.result-logo {
    grid-column: 2;
    display: block;
    height: 8vh;
    width: auto;
    margin: 0 auto;       /* Centre horizontalement dans sa colonne */
    justify-self: center; /* Force le centrage dans la grille */
    object-fit: contain;
}

    /* On cache ou on adapte les éléments inutiles du mobile */
.result-row { 
	display: none; 
} 

.social-item { 
    font-size: 4vh; 
}
.social-icon { 
    width: 6vh; 
    height: 6vh; 
}  
   
  /* Cible le conteneur flex spécifiquement dans la page 4 */
.page-4-content .flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 80px; /* Espace entre texte et logo */
    width: 100%;
}
	
.sub-title {
    font-size: 4vh; /* Ajuste cette valeur selon tes préférences */
}
	
	/* Ajoute un espace entre la ville et la date */
.event-row span {
    margin-right: 40px; /* Ajuste la valeur selon l'écart voulu */
}

    /* Style du logo réactivé */
.logo-side {
    display: block;
    height: 6vh; /* Taille fixe ou 10vh selon ta préférence */
    width: auto;
    flex-shrink: 0;
}
	
.img-circuit {
    height: 30vh; /* Environ 25% de la hauteur de l'écran */
    width: auto;
    display: block;
}

/* ============================================================
   PAGE 4 : RÉSULTATS
   ============================================================ */

.main-intro, .blue-text-highlight, .bold-commitment {
    font-size: 2.5vh; /* Texte très lisible même à 1 mètre de l'écran */
    max-width: 100%;   /* On limite la largeur du texte au centre pour le confort de lecture */
    line-height: 1.7;
}   

/* ============================================================
   PAGE 5 : PRET A REJOINDRE L'AVENTURE
   ============================================================ */ 
    
.social-item { 
    font-size: 3vh; 
}

.social-icon { 
    width: 4vh; 
	height: 4vh; 
}
 
.final-photo {
    width: 25vw;      /* Utilise 60% de la largeur de l'écran */
    max-width: 800px; /* Limite pour ne pas perdre en qualité */
    height: auto;      /* Garde les proportions */
}

/* ============================================================
   PAGE HOME - SECTION 1
   ============================================================ */

.section1 {
  padding-top: 110px;
}

.section1 .wrapper {
        padding-left: 0;           /* On supprime le décalage forcé à gauche */
        align-items: center;       /* Centre horizontalement le contenu */
        width: 100vw;              /* Prend toute la largeur */
        justify-content: flex-start; /* On aligne vers le haut plutôt qu'au centre */
        min-height: auto;
        padding-top: 5vh;
    }

.carousel {
        width: 40vw;       /* Largeur demandée */
        height: 60vh;      /* Hauteur augmentée (ajustez selon votre besoin entre 60vh et 80vh) */
        margin: 0 auto;
        left: 0;
        position: relative;
        transform-style: preserve-3d;
    }
    
    .slide-content {
    padding: 2vw; /* Padding proportionnel */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calendar-table {
    width: 100%;
    height: auto;
    border-spacing: 0 0.5vh; /* Espace vertical entre lignes proportionnel */
}

.calendar-table td {
    padding: 1vh 1vw; /* Padding interne des cellules */
    font-size: 1.2vh; /* Texte basé sur la hauteur d'écran */
    white-space: nowrap;
}

#slider-modal {
    background: #1a1a1a; 
    width: 70vw;          /* Plus large sur PC */
    max-width: 1000px;
    padding: 50px;       /* Plus d'espace pour le confort */
    border: 2px solid #0052D4;
    box-shadow: 0 0 50px rgba(0, 82, 212, 0.4);
}

#slider-modal-content h3 {
    font-size: 2.5rem;   /* Titre bien grand */
    margin-bottom: 30px;
}

#slider-modal-content td {
    padding: 20px 15px;  /* Cellules très lisibles */
    font-size: 1.2rem;   /* Texte plus gros que sur mobile */
    border-bottom: 1px solid #333;
}

.table-section-title td {
    background: rgba(101, 199, 247, 0.15) !important;
    font-size: 1.4rem !important;
    letter-spacing: 1px;
}

    /* Animation d'entrée pour le côté pro */
#slider-modal-overlay[style*="display: flex"] #slider-modal {
    animation: modalFadeIn 0.4s ease-out;
}

    /* Slide 1 : Extrême Gauche */
    .posLeft2 {
        transform: translate3d(-80%, 0, -400px) scale(1);
        z-index: 1;
        opacity: 0.8;
    }

    /* Slide 2 : Gauche Proche */
    .posLeft1 {
        transform: translate3d(-40%, 0, -200px) scale(1);
        z-index: 5;
        opacity: 0.9;
    }

    /* Slide 3 : CENTRE (Slide active) */
    .posCenter {
        transform: translate3d(0, 0, 100px);
        z-index: 10;
        opacity: 1;
    }

    /* Slide 4 : Droite Proche */
    .posRight1 {
        transform: translate3d(40%, 0, -200px) scale(1);
        z-index: 5;
        opacity: 0.9;
    }

    /* Slide 5 : Extrême Droite */
    .posRight2 {
        transform: translate3d(80%, 0, -400px) scale(1);
        z-index: 1;
        opacity: 0.8;
    }
    
    .calendar-table {
    width: 100%;
    height: auto;
    border-spacing: 0 0.5vh; /* Espace vertical entre lignes proportionnel */
}

.calendar-table td {
    padding: 1vh 1vw; /* Padding interne des cellules */
    font-size: 1.2vh; /* Texte basé sur la hauteur d'écran */
    white-space: nowrap;
}

/* 2. Réactivation des flèches directionnelles */
    .arrow {
        display: flex !important; /* On annule le display: none précédent */
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 100;
        cursor: pointer;
        font-size: 5rem;
        color: white;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        transition: background 0.3s;
    }

    /* Placement des flèches sur les côtés de l'écran */
    .arrow.left { left: 5vw; }
    .arrow.right { right: 5vw; }

    .arrow:hover {
    }	

/* ============================================================
   PAGE HOME - SECTION 3
   ============================================================ */
.section3 {
    padding-top: 70px; /* Ajustez cette valeur selon la hauteur de votre header blanc */
}

#livetiming-container {
		top: 70px; 
        flex-grow: 1;    /* Prend l'espace entre le bandeau bleu et le footer */
        z-index: 10;
        background: #000;
    }
    
    #livetiming-container iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

}

@media (min-width: 1900px) {
   

/* ============================================================
   HEADER + NAVIGATION + SOCIAL
   ============================================================ */

header {
    height: 70px; /* Hauteur fixe pour prévoir l'espacement du main */
}

.nav-center {
    position: absolute;
	display: flex;
	justify-self: center;
    gap: 30px;
}

.social {
  position: absolute;
  display: flex;
  right:40px;
}

/* ============================================================
   ANNONCE
   ============================================================ */
   
.announcement-animated {
        padding: 30px 30px;
        font-size: 20px;
    }   

/* ============================================================
   STRUCTURE DES PAGES SPONSORING
   ============================================================ */   
   
.page {
    padding-top: 5vh; 
    justify-content: center;
}    

.page-frame {
    width: 95vw;      
    height: 95vh;     
    max-width: none;   
    padding: 5vh 10vw;
    gap: 4vh;        
    border: none;
}

.page-frame::before {
    background-image: 
        linear-gradient(to right, black 80px, transparent 80px),
        linear-gradient(to left, black 80px, transparent 80px),
        linear-gradient(to right, black 80px, transparent 80px),
        linear-gradient(to left, black 80px, transparent 80px),
        linear-gradient(to bottom, black 80px, transparent 80px),
        linear-gradient(to bottom, black 80px, transparent 80px),
        linear-gradient(to top, black 80px, transparent 80px),
        linear-gradient(to top, black 80px, transparent 80px);
    background-size: 
        150px 8px, 150px 8px, 150px 8px, 150px 8px, 
        8px 150px, 8px 150px, 8px 150px, 8px 150px;
    background-repeat: no-repeat;
    background-position: 0 0, 100% 0, 0 100%, 100% 100%, 0 0, 100% 0, 0 100%, 100% 100%;
}
	
.page-frame::after {
    top: 3vh; 
    left: 3vw; 
    right: 3vw; 
    bottom: 3vh;
}

/* ============================================================
   PAGE 1 : ACCUEIL MOBILE (Conversion VH/VW)
   ============================================================ */	
    
	/* Agrandissement des bandes de couleurs pour le plein écran */
.corner-stripes-left, 
.corner-stripes-right {
    width: 50vw;  /* On augmente la taille pour le 27" */
    height: 50vh;
}

/* ============================================================
   PAGE 5 : PRET A REJOINDRE L'AVENTURE
   ============================================================ */ 

.final-photo {
    width: 30vw;      /* Utilise 60% de la largeur de l'écran */
    max-width: 800px; /* Limite pour ne pas perdre en qualité */
    height: auto;      /* Garde les proportions */
}

/* ============================================================
   PAGE HOME - SECTION 1
   ============================================================ */

.carousel {
    width: 40vw;       /* Largeur demandée */
    height: 70vh;      /* Hauteur augmentée (ajustez selon votre besoin entre 60vh et 80vh) */
    margin: 0 auto;
    left: 0;
    position: relative;
    transform-style: preserve-3d;
}

.calendar-table td {
        font-size: 1.5vh; /* On agrandit le texte sur très grand écran */
    }
    
/* ============================================================
   PAGE HOME - SECTION 2
   ============================================================ */

.postit-container-global {
    gap: 50px;
}

.postit-small-group {
    gap: 50px;
    width: 60%;
}

.postit-small {
    height: 20vh;
}

.postit-small p {
    font-size: 1.5rem;
}    
    
.postit-large h3, .postit-small h4 {
    font-size: 2rem;
}    

.postit-large {
    text-align: center;
    font-size: 1.5rem;
    max-width: 1200px;
}
   
.postit-small .download-pdf, .postit-small .download-pdf i {
    font-size: 1.5rem;
}

.postit-logo {
  width: 120px;
}

/* ============================================================
   PAGE GALLERY
   ============================================================ */ 

.gallery {
    display: grid;
    grid-template-columns: repeat(12, 1fr); 
    gap: 10px;
    padding: 15% 2% 50px 2%; /* Padding réduit pour plus d'espace */
    width: 100%;
    max-width: 100%; 
    margin: 0 auto;
    box-sizing: border-box;
}

.gallery img,
.gallery video {
    width: 100%;
    aspect-ratio: 1 / 1; /* ou 1 / 1 si tu veux du carré */
    object-fit: cover;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.3s;
	background-color: rgba(255,255,255,0.25); /* cadre visible */
}

/* ============================================================
   PAGE CALENDRIER
   ============================================================ */ 

.map-legend {
    position: fixed; /* fixe par rapport à la fenêtre */
    top: 10px;       /* hauteur du header (ajuster selon ton header) */
    left: 60px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #000;
    font-size: 14px;
    background-color: #fff; /* fond bleu clair */
    color: #000;           /* texte bleu */
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    max-width: 250px;
    z-index: 10000; /* plus haut que la carte */
	display: block;
}

.map-filter {
	transform: translateX(90%);
    position: absolute;
    color: #007BFF;
    top: 10px;
}
 
}

/* =====================================================================
   CORRECTIF FINAL : LIBÉRATION DU SCROLL EN PAYSAGE MOBILE UNIQUEMENT
   ===================================================================== */

@media screen and (orientation: landscape) and (max-width: 1100px) {
    
    /* 1. ON FORCE LE SCROLL LIBRE */
html, body {
    overflow-y: auto; 
    overflow-x: hidden;
    height: auto;
    scroll-snap-type: none;
}

    /* 2. ON DÉBLOQUE LE CONTENEUR DES SECTIONS */
.main-container {
    height: auto !important;
    transform: none !important;
    display: block !important;
}

    /* 3. ON ADAPTE LES SECTIONS */
    section {
        height: auto;
        min-height: 100vh;
        scroll-snap-align: none;
        display: block;
        padding-top: 100px; /* Ajusté pour remonter l'annonce */
    }

    /* 1. On agrandit la hauteur totale de la zone de travail */
    .section1 {
        /* On passe à 140% de la hauteur de l'écran pour être à l'aise */
        min-height: 140vh; 
        height: auto;
        display: block;
        padding-top: 100px; /* Distance Header -> Annonce */
    }

    /* 2. On ajuste le wrapper pour qu'il laisse le carousel descendre */
    .section1 .wrapper {
        min-height: 450px; /* On donne de la hauteur au conteneur interne */
        display: flex;
        flex-direction: column;
    }

    /* 3. On positionne le carousel avec une marge propre */
    .carousel {
        margin-top: 90px !important; /* Espace entre l'annonce et le haut du carousel */
        height: 250px !important;   /* Hauteur du carousel lui-même */
        width: 60vw !important;
        margin-bottom: 50px !important; /* Espace avant la fin de la section 1 */
    }

    /* 5. SLIDES */
    .slide.posCenter {
        transform: translate3d(0, 0, 100px) scale(1);
    }

    .slide.posRight1 {
        transform: translate3d(55%, 0, 0) scale(0.5, 0.85);
        opacity: 0.8;
        display: block;
        z-index: 5;
    }

    .slide.posLeft1, .slide.posLeft2, .slide.posRight2 {
        display: none;
    }

    /* 6. RÉACTIVATION DE LA MODALE (On retire le display:none !important précédent) */
    .modal, #modalTextContent, #slider-modal-overlay {
        display: none; /* Pas de !important ici pour laisser le JS travailler */
    }

    /* Règle pour quand la modale est ouverte par le JS */
    .modal[style*="display: flex"], 
    .modal[style*="display: block"] {
        display: flex;
        position: fixed;
        z-index: 99999;
    }
	
	.section2 {
        margin-top: 0px !important;
        min-height: 100vh; /* Pour que le fond couvre tout l'écran */
        padding-top: 50px !important;  /* On réduit l'espace haut pour faire remonter les post-its */
        padding-bottom: 50px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Aligne le contenu vers le haut */
        height: auto !important;
    }

    /* 7. TRANSITIONS ENTRE SECTIONS */
    .section2, .section3 {
        margin-top: 0px;
        position: relative;
        z-index: 2;
    }
    
    .section-live {
    margin-top: -100px;
    }

    .announcement-animated {
        margin-top: 0px;
        margin-bottom: 10px;
        font-size: 14px;
		width: 80%;         /* On réduit à 80% de la largeur de l'écran */
        max-width: 500px;   /* On fixe une limite pour les grands écrans */
        margin-left: auto;  /* Centrage horizontal */
        margin-right: auto; /* Centrage horizontal */
    }
}

