/* --- NOUVELLES POLICES CUSTOM --- */
        
/* 2. Bell Gothic Light pour Corps de Texte */
@font-face {
    font-family: 'Bell Gothic Light';
    /* CORRECTION D'URL: Ajout des guillemets pour une meilleure compatibilité */
    src: url('bell-gothic-light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

/* --- VARIABLES & THEMES --- */
:root {
    --bg-color: #f4f4f4;
    --text-color: #1a1a1a;
    --accent-color: #000000;
    --secondary-text: #666;
    --border-color: #e0e0e0;
    --modal-bg: #ffffff;
    --modal-overlay: rgba(255, 255, 255, 0.95);
    
    --spacing-unit: 80px;
    --transition-speed: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    --mobile-padding: 20px;
    --header-height-initial: 120px;
}

[data-theme="dark"] {
    --bg-color: #111111;
    --text-color: #ededed;
    --accent-color: #ffffff;
    --secondary-text: #a0a0a0;
    --border-color: #333333;
    --modal-bg: #1a1a1a;
    --modal-overlay: rgba(0, 0, 0, 0.95);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    /* POLICE CORPS DE TEXTE : Ajout d'une fallback font */
    font-family: 'Bell Gothic Light', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    padding-left: var(--mobile-padding);
    padding-right: var(--mobile-padding);
}

@media (min-width: 769px) {
    body {
        padding-left: 0;
        padding-right: 0;
    }
}


/* --- LOADING SCREEN (inchangé) --- */
#loader {
    position: fixed; top: 0; left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    z-index: 9999;
    display: flex; justify-content: center; align-items: center; flex-direction: column;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
@supports (height: 100%) {
    #loader { height: 100%; }
}

.loader-content { text-align: center; }

.loader-text {
    /* POLICE LOGO LOADING : Syne Extrawide */
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 20px; letter-spacing: 2px; color: var(--accent-color);
}

.progress-bar {
    width: 200px;
    height: 2px; background: var(--border-color);
    overflow: hidden; position: relative;
    margin: 0 auto;
}

.progress-bar::after {
    content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 0%;
    background: var(--accent-color); animation: load 1.5s ease-in-out forwards;
}

@keyframes load { 0% { width: 0%; } 100% { width: 100%; } }

.loaded #loader { opacity: 0; visibility: hidden; }

/* --- TYPOGRAPHIE (inchangé) --- */
h1, h2, h3 {
    /* POLICE TITRES : Poppins */
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--accent-color); transition: color 0.5s ease;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem); line-height: 0.9;
    margin-bottom: 30px; letter-spacing: -2px;
}

h2 { font-size: 2.5rem; margin-bottom: 40px; letter-spacing: -1px; }

p {
    font-size: 1.1rem; margin-bottom: 20px;
    max-width: 600px; color: var(--secondary-text);
}

/* --- LOGO ET NAVIGATION --- */

/* 1. Correction du Logo (Retire le bleu et le soulignement par défaut) */
.brand-link {
    text-decoration: none; /* Enlève le soulignement du lien */
    color: var(--text-color); /* Assure que le texte prend la couleur normale */
}

/* 2. Correction des liens de Navigation (inclut l'effet de survol) */
nav a, footer a, .contact-text a {
    text-decoration: none; /* Supprime le soulignement par défaut */
    color: var(--text-color); /* Définit la couleur par défaut pour la navigation */
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

/* 3. Implémentation de l'effet de survol (underscore animé) */
.hover-effect::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px; /* Positionnement sous le texte */
    width: 0%;
    height: 1px; /* Épaisseur du soulignement */
    background-color: var(--accent-color);
    transition: width 0.3s ease-out; /* Animation pour l'apparition */
}

.hover-effect:hover::after {
    width: 100%; /* L'underscore apparaît au survol */
}

/* NOTE : Les liens de la liste de contact dans .contact-text conservent un soulignement simple par défaut (voir leur propre sélecteur) */
.contact-text a.hover-effect {
    color: var(--text-color); /* Assure que le téléphone est noir/blanc */
}


/* --- LOGO HEADER (inchangé) --- */
.brand {
    /* POLICE LOGO HEADER : Syne Extrawide */
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    letter-spacing: -2px;
    text-transform: uppercase;
    line-height: 1;
    transition: font-size 0.3s ease, letter-spacing 0.3s ease;
}

/* --- STRUCTURE & HEADER FIXE ET DYNAMIQUE (inchangé) --- */
.wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 769px) {
    .wrapper {
        padding: 0 20px;
    }
}

#main-header {
    display: flex; justify-content: space-between; align-items: center;
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    background-color: var(--bg-color);
    padding: 25px 40px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

main {
    padding-top: var(--header-height-initial);
}

/* Conteneur du logo et du texte */
.brand-container {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header-logo {
    height: 60px;
    width: auto;
    margin-right: 15px;
    transition: height 0.3s ease, opacity 0.3s ease;
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}


.subtitle {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 3px;
    color: var(--secondary-text); margin-top: 5px;
    transition: opacity 0.3s ease, transform 0.3s ease, height 0.3s ease, margin 0.3s ease;
}

nav ul { display: flex; gap: 40px; list-style: none; }

.hero {
    min-height: 75vh; display: flex; flex-direction: column;
    justify-content: center; padding-bottom: var(--spacing-unit);
}

/* --- ÉTAT SCROLLÉ DU HEADER (inchangé) --- */
#main-header.scrolled {
    padding: 15px 40px;
    border-bottom: 1px solid var(--border-color);
}
#main-header.scrolled .header-logo {
    height: 0;
    margin-right: 0;
    opacity: 0;
    overflow: hidden;
}
#main-header.scrolled .brand {
    font-size: 1.2rem;
    letter-spacing: 0;
}
#main-header.scrolled .subtitle {
    opacity: 0;
    transform: translateY(-5px);
    height: 0;
    margin-top: 0;
    overflow: hidden;
}

/* --- GALERIE (inchangé) --- */
.gallery-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
    padding-bottom: var(--spacing-unit);
}
.gallery-item {
    position: relative; opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.gallery-item.visible { opacity: 1; transform: translateY(0); }
.gallery-item img {
    width: 100%; height: auto; display: block;
    transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1), filter 0.5s ease;
    filter: grayscale(100%) contrast(1.1);
}
.gallery-item:hover img {
    transform: scale(0.98); filter: grayscale(0%) contrast(1);
}
.caption {
    margin-top: 15px; font-size: 0.9rem; display: flex;
    justify-content: space-between; border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

/* --- CONTACT SECTION & FORMULAIRE (inchangé) --- */
.contact-section {
    padding: var(--spacing-unit) 0; display: grid;
    grid-template-columns: 1fr 1fr; gap: 50px;
    border-top: 1px solid var(--border-color);
}
input, textarea {
    width: 100%; padding: 20px 0; background: transparent; border: none;
    border-bottom: 1px solid var(--secondary-text); color: var(--text-color);
    font-family: 'Bell Gothic Light', sans-serif;
    font-size: 1.1rem; margin-bottom: 20px;
}
input:focus, textarea:focus { outline: none; border-bottom: 1px solid var(--accent-color); }

button {
    background: transparent; border: 1px solid var(--text-color);
    color: var(--text-color); padding: 15px 40px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500; cursor: pointer; transition: all 0.3s;
}
button:hover { background: var(--text-color); color: var(--bg-color); }

.theme-toggle {
    position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px;
    border-radius: 50%; background: var(--text-color); color: var(--bg-color);
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; z-index: 999; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
/* --- MESSAGES DE STATUT FORMULAIRE (inchangé) --- */
.form-success-message, .form-error-message {
    padding: 15px;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    border-radius: 2px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, max-height 0.5s ease;
}

.form-success-message {
    /* Fond très discret */
    background-color: rgba(0, 150, 0, 0.1);
    /* Couleur du texte basée sur l'accent (ou un vert sombre) */
    color: var(--accent-color);
    border: 1px solid rgba(0, 150, 0, 0.5);
}

.form-error-message {
    /* Fond très discret */
    background-color: rgba(200, 0, 0, 0.1);
    /* Couleur du texte basée sur l'accent (ou un rouge sombre) */
    color: var(--accent-color);
    border: 1px solid rgba(200, 0, 0, 0.5);
}

.form-success-message.show, .form-error-message.show {
    opacity: 1;
    max-height: 100px; /* Assez grand pour afficher le contenu */
}
/* --- MESSAGE D'ERREUR SPÉCIFIQUE AU CHAMP (Élégant) --- */
.field-error-message {
    /* Style plus discret que le message global */
    font-size: 0.85rem;
    color: var(--accent-color);
    background-color: transparent;
    border-left: 3px solid #cc0000; /* Ligne rouge à gauche pour l'accentuation */
    padding: 5px 10px;
    margin-top: -10px; /* Remonter légèrement sous le champ */
    margin-bottom: 20px;
    font-family: 'Bell Gothic Light', sans-serif;
    font-weight: 400;
}
/* Style du bouton pendant l'envoi */
#submit-button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--text-color);
    color: var(--bg-color);
}

/* --- NOUVEAU CARROUSSEL LIGHTBOX (Swiper Modal) --- */
.swiper-modal {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--modal-overlay);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    /* Ajout du flou sur l'arrière-plan */
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}
.swiper-modal.active {
    display: flex;
}
.swiper-modal-content {
    /* Dimensions maximales de la fenêtre du carrousel */
    width: 95%;
    height: 95%;
    max-width: 1200px;
    max-height: 800px;
    position: relative;
    background: var(--modal-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    padding: 20px; /* Espace autour du swiper */
}

/* 🛠️ RÈGLE CORRIGÉE et RENFORCÉE pour la croix spécifique au carrousel */
#carousel-close {
    position: absolute;
    top: -25px;
    right: -25px;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10002;
    color: var(--accent-color);
    background: var(--modal-bg);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s ease-in-out, background 0.3s, color 0.3s;
}

#carousel-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: var(--text-color);
    color: var(--bg-color);
}

/* Style du conteneur Swiper */
.swiper {
    width: 100%;
    height: 100%;
}
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--modal-bg);
}

/* Les images à l'intérieur du carrousel */
/* Utilise flex-grow pour remplir l'espace disponible au-dessus de la légende */
.swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Adaptation des couleurs de navigation (flèches et pagination) */
.swiper-button-next, .swiper-button-prev {
    color: var(--accent-color) !important;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
}
.swiper-pagination-bullet-active {
    background: var(--accent-color) !important;
}


/* --- MODALE LÉGALE (inchangé) --- */
#legal-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--modal-overlay);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 20px;
    transition: background 0.3s ease;
}
#legal-modal.active {
    display: flex;
}
.modal-content {
    background: var(--modal-bg);
    color: var(--text-color);
    padding: 50px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
    border: 1px solid var(--border-color);
    transition: background-color 0.5s ease;
    margin-top: 5vh;
    margin-bottom: 5vh;
}
.modal-close {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary-text);
    transition: transform 0.3s ease-in-out, color 0.3s;
}
.modal-close:hover {
    transform: rotate(90deg);
    color: var(--accent-color);
}

/* --- FOOTER (inchangé) --- */
footer {
    padding: 30px 40px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--secondary-text);
}
footer a { color: var(--secondary-text); }


/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    
    #main-header, footer {
        padding-left: var(--mobile-padding);
        padding-right: var(--mobile-padding);
    }
    
    #main-header { padding-top: 15px; padding-bottom: 15px; flex-direction: column; gap: 10px; }
    #main-header.scrolled { padding-top: 10px; padding-bottom: 10px; }

    .brand { font-size: 1.8rem; }
    .subtitle { margin-top: 0; }
    #main-header.scrolled .brand { font-size: 1.2rem; }
    
    nav ul { gap: 20px; font-size: 0.9rem; }
    
    main {
        padding-top: calc(var(--header-height-initial) + 20px);
    }

    .header-logo { height: 30px; }
    #main-header.scrolled .header-logo { height: 0; }
    
    .gallery-grid { grid-template-columns: 1fr; gap: 60px; }
    .contact-section { grid-template-columns: 1fr; gap: 50px; }
    h1 { font-size: 3rem; }
    
    footer { justify-content: center; flex-direction: column; text-align: center; }
    
    .contact-form form {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .contact-form input, .contact-form textarea {
        max-width: 100%;
    }
    
    .contact-form button {
        align-self: center;
    }

    .contact-form h2 {
        text-align: left;
        width: 100%;
    }
    
    /* Carrousel Mobile */
    .swiper-modal-content {
        padding: 10px;
        width: 100%;
        height: 100%;
    }
    .swiper-button-next, .swiper-button-prev {
        transform: scale(0.7);
    }
    /* Adaptation de la croix pour le mobile */
    #carousel-close {
        top: 10px;
        right: 10px;
        font-size: 1.8rem;
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 769px) {
    #main-header { padding: 25px 40px; }
    #main-header.scrolled { padding: 15px 40px; }
    footer { padding: 30px 40px; }
    
    .contact-form button {
        align-self: flex-start;
    }
}

/* --- CURSEUR PERSONNALISÉ (CUSTOM CURSOR) --- */

/* Masquer le curseur système par défaut sur les ordinateurs */
body {
    cursor: none;
}

/* CORRECTION CRUCIALE : Supprime le curseur système par défaut sur tous les éléments interactifs. */
/* Le !important est nécessaire pour écraser les curseurs implicites ou explicites (ex: zoom-in sur .gallery-item) */
a,
button,
.gallery-item,
#theme-btn,
.modal-close,
.swiper-button-next,
.swiper-button-prev,
.swiper-pagination-bullet {
    cursor: none !important;
}


#custom-cursor {
    width: 20px;
    height: 20px;
    background-color: #FFCC00;
    border-radius: 50%;
    
    position: fixed;
    z-index: 10001; /* Assure qu'il est au-dessus du carrousel */
    pointer-events: none;
    
    top: 0;
    left: 0;
    
    transform: translate(-50%, -50%);
    opacity: 1;
    
    /* OPTIMISATION FLUIDITÉ: Indique au navigateur d'utiliser l'accélération matérielle pour le mouvement */
    will-change: transform;
    
    /* Permet le centrage du signe '+' */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* On transitionne la couleur, l'opacité et le scale/rotation pour l'effet de survol */
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Création et style du signe Plus */
#custom-cursor::before {
    content: '+';
    font-size: 14px;
    font-weight: 400;
    /* La couleur du 'plus' doit être le background pour contraster quand le cercle change de couleur */
    color: var(--bg-color);
    line-height: 1;
    opacity: 0;
    transform: translateY(-1px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Changement de style au survol */
#custom-cursor.is-hovering {
    background-color: var(--text-color);
    transform: translate(-50%, -50%) scale(1.2);
}

#custom-cursor.is-hovering::before {
    opacity: 1;
    color: var(--bg-color);
    /* Le '+' reste un '+' */
    transform: translateY(-1px);
}


/* Masquer le curseur sur mobile (écrans inférieurs à 768px) */
@media (max-width: 768px) {
    #custom-cursor {
        display: none !important;
    }
    body {
        cursor: default;
    }
}
