/* --- Variables & Styles Généraux --- */
:root {
    --bg-color: #faf9f6; /* Blanc cassé / lin très doux, idéal pour un site d'art */
    --text-color: #2c2c2c;
    --accent-color: #d35400; /* Touche chaleureuse rappelant la terre/peinture */
    --accent-hover: #b94600;
    --nav-bg: #ffffff;
    --border-color: #e0deda;
    --font-main: 'Genos', sans-serif;
    --font-title: 'Poiret One', cursive;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    font-size: 1.1rem;
}

/* --- En-tête & Navigation --- */
header {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.logo a {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 1px;
}

/* Menu Burger (Mobile) */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
}

.burger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}

/* Navigation par défaut (Desktop) */
.site-nav {
    display: none; /* Masqué sur mobile par défaut, affiché via JS ou media query */
    background: var(--nav-bg);
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
}

.site-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.site-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-nav a:hover, .site-nav a.active {
    color: var(--accent-color);
}

/* --- Sous-menu (Dropdown) --- */
.has-submenu {
    position: relative;
}

/* Zone tampon invisible pour le survol */
.has-submenu::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
}

.site-nav .submenu {
    display: none !important; /* Force le masquage indépendamment du flex parent */
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 150px;
    border-radius: 4px;
    z-index: 1001;
    flex-direction: column; /* Annule le flex horizontal s'il y en a un */
}

.submenu li {
    width: 100%;
}

.submenu li a {
    display: block;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    color: var(--text-color);
}

/* Affichage au survol sur desktop */
@media (min-width: 768px) {
    .has-submenu:hover .submenu {
        display: block !important;
    }
}


/* --- Styles de la Biographie --- */
.bio-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
}

.bio-subtitle {
    font-family: var(--font-title);
    font-size: 1.5rem;
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-weight: 600;
}

.bio-container p {
    margin-bottom: 1.2rem;
}

.bio-end-mark {
    color: var(--accent-color);
    font-size: 0.9rem;
    vertical-align: middle;
    margin-left: 0.3rem;
}


/* --- Sections Principales --- */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
    border-bottom: none;
}

/* --- Section Hero en Pleine Largeur --- */
#hero {
    text-align: center;
    padding: 14rem 1rem;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    
    background-image: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.35)), 
                      url('../images/plage_b.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--border-color);
}

#hero h1 {
    font-family: var(--font-title);
    font-size: 4.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}

#hero p {
    font-size: 1.5rem;
    color: #f1f1f1;
    font-style: italic;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

h2 {
    font-family: var(--font-title);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 1px;
}


/* --- Formulaire de Contact Moderne --- */
.contact-form {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fcfcfc;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(211, 84, 0, 0.1);
}

.btn-send {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-family: var(--font-main);
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
}

.btn-send:hover {
    background-color: var(--accent-hover);
}


/* --- Footer --- */
.footer {
    background: #222;
    color: #ccc;
    text-align: center;
    padding: 3rem 1.5rem;
    font-size: 0.95rem;
}

.social-links {
    margin-bottom: 1.5rem;
}

.social-links a {
    color: #ccc;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.2s;
}

.social-links a:hover {
    color: white;
}

.footer small a {
    color: #f1f1f1;
    text-decoration: underline;
}


/* --- Media Queries pour les écrans larges (Desktop) --- */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }

    header {
        position: relative;
    }

    .site-nav {
        display: block;
    }

    /* Affichage du sous-menu uniquement au survol sur desktop */
    .has-submenu:hover .submenu {
        display: block;
    }
}



/* --- Style du menu mobile (Responsive) --- */
@media (max-width: 767px) {
    header {
        position: relative;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        padding: 1rem 0;
    }

    .site-nav.open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Sur mobile, le sous-menu reste masqué par défaut au sein du menu burger */
    .has-submenu .submenu {
        position: static !important;
        display: none !important; /* Caché au repos */
        box-shadow: none;
        background: rgba(0, 0, 0, 0.02);
        padding-left: 1rem;
        margin-top: 0.5rem;
    }

    /* Si on souhaite qu'il s'affiche lorsque le parent "Les plus" est cliqué ou actif sur mobile */
    .has-submenu.active-mobile .submenu {
        display: block !important;
    }
}

/* --- Bouton "Retour en haut" (Back to top) --- */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background-color: var(--accent-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#back-to-top:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
}

/* Classe ajoutée par le JS pour l'afficher */
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Désactivation totale sur mobile et tablettes (< 768px) */
@media (max-width: 767px) {
    #back-to-top {
        display: none !important;
    }
}

/* --- SECTION ÉVÉNEMENTS (LISTE VERTICALE) --- */
.events-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.events-block {
    margin-bottom: 3.5rem;
}

.events-subtitle {
    font-family: var(--font-title);
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.events-subtitle i {
    color: var(--accent-color);
    font-size: 1.4rem;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-card {
    display: flex;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card.upcoming:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
}

.event-date {
    background-color: var(--accent-color);
    color: #ffffff;
    width: 130px;      /* Largeur fixe identique pour toutes les cartes */
    flex-shrink: 0;    /* Empêche la boîte de se déformer selon le texte à droite */
    padding: 1.2rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.event-date .day {
    font-family: var(--font-title);
    font-size: 1.7rem;
    font-weight: bold;
    line-height: 1.1;
}

.event-date .month {
    font-size: 0.9rem;
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-details {
    padding: 1.4rem 1.8rem;
    flex-grow: 1;
}

.event-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.event-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background-color: rgba(211, 84, 0, 0.12);
    color: var(--accent-color);
}

.event-details h4 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0;
}

.event-location {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.7rem;
}

.event-location i {
    color: var(--accent-color);
    margin-right: 0.35rem;
}

.event-desc {
    font-size: 0.98rem;
    color: #444;
    line-height: 1.55;
    margin-bottom: 0;
}

/* Style du bouton "Me contacter pour cet événement" */
.event-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.event-cta:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

/* Différenciation visuelle des événements passés */
.event-card.past {
    opacity: 0.82;
    background-color: #fafafa;
}

.event-card.past .event-date {
    background-color: #8c8c8c;
}

.past-badge {
    background-color: #e8e8e8;
    color: #666666;
}

/* Adaptation mobile */
@media (max-width: 600px) {
    .event-card {
        flex-direction: column;
    }
    .event-date {
        width: 100%;
        flex-direction: row;
        gap: 0.6rem;
        padding: 0.8rem 1rem;
    }
    .event-date .month {
        margin-top: 0;
    }
}