/* --- Structure générale --- */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #cccccc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1;
}

/* --- Header --- */
header {
    background-color: #ff6600;
    color: #ffffff;
    padding: 0.3em;
    text-align: center;
}

/* --- Navbar --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

ul {
    display: flex;
    gap: 18px; /* réduit l'espace entre les boutons */
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

li {
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
}

ul li:first-child {
    margin-left: 18px; /* espace Accueil du bord */
}

a {
    display: block;
    color: #ffffff;
    text-align: center;
    padding: 12px 16px;
    text-decoration: none;
}

a:hover {
    background-color: #444444;
    color: #ffffff;
    transition: background-color 0.3s ease;
    border-radius: 0 !important;
}

#theme-toggle {
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px #0002;
}

#theme-toggle:hover {
    background: #fff;
    color: #ff6600;
}

.logo {
    position: relative;
    display: flex;
    align-items: center;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 8px #0008;
    vertical-align: middle;
}

.logo[title]:hover::after {
    content: attr(title);
    position: absolute;
    right: -10px;
    top: 100%;
    background: #222;
    color: #ff6600;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.95em;
    white-space: nowrap;
    box-shadow: 0 2px 8px #0008;
    z-index: 100;
    margin-top: 8px;
    left: auto;
    transform: none;
}

/* --- Sections --- */
.article, .section_photo {
    margin: 0.7em 0;
    padding: 0.6em 1em;
    background: #222;
    color: #cccccc;
    border-radius: 8px;
    box-shadow: 0 2px 8px #0002;
    line-height: 1.7;
    font-size: 1.08em;
    width: 85%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
}

.titre {
    font-style: italic;
    text-decoration: underline;
    color: #ff6600;
    text-align: center; 
}

.article ul {
    margin: 0.5em 0 0.5em 1.2em;
    padding: 0;
}

.article li {
    margin-bottom: 0.3em;
    line-height: 1.5;
}

.liste_article {
    padding-left: 40px;
}

/* --- Galerie photo --- */
.galerie_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    justify-items: center;
    align-items: center;
}

.galerie_photo {
    max-width: 350px;
    margin: 10px auto;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.galerie_photo:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* --- Lightbox --- */
#lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

#lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    z-index: 1001;
    user-select: none;
    transition: color 0.2s ease;
}

#lightbox .close-btn:hover {
    color: #ff6600;
}

#lightbox .prev, #lightbox .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    user-select: none;
    z-index: 1001;
    transition: color 0.2s;
}

#lightbox .prev:hover, #lightbox .next:hover {
    color: #ff6600;
}

#lightbox .prev {
    left: 30px;
}

#lightbox .next {
    right: 30px;
}

/* --- Tableau --- */
.tableau-bio {
    border-collapse: collapse;
    width: 100%;
    max-width: 800px;
    margin: 15px auto;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tableau-bio caption p {
    font-weight: bold;
    margin-bottom: 10px;
}

.tableau-bio th,
.tableau-bio td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    text-align: center;
}

.tableau-bio th {
    background-color: rgba(255, 255, 255, 0.1);
}

.tableau-bio tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

.tableau-bio tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transition: background-color 0.3s ease;
}

/* --- Bouton haut de page --- */
#btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 1000;
    border: none;
    outline: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s;
}

#btn.show {
    opacity: 1;
    visibility: visible;
}

#btn:hover img {
    filter: brightness(1.2);
    box-shadow: 0 4px 16px #ff6600;
}

#btn img {
    border: 2px solid #666; /* gris foncé */
    background: none;
    box-shadow: 0 2px 8px #ff6600;
}

/* --- Footer --- */
#sticky-footer {
    background-color: #222;
    color: #ccc;
    text-align: center;
    padding: 0.7em 0;
    width: 100%;
    border-top: 2px solid #444444;
    font-size: 1.08em;
    margin-top: 40px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 -2px 8px #0002;
    position: static;
    z-index: 10;
}

/* --- Dropdown navbar --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    cursor: pointer;
    background: #282828;
    color: #fff;
    border: none;
    border-radius: 0 !important;
    padding: 7px 14px; /* moins de padding */
    font-size: 1em;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px #0002;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px; /* moins haut */
    min-width: 90px; /* moins large */
    text-decoration: none;
}

.navbtn:hover, .dropbtn:hover, .dropdown:hover .navbtn {
    background: #ff6600;
    color: #fff;
}

.dropdown-header {
    display: flex;
    align-items: center;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1em;
    margin-left: 4px;
    cursor: pointer;
    padding: 0;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.dropdown-toggle .arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 1.1em;
    line-height: 1;
    margin: 0;
    color: #fff;
}

.dropdown-toggle.active .arrow {
    transform: rotate(180deg);
    color: #cca68d;
}

/* La largeur du dropdown s'adapte au bouton parent */
.dropdown-content {
    display: none;
    background-color: #2a2a3a !important;
    border: 2px solid #4444aa;
    border-radius: 0 !important;
    box-shadow: 0 4px 16px #0008;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 100;

    /* Ajuste la largeur */
    width: 100%;
    min-width: unset;
    /* On supprime la largeur mini forcée */
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-header .navbtn,
.dropdown-header .dropdown-toggle {
    border-radius: 0 !important; /* rectangulaire */
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.dropdown-header .navbtn:hover,
.dropdown-header .dropdown-toggle:hover {
    border-color: #4444aa;
}

/* --- Responsive --- */
@media screen and (max-width: 768px) {
    .article, .section_photo {
        width: 98%;
        padding: 0.4em 0.2em;
    }
    .galerie_grid {
        grid-template-columns: 1fr;
    }
    nav {
        flex-direction: column;
        height: auto;
        padding: 10px 10px;
    }
    ul {
        gap: 12px;
    }
    .text2 {
        flex-direction: column;
        align-items: center;
    }

    .infobox {
        width: 80%;
    }
    
    .text2 section {
        width: 90%;
    }
}

/* --- h1 - h2 - p - section --- */
h2 {
    color: #ff6600;
    border-bottom: 2px solid #ff6600;
    padding-bottom: 10px;
}
p {
    line-height: 1.6;
    color: #cccccc;
}
section {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #2c2c2c;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}
/* --- Classes --- */

/** text et photo "Chase the skies" **/

.centre {
    display: flex;
    justify-content: center;
    margin: 20px auto;
    max-width: 1200px;
    /* largeur*/
    padding: 20px;
}

.text2 {
    display: flex;
    flex-wrap: wrap;
    /* colonne */
    background-color: #2c2c2c;
    border-radius: 10px;
    padding: 20px;
    gap: 20px;
    /* espace entre texte et image */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.infobox {
    flex: 0 0 250px;
    /* largeur flexible */
    background-color: #333232;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    /* effet hover */
}

.infobox:hover {
    transform: scale(1.05);
    /* zoom au survol */
}

.infobox img {
    width: 100%;
    /* l’image prend toute la largeur de la boîte */
    height: auto;
    border-radius: 8px;
}

.caption {
    font-size: 0.9em;
    color: #ccc;
    margin-top: 8px;
    font-style: italic;
}

.text2 section {
    flex: 1;
    min-width: 300px;
    color: #cccccc;
    line-height: 1.6;
}

section,
.article,
.section_photo {
    max-width: 1200px;
    width: 85%;
    margin: 20px auto;
    padding: 20px;
    background-color: #2c2c2c;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid #333;
    color: #cccccc;
    text-align: center;
}

h2, .titre {
    color: #ff6600;
    border-bottom: 2px solid #ff6600;
    padding-bottom: 10px;
    text-align: center;
    margin-top: 0;
    margin-bottom: 18px;
}