/* Réinitialisation des marges et paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Style pour assurer que le contenu prend tout l'écran sans scrollbar */
html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Container principal */
.container {
    display: grid;
    grid-template-columns: 70% 30%;
    grid-template-rows: 18% 1fr 10%;
    grid-template-areas:
        "header header"
        "main right"
        "footer footer";
    height: 100vh;
    width: 100vw;
}

/* Style pour le header */
.header {
    grid-area: header;
    background-color: #3498db;
    background: linear-gradient( #3AA8F2, #3498db);
    color: black;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-bottom-color : #1a3a4a;
    border-bottom-width: 1px;
    border-bottom-style: solid;
   /* width: 100%; 
    height: 100%; 

    background-image: url('ressources/sevigne.png'); 
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: bottom right; 
*/
    
}
.header-image-container {
    position: absolute;
    bottom: 0;
    right: 30%; 
    width: 400px;
    height: 133px;
    background-image: url('ressources/sevigne.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    z-index: 5; /* Plus bas que `.header-content` */
}


/* Style pour le contenu principal du header */
.header-content {
    display: flex;
    align-items: center;
    z-index: 10; 

}

.header-content-title {
    display: flex;
    padding-left: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 20px;           
    margin: 0px;
    width: 100%;
    background-color:rgb(255, 255, 255);
    border-top-right-radius: 40px;
    border-bottom-right-radius: 40px;
    border-bottom-color: red;
}
/* Style pour le logo */
.hd_logo {
    margin-right: 35px;
}

.hd_logo img {
    height: 80px;
    width: auto;
}

/* Styles pour le texte de l'établissement */
.hd_sevigne1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6em;
    color: #845EC2;
    font-weight: 500;
    margin-bottom: 2px;
    letter-spacing: 0.05em;
    margin-top: 0;
}

.hd_sevigne2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em;
    color: #FF6F91;
    font-weight: normal;
    margin-top: 0;
    margin-bottom: 2px;
}

.hd_sevigne3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em;
    color: #D65DB1;
    font-style: italic;
    font-weight: 500;
    text-decoration: none;
    margin-top: 2px;
    margin-bottom: 0;
}

/* Style pour la case bleue à droite dans le header */
.header-right-box {
    width: 30%; /* Même largeur que le right panel */
    height: 100%;
    background-color: #2980b9; /* Bleu légèrement différent pour distinguer */
    background: linear-gradient( #3093D1, #2980b9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left-color : rgb(50, 50, 50);
    border-left-width: 1px;
    border-left-style: solid;
}

/* Style pour la date dans le header */
.date-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
    margin-bottom: 5px;
}

/* Style pour l'heure dans le header */
.time-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.0rem;
    font-weight: bold;
    color: white;
}

/* Style pour la date dans le header */
.saint-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
    margin-bottom: 5px;
}

/* Style pour le panneau principal */
.main-panel {
    grid-area: main;
    background: linear-gradient(135deg, #83a4d4, #b6fbff); /* Joli dégradé bleu */
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

/* Style pour l'image de fond */
.background-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Maintien le ratio */
    position: relative;
    z-index: 1;
}

/* Conteneur pour l'image et le gradient */
.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url("/ressources/background01.jpg");
    background-size: cover;

    }

/* Style pour le panneau de texte superposé */
.text-overlay {
    position: absolute;
    width: 80%; /* 80% de la taille du MainPanel */
    height: 80%; /* 80% de la taille du MainPanel */
    background-color: rgba(0, 0, 0, 0.6); /* Fond semi-transparent */
    border-radius: 20px; /* Coins arrondis */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    z-index: 2;
}

/* Style pour le texte adaptatif */
.adaptive-text {
    font-size: 4vw; /* Taille adaptative basée sur la largeur de la fenêtre */
    word-wrap: break-word;
    max-width: 100%;
}

/* Style pour le panneau droit */
.right-panel {
    grid-area: right;
    background-color: #1a3a4a;
    background: linear-gradient( #9EBEF3, #898AE7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-left-color : #1a3a4a;
    border-left-width: 1px;
    border-left-style: solid;
}


/* Style pour la section agenda (plus grande) */
.panel-section-agenda {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1; /* Permet à cette section de prendre tout l'espace disponible */
    padding-top: 10px;
    /*height: 65%; /* Panel agenda plus grand */
}

/* Style pour la section météo (plus petite) */
.panel-section-meteo {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 10px;
}



/* Style pour les titres des panels */
.panel-title {
    color:rgb(255, 255, 255); 
    font-family: 'Montserrat', sans-serif;
    font-size: 1.0rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Style pour le sous-panel supérieur (rouge) */

.right-sub-panel-top {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
    background: #FFFFFF;  
    border-radius: 15px;
    width: 96%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-top: 8px;
}

.meteo-column {
    text-align: center;
    width: 30%;
    padding: 4px;
    background: #009FF3;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #193CBE;
}

.meteo-column img {
    width: 80px;
    height: 60px;
}

.meteo-column h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    /*margin-bottom: 5px;*/

}

.meteo-column p {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: bold;

}


/* Style pour le sous-panel inférieur (bleu) - agenda */
.right-sub-panel-bottom {
    background-color: #FFFFFF;
    border-radius: 15px;
    width: 96%;
    height: 90%;
    display: flex;
    flex-direction: column;
    padding: 10px;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

/* Style pour l'agenda défilant */
.agenda-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* MODIFICATION DE L'ANIMATION POUR AFFICHAGE IMMÉDIAT */
.agenda-scroll {
    position: absolute;
    width: 100%;
    /* L'animation démarre avec le contenu visible (0%) et non plus hors écran (100%) */
    animation: none; /* Animation définie par JS */
}

/* Animation modifiée pour le défilement vertical continu */
@keyframes scroll-vertical-continuous {
    0% { transform: translateY(0); }
    100% { transform: translateY(calc(-50% - 10px)); } /* -50% pour boucler à mi-chemin */
}

/* Style pour le tableau de l'agenda */
.agenda-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Montserrat', sans-serif;
}

.agenda-table td {
    padding: 6px 4px;
    vertical-align: top;
    border-bottom: 1px solid rgba(31, 192, 210, 0.8);
}

.agenda-date {
    font-weight: 600;
    color: #B62290; /* Jaune */
    white-space: nowrap;
    width: 28%;
    text-align: left;
}

.agenda-event {
    font-size: 0.85rem;
    line-height: 1.3;
    padding-left: 5px;
    color: #2A2FBF; /* Jaune */
}

/* Style pour le footer */
.footer {
    grid-area: footer;
    background-color: #1a3a4a;
    background: linear-gradient( #3093D1, #2980b9);
    background: linear-gradient( #A09FFD, #728EFB);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    overflow: hidden;
    position: relative;
    border-top-color : #1a3a4a;
    border-top-width: 1px;
    border-top-style: solid;
    font-family: 'Montserrat', sans-serif;

}

.scrolling-text {
    position: absolute;
    white-space: nowrap;
    display: flex; /* Permet de dupliquer proprement */
    animation: scroll-left linear infinite;
    animation-duration: var(--scroll-duration);
    will-change: transform;
}

/* Animation sans temps mort */
@keyframes scroll-left {
    0% { transform: translateX(0); } /* Départ immédiat */
    100% { transform: translateX(-50%); } /* Déplacement en continu */
}

/* Media queries pour différentes tailles d'écran */
@media screen and (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr 1fr 80px;
        grid-template-areas:
            "header"
            "main"
            "right"
            "footer";
    }
    
    .header {
        flex-direction: column;
        padding: 10px 0;
        height: auto;
    }
    
    .header-content {
        margin-bottom: 10px;
    }
    
    .header-right-box {
        width: 100%;
        padding: 10px 0;
    }
    
    .right-panel {
        padding: 15px;
    }
    
    .panel-section-meteo,
    .panel-section-agenda {
        margin: 10px 0;
    }

    .adaptive-text {
        font-size: 8vw; /* Taille adaptative plus grande sur mobile */
    }

    .agenda-event {
        font-size: 0.75rem;
    }
}