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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
    padding: 20px;
}

/* ===== Style de la barre de navigation ===== */

#nav {
    font-size: 20px;
    gap:10px;
    list-style-type: none;
    display: flex;
    background-color: #2c3e50;
    padding: 10px 20px;
    border-radius: 5px;
    justify-content: center;
    flex-wrap: nowrap;
    position: relative; /* pour positionner le logo par rapport à ce conteneur */
    min-height: 50px; /* ajustez selon la hauteur réelle de votre logo */
}

#nav li {
    margin-right: 25px;
    flex-shrink: 0; /* empêche l'image de forcer un débordement bizarre */
}

#nav li:first-child {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 0; /* on annule le margin-right existant */
}

#nav li:last-child {
    margin-right: 0;
    /* on retire margin-left: auto puisqu'on ne pousse plus à droite */
}

#nav img {
    width: 150px; /* taille desktop par défaut */
    max-width: 100%;
    height: auto;
    display: block;
}

#nav a {
    color: white;
    text-decoration: none;
    font-size: 2em;
    padding: 20px 15px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    font-weight: bold;
}

#nav a:hover {
    background-color: #3498db;
    transform: scale(1.10);
}

#nav li.titre {
    font-family:Verdana;
    text-align: center;
    margin-right: 150px;
    margin-left: 150px;
    margin-top: 25px;
    font-size:60px;
    color: white;
}

/* ===== Style du contenu principal ===== */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#nav_snt {
    font-size: 18px;
    list-style-type: none;
    display: flex;
    background-color: #51BDB4;
    padding: 10px 20px;
    border-radius: 5px;
    justify-content: center;
    flex-wrap: wrap;
}
#nav_snt li {
    margin: 10px;
    padding: 10px 15px;
}
#nav_snt a {
    color: white;
    text-decoration: none;
    font-size: 2em;
    background-color: #5175BD;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    font-weight: bold;
}
#nav_snt a:hover {
    background-color: #83BD51;
    transform: scale(1.10);
}

@keyframes clignoter {
  0%, 50% { color: red; }
  51%, 100% { color: inherit;}
}

#clignote {font-size:30px;
  animation: clignoter 1s step-start 10;
}

.hero {
    text-align: center;
    padding: 20px;
    margin-left: 30px;
    margin-bottom: 30px;
    background-color: #3498db;
    color: white;
    border-radius: 8px;
}

.hero h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.1em;
}

h1.summary { text-align: center; }
h1.titre { color: white; }

h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}
h2.centre { text-align: center; }

.actualites, .ressource {
    margin-bottom: 30px;
}

.intro {
    margin: 20px;
    font-size: 1.2em;
    font-style: italic;
}

.actualite, .ressource, .cours {
    background-color: #ecf0f1;
    padding-left: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
    font-size: 20px;
}

.cours ol {
    margin-left: 30px;
    margin-bottom: 20px;
    line-height: 2em;
    font-weight: bold;
}
.cours ul { margin-left: 50px; }

.ressource h1 { text-align: center; }
.ressource ul {
    margin-left: 20px;
    line-height: 2em;
    font-weight: bold;
}

/* ===== Style du pied de page ===== */
footer {
    text-align: center;
    padding: 15px;
    background-color: #2c3e50;
    color: white;
    margin-top: 20px;
    border-radius: 5px;
}

/* ===== Responsive smartphone ===== */
@media (max-width: 768px) {
    #nav img {
        width: 60px !important;
        max-width: 60px;
        height: auto;
    }

    #nav {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px;
    }

    #nav li {
        margin-right: 0;
        margin-bottom: 10px;
    }

    #nav li:last-child {
        margin-bottom: 0;
    }

    .hero h1 {
        font-size: 1.3em;
    }

    #nav a {
        font-size: 1.3em;
        padding: 10px 12px;
    }
}
