/* ============================================================
   MK EducLib — Site vitrine
   Palette : Or #D4AF37, Brun #5D4E37, Crème #FBF4E0, Blanc #FFF
   Typo   : Playfair Display (titres) + Open Sans (corps)
   ============================================================ */

/* ----- Reset & base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ----- Typography ----- */
h1, h2, h3 { font-family: 'Playfair Display', serif; color: #5D4E37; }
h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }

/* ----- Buttons ----- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}
.btn--primary {
    background: #D4AF37;
    color: #fff;
    border-color: #D4AF37;
}
.btn--primary:hover {
    background: #b8952e;
    border-color: #b8952e;
}
.btn--outline {
    background: transparent;
    color: #5D4E37;
    border-color: #5D4E37;
}
.btn--outline:hover {
    background: #5D4E37;
    color: #fff;
}
.btn--outline-light {
    background: transparent;
    color: #FBF4E0;
    border-color: #FBF4E0;
}
.btn--outline-light:hover {
    background: #FBF4E0;
    color: #5D4E37;
}
.btn--small { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.btn--large { padding: 1rem 2.2rem; font-size: 1.05rem; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid #eee;
    transition: box-shadow 0.3s;
}
.header--scrolled { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.header__logo-img { height: 42px; width: auto; }
.header__logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #5D4E37;
}

.nav { display: flex; gap: 1.5rem; }
.nav__link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #5D4E37;
    transition: color 0.2s;
    position: relative;
}
.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: #D4AF37;
    transition: width 0.3s;
}
.nav__link:hover::after,
.nav__link.active::after { width: 100%; }
.nav__link:hover { color: #D4AF37; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}
.hamburger span {
    display: block;
    width: 26px; height: 3px;
    background: #5D4E37;
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(160deg, #FBF4E0 0%, #fff 40%, #FBF4E0 100%);
    padding: 6rem 1rem 4rem;
}
.hero__inner { max-width: 720px; }
.hero__brand {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #5D4E37;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}
.hero__brand::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #D4AF37;
    margin: 0.5rem auto 0;
}
.hero__title { margin-bottom: 1rem; }
.hero__title em { color: #D4AF37; font-style: italic; }
.hero__subtitle {
    font-size: 1.15rem;
    color: #5D4E37;
    margin-bottom: 2rem;
    opacity: 0.85;
}
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   SECTIONS (generic)
   ============================================================ */
.section { padding: 5rem 0; }
.section:nth-child(even) { background: #FAFAFA; }
.section__title {
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
}
.section__title::after {
    content: '';
    display: block;
    width: 60px; height: 3px;
    background: #D4AF37;
    margin: 0.75rem auto 0;
}
.section__title--light { color: #FBF4E0; }
.section__title--light::after { background: #D4AF37; }
.section__subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto; margin-right: auto;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: start;
}
.about__portrait { text-align: center; }
.about__avatar {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4AF37, #5D4E37);
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.about__name { font-size: 1.2rem; }
.about__role {
    color: #D4AF37;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.about__bio { font-size: 0.9rem; color: #666; }
.about__text p { margin-bottom: 1rem; }
.about__quote {
    border-left: 4px solid #D4AF37;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    background: #FBF4E0;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #5D4E37;
}
.about__quote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 600;
}

/* Values grid */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.values__card {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
}
.values__card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.values__icon { font-size: 2rem; margin-bottom: 0.75rem; }
.values__card h4 { font-family: 'Playfair Display', serif; color: #5D4E37; margin-bottom: 0.5rem; }
.values__card p { font-size: 0.85rem; color: #666; }

/* ============================================================
   FORMATIONS
   ============================================================ */
.formations { background: #fff !important; }

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.filters__btn {
    padding: 0.5rem 1.3rem;
    border: 2px solid #5D4E37;
    border-radius: 30px;
    background: transparent;
    color: #5D4E37;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}
.filters__btn.active,
.filters__btn:hover {
    background: #5D4E37;
    color: #fff;
}

/* Grid */
.formations__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid #e8e4dd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    cursor: pointer;
}
.card:hover {
    box-shadow: 0 6px 20px rgba(93,78,55,0.1);
    transform: translateY(-2px);
}
.card.hidden { display: none; }
.card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}
.card__number {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #D4AF37;
    min-width: 42px;
}
.card__title {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}
.card__meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.card__duration { font-size: 0.8rem; color: #888; }
.card__toggle {
    margin-left: auto;
    font-size: 1.5rem;
    color: #D4AF37;
    font-weight: 700;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.card.open .card__toggle { transform: rotate(45deg); }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.7rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge--1 { background: #D4AF37; color: #fff; }
.badge--2 { background: #5D4E37; color: #fff; }
.badge--3 { background: #8B7355; color: #fff; }

.card__desc {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    color: #555;
}
.card__details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.25rem;
    background: #FBF4E0;
    border-top: 1px solid transparent;
}
.card.open .card__details {
    max-height: 300px;
    padding: 1rem 1.25rem;
    border-top-color: #e8e4dd;
}
.card__details p { font-size: 0.85rem; color: #555; margin-bottom: 0.4rem; }

.formations__note {
    text-align: center;
    margin-top: 2rem;
    color: #777;
    font-size: 0.9rem;
}

/* ============================================================
   PARCOURS
   ============================================================ */
.parcours { background: #FBF4E0 !important; }
.parcours__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.parcours__card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e8e4dd;
    transition: box-shadow 0.3s;
}
.parcours__card:hover { box-shadow: 0 6px 20px rgba(93,78,55,0.1); }
.parcours__name { margin-bottom: 0.25rem; }
.parcours__duration {
    font-size: 0.85rem;
    color: #D4AF37;
    font-weight: 700;
    margin-bottom: 1rem;
}
.parcours__steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.parcours__step {
    background: #FBF4E0;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.parcours__step-num {
    font-weight: 700;
    color: #D4AF37;
}
.parcours__step small { color: #999; }
.parcours__arrow { color: #D4AF37; font-size: 1.2rem; font-weight: 700; }
.parcours__target { font-size: 0.8rem; color: #888; font-style: italic; }

/* ============================================================
   TARIFS
   ============================================================ */
.tarifs__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
}
.tarifs__card {
    background: #fff;
    border: 1px solid #e8e4dd;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: box-shadow 0.3s;
}
.tarifs__card:hover { box-shadow: 0 8px 24px rgba(93,78,55,0.1); }
.tarifs__card--featured {
    border: 2px solid #D4AF37;
    transform: scale(1.03);
}
.tarifs__badge {
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    background: #D4AF37;
    color: #fff;
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.tarifs__name { margin-bottom: 0.25rem; }
.tarifs__label { color: #888; font-size: 0.85rem; margin-bottom: 1rem; }
.tarifs__price {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #D4AF37;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.tarifs__price small { font-size: 0.7rem; color: #888; font-family: 'Open Sans', sans-serif; }
.tarifs__note { font-size: 0.82rem; color: #888; margin-bottom: 1rem; }
.tarifs__features {
    text-align: left;
    margin: 1.5rem 0;
}
.tarifs__features li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    padding-left: 1.2rem;
    position: relative;
}
.tarifs__features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #D4AF37;
    font-weight: 700;
}

/* Infos pratiques */
.infos {
    background: #fff;
    border: 1px solid #e8e4dd;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}
.infos__title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
    color: #5D4E37;
}
.infos__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.infos__item {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 0.75rem;
    border-radius: 6px;
    background: #FBF4E0;
}
.infos__item strong { color: #5D4E37; font-size: 0.85rem; margin-bottom: 0.25rem; }
.infos__item span { font-size: 0.9rem; color: #555; }

/* Financement */
.financement {
    background: #FBF4E0;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    text-align: center;
}
.financement h3 {
    font-family: 'Playfair Display', serif;
    color: #5D4E37;
    margin-bottom: 0.75rem;
}
.financement p { font-size: 0.9rem; color: #555; max-width: 700px; margin: 0 auto; }

/* ============================================================
   PUBLICS
   ============================================================ */
.publics__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.publics__card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.publics__card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.publics__icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.publics__card h4 { font-family: 'Playfair Display', serif; color: #5D4E37; margin-bottom: 0.5rem; font-size: 1rem; }
.publics__card p { font-size: 0.82rem; color: #777; }

.publics__prereq, .publics__conseil {
    background: #FBF4E0;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #555;
}
.publics__conseil {
    text-align: center;
    background: #5D4E37;
    color: #e8e4dd;
}
.publics__conseil strong { color: #D4AF37; }

/* ============================================================
   TÉMOIGNAGES
   ============================================================ */
.temoignages { background: #FBF4E0 !important; }
.temoignages__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.temoignages__card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e8e4dd;
    transition: transform 0.3s, box-shadow 0.3s;
}
.temoignages__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(93,78,55,0.1);
}
.temoignages__stars {
    color: #D4AF37;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    letter-spacing: 2px;
}
.temoignages__text {
    font-size: 0.92rem;
    color: #555;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 1rem;
}
.temoignages__author strong {
    display: block;
    color: #5D4E37;
    font-size: 0.9rem;
}
.temoignages__author span {
    font-size: 0.8rem;
    color: #999;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq__list {
    max-width: 760px;
    margin: 0 auto;
}
.faq__item {
    border-bottom: 1px solid #e8e4dd;
}
.faq__item:first-child {
    border-top: 1px solid #e8e4dd;
}
.faq__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #5D4E37;
    text-align: left;
    transition: color 0.2s;
}
.faq__question:hover { color: #D4AF37; }
.faq__icon {
    font-size: 1.5rem;
    color: #D4AF37;
    font-weight: 700;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 1rem;
}
.faq__item.open .faq__icon { transform: rotate(45deg); }
.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq__item.open .faq__answer {
    max-height: 300px;
    padding-bottom: 1.25rem;
}
.faq__answer p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.7;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
    background: #5D4E37 !important;
    color: #e8e4dd;
}
.contact .section__title::after { background: #D4AF37; }
.contact__intro {
    text-align: center;
    color: #ccc;
    margin-bottom: 2.5rem;
}
.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 2.5rem;
}
.contact__item { margin-bottom: 1.25rem; }
.contact__label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #D4AF37;
    margin-bottom: 0.25rem;
}
.contact__item a {
    color: #FBF4E0;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.2s;
}
.contact__item a:hover { color: #D4AF37; }
.contact__item span { font-size: 1.1rem; }

.contact__cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact__legal {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: #3d3428;
    color: #999;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.8rem;
}
.footer a { color: #D4AF37; }
.footer a:hover { text-decoration: underline; }
.footer__inner { display: flex; flex-direction: column; gap: 0.3rem; }

/* ============================================================
   FADE-IN ANIMATION
   ============================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablette */
@media (max-width: 900px) {
    .about__grid { grid-template-columns: 1fr; }
    .values { grid-template-columns: repeat(2, 1fr); }
    .formations__grid { grid-template-columns: 1fr; }
    .parcours__grid { grid-template-columns: 1fr; }
    .tarifs__grid { grid-template-columns: 1fr; }
    .tarifs__card--featured { transform: none; }
    .infos__grid { grid-template-columns: repeat(2, 1fr); }
    .publics__grid { grid-template-columns: repeat(2, 1fr); }
    .temoignages__grid { grid-template-columns: 1fr; }
    .contact__grid { grid-template-columns: 1fr; text-align: center; }
}

/* Mobile */
@media (max-width: 640px) {
    html { font-size: 15px; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }

    .header__cta { display: none; }
    .hamburger { display: flex; }

    .nav {
        position: fixed;
        top: 0; right: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        transition: right 0.35s ease;
        z-index: 999;
    }
    .nav.open { right: 0; }
    .nav__link { font-size: 1.1rem; }

    .hero { min-height: auto; padding: 7rem 1rem 3rem; }
    .hero__actions { flex-direction: column; align-items: center; }

    .values { grid-template-columns: 1fr; }
    .infos__grid { grid-template-columns: 1fr; }
    .publics__grid { grid-template-columns: 1fr; }

    .parcours__steps { flex-direction: column; align-items: flex-start; }
    .parcours__arrow { transform: rotate(90deg); margin: 0 0 0 1rem; }

    .section { padding: 3rem 0; }
}
