:root {
    --color-primary: #4caf50;
    /* Vert - symbolise l'écologie */
    --color-secondary: #8bc34a;
    /* Vert clair */
    --color-accent: #ff9800;
    /* Orange - couleur contrastante pour les boutons */
    --color-dark: #1c4f1f;
    /* Vert foncé pour les titres */
    --color-light: #f1f8e9;
    /* Vert très clair pour le fond */
    --color-text: #333333;
    /* Gris foncé pour le texte */
    --color-text-light: #ffffff;
    /* Blanc pour le texte clair */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-light);
}

/* En-tête */
header {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--color-secondary);
    opacity: 0.6;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

header h1::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 25%;
    width: 50%;
    height: 3px;
    background-color: var(--color-text-light);
}

/* Hero Section */
#hero {
    position: relative;
    width: 100%;
    margin-top: -20px;
    /* Pour chevaucher légèrement le header */
    margin-bottom: 3rem;
}

.hero-container {
    position: relative;
    height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Styles pour la vidéo en arrière-plan */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.85) 0%, rgba(46, 125, 50, 0.9) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--color-text-light);
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease-out forwards;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.6s forwards;
    opacity: 0;
}

.btn {
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-text-light);
}

.btn-primary:hover {
    background-color: #e68a00;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-light);
    border: 2px solid var(--color-text-light);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-wave svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
}

/* Conteneur principal */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Sections */
section {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

section h2 {
    color: var(--color-dark);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 10px;
}

section h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary);
}

/* Section images */
#images {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#images img {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

#images img:hover {
    transform: scale(1.02);
}

/* Section posts */
#posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.post-preview {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.post-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.post-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-preview h3 {
    padding: 1rem;
    color: var(--color-dark);
    font-size: 1.2rem;
}

.post-preview button {
    margin: 0 1rem 1rem auto;
    padding: 0.7rem 1.2rem;
    background-color: var(--color-accent);
    color: var(--color-text-light);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    align-self: flex-end;
}

.post-preview button:hover {
    background-color: #e68a00;
}

/* Pied de page */
footer {
    background-color: var(--color-dark);
    color: var(--color-text-light);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.6s ease-out forwards;
}

#images img:nth-child(2) {
    animation-delay: 0.2s;
}

#images img:nth-child(3) {
    animation-delay: 0.4s;
}

.post-preview:nth-child(1) {
    animation-delay: 0.2s;
}

.post-preview:nth-child(2) {
    animation-delay: 0.4s;
}

/* Responsive */
@media (min-width: 768px) {
    .post-preview {
        flex-direction: row;
        align-items: center;
    }

    .post-preview img {
        width: 30%;
        height: 150px;
    }

    .post-preview h3 {
        flex: 1;
    }

    .post-preview button {
        margin: 0 1rem;
    }

    #posts {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    header h1 {
        font-size: 2rem;
    }

    section {
        padding: 1.5rem;
    }

    .post-preview h3 {
        font-size: 1.1rem;
    }

    .hero-container {
        height: 500px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-container {
        height: 450px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Style pour les conteneurs de GIF/vidéo */
.gif-container {
    width: 100%;
    max-width: 800px;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    position: relative;
}

.gif-container:hover {
    transform: scale(1.02);
}

/* Style pour les GIFs et vidéos */
.gif-media {
    width: 100%;
    display: block;
    border-radius: 8px;
}

/* Légende pour les GIFs/vidéos */
.gif-caption {
    background-color: rgba(76, 175, 80, 0.8);
    color: white;
    padding: 0.8rem;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    font-weight: 500;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gif-container:hover .gif-caption {
    transform: translateY(0);
}

/* Assurez-vous que les vidéos ont la bonne taille */
video.gif-media {
    height: auto;
    max-height: 500px;
    object-fit: cover;
}