/* ========================= */
/* ===   GLOBAL STYLE    === */
/* ========================= */

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: #333;
}

a {
    color: #2e7d32;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========================= */
/* ===      HEADER       === */
/* ========================= */

header {
    background: #ffffff;
    border-bottom: 3px solid #4caf50;
    padding: 20px 0;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.4em;
    color: #2e7d32;
}

/* ========================= */
/* ===       MENU        === */
/* ========================= */

nav {
    margin-top: 10px;
}

nav a {
    margin: 0 12px;
    font-weight: bold;
    color: #2e7d32;
}

nav a:hover {
    color: #1b5e20;
}

/* Menu mobile */
.hamburger {
    display: none;
    font-size: 2em;
    cursor: pointer;
    color: #2e7d32;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
    }

    nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        display: block;
    }

    nav.open {
        max-height: 300px;
    }

    nav a {
        display: block;
        padding: 12px;
        border-bottom: 1px solid #c8e6c9;
        margin: 0;
    }
}

/* ========================= */
/* ===     CONTAINER     === */
/* ========================= */

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border: 3px solid #4caf50;
    border-radius: 8px;
}

h1, h2, h3 {
    color: #2e7d32;
    text-align: center;
}

p {
    line-height: 1.6em;
    font-size: 1.1em;
}
/* ========================= */
/* ===     GALERIES      === */
/* ========================= */

/* Galerie de l'accueil */
.gallery-accueil {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px auto;
    max-width: 1000px;
}

.gallery-accueil img {
    width: 100%;
    border-radius: 6px;
    border: 2px solid #4caf50;
    object-fit: cover;
}

/* Galerie générale */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px auto;
    max-width: 1000px;
}

.gallery img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #ccc;
    object-fit: cover;
}

/* ========================= */
/* ===      SLIDER       === */
/* ========================= */

.slider {
    overflow: hidden;
    position: relative;
}

.slides {
    display: flex;
    transition: transform 0.6s ease;
}

.slide {
    min-width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.slide img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    animation: zoomslow 18s ease-in-out infinite alternate;
}

@keyframes zoomslow {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}


/* Flèches */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: #2e7d32;
    padding: 8px 12px;
    font-size: 1.6em;
    cursor: pointer;
    border-radius: 50%;
    border: 1px solid #4caf50;
}

.prev { left: 10px; }
.next { right: 10px; }

/* Points */
.dots {
    text-align: center;
    margin-top: 10px;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: #c8e6c9;
    border-radius: 50%;
    display: inline-block;
}

.dot.active {
    background-color: #4caf50;
}

/* ========================= */
/* ===   PAGES INTERNES   === */
/* ========================= */

.page-box {
    max-width: 900px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border: 2px solid #4caf50;
    border-radius: 6px;
}

.page-box h2 {
    margin-top: 0;
    color: #2e7d32;
}

.page-box p {
    font-size: 1.1em;
    line-height: 1.6em;
}

/* Contact */
.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin: 10px 0;
    font-size: 1.1em;
}

/* À propos */
.about-text {
    font-size: 1.15em;
    line-height: 1.7em;
    text-align: center;
}
/* ========================= */
/* ===   RANDONNÉES      === */
/* ========================= */

.rando-list {
    max-width: 1000px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.rando-card {
    background: #ffffff;
    border: 2px solid #4caf50;
    border-radius: 6px;
    padding: 20px;
}

.rando-card h3 {
    margin-top: 0;
    color: #2e7d32;
    font-size: 1.6em;
}

.rando-info {
    margin-top: 10px;
    font-size: 1.1em;
    line-height: 1.6em;
}

.rando-info strong {
    color: #2e7d32;
}

/* ========================= */
/* ===       CARTES       === */
/* ========================= */

.map-container {
    width: 100%;
    height: 260px;
    margin: 15px 0;
    border: 2px solid #4caf50;
    border-radius: 6px;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================= */
/* ===     BOUTON GPX     === */
/* ========================= */

.gpx-btn {
    display: inline-block;
    padding: 10px 18px;
    background: #4caf50;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 10px;
}

.gpx-btn:hover {
    background: #2e7d32;
    text-decoration: none;
}

/* ========================= */
/* ===   FICHE RANDONNÉE  === */
/* ========================= */

.fiche-rando {
    max-width: 900px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border: 2px solid #4caf50;
    border-radius: 6px;
}

.fiche-rando h2 {
    margin-top: 0;
    color: #2e7d32;
}

.fiche-details {
    margin-top: 15px;
    font-size: 1.15em;
    line-height: 1.7em;
}

.fiche-details strong {
    color: #2e7d32;
}

/* ========================= */
/* ===   SECTIONS TEXTE   === */
/* ========================= */

.section-rando {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background: #ffffff;
    border-left: 4px solid #4caf50;
}

.section-rando p {
    font-size: 1.15em;
    line-height: 1.7em;
}
/* ========================= */
/* ===       BLOG        === */
/* ========================= */

.blog-grid {
    max-width: 1000px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.blog-card {
    background: #ffffff;
    border: 2px solid #4caf50;
    border-radius: 6px;
    padding: 20px;
}

.blog-card img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 15px;
}

.blog-card h3 {
    margin-top: 0;
    color: #2e7d32;
    font-size: 1.5em;
}

.blog-card p {
    font-size: 1.1em;
    line-height: 1.6em;
}

.blog-card a {
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
    color: #2e7d32;
}

/* Tags */
.tag-filter {
    text-align: center;
    margin-bottom: 20px;
}

.tag-filter button {
    padding: 8px 14px;
    margin: 5px;
    border: 2px solid #4caf50;
    background: white;
    color: #2e7d32;
    border-radius: 6px;
    cursor: pointer;
}

.tag-filter button:hover {
    background: #4caf50;
    color: white;
}

/* ========================= */
/* ===      FORUM        === */
/* ========================= */

.forum-container {
    max-width: 1000px;
    margin: 30px auto;
}

.category-box {
    background: #ffffff;
    border: 2px solid #4caf50;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.category-box h3 {
    margin-top: 0;
    color: #2e7d32;
}

.stats-box {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.topic-list {
    margin-top: 20px;
}

.topic-card {
    background: #ffffff;
    border: 1px solid #ccc;
    border-left: 4px solid #4caf50;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.topic-card h4 {
    margin: 0;
    color: #2e7d32;
}

.topic-card p {
    margin: 5px 0 0 0;
    font-size: 1.05em;
}

/* ========================= */
/* ===      FOOTER       === */
/* ========================= */

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background: #ffffff;
    border-top: 3px solid #4caf50;
    font-size: 1.1em;
}

/* ========================= */
/* ===    MODE NUIT      === */
/* ========================= */

body.dark {
    background: #121212;
    color: #e0e0e0;
}

body.dark .container,
body.dark .page-box,
body.dark .rando-card,
body.dark .blog-card,
body.dark .category-box,
body.dark .topic-card,
body.dark footer,
body.dark header {
    background: #1e1e1e;
    border-color: #81c784;
}

body.dark nav a {
    color: #81c784;
}

body.dark .gpx-btn {
    background: #81c784;
    color: #000;
}

body.dark .topic-card {
    border-left-color: #81c784;
}
/* ========================= */
/* ===  CADRES EN VERT   === */
/* ========================= */

/* Cadre principal des sections */
.section-accueil-rando,
.fiche-accueil,
.rando-card,
.fiche-rando,
.category-box,
.blog-card,
.page-box,
.topic-card,
.map-container {
    border: 3px solid #4caf50 !important;
    border-radius: 8px !important;
    background: #ffffff;
}

/* Les petites randonnées du haut */
.rando-mini {
    border: 3px solid #4caf50 !important;
    border-radius: 8px !important;
    background: #ffffff;
    padding: 15px;
}

/* Encadrement des titres */
.section-accueil-rando h3,
.rando-mini h3,
.fiche-accueil h3,
.rando-card h3,
.fiche-rando h2,
.blog-card h3,
.category-box h3,
.topic-card h4 {
    color: #2e7d32;
    font-weight: bold;
}

/* Encadrement des blocs de texte */
.section-accueil-rando p,
.rando-mini p,
.fiche-accueil p,
.rando-card p,
.fiche-rando p,
.blog-card p,
.topic-card p {
    font-size: 1.1em;
    line-height: 1.6em;
}

/* Carte dans un cadre vert */
.map-container iframe {
    border-radius: 6px;
}
/* ========================= */
/* ===  ACCUEIL : CADRES  === */
/* ========================= */

/* Grand cadre autour de la section Randonnées à découvrir */
.container > h2 + div,
.container > h2 + div + div,
.container > h2 + div + div + div {
    background: #ffffff;
    border: 3px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

/* Les 3 randonnées du haut */
.container > div > h3 {
    margin-top: 0;
    color: #2e7d32;
    font-size: 1.4em;
}

.container > div > p {
    font-size: 1.1em;
    line-height: 1.6em;
}

/* Fiches randonnées du bas */
.container > .fiche-rando-accueil,
.container > div .fiche-rando-accueil {
    background: #ffffff;
    border: 3px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

/* Carte dans un cadre vert */
.container iframe {
    border: 3px solid #4caf50;
    border-radius: 6px;
}
/* ========================= */
/* ===  BANDEAU ZOOM     === */
/* ========================= */

header {
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://capnature360.be/wp-content/uploads/2024/01/bandeau.jpg'); /* mets ton image */
    background-size: 110%;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    animation: zoomslow 20s ease-in-out infinite alternate;
}

@keyframes zoomslow {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}

/* Les 3 randonnées du haut dans des cadres verts */
.container h2 + div > div {
    background: #ffffff;
    border: 3px solid #4caf50;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}
/* Fiches randonnées du bas */
.container h2 + div + div + div + div {
    background: #ffffff;
    border: 3px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}
/* ========================= */
/* ===  SLIDER ZOOM LENT  === */
/* ========================= */

.slide img {
    width: 100%;
    height:250px;
    object-fit: cover;
    animation: zoomslow 18s ease-in-out infinite alternate;
}

@keyframes zoomslow {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}
/* Fiche randonnée du bas dans un cadre vert */
.container > div:last-of-type {
    background: #ffffff;
    border: 3px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}
/* Correction largeur slider */
.slider {
    overflow: hidden;
    position: relative;
}

.slides {
    display: flex;
    width: 100%;
}

.slide {
    min-width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
}

.slide img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}
.slide img {
    animation: zoomslow 18s ease-in-out infinite alternate;
}

@keyframes zoomslow {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}
/* Correction taille images Blog */
.blog-card img {
    width: 100%;
    max-width: 350px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
    border-radius: 6px;
    object-fit: cover;
}
/* Correction taille images Blog (FORCE) */
.blog-card img {
    width: auto !important;
    max-width: 300px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto 15px auto !important;
    object-fit: cover !important;
    border-radius: 6px !important;
}
/* Correction taille images page Photos */
.gallery img {
    width: 100%;
    max-width: 300px !important;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    margin: 10px auto;
    display: block;
}

/* Grille propre pour la galerie */
.gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 15px !important;
    max-width: 1000px;
    margin: 20px auto;
}

#theme-toggle img {
    width: 18px;
    height:18px;
    object-fit: contain;
    vertical-align: middle;
}

#icon-sun {
    display: block;
}

.dark-mode #icon-sun {
    display: none;
}

#icon-moon {
    display: none;
}

.dark-mode #icon-moon {
    display: block;
}
#theme-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
#theme-toggle img {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain;
    vertical-align: middle;
}

