/* ============================================================
   Coach Famille — Sauge & Argile
   Mode jour/nuit auto (prefers-color-scheme) + toggle manuel
   ============================================================ */

:root {
    /* Sauge & Argile — light */
    --sage-50:  #EEF2EA;
    --sage-100: #D6E1C9;
    --sage-200: #B8CFA8;
    --sage-400: #7FA068;
    --sage-500: #6B8E5A;
    --sage-600: #577449;
    --sage-700: #435A39;
    --sage-800: #2F4128;

    --terra-100: #F4D5C7;
    --terra-500: #C97B5D;
    --terra-700: #844A33;

    --lin-50:  #FAF7F1;
    --lin-100: #F5F1EA;
    --lin-200: #E9E2D4;
    --lin-300: #D8CEB9;

    --charcoal-100: #CFCCC0;
    --charcoal-300: #6E6A5A;
    --charcoal-400: #4A4738;
    --charcoal-500: #2F3128;
    --charcoal-700: #1A1D17;

    --ochre: #CDA86A;

    /* Tokens semantiques (light) */
    --bg:           var(--lin-100);
    --surface:      var(--lin-50);
    --surface-alt:  var(--lin-200);
    --on-surface:   var(--charcoal-500);
    --on-surface-muted: var(--charcoal-300);
    --primary:      var(--sage-500);
    --on-primary:   var(--lin-50);
    --primary-container: var(--sage-100);
    --on-primary-container: var(--sage-800);
    --secondary:    var(--terra-500);
    --secondary-container: var(--terra-100);
    --on-secondary-container: var(--terra-700);
    --accent:       var(--ochre);
    --outline:      var(--lin-300);

    --radius-sm: 8px;
    --radius:    16px;
    --radius-lg: 24px;
    --shadow:    0 2px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
}

/* Mode sombre auto */
@media (prefers-color-scheme: dark) {
    :root:not(.theme-light) {
        --bg:           var(--charcoal-700);
        --surface:      #25291F;
        --surface-alt:  var(--charcoal-400);
        --on-surface:   #E8E6DD;
        --on-surface-muted: var(--charcoal-100);
        --primary:      var(--sage-200);
        --on-primary:   var(--sage-800);
        --primary-container: var(--sage-700);
        --on-primary-container: var(--sage-100);
        --secondary:    #E8A589;
        --secondary-container: #5C3322;
        --on-secondary-container: var(--terra-100);
        --outline:      var(--charcoal-400);
        --shadow:    0 2px 12px rgba(0,0,0,0.30);
        --shadow-lg: 0 8px 32px rgba(0,0,0,0.45);
    }
}

/* Mode sombre force par toggle */
:root.theme-dark {
    --bg:           var(--charcoal-700);
    --surface:      #25291F;
    --surface-alt:  var(--charcoal-400);
    --on-surface:   #E8E6DD;
    --on-surface-muted: var(--charcoal-100);
    --primary:      var(--sage-200);
    --on-primary:   var(--sage-800);
    --primary-container: var(--sage-700);
    --on-primary-container: var(--sage-100);
    --secondary:    #E8A589;
    --secondary-container: #5C3322;
    --on-secondary-container: var(--terra-100);
    --outline:      var(--charcoal-400);
    --shadow:    0 2px 12px rgba(0,0,0,0.30);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.45);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--on-surface);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--on-surface);
}

/* ============================================================
   Theme toggle
   ============================================================ */
.theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--outline);
    background: var(--surface);
    color: var(--on-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}
.theme-toggle:hover { transform: scale(1.05); }
.theme-toggle .icon-sun { display: none; }
:root.theme-dark .theme-toggle .icon-sun { display: inline; }
:root.theme-dark .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not(.theme-light) .theme-toggle .icon-sun { display: inline; }
    :root:not(.theme-light) .theme-toggle .icon-moon { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--sage-700) 100%);
    color: var(--on-primary);
    padding: 100px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.hero::before { width: 300px; height: 300px; top: -100px; right: -50px; }
.hero::after { width: 200px; height: 200px; bottom: -80px; left: -50px; }

.hero-content { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 16px; }
.hero .tagline { font-size: clamp(1.1rem, 2.5vw, 1.4rem); opacity: 0.95; margin-bottom: 32px; }

.hero-illu { width: clamp(280px, 60vw, 480px); height: auto; margin: 0 auto 32px; display: block; }
.hero-illu .person-primary { fill: var(--on-primary); opacity: 0.95; }
.hero-illu .person-secondary { fill: #E8A589; }
.hero-illu .ground { fill: var(--on-primary); opacity: 0.2; }

/* ============================================================
   Sections
   ============================================================ */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 64px 24px;
}

section {
    margin-bottom: 64px;
}

section h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 16px;
}

section p {
    font-size: 1.05rem;
    color: var(--on-surface);
    margin-bottom: 16px;
    max-width: 720px;
}

/* ============================================================
   Cards / grilles
   ============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--outline);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary-container);
    color: var(--on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.card-icon svg { width: 32px; height: 32px; }

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}
.card p {
    color: var(--on-surface-muted);
    font-size: 0.97rem;
    margin: 0;
}

/* ============================================================
   Steps (how it works)
   ============================================================ */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 32px;
    counter-reset: step;
}

.step {
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--outline);
    position: relative;
    counter-increment: step;
}
.step::before {
    content: counter(step);
    position: absolute;
    top: -16px;
    left: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}
.step h3 { margin-top: 16px; margin-bottom: 8px; }

/* ============================================================
   Note / aside
   ============================================================ */
.note {
    background: var(--secondary-container);
    color: var(--on-secondary-container);
    padding: 20px 24px;
    border-radius: var(--radius);
    border-left: 4px solid var(--secondary);
    margin: 24px 0;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
    background: var(--surface-alt);
    color: var(--on-surface-muted);
    padding: 32px 24px;
    text-align: center;
    margin-top: 64px;
}
footer a { color: var(--primary); }

/* ============================================================
   Politique de confidentialite
   ============================================================ */
.privacy-content {
    background: var(--surface);
    padding: 48px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.privacy-content h2 { font-size: 1.4rem; margin: 32px 0 12px; }
.privacy-content h3 { font-size: 1.1rem; margin: 20px 0 8px; }
.privacy-content p, .privacy-content li { margin-bottom: 8px; font-size: 1rem; }
.privacy-content ul { margin-left: 24px; margin-bottom: 16px; }

.meta-box {
    background: var(--bg);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--outline);
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: var(--on-surface-muted);
}

/* Responsive */
@media (max-width: 600px) {
    .hero { padding: 80px 20px 60px; }
    main { padding: 48px 20px; }
    .privacy-content { padding: 32px 20px; }
}
