/* General body */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #f0f4f9;
    font-family: "Tahoma", sans-serif;
    color: #222;
    display: flex;
    flex-direction: column;
}

/* Top header */
#en-tete {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #3366cc, #254a99);
    color: white;
    padding: 1rem;
}

#en-tete h4 {
    font-size: 1.1rem;
    margin: 0.3rem 0;
}

#en-tete h3 {
    font-size: 1.2rem;
    margin: 0.3rem 0;
}

/* Main header */
#tete {
    background: linear-gradient(135deg, #3366cc, #254a99);
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: center;
}

#tete h2 {
    font-size: 2.2rem;
    margin: 0.5rem 0;
}

#tete h1 {
    font-size: 3rem;
    margin: 0.5rem 0;
}

.tete-left {
    text-align: center;
}

.tete-right img {
    max-width: 160px;
    height: auto;
}

/* Content area */
#content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 2rem 0 4rem 0; /* bottom padding so footer doesn’t overlap */
}

/* Navigation layout */
#navigation {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem; /* keeps cards away from screen edges */
}

/* Year cards (buttons) */
.year-card {
    background: linear-gradient(135deg, #3366cc, #254a99);
    color: white;
    font-size: 1.3rem;
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 15px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.year-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #254a99, #3366cc);
}

/* Footer stays at bottom of page, not fixed */
#pied {
    background: linear-gradient(135deg, #254a99, #3366cc);
    color: white;
    padding: 1rem;
    text-align: center;
    margin-top: auto; /* pushes footer to bottom if page is short */
}
#pied h5 {
    margin: 0;
    font-size: 1em;
}
/* Responsive (phones) */
@media (max-width: 768px) {
    /* Make header & footer stretch edge to edge */
    #en-tete,
    #tete,
    #pied {
        width: 100%;
        margin: 0;
        border-radius: 0;
        box-sizing: border-box; /* prevents overflow */
    }

    #tete {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem; /* same side padding as footer */
    }

    .tete-right {
        margin-bottom: 1rem;
    }
    .tete-right img {
        max-width: 120px;
    }

    /* Buttons: stacked with equal left/right spacing */
    #navigation {
        grid-template-columns: 1fr !important;
        width: 100%;
        max-width: none;
        padding-left: 1rem;
        padding-right: 1rem;
        gap: 2rem;
        box-sizing: border-box;
    }

    .year-card {
        width: 100%;
        margin: 0.5rem 0;
        box-sizing: border-box; /* respects parent padding */
    }
}
