/* ╔══════════════════════════════════════════════════════════════════════════════╗
   ║  ÉCOLE MONTESSORI LES MIMOSAS — V2                                          ║
   ║  Design System officiel — partagé par toutes les pages                      ║
   ╚══════════════════════════════════════════════════════════════════════════════╝ */

:root {
    /* COULEURS OFFICIELLES */
    --rose: #ee7186;
    --rose-soft: #f8b4c0;
    --rose-light: #fee8ec;
    --jaune: #f4c200;
    --jaune-soft: #ffe066;
    --jaune-light: #fff8d6;
    --bleu: #0099df;
    --bleu-soft: #66c7f0;
    --bleu-light: #e0f4fc;
    --vert: #6ebb79;
    --vert-soft: #a8dab0;
    --vert-light: #e8f5ea;
    --teal: #049f79;
    --teal-soft: #4ccfb0;
    --teal-light: #dff7f0;
    --orange: #ed6700;
    --orange-soft: #ff9f4d;
    --orange-light: #ffecdb;
    --blanc: #ffffff;
    --creme: #fffef9;
    --papier: #fdf9f0;
    --craie: #f5f2ea;
    --gris-doux: #e8e4da;
    --gris-moyen: #b5afa3;
    --gris-fonce: #5d574d;
    --noir-doux: #2d2a26;

    /* TYPOGRAPHIE */
    --font-display: "Baloo 2", "Comic Sans MS", cursive;
    --font-hand: "Patrick Hand", cursive;
    --font-script: "Caveat", cursive;
    --font-body: "Nunito", sans-serif;

    /* ESPACEMENTS */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* RAYONS ARRONDIS */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-blob: 40% 60% 70% 30% / 40% 50% 60% 50%;
    --radius-pill: 100px;

    /* OMBRES DOUCES */
    --shadow-soft: 0 4px 20px rgba(45, 42, 38, 0.08);
    --shadow-medium: 0 8px 30px rgba(45, 42, 38, 0.12);
    --shadow-lifted: 0 15px 40px rgba(45, 42, 38, 0.15);

    /* Z-INDEX */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-header: 500;
    --z-modal: 2000;
}

/* ═══════ RESET & BASE ═══════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--gris-fonce);
    background: var(--creme);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: -1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}
ul,
ol {
    list-style: none;
}

/* ═══════ TYPOGRAPHIE LUDIQUE ═══════ */
h1,
.h1 {
    font-family: var(--font-display);
    font-size: clamp(42px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--noir-doux);
    letter-spacing: -0.02em;
}
h2,
.h2 {
    font-family: var(--font-display);
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--noir-doux);
}
h3,
.h3 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    color: var(--noir-doux);
}
h4,
.h4 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.handwritten {
    font-family: var(--font-hand);
    font-size: 1.3em;
    line-height: 1.5;
}
.script {
    font-family: var(--font-script);
    font-size: 1.4em;
    font-weight: 600;
}

.title-rainbow {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.1em;
}
.title-rainbow span {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.title-rainbow span:hover {
    transform: scale(1.15) rotate(-3deg);
}
.title-rainbow .c-rose { color: var(--rose); }
.title-rainbow .c-jaune { color: var(--jaune); text-shadow: 0 0 1px rgba(0,0,0,0.1); }
.title-rainbow .c-bleu { color: var(--bleu); }
.title-rainbow .c-vert { color: var(--vert); }
.title-rainbow .c-teal { color: var(--teal); }
.title-rainbow .c-orange { color: var(--orange); }

.overline {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--teal);
}

/* ═══════ BOUTONS LUDIQUES ═══════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 16px 32px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--radius-pill);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}
.btn:hover::before { left: 100%; }
.btn svg {
    width: 20px; height: 20px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn:hover svg { transform: translateX(4px); }
.btn-sm { padding: 12px 24px; font-size: 14px; }
.btn-lg { padding: 20px 40px; font-size: 18px; }
.btn-orange {
    background: var(--orange);
    color: var(--blanc);
    box-shadow: 0 6px 20px rgba(237,103,0,0.4);
}
.btn-orange:hover {
    background: #d85e00;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(237,103,0,0.45);
}
.btn-teal {
    background: var(--teal);
    color: var(--blanc);
    box-shadow: 0 6px 20px rgba(4,159,121,0.4);
}
.btn-teal:hover {
    background: #038366;
    transform: translateY(-4px) scale(1.02);
}
.btn-bleu {
    background: var(--bleu);
    color: var(--blanc);
    box-shadow: 0 6px 20px rgba(0,153,223,0.35);
}
.btn-bleu:hover {
    background: #0083bd;
    transform: translateY(-4px) scale(1.02);
}
.btn-outline {
    background: transparent;
    border: 3px solid currentColor;
}
.btn-outline:hover { transform: translateY(-4px); }
.btn-outline.orange { color: var(--orange); }
.btn-outline.orange:hover { background: var(--orange); color: var(--blanc); }
.btn-outline.teal { color: var(--teal); }
.btn-outline.teal:hover { background: var(--teal); color: var(--blanc); }
.btn-outline.bleu { color: var(--bleu); }
.btn-outline.bleu:hover { background: var(--bleu); color: var(--blanc); }

/* ═══════ BADGES ═══════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 16px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-pill);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.badge:hover { transform: scale(1.08) rotate(-3deg); }
.badge-rose { background: var(--rose-light); color: var(--rose); }
.badge-jaune { background: var(--jaune-light); color: #b89200; }
.badge-bleu { background: var(--bleu-light); color: var(--bleu); }
.badge-vert { background: var(--vert-light); color: #4a9a56; }
.badge-teal { background: var(--teal-light); color: var(--teal); }
.badge-orange { background: var(--orange-light); color: var(--orange); }

/* ═══════ CARTES ═══════ */
.card {
    background: var(--blanc);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--rose), var(--jaune), var(--bleu), var(--vert));
    z-index: 2;
}
.card:hover {
    transform: translateY(-10px) rotate(-1deg);
    box-shadow: var(--shadow-lifted);
}
.card-image {
    position: relative;
    overflow: hidden;
}
.card-image img {
    transition: transform 0.5s ease;
}
.card:hover .card-image img { transform: scale(1.08); }
.card-body { padding: var(--space-xl); }
.card-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--noir-doux);
    margin-bottom: var(--space-sm);
}
.card-text {
    color: var(--gris-fonce);
    margin-bottom: var(--space-md);
}

/* ═══════ HEADER (sticky avec rétrécissement au scroll — V3) ═══════ */
.header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--blanc);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
}
.header.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.96);
}
.topbar {
    background: var(--bleu);
    padding: var(--space-sm) var(--space-xl);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-lg);
    position: relative;
    overflow: hidden;
    max-height: 48px;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
}
.header.scrolled .topbar {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
}
.topbar::before {
    content: "";
    position: absolute;
    left: -50px; top: -50px;
    width: 180px; height: 180px;
    background: var(--rose);
    border-radius: 50%;
    opacity: 0.7;
}
.topbar::after {
    content: "";
    position: absolute;
    right: -30px; bottom: -60px;
    width: 120px; height: 120px;
    background: var(--vert);
    border-radius: 50%;
    opacity: 0.6;
}
.topbar-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--blanc);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}
.topbar-link:hover { transform: scale(1.05); }
.topbar-link svg { width: 18px; height: 18px; }

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
    transition: padding 0.3s ease;
}
.header.scrolled .navbar {
    padding: 6px var(--space-xl);
}
.logo img {
    height: 70px;
    width: auto;
    transition: height 0.3s ease;
}
.header.scrolled .logo img {
    height: 44px;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}
.nav-item {
    position: relative;
    z-index: var(--z-dropdown);
}
.nav-link {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--gris-fonce);
    padding: var(--space-sm) 0;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: color 0.3s ease;
    position: relative;
}
.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 3px;
    background: var(--orange);
    border-radius: var(--radius-pill);
    transition: width 0.3s ease;
}
.nav-link:hover { color: var(--orange); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--orange); }
.nav-link.active::after { width: 100%; }
.nav-link svg {
    width: 16px; height: 16px;
    transition: transform 0.3s ease;
}
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    background: var(--blanc);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lifted);
    padding: var(--space-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: calc(var(--z-dropdown) + 10);
}
.dropdown::before {
    content: "";
    position: absolute;
    top: -8px; left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--blanc);
}
.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}
.dropdown-item:hover {
    background: var(--papier);
    transform: translateX(5px);
}
.dropdown-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dropdown-icon svg { width: 22px; height: 22px; }
.dropdown-icon.rose { background: var(--rose-light); color: var(--rose); }
.dropdown-icon.bleu { background: var(--bleu-light); color: var(--bleu); }
.dropdown-icon.vert { background: var(--vert-light); color: var(--vert); }
.dropdown-icon.jaune { background: var(--jaune-light); color: #b89200; }
.dropdown-icon.teal { background: var(--teal-light); color: var(--teal); }
.dropdown-icon.orange { background: var(--orange-light); color: var(--orange); }
.dropdown-content h4 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--noir-doux);
    margin-bottom: 2px;
}
.dropdown-content p {
    font-size: 13px;
    color: var(--gris-moyen);
}

/* ═══════ MENU MOBILE ═══════ */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.mobile-toggle svg {
    width: 28px;
    height: 28px;
    color: var(--gris-fonce);
}

/* ═══════ SECTIONS COMMUNES ═══════ */
.section {
    padding: var(--space-4xl) var(--space-xl);
    position: relative;
    overflow: hidden;
}
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}
.grid { display: grid; gap: var(--space-xl); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ═══════ FOOTER (sans cutline/ciseaux — V2) ═══════ */
.footer {
    background: var(--bleu);
    color: var(--blanc);
    padding: var(--space-3xl) var(--space-xl) var(--space-xl);
    position: relative;
    overflow: hidden;
    margin-top: var(--space-3xl);
}
.deco-circles {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}
.deco-circle {
    position: absolute;
    border-radius: 50%;
    transition: transform 0.8s ease;
}
.deco-circle.glossy::before {
    content: "";
    position: absolute;
    top: 10%; left: 15%;
    width: 35%; height: 30%;
    background: rgba(255,255,255,0.35);
    border-radius: 50%;
    transform: rotate(-30deg);
}
.footer .deco-circle.f1 {
    top: -80px; right: -60px;
    width: 200px; height: 200px;
    background: var(--rose);
    opacity: 0.6;
}
.footer .deco-circle.f2 {
    bottom: -100px; left: -50px;
    width: 250px; height: 250px;
    background: var(--vert);
    opacity: 0.5;
}
.footer .deco-circle.f3 {
    top: 30%; left: 25%;
    width: 100px; height: 100px;
    background: var(--jaune);
    opacity: 0.4;
}
.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: var(--space-3xl);
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.footer-logo {
    display: inline-block;
    background: var(--blanc);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: var(--space-lg);
    position: relative;
    transform: rotate(-2deg);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer-logo:hover { transform: rotate(0) scale(1.05); }
.footer-logo::before {
    content: "";
    position: absolute;
    top: -8px; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 16px;
    background: var(--jaune);
    opacity: 0.7;
    border-radius: 2px;
}
.footer-logo img {
    height: 75px;
    width: auto;
    display: block;
}
.footer-text {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
}
.footer h4 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--blanc);
    margin-bottom: var(--space-lg);
}
.footer-links li { margin-bottom: var(--space-sm); }
.footer-links a {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}
.footer-links a:hover {
    color: var(--jaune);
    transform: translateX(5px);
}
.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: 15px;
    color: rgba(255,255,255,0.85);
}
.footer-contact svg {
    width: 20px; height: 20px;
    color: var(--jaune);
    flex-shrink: 0;
    margin-top: 2px;
}
.footer-bottom {
    margin-top: var(--space-3xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255,255,255,0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
.social-links {
    display: flex;
    gap: var(--space-md);
}
.social-link {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanc);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.social-link:hover {
    background: var(--jaune);
    color: var(--noir-doux);
    transform: translateY(-5px) rotate(10deg);
}
.social-link svg { width: 20px; height: 20px; }

/* ═══════ LITE YOUTUBE (fallback embed cliquable — fix erreur 153) ═══════ */
.lite-youtube {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    background: #000;
    display: block;
}
.lite-youtube .lyt-poster {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.4s ease;
    filter: brightness(0.78);
}
.lite-youtube:hover .lyt-poster {
    transform: scale(1.03);
    filter: brightness(0.88);
}
.lite-youtube .lyt-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 86px; height: 60px;
    background: rgba(220, 0, 0, 0.92);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
.lite-youtube:hover .lyt-play {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}
.lite-youtube .lyt-play svg {
    width: 32px;
    height: 32px;
    fill: var(--blanc);
    margin-left: 4px;
}
.lite-youtube iframe {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    border: 0;
    z-index: 2;
}

/* ═══════ HERO BANNER (réutilisable pour pages internes) ═══════ */
.page-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bleu-light), var(--teal-light));
    padding: var(--space-3xl) var(--space-xl);
}
.page-hero-image {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    background: var(--gris-doux);
}
.page-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.page-hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.45) 100%);
}
.page-hero-title {
    position: absolute;
    bottom: var(--space-3xl);
    left: var(--space-3xl);
    z-index: 2;
    color: var(--blanc);
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* ═══════ RESPONSIVE COMMUN ═══════ */
@media (max-width: 1024px) {
    .footer-content { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        gap: var(--space-xs);
        padding: var(--space-sm);
    }
    .topbar-link { font-size: 13px; }
    .nav-menu { display: none; }
    .nav-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--blanc);
        padding: var(--space-lg);
        box-shadow: var(--shadow-medium);
        gap: var(--space-md);
        align-items: stretch;
    }
    .mobile-toggle { display: block; }
    .footer-content { grid-template-columns: 1fr; }
    .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
    .page-hero-image { height: 240px; }
    .page-hero-title { left: var(--space-md); bottom: var(--space-md); font-size: 32px; }
}
