/* --- VARIABLES ET PARAMÈTRES GLOBAUX --- */
:root {
    --dark-bg: #0B0F19;
    --light-bg: #f8f9fa;
    --text-light: #EAEAEA;
    --text-dark: #333333;
    --accent-gold: #c5a975;
    --accent-gold-darker: #ab9161;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Lato', sans-serif;
    --section-padding: 5rem 0;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Comportement de défilement natif */
}

body {
    font-family: var(--font-sans);
    background-color: #ffffff;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- CLASSES UTILITAIRES --- */
.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-bg);
}

.bg-light {
    background-color: var(--light-bg);
}

/* --- EN-TÊTE ET NAVIGATION --- */
.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text-light);
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
}
.logo strong {
    font-weight: 400;
    opacity: 0.8;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 400;
    font-size: 1rem;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-gold);
    transition: width 0.3s ease-out;
}

.main-nav a:hover {
    color: var(--accent-gold);
}

.main-nav a:hover::after {
    width: 100%;
}


/* --- SECTION HÉROS --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Aligner le contenu à gauche */
    text-align: left;
    color: var(--text-light);
    /* REMPLACEZ L'URL CI-DESSOUS PAR CELLE DE VOTRE IMAGE */
    background: url('../images/main_background.jpg') no-repeat center center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(11, 15, 25, 0.85) 0%, rgba(11, 15, 25, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 6vw, 4.5rem); /* Taille de police responsive */
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero .subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
}

.cta-button {
    background-color: var(--accent-gold);
    color: var(--dark-bg);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease; /* Add color to transition */
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--accent-gold-darker);
    transform: translateY(-3px);
    color: white; /* Make text white on hover */
}

/* --- SECTIONS DE CONTENU --- */
.content-section {
    padding: var(--section-padding);
}

/* --- Grille Recherche --- */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: #ffffff;
    padding: 2.5rem 2rem;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.card h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--dark-bg);
    margin-bottom: 1rem;
}

/* --- Grille Équipe --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}
.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.team-member h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
}
.team-member p {
    color: #6c757d;
}

/* --- Liste Publications --- */
.publication-list {
    max-width: 800px;
    margin: 0 auto;
}
.publication-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
}
.publication-item:last-child {
    border-bottom: none;
}
.publication-item h4 a {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.3rem;
    text-decoration: none;
    color: var(--dark-bg);
    transition: color 0.3s ease;
}
.publication-item h4 a:hover {
    color: var(--accent-gold);
}
.publication-item p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* --- PIED DE PAGE --- */
.footer {
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 4rem 0 2rem 0;
}
.footer-content {
    display: grid;
    /* Force 3 columns of equal width for larger screens */
    grid-template-columns: repeat(3, 1fr); 
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Adjustments for footer columns to ensure consistent spacing */
.footer-col {
    min-width: 250px; /* Ensure columns don't get too narrow before stacking */
}

.footer-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}
.footer p, .footer-nav li {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}
.footer-nav {
    list-style: none;
}
.footer-nav a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-nav a:hover {
    color: var(--accent-gold);
}
.footer-col a[href^="mailto:"] {
    color: var(--text-light);
    text-decoration: none;
}
.footer-col a[href^="mailto:"]:hover {
    color: var(--accent-gold);
    text-decoration: underline; /* Optionnel : souligner au survol pour montrer que c'est cliquable */
}
.cta-button-footer {
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.8rem 1.8rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 1rem;
}
/* This rule was correct and will now be effective */
.cta-button-footer:hover {
    background-color: var(--accent-gold);
    color: var(--dark-bg); /* This was the color you saw 'disappearing' */
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.6;
}

/* --- ANIMATIONS & RESPONSIVE --- */
.fade-in {
    opacity: 0;
    animation: fadeInAnimation 1s ease-out forwards;
}
@keyframes fadeInAnimation {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-content .fade-in:nth-child(1) { animation-delay: 0.3s; }
.hero-content .fade-in:nth-child(2) { animation-delay: 0.5s; }
.hero-content .fade-in:nth-child(3) { animation-delay: 0.7s; }

.anim-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.anim-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .section-title { font-size: 2.2rem; }
    .header-container { flex-direction: column; gap: 1rem; }
    .main-nav ul { padding: 0; margin-top: 1rem; }
    .hero { justify-content: center; text-align: center; background-position: top center; }
    .hero h1 { font-size: 2.5rem; }
    .hero-overlay { background: rgba(11, 15, 25, 0.7); }
    /* Stack columns on smaller screens for footer */
    .footer-content { 
        grid-template-columns: 1fr; /* Single column layout */
        gap: 2rem; /* Adjust gap for stacking */
        text-align: center; /* Center content when stacked */
    }
    .footer-col {
        padding: 0; /* Remove horizontal padding when stacked */
    }
}

/* --- Styles spécifiques ajoutés pour le formulaire et les boutons du footer --- */

/* Styles for the newsletter form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.newsletter-form input[type="email"] {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: #fff; /* Ensure background is white for contrast */
    color: #333; /* Darker text for readability */
}

.newsletter-form button.cta-button-footer {
    width: 100%;
    text-align: center;
}

/* Custom styles for newsletter button (S'inscrire) */
.cta-button-footer.newsletter-button {
    background-color: var(--accent-gold); /* Gold color from variables */
    color: white; /* White text */
    border: 1px solid var(--accent-gold);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button-footer.newsletter-button:hover {
    background-color: var(--accent-gold-darker); /* Slightly darker gold on hover from variables */
    color: white; /* Text remains white */
}

/* Custom styles for contact button (Envoyer un message) */
.cta-button-footer.contact-button {
    background-color: transparent;
    color: var(--accent-gold); /* Gold text */
    border: 1px solid var(--accent-gold); /* Gold border */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button-footer.contact-button:hover {
    background-color: var(--accent-gold); /* Gold background on hover */
    color: white; /* Text is white on hover */
}

/* --- Popup Styles --- */
#status-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex; /* Always use flex for positioning content */
    justify-content: center;
    align-items: center;
    visibility: hidden; /* Use visibility instead of display for transition */
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

#status-popup.show {
    visibility: visible;
    opacity: 1;
}

#status-popup > div { /* Modal content */
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease-in-out;
}

#status-popup.show > div {
    transform: translateY(0);
}

#status-popup h3 {
    font-family: var(--font-serif);
    color: var(--accent-gold);
    margin-bottom: 15px;
}

#status-popup p {
    color: var(--text-dark);
    margin-bottom: 20px;
}

#status-popup .cta-button { /* Re-use existing cta-button style */
    margin-top: 0; /* Remove default margin from cta-button if it's there */
    padding: 0.8rem 1.5rem; /* Adjust padding for a smaller popup button */
    font-size: 0.9rem;
}