/* ============================================================
   1. STRUCTURE DE BASE & RESET
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow: hidden; 
    height: 100vh;
    width: 100vw;
    background-color: #000;
}

/* Conteneur géré par le JS (translateY) */
.main-container {
    width: 100%;
    height: 100vh;
    padding-top: 0; /* Suppression du padding ici */
	margin: 0;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
	display: block;
}

section {
    width: 100vw;
    height: 100vh;
	margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* ============================================================
   2. SECTION 1 - BANDEAU ANNONCE
   ============================================================ */

.section1 {
    background-image: url('../img/background-slide1.png');
    padding-top: 150px; /* Espace pour ton header */
}

.announcement-animated {
    width: 95%;
    margin: 0px auto 20px auto; 
    position: relative;
    padding: 15px 15px;
    background: linear-gradient(90deg, #65C7F7 0%, #0052D4 50%, #65C7F7 100%);
    color: #fff;
    font-size: 14px; /* Ajusté mobile */
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1.1); }
    to   { transform: scale(1.02); }
}

/* ============================================================
   3. SECTION 1 - SLIDER 3D
   ============================================================ */

.section1 .wrapper {
    display: flex;
    flex-direction: column;     /* Aligne les éléments du haut vers le bas */
    justify-content: flex-start; /* Colle le contenu en haut */
    align-items: flex-start;    /* Colle le contenu à gauche */
    min-height: 100vh;
    padding-top: 3vh;           /* Ajustez ici pour remonter (plus petit = plus haut) */
    padding-left: 12vw;          /* Espace à gauche */
    perspective: 1500px;        /* Garde l'effet 3D */
    position: relative;
    flex-grow: 1;
}

.carousel {
    width: 60vw; /* Le slide prend 75% de la largeur */
    height: 45vh;
    position: relative;
    transform-style: preserve-3d;
    touch-action: none;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: 3px solid white;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease, opacity 0.8s;
    cursor: pointer;
    background-color: #222;
}

.table-section-title td {
    background: rgba(101, 199, 247, 0.15);
    color: #65C7F7;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.red    { background-image: url('../img/caricature.png'); }
.green  { background: #3498db;; }
.blue   { background: #3498db; }
.yellow { background: #3498db; }
.purple { background: #3498db; }

/* --- POSITIONS MOBILE (CALAGE GAUCHE) --- */

/* Slide Actif : À gauche */
.posCenter {
    transform: translate3d(0, 0, 100px);
    z-index: 10;
    opacity: 1;
}

/* Slide Suivant : Aperçu à droite */
.posRight1 {
    transform: translate3d(45%, 0, -150px) scale(0.85); /* Décalé vers la droite et réduit */
    z-index: 5;
    opacity: 0.5;
}

/* Autres Slides : Cachés (sortis de l'écran à droite) */
.posLeft1, .posLeft2, .posRight2 {
    transform: translate3d(150%, 0, -500px);
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
   4. SECTION 1 - TABLEAU DANS LE SLIDER
   ============================================================ */

.slide-content {
    width: 100%;
    height: 100%;
    padding: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 18px;
}

.calendar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 5px;
}

.calendar-table td {
    padding: 6px 8px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 10px;
}

/* Styles colonnes spécifiques (Reprise de tes réglages) */
.calendar-table td:nth-child(1) { 
    background: #000; 
    color: #fff; 
    width: 30px; 
    border-radius: 6px 0 0 6px; 
}
.calendar-table td:nth-child(2) { 
    background: #fff; 
    color: #000; 
}
.calendar-table td:nth-child(3) { 
    background: #fff; 
    color: #666; 
    font-size: 8px; 
}
.calendar-table td:nth-child(4) { 
    background: #d60000; 
    color: #fff; 
    width: 70px; 
    border-radius: 0 6px 6px 0; 
    }

/* Statut par défaut (Vert) */
.status-ok { background: #008000 !important; color: #fff; }

/* Statut en attente (Orange) */
.status-pending { background: #ffae00 !important; color: #fff; }

/* Statut annulé ou passé (Rouge) */
.status-off { background: #d60000 !important; color: #fff; }

/* ============================================================
   5. SECTION 2 : POST-ITS
   ============================================================ */

.section2 {
    background-image: url('../img/background-slide2.png');
    padding-top: 80px; /* Ajuste selon ton besoin, mais pas de marge négative */
    overflow-y: auto;  /* Si le contenu est trop grand, on scroll dedans, mais la section reste calée */
	padding-top: 150px;
}

.postit-container-global {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 15px;
    position: relative;
    transform: none;
    inset: auto;
}

.postit-large, .postit-small {
    position: relative;
    background: linear-gradient(180deg, #65C7F7 0%, #ffffff 100%);
    padding: 40px 20px 20px;
    border-radius: 5px;
    color: #333;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
}

.postit-large {
    position: relative;
    display: block;
    width: 85vw;
    max-width: 300px;
    height: 25vh;
    min-height: 150px;
    margin: 0 auto;
    inset: auto; 
    transform: none;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 10px 15px 15px 15px; 
    box-sizing: border-box;
    overflow-y: auto;
}
  
.postit-large h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    line-height: 1.2;
	text-align: center;
}  

.postit-small-group {
	display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 90%;
    margin: 0 auto;
	text-align: center;
}

.postit-small {
    width: 100%;
    height: 11vh;
    min-height: 110px;
    position: relative;
    inset: auto;
    padding: 0px;
    box-sizing: border-box;
}

.postit-small h4 {
    font-size: 0.9rem;
    margin: 15px;
    line-height: 1.1;
	text-align: center;
}
  
.postit-small p {
    font-size: 0.85rem;
    line-height: 1.2;
}  

.postit-logo {
    position: absolute;
    bottom: 10px; 
	right: 10px;
    width: 60px;
    transform: rotate(-5deg);
}

.postit-small .download-pdf {
    font-size: 0.75rem;
    text-decoration: none;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding-left: 10px; 
    text-align: left;   
    width: 100%;
}

.postit-small .download-pdf i {
    font-size: 1.2rem;        /* Taille de l'icône PDF */
    flex-shrink: 0;           /* Empêche l'icône de s'écraser si le texte est long */
}

/* ============================================================
   6. SECTION 3 : LIVE TIMING
   ============================================================ */

.section3 {
    background-image: url('../img/background-slide1.png');
    height: 100dvh;
    width: 100vw;
    display: flex;
    flex-direction: column;
	justify-content: space-between;
    overflow: hidden;
    padding-top: 100px; /* Ajustez cette valeur selon la hauteur de votre header blanc */
	position: relative;
}

.section-live {
    flex-shrink: 0;
    z-index: 5;
    background: linear-gradient(90deg, #65C7F7 0%, #0052D4 50%, #65C7F7 100%);
    padding: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.live-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.arrow-left, .arrow-right {
    width: 80px; /* Taille mobile */
    height: 50px;
    background: #1e3a8a;
    animation: blink 6s infinite;
}

.arrow-left { clip-path: polygon(0% 0%, 80% 0%, 100% 50%, 80% 100%, 0% 100%, 20% 50%); }
.arrow-right { clip-path: polygon(100% 0%, 20% 0%, 0% 50%, 20% 100%, 100% 100%, 80% 50%); }

.live-button {
    width: 50px; height: 35px;
    background-color: #ef4444;
    color: white; border: none; border-radius: 4px;
}

/* On s'assure que la section 3 est bien le parent de référence */
.section3 {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Le conteneur du Live (quand tu l'actives dans F12) */
#livetiming-container {
    position: absolute;
    top: 100px;         /* Ajuste pour être juste sous le bandeau bleu LIVE */
    bottom: 0;          /* Touche le bas de l'écran (cache le footer) */
    left: 0;
    right: 0;
    z-index: 9999;      /* Passe devant tout */
    background: #000;
	height: calc(100vh - 100px); /* L'iframe fera exactement la taille restante */
    max-height: calc(100vh - 100px);
    overflow: hidden;
}

#livetiming-container iframe {
    width: 100%;
    height: 100%;
    border: none;
	display: block;
}

/* Ton message d'indisponibilité (Lui reste centré normalement) */
#no-live-message {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
	min-height: 0;
	font-size: 30px;
    z-index: 1;         /* Niveau inférieur */
}

/* ============================================================
   7. MODALE & DIVERS
   ============================================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    justify-content: center; align-items: center;
}

.modal-content {
    max-width: 95%; max-height: 70%;
    border: 2px solid #fff; border-radius: 10px;
}

.close {
    position: fixed; top: 15px; right: 25px;
    color: #fff; font-size: 50px; cursor: pointer;
    z-index: 10005;
}

@keyframes blink { 0%, 50%, 100% { opacity: 1; } 25%, 75% { opacity: 0.4; } }

/* Masquer les flèches de navigation PC sur mobile */
.arrow { display: none !important; }