/* =========================================
   1. VARIABLES & THÈMES
   ========================================= */
:root {
    /* --- MODE CLAIR (LIGHT) --- */
    --primary-color: #ff914d;

    /* Overlay transparent en mode clair -> Image brute et nette */
    --body-overlay: rgba(255, 255, 255, 0.0);

    --header-text: #1a1a1a;

    /* Glassmorphism Light (Un peu plus opaque pour lisibilité vu qu'il n'y a plus de voile blanc global) */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-blur: blur(12px);

    --text-main: #000000;
    /* Noir pur pour max contraste */
    --text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    /* Petit contour blanc pour détacher le texte */
    --text-muted: #222222;

    --shadow-md: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --shadow-glow: 0 0 15px rgba(255, 145, 77, 0.3);
    --radius-lg: 20px;
}

/* --- MODE SOMBRE (DARK) --- */
body.dark-mode {
    /* Overlay sombre léger maintenu */
    --body-overlay: rgba(0, 0, 0, 0.3);

    --header-text: #ffffff;

    /* Glassmorphism Dark */
    --glass-bg: rgba(30, 30, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);

    --text-main: #ffffff;
    --text-shadow: none;
    /* Pas besoin d'ombre blanche sur fond noir */
    --text-muted: #cccccc;

    --shadow-md: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* =========================================
   2. GLOBAL BODY (IMAGE DE FOND FIXE)
   ========================================= */
@font-face {
    font-family: 'Bruno Ace';
    src: url('police/BrunoAce-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Lucidity Consended';
    src: url('police/lucidity-condensed.ttf') format('truetype');
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--text-main);

    /* IMAGE DE FOND GLOBALE */
    background: linear-gradient(var(--body-overlay), var(--body-overlay)), url('../images/header-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;

    transition: color 0.3s;
}

/* Application de l'ombre de texte pour lisibilité en mode light */
p,
li,
span,
div {
    text-shadow: var(--text-shadow);
}

/* Pas d'ombre sur les titres ou boutons colorés sinon ça bave */
h1,
h2,
h3,
a.cta,
.projet-card ul li {
    text-shadow: none;
}

h1,
h2,
h3 {
    font-family: 'Lucidity Consended', 'Bruno Ace', sans-serif;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
    padding: 0;
}

/* =========================================
   3. NAVIGATION (GLASS)
   ========================================= */
nav {
    position: sticky;
    top: 20px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 1000;

    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);

    border-radius: 50px;
    padding: 10px 30px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 8px 20px;
    color: var(--text-main);
    font-weight: 600;
    /* Un peu plus gras pour lisibilité */
    border-radius: 30px;
    text-shadow: none;
    /* Net pour le menu */
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

#theme-toggle {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 15px;
}

#theme-toggle:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* =========================================
   4. HEADER (HERO)
   ========================================= */
header {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--header-text);
    margin-top: -90px;
    padding-top: 90px;
}

header img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 25px rgba(255, 145, 77, 0.5);
    margin-bottom: 20px;
    transition: transform 0.5s;
}

header img:hover {
    transform: scale(1.05);
}

header h1 {
    font-size: 3.5rem;
    margin: 0;
    /* Fond blanc derrière le texte titre en mode Light pour lisibilité absolue ? 
       Ou juste une grosse ombre portée */
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    /* Ombre légère peu importe le mode */
}

#textBonjour {
    max-width: 700px;
    margin: 20px auto;
    font-size: 1.1rem;
    color: var(--header-text);
    font-weight: 600;
    background: var(--glass-bg);
    /* Petit fond glass pour le texte d'intro */
    padding: 15px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

header a {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 30px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    color: var(--primary-color);
    font-weight: bold;
    backdrop-filter: blur(5px);
    text-shadow: none;
}

header a:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 20px rgba(255, 145, 77, 0.4);
}

/* =========================================
   5. SECTIONS (TRANSPARENTES)
   ========================================= */
section {
    padding: 80px 0;
}

#aPropos,
.gris-container,
.blanc-container {
    background-color: transparent;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    position: relative;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

/* A Propos */
.aPropos-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;

    /* GLASS PANEL GLOBAL */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--glass-border);
}

.colonne {
    flex: 1;
    min-width: 300px;
}

.colonne.gauche img {
    width: 100%;
    max-width: 320px;
    border-radius: var(--radius-lg);
    display: block;
    margin: 0 auto;
    box-shadow: 10px 10px 0 var(--primary-color);
}

.colonne.droite {
    text-align: left;
    color: var(--text-main);
}

/* =========================================
   6. CARTES (GLASS)
   ========================================= */
.etudes>div,
.projet-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);

    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, border-color 0.3s;
}

/* ETUDES */
.etudes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.etudes>div {
    flex: 1 1 300px;
    padding: 2rem;
}

.etudes>div:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.etudes h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.etudes p {
    color: var(--text-main);
}

/* PROJETS */
.projets-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.projet-card {
    width: 350px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.projet-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.projet-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.projet-card h3 {
    padding: 0 20px;
    color: var(--text-main);
}

.projet-card ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.projet-card ul li {
    font-size: 0.85rem;
    background-color: rgba(255, 145, 77, 0.15);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    text-shadow: none;
}

.projet-card .cta {
    margin-top: auto;
    padding: 15px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-main);
    font-weight: bold;
    display: block;
    text-shadow: none;
}

.projet-card .cta:hover {
    color: var(--primary-color);
    background-color: rgba(255, 145, 77, 0.1);
}

.projet-card .cta i,
.projet-card .cta svg {
    display: none !important;
}

/* =========================================
   7. FOOTER
   ========================================= */
.site-footer {
    background-color: rgba(10, 10, 10, 0.95);
    /* Très opaque pour couper avec le fond */
    color: #aaa;
    padding: 60px 0 20px;
    font-size: 0.9rem;
    margin-top: 50px;
    text-shadow: none;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 40px;
    gap: 30px;
}

.footer-section h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-section a {
    color: #aaa;
    display: block;
    margin-bottom: 8px;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .aPropos-container {
        flex-direction: column;
        padding: 20px;
    }

    nav {
        flex-direction: column;
        gap: 10px;
        border-radius: 20px;
        padding: 15px;
    }
}