@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Roboto:wght@300;400&display=swap');

:root {
  --bg: #0f0f0f;
  --surface: #171614;
  --surface-2: #1f1d1b;
  --border: #2a2623;
  --text: #f2efe9;
  --muted: #cfc8bb;
  --accent: #b35a2b;
  --accent-600: #9b4920;
  --accent-300: #d88a5a;
  --gold: #c7a56a;
  --shadow: 0 12px 40px rgba(0,0,0,.6);
  --leaf: #5a7d52;
  --error: #c03a2b;
}

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

body.dark-theme {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1.05rem;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Lora', serif;
  font-weight: 500;
  letter-spacing: .2px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

img { max-width: 100%; display: block; border-radius: 6px; }

a { text-decoration: none; color: var(--accent); transition: color 0.3s ease; }
a:hover { color: var(--accent-300); }

header {
  background: rgba(15,15,15,.72);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img { max-height: 50px; border-radius: 0; }

nav, .nav-left ul, .nav-right ul { 
  display: flex; 
  align-items: center; 
  gap: 1.5rem; 
  list-style: none; 
}

nav ul li a {
  color: var(--text);
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 5px;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px; width: 0;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

nav ul li a:hover::after { width: 100%; }

nav ul li a.active {
    color: var(--accent-300);
}

nav ul li a.active::after {
    width: 100%;
    background-color: var(--accent-300);
}

.menu-burger {
    display: none;
    font-size: 2.2rem;
    color: var(--text);
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.footer-masterclass {
  background-color: #0b0a09;
  color: #aaa;
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--border);
  margin-top: 5rem;
}

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; }

.footer-col h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-col h2::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0;
  width: 30px; height: 2px;
  background-color: var(--accent);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col ul li a { color: #aaa; transition: all 0.3s ease; }
.footer-col ul li a:hover { color: #fff; padding-left: 5px; }

.footer-col-brand .footer-logo { max-height: 50px; margin-bottom: 1rem; }
.footer-col-brand p { font-style: italic; color: var(--muted); margin-bottom: 1rem; }
.footer-col-brand .footer-copyright { color: #777; font-size: 0.85rem; margin-top: 1rem; display: block;}

.footer-socials { display: flex; gap: 1rem; margin-top: 1.5rem; }
.footer-socials a { color: #aaa; font-size: 1.5rem; transition: all 0.3s ease; }
.footer-socials a:hover { color: var(--accent); transform: translateY(-3px); }

.cta-button {
  background-color: var(--accent);
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 0 18px rgba(179,90,43,.35);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background-color: var(--accent-600);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 26px rgba(179,90,43,.55);
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.section-wrapper {
  background-color: var(--surface-2);
  border-radius: 8px;
  padding: 3rem 2.5rem;
  margin-bottom: 4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.section-flex { display: flex; gap: 2.5rem; align-items: center; }
.section-flex > img { flex: 0 0 40%; max-width: 40%; border: 1px solid var(--border); }
.section-flex .text-content { flex: 1; font-size: 1.15rem; color: var(--muted); }

.hidden-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.confirmation { padding: 1rem; margin-bottom: 1.5rem; border-radius: 6px; font-weight: bold; text-align: center; }
.confirmation.success { background: rgba(90,125,82,.15); border: 1px solid var(--leaf); color: #dff3d7; }
.confirmation.error { background: rgba(192,58,43,.15); border: 1px solid var(--error); color: #ffe2de; }

@media (max-width: 992px) {
    .menu-burger {
        display: block;
    }

    /* Le menu fermé (caché à droite) ne doit pas élargir la page */
    header {
        overflow-x: clip;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
        z-index: 1000;
    }

    nav.active {
        right: 0;
    }

    nav ul, .nav-left ul, .nav-right ul {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }

    nav ul li a {
        font-size: 1.5rem;
    }

    .header-container {
        justify-content: space-between;
    }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col-brand { grid-column: 1 / -1; text-align: center; }
  .footer-col p { overflow-wrap: anywhere; } /* l'adresse e-mail ne doit pas faire déborder la page */
  .footer-col-brand .footer-logo, .footer-socials, .footer-col h2::after { margin-left: auto; margin-right: auto; }
}

@media (max-width: 768px) {
  .section-title { font-size: 2.2rem; }
  .section-flex { flex-direction: column !important; }
  .section-flex > img { flex: 0 0 100%; max-width: 100%; margin-bottom: 1.5rem; }
  .section-flex .text-content, .cta-wrapper { text-align: center; }
}