/* --- Structure générale --- */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f7faad;
    color: #1a1a1a;
    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;
    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;
}

a {
    display: block;
    color: #222222;
    text-align: center;
    padding: 12px 16px;
    text-decoration: none;
}

a:hover {
    background-color: #ff6600;
    color: #ffffff;
    transition: all 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;
}

/* --- Lightbox --- */
#lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(38, 50, 56, 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(77, 182, 172, 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, 102, 0, 0.05);
    border: 1px solid rgba(255, 102, 0, 0.2);
}

.tableau-bio caption p {
    font-weight: bold;
    margin-bottom: 10px;
}

.tableau-bio th,
.tableau-bio td {
    border: 1px solid rgba(255, 102, 0, 0.2);
    padding: 10px;
    text-align: center;
}

.tableau-bio th {
    background-color: rgba(255, 102, 0, 0.1);
}

.tableau-bio tr:nth-child(even) {
    background-color: rgba(255, 102, 0, 0.03);
}

.tableau-bio tr:hover {
    background-color: rgba(255, 102, 0, 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;
    background: none;
    box-shadow: 0 2px 8px #ff6600;
}

/* --- Footer --- */
#sticky-footer {
    background-color: #ffffff;
    color: #000000;
    text-align: center;
    padding: 0.7em 0;
    width: 100%;
    border-top: 2px solid #cec3c3;
    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: #f7f8f9;
    color: #222222;
    border: none;
    border-radius: 0 !important;
    padding: 7px 14px;
    font-size: 1em;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px #0002;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    min-width: 90px;
    text-decoration: none;
}

.navbtn:hover, .dropbtn:hover, .dropdown:hover .navbtn {
    background: #ff6600;
    color: #ffffff;
}

.dropdown-header {
    display: flex;
    align-items: center;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: #222222;
    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;
    /* flèche visible sur fond clair */
    color: #263238;
}

.dropdown-toggle.active .arrow {
    transform: rotate(180deg);
    color: #cca68d;
}

/* La largeur du dropdown s'adapte au bouton parent */
.dropdown-content {
    display: none;
    background-color: #ff6600 !important;
    border: 2px solid #222;
    border-radius: 0 !important;
    box-shadow: 0 4px 16px #0008;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 100;
    width: 100%;
    min-width: unset;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: #fff !important;
    padding: 10px 0;
    display: block;
    text-decoration: none;
    font-size: 1em;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    background: none !important;
    border-radius: 0 !important;
    width: 100%;
}

.dropdown-content a:hover {
    background: #263238 !important;
    color: #ffffff51 !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-header .navbtn,
.dropdown-header .dropdown-toggle {
    border-radius: 0 !important;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.dropdown-header .navbtn:hover,
.dropdown-header .dropdown-toggle:hover {
    border-color: #ff6600;
}

/* --- Responsive --- */
@media screen and (max-width: 1024px) {
    section, .article, .section_photo, .centre {
        width: 92%;
        margin: 15px auto;
    }
    
    .galerie_grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
    }
}

@media screen and (max-width: 768px) {
    /* Navigation */
    nav {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    nav ul li, nav ul li:first-child {
        width: 100%;
        margin: 0;
        height: auto;
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropdown-header {
        width: 100%;
        justify-content: space-between;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
    }
    
    .navbtn, .dropbtn {
        width: 100%;
        padding: 12px;
    }
    
    nav > div {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    #theme-toggle {
        width: 100%;
        margin: 10px 0;
    }
    
    .logo {
        justify-content: center;
        margin: 10px 0;
    }

    /* Contenu */
    .article, .section_photo, .centre {
        width: 95%;
        padding: 15px;
        margin: 10px auto;
        font-size: 1em;
    }
    
    .text2 {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
}
    
.infobox {
    width: 100%;
    max-width: 400px;
}
    
.text2 section {
    width: 100%;
}
    
/* Typographie responsive */
h1 {
    font-size: 1.8em;
    padding: 10px;
}
    
h2 {
    font-size: 1.5em;
    margin: 15px 0;
}
    
p {
    font-size: 1em;
    line-height: 1.5;
}

@media screen and (max-width: 480px) {
    section, .article, .section_photo, .centre {
        width: 98%;
        padding: 10px;
        margin: 8px auto;
    }
    
    .galerie_grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.6em;
    }
    
    h2 {
        font-size: 1.3em;
    }
    
    #btn {
        bottom: 20px;
        right: 20px;
    }
    
    #btn img {
        width: 40px;
        height: 40px;
    }
    
    .announcement {
        width: 95%;
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* CSS pour les articles (Minecraft, autre...) */

/* Article */ /** -- -- -- -- -- **/ /** -- -- -- -- -- **/
.article {
    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;
}

/* --- h2, titre - p - Centre, Section, Infobox --- */
h2, .titre {
    color: #ff6600;
    border-bottom: 2px solid #ff6600;
    padding-bottom: 10px;
    text-align: center;
    margin-top: 0;
    margin-bottom: 18px;
    font-style: italic;
    text-decoration: underline;
}

p {
    line-height: 1.6;
    color: black;
}

.centre {
    display: flex;
    justify-content: center;
    width: 85%;
    max-width: 2100px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
}

section {
    max-width: 2100px;
    width: 85%;
    margin: auto;
    padding: 20px;
    background-color: #fff;
    text-align: center;
    box-shadow: none;
    border-radius: 8px;
}

.infobox {
    flex: 0 0 250px;
    margin: 20px;
    /* largeur flexible */
    background-color: #f5f7faad;
    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;
    display: flex;
    justify-content: center;
}

.caption {
    font-size: 0.9em;
    color: black;
    margin-top: 8px;
    font-style: italic;
}


/* --- Galerie photo --- */ /** -- -- -- -- -- **/ /** -- -- -- -- -- **/
.section_photo {
    max-width: 2100px;
    width: 82.25%;
    background-color: #fff;
    box-shadow: 0 2px 8px #0002;
    border-radius: 8px;
    border: 1px solid #fff;
    margin: 20px auto;
    padding: 20px;
    font-size: 1.08em;
    text-align: justify;
    line-height: 1.7;
}

.galerie_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
    justify-items: center;
    align-items: center;
}

.galerie_photo {
    max-width: 380px;
    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);
}

/* Nouveautés style trickytrails */ /** -- -- -- -- -- **/ /** -- -- -- -- -- **/
.btn {
    background-color: rgba(255, 255, 255, 0.02);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    width: 90%;
    margin: auto;
    margin-bottom: 10px;
    padding: 8px;
    border: 2px solid transparent;
}

.btn:hover {
    background-color: rgba(255, 102, 0, 0.06);
    border-color: rgba(255, 102, 0, 0.35);
    color: white;
    cursor: pointer;
    font-size: 16px;
    width: 90%;
    padding: 8px;
    margin: auto;
    margin-bottom: 10px;

}

.page {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 25%;
    background-color: #1c1c1c;
    border: 2px solid #ff6600;
    border-radius: 8px;
    margin: 20px;
}

.sidebar h1 {
    text-align: center;
    padding: 1px;
}

.content {
    width: 75%;
}