/* --- Variables CSS (Mode Clair par défaut) --- */
:root {
    --bg-main: #f8fafc;       
    --bg-secondary: #ffffff;  
    --accent: #0f172a;        
    --text-primary: #1e293b;  
    --text-secondary: #64748b; 
    --border-color: #e2e8f0;  
    --nav-bg: rgba(255, 255, 255, 0.85);
    
    --btn-primary-bg: #0f172a;
    --btn-primary-text: #ffffff;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

/* --- Variables CSS (Mode Sombre) --- */
[data-theme="dark"] {
    --bg-main: #0f172a;       
    --bg-secondary: #1e293b;  
    --accent: #f8fafc;        
    --text-primary: #f1f5f9;  
    --text-secondary: #94a3b8; 
    --border-color: #334155;  
    --nav-bg: rgba(15, 23, 42, 0.85);
    
    --btn-primary-bg: #f8fafc;
    --btn-primary-text: #0f172a;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

h1 { 
    font-family: 'Playfair Display', serif; 
    font-style: italic;
    font-size: 3.5rem; 
    font-weight: 700; 
    margin-bottom: 2rem; 
    color: var(--accent); 
    text-align: center; 
}
h2 { font-size: 1.8rem; margin: 2rem 0 1.5rem; color: var(--accent); }
p { margin-bottom: 15px; color: var(--text-secondary); }

/* --- BARRE DE NAVIGATION (OVALE FLOTTANT) --- */
.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0.6rem 1.5rem;
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 20px; 
    left: 50%;
    transform: translateX(-50%); 
    width: 90%;
    max-width: 1000px;
    z-index: 100;
    border: 1px solid var(--border-color);
    border-radius: 50px; 
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-brand { justify-self: start; }
.nav-center { display: flex; gap: 2.5rem; justify-self: center; align-items: center; }
.theme-btn { justify-self: end; }

.nav-brand { 
    font-weight: 800; 
    font-size: 1.3rem; 
    letter-spacing: -0.5px; 
    color: var(--accent); 
    position: relative;
    padding-bottom: 2px;
}
.nav-link, .dropbtn {
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.nav-brand::after, .nav-link::after, .dropbtn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease-in-out;
}
.nav-brand:hover::after, .nav-link:hover::after, .nav-link.active::after, .dropdown:hover .dropbtn::after {
    width: 100%;
}
.nav-brand:hover, .nav-link:hover, .nav-link.active, .dropdown:hover .dropbtn {
    color: var(--accent);
}

.theme-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
    transition: all 0.3s ease;
}
.theme-btn:hover { background-color: var(--bg-secondary); transform: scale(1.05); box-shadow: var(--shadow-md); }

/* --- CORRECTIF MENU DÉROULANT --- */
.dropdown { position: relative; display: inline-block; }
.dropdown-content { 
    display: none; 
    position: absolute; 
    background-color: var(--bg-secondary); 
    min-width: 160px; 
    box-shadow: var(--shadow-lg); 
    border-radius: 12px; 
    padding: 0.5rem; 
    z-index: 1; 
    top: 100%; /* Placé juste en dessous */
    margin-top: 15px; /* Décalage visuel */
    left: 50%; 
    transform: translateX(-50%); 
    border: 1px solid var(--border-color); 
}

/* Le pont invisible pour ne pas perdre le :hover */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a { color: var(--text-primary); padding: 12px 16px; border-radius: 8px; font-weight: 500; display: block;}
.dropdown-content a:hover { background-color: var(--bg-main); color: var(--accent); transform: translateY(-2px); }

/* --- Contenu Principal --- */
main { flex: 1; padding: 150px 20px 40px; max-width: 1200px; margin: 0 auto; width: 100%; }

.hero { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 20px; margin-top: 150px; margin-bottom: 40px; }
.hero-content { max-width: 1000px; }
.hero-title { font-family: 'Playfair Display', serif; font-style: italic; font-size: 4.5rem; font-weight: 700; line-height: 1.1; margin-bottom: 1.5rem; color: var(--accent); }
.hero-title span { color: var(--text-secondary); }
.hero-text { font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 2.5rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero + main { padding-top: 0; max-width: 1200px; }

.cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn { padding: 0.75rem 1.5rem; border-radius: 50px; font-weight: 600; transition: all 0.2s ease-in-out; border: 2px solid transparent; display: inline-block; }
.btn-primary { background-color: var(--btn-primary-bg); color: var(--btn-primary-text); box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); filter: brightness(110%); }
.btn-secondary { background-color: transparent; border-color: var(--accent); color: var(--accent); }
.btn-secondary:hover { background-color: var(--accent); color: var(--bg-main); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; margin-top: 20px; }
.bento-card { border-radius: 16px; padding: 30px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid var(--border-color); min-height: 220px; background-color: var(--bg-secondary); text-decoration: none;}
.bento-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.btn-top-1 { grid-column: span 6; background-color: var(--btn-primary-bg); color: var(--btn-primary-text); justify-content: flex-start; }
.btn-top-2 { grid-column: span 3; justify-content: flex-start; }
.btn-top-3 { grid-column: span 3; justify-content: flex-start; }

.btn-lx { grid-column: span 4; background: linear-gradient(135deg, #334155 0%, #0f172a 100%); color: white; border: none; }
.btn-lx h3 { font-family: 'Inter', sans-serif; font-style: normal; font-size: 1.3rem; margin-bottom: 8px; position: relative; z-index: 2; color: white;}
.btn-lx p { font-size: 0.9rem; position: relative; z-index: 2; color: #cbd5e1; margin-bottom: 0;}
.watermark { position: absolute; top: 10px; right: 15px; font-size: 6rem; font-weight: 800; color: rgba(255, 255, 255, 0.05); z-index: 1; line-height: 1; pointer-events: none; }

@media (max-width: 768px) { 
    .btn-top-1, .btn-top-2, .btn-top-3, .btn-lx { grid-column: span 12; min-height: 180px;} 
    .navbar { grid-template-columns: 1fr auto; }
    .nav-center { display: none; }
}

/* --- Styles de la page Contact --- */
.contact-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 1rem; background-color: var(--bg-secondary); color: var(--accent); border: 1px solid var(--border-color); border-radius: 12px; font-weight: 600; font-size: 1.1rem; margin-bottom: 15px; box-shadow: var(--shadow-sm); transition: all 0.3s ease; }
.contact-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); background-color: var(--btn-primary-bg); color: var(--btn-primary-text); }

.contact-photo-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 30px;
}

.contact-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover; /* Assure que la photo ne soit pas déformée */
    border: 4px solid var(--accent); /* Contour dynamique selon le thème clair/sombre */
    box-shadow: var(--shadow-md);
}

.card { background-color: var(--bg-secondary); padding: 25px; border-radius: 12px; margin-bottom: 25px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card h3 { font-family: 'Inter', sans-serif; font-style: normal; font-size: 1.25rem; margin-bottom: 10px; color: var(--accent); }

footer { text-align: center; padding: 2rem; color: var(--text-secondary); font-size: 0.9rem; margin-top: auto; border-top: 1px solid var(--border-color); }

/* --- Bouton Remonter en haut --- */
#backToTopBtn {
    display: none; 
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--accent);
    color: var(--bg-secondary);
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

#backToTopBtn:hover { 
    background-color: var(--text-secondary); 
    transform: translateY(-4px); 
    box-shadow: var(--shadow-lg); 
}