/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Conteneur principal en grille */
.container {
    display: grid;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

/* Grille desktop (>= 768px) : 2 colonnes, ordre FD FT / F1 F2 */
@media (min-width: 768px) {
    .container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "fd ft"
            "f1 f2";
    }
}

/* Grille mobile (< 768px) : 1 colonne, ordre FT FD F1 F2 */
@media (max-width: 767px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "ft"
            "fd"
            "f1"
            "f2";
    }
}

/* Assignation des zones */
.fd { grid-area: fd; }
.ft { grid-area: ft; }
.f1 { grid-area: f1; }
.f2 { grid-area: f2; }

/* Style commun des fenêtres */
.fenetre {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Fenêtre FD */
.fd {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(135deg, #0f3460, #16213e);
}
.fd-date, .fd-heure, .fd-mjd {
    letter-spacing: 1px;
}
.fd-heure {
    font-size: 3rem;
    color: #ecb53f;
}
.fd-mjd {
    font-size: 1.2rem;
    color: #a2a8d3;
}

/* Fenêtre FT */
.ft-content {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
}
.logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
}
.ft-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;  /* Centrage horizontal du texte */
    align-items: center; /* Centrage si les lignes ont une largeur propre */
}
.ft-text p {
    margin: 10px;
    font-weight: 600;
    color: #f0f0f0;
}
/* Classes individuelles pour chaque ligne (personnalisables) */
.ft-ligne1 {
    font-size: 0.9rem;
    margin-left: 10px;
    /* Styles spécifiques si souhaité */
}
.ft-ligne2 {
    font-size: 1.1rem;
    margin-left: 10px;
    /* Styles spécifiques si souhaité */
}
.ft-ligne3 {
    font-size: 1.1rem;
    margin-left: 10px;
    font-size: 1.5rem;
    color: #e94560;
    font-weight: bold;
    margin-top: 5px;
}

/* Adaptation mobile de la fenêtre FT */
@media (max-width: 767px) {
    .ft-content {
        flex-direction: column;
        text-align: center;
    }
    .logo {
        width: 120px;
        height: 120px;
    }
    .ft-text {
        text-align: center;
        align-items: center;
    }
    .fd {
        font-size: 1.4rem;
    }
    .fd-heure {
        font-size: 2rem;
    }
}

/* Fenêtres images F1 / F2 */
.f1, .f2 {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.image-link {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid #0f3460;
    transition: transform 0.2s, box-shadow 0.2s;
}
.image-link:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.6);
}
.image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.legende {
    margin-top: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #ddd;
    text-align: center;
}