/* ═══════════════════════════════════════════════
   KREATIVE MONSTER SCHOOL — Formations Page
   (Page-specific styles only — base from styles.css)
   ═══════════════════════════════════════════════ */

/* ── Force nav visible on School page (no fullscreen hero like index) ── */
.nav {
    transform: translateY(0);
    background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
body.dark-mode .nav {
    background: rgba(17,17,17,.95);
}
.fm-back-link {
    text-transform: uppercase;
}

/* ── Page container ── */
.fm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Formations-specific buttons ── */
.fm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: .85rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 16px 36px;
    border-radius: 0;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .3s var(--ease);
    text-decoration: none;
}
.fm-btn-primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}
.fm-btn-primary:hover {
    background: #8B0000;
    border-color: #8B0000;
    transform: translateY(-2px);
}
.fm-btn-outline {
    background: transparent;
    color: var(--black);
    border-color: var(--black);
}
.fm-btn-outline:hover {
    background: var(--black);
    color: var(--white);
    transform: translateY(-2px);
}
.fm-btn-white {
    background: var(--white);
    color: var(--red);
    border-color: var(--white);
}
.fm-btn-white:hover {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-2px);
}
.fm-btn-white-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.fm-btn-white-outline:hover {
    background: var(--white);
    color: var(--red);
    transform: translateY(-2px);
}
.fm-btn-sub {
    font-family: var(--font-b);
    font-weight: 400;
    font-size: .75rem;
    text-transform: none;
    letter-spacing: 0;
    opacity: .7;
}
.fm-btn-card {
    width: 100%;
    margin-top: auto;
}

/* ── Reveal animations ── */
.fm-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.fm-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Back link in nav ── */
.fm-back-link {
    font-family: var(--font-b);
    font-size: .75rem;
    font-weight: 500;
    color: var(--gray-txt);
    transition: color .3s var(--ease);
}
.fm-back-link:hover {
    color: var(--red);
}

/* ═══════════════════════════════════
   HERO
   ═══════════════════════════════════ */
.fm-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 160px 0 100px;
    text-align: center;
}
.fm-hero .fm-container {
    width: 100%;
}
.fm-hero-title {
    font-family: var(--font-h);
    font-weight: 900;
    line-height: .95;
    margin-bottom: 32px;
}
.fm-hero-line {
    display: block;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -.03em;
}
.fm-hero-school {
    color: var(--red);
    position: relative;
    display: inline-block;
}
.fm-hero-underline {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--red);
    transition: width 1.2s var(--ease);
}
.fm-hero-school.drawn .fm-hero-underline {
    width: 100%;
}
.fm-hero-subtitle {
    font-family: var(--font-b);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 500;
    color: var(--gray-txt);
    margin-bottom: 16px;
}
.fm-hero-text {
    font-size: .95rem;
    color: var(--gray-txt);
    max-width: 600px;
    margin: 0 auto 40px;
}
.fm-hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.fm-hero-micro {
    font-size: .8rem;
    color: #999;
}

/* ═══════════════════════════════════
   POUR QUI
   ═══════════════════════════════════ */
.fm-pourqui {
    background: var(--gray-bg);
    padding: 120px 0;
}
.fm-section-title {
    font-family: var(--font-h);
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -.02em;
    margin-bottom: 56px;
    position: relative;
}
.fm-title-line {
    display: block;
    width: 0;
    height: 2px;
    background: var(--red);
    margin-top: 12px;
    transition: width 1s var(--ease) .3s;
}
.fm-section-title.visible .fm-title-line {
    width: 80px;
}
.fm-pourqui-list {
    max-width: 700px;
}
.fm-pourqui-item {
    font-size: 1.15rem;
    font-weight: 500;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
    position: relative;
    padding-left: 24px;
}
.fm-pourqui-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
}

/* ═══════════════════════════════════
   COMMENT ÇA MARCHE
   ═══════════════════════════════════ */
.fm-process {
    padding: 120px 0;
}
.fm-process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}
.fm-process-step {
    position: relative;
}
.fm-process-num {
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 3rem;
    color: #F0F0F0;
    line-height: 1;
    display: block;
    margin-bottom: 16px;
}
.fm-process-step h3 {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 12px;
    letter-spacing: -.01em;
}
.fm-process-step p {
    font-size: .9rem;
    color: var(--gray-txt);
    line-height: 1.7;
}

/* ═══════════════════════════════════
   QUESTIONNAIRE HIGHLIGHT
   ═══════════════════════════════════ */
.fm-quiz-section {
    padding: 100px 0;
    text-align: center;
    border-top: 1px solid #EBEBEB;
    border-bottom: 1px solid #EBEBEB;
}
.fm-quiz-text {
    font-size: 1.05rem;
    color: var(--gray-txt);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}
.fm-quiz-bar-wrap {
    width: 100%;
    max-width: 500px;
    height: 6px;
    background: #E8E8E8;
    border-radius: 3px;
    margin: 0 auto 40px;
    overflow: hidden;
}
.fm-quiz-bar {
    height: 100%;
    width: 0;
    background: var(--red);
    border-radius: 3px;
    transition: width 1.5s var(--ease);
}
.fm-quiz-section.in-view .fm-quiz-bar {
    width: 75%;
}
.fm-quiz-micro {
    font-size: .8rem;
    color: #999;
    margin-top: 16px;
}

/* ═══════════════════════════════════
   FORMATIONS GRID
   ═══════════════════════════════════ */
.fm-formations {
    padding: 120px 0;
}
.fm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}
.fm-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #E0E0E0;
    padding: 40px 36px;
    transition: all .35s var(--ease);
    position: relative;
}
.fm-card:hover {
    border-color: var(--red);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,.06);
}
.fm-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}
.fm-card-name {
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 1.3rem;
    letter-spacing: -.01em;
    line-height: 1.15;
}
.fm-card-price {
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 1.6rem;
    color: var(--red);
    white-space: nowrap;
}
.fm-card-subtitle {
    font-size: .9rem;
    color: var(--gray-txt);
    margin-bottom: 16px;
}
.fm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--gray-txt);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.fm-card-meta span {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}
.fm-card-list {
    margin-bottom: 28px;
}
.fm-card-list li {
    font-size: .88rem;
    padding: 6px 0;
    padding-left: 18px;
    position: relative;
    color: var(--black);
}
.fm-card-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
}

/* ═══════════════════════════════════
   FAQ
   ═══════════════════════════════════ */
.fm-faq {
    background: var(--gray-bg);
    padding: 120px 0;
}
.fm-faq-list {
    max-width: 800px;
}
.fm-faq-item {
    border-bottom: 1px solid rgba(0,0,0,.08);
}
.fm-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 1rem;
    text-align: left;
    padding: 24px 0;
    color: var(--black);
    transition: color .3s var(--ease);
}
.fm-faq-question:hover {
    color: var(--red);
}
.fm-faq-question svg {
    flex-shrink: 0;
    transition: transform .3s var(--ease);
}
.fm-faq-item.open .fm-faq-question svg {
    transform: rotate(180deg);
}
.fm-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s var(--ease), padding .4s var(--ease);
}
.fm-faq-item.open .fm-faq-answer {
    max-height: 300px;
}
.fm-faq-answer p {
    font-size: .9rem;
    color: var(--gray-txt);
    line-height: 1.7;
    padding-bottom: 24px;
}

/* ═══════════════════════════════════
   CTA FINAL
   ═══════════════════════════════════ */
.fm-cta-final {
    background: var(--red);
    padding: 120px 0;
    text-align: center;
}
.fm-cta-title {
    font-family: var(--font-h);
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--white);
    letter-spacing: -.02em;
    margin-bottom: 40px;
}
.fm-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════
   MOBILE — Tablet
   ═══════════════════════════════════ */
@media (max-width: 1100px) {
    .fm-back-link { display: none; }
}

/* ═══════════════════════════════════
   MOBILE — Phone
   ═══════════════════════════════════ */
@media (max-width: 768px) {
    /* Hero */
    .fm-hero {
        min-height: 0;
        padding: 140px 0 80px;
    }
    .fm-hero-ctas {
        flex-direction: column;
        align-items: center;
    }
    .fm-hero-ctas .fm-btn {
        width: 100%;
        max-width: 360px;
    }

    /* Process */
    .fm-process-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Formations grid */
    .fm-grid {
        grid-template-columns: 1fr;
    }
    .fm-card {
        padding: 32px 24px;
    }
}

/* ═══════════════════════════════════
   GOLD SHIMMER — Formation highlight
   ═══════════════════════════════════ */
@keyframes fm-gold-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes fm-gold-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); }
    30%      { box-shadow: 0 0 30px 8px rgba(212,175,55,.35); }
    60%      { box-shadow: 0 0 20px 4px rgba(212,175,55,.2); }
}
.fm-card.quiz-highlight {
    position: relative;
    animation: fm-gold-pulse 2s ease-in-out;
    z-index: 5;
    transform: scale(1.03);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.fm-card.quiz-highlight::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid rgba(212,175,55,.6);
    background: linear-gradient(
        110deg,
        transparent 20%,
        rgba(212,175,55,.12) 40%,
        rgba(255,215,0,.18) 50%,
        rgba(212,175,55,.12) 60%,
        transparent 80%
    );
    background-size: 200% 100%;
    animation: fm-gold-shimmer 1.8s ease-in-out 2;
    pointer-events: none;
    z-index: 10;
}

/* ═══════════════════════════════════
   SCHOOL QUIZ MODAL
   ═══════════════════════════════════ */
.sq-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0,0,0,.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s var(--ease);
    padding: 20px;
}
.sq-overlay.open {
    opacity: 1;
    visibility: visible;
}
.sq-modal {
    background: var(--white);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    border-radius: 0;
    overflow-y: auto;
    padding: 48px 40px;
    position: relative;
    transform: translateY(20px);
    transition: transform .35s var(--ease);
}
.sq-overlay.open .sq-modal {
    transform: translateY(0);
}
.sq-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none; border: none;
    cursor: pointer;
    color: var(--gray-txt);
    transition: color .2s;
    z-index: 2;
}
.sq-close:hover { color: var(--red); }

/* Header / progress */
.sq-header {
    margin-bottom: 32px;
    text-align: center;
}
.sq-section-label {
    display: block;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: .65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
}
.sq-progress {
    height: 4px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.sq-progress-bar {
    height: 100%;
    background: var(--red);
    width: 0%;
    transition: width .4s var(--ease);
    border-radius: 4px;
}
.sq-step-count {
    font-family: var(--font-b);
    font-size: .72rem;
    color: var(--gray-txt);
}

/* Steps */
.sq-step {
    display: none;
    text-align: center;
}
.sq-step.active { display: block; }
.sq-num {
    display: inline-block;
    font-family: var(--font-h);
    font-weight: 900;
    font-size: .65rem;
    letter-spacing: .1em;
    color: var(--gray-txt);
    margin-bottom: 12px;
}
.sq-question {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 28px;
    color: var(--black);
}
.sq-hint {
    font-weight: 400;
    font-size: .8rem;
    color: var(--gray-txt);
}

/* Options */
.sq-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 480px;
    margin: 0 auto;
}
.sq-options-inline {
    flex-direction: row;
    justify-content: center;
}
.sq-opt {
    font-family: var(--font-b);
    font-size: .88rem;
    font-weight: 500;
    padding: 14px 20px;
    border: 1px solid #ddd;
    border-radius: 0;
    background: var(--white);
    color: var(--black);
    cursor: pointer;
    transition: all .2s var(--ease);
    text-align: left;
}
.sq-opt:hover {
    border-color: var(--red);
    color: var(--red);
}
.sq-opt.selected {
    border-color: var(--red);
    background: var(--red);
    color: var(--white);
}
.sq-opt-sm {
    padding: 10px 24px;
    font-size: .82rem;
    text-align: center;
}
.sq-multi .sq-opt.selected {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}
.sq-next-btn {
    margin-top: 20px;
}
.sq-skip-btn {
    display: block;
    margin: 16px auto 0;
    background: none;
    border: none;
    font-family: var(--font-b);
    font-size: .82rem;
    color: var(--gray-txt);
    cursor: pointer;
    transition: color .2s;
}
.sq-skip-btn:hover { color: var(--red); }

/* Contact form */
.sq-contact-form {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}
.sq-field-wa,
.sq-field-email {
    display: none;
}
.sq-form-group {
    margin-bottom: 20px;
}
.sq-label {
    display: block;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .03em;
    margin-bottom: 8px;
    color: var(--black);
}
.sq-input {
    width: 100%;
    font-family: var(--font-b);
    font-size: .9rem;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 0;
    background: var(--white);
    color: var(--black);
    transition: border-color .2s;
    outline: none;
}
.sq-input:focus { border-color: var(--red); }
.sq-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .78rem;
    color: var(--gray-txt);
    line-height: 1.5;
    cursor: pointer;
}
.sq-checkbox-label a { color: var(--red); text-decoration: underline; }
.sq-checkbox {
    width: 18px; height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--red);
}
.sq-submit-btn {
    width: 100%;
    margin-top: 8px;
}
.sq-submit-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Result ── */
.sq-result {
    display: none;
    text-align: center;
}
.sq-result.active { display: block; }
.sq-result-profile {
    font-size: .78rem;
    color: var(--gray-txt);
    line-height: 1.8;
    margin-bottom: 32px;
    padding: 16px 20px;
    background: #f8f8f8;
    text-align: left;
}
.sq-result-badge {
    display: inline-block;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: .65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--red);
    padding: 6px 16px;
    margin-bottom: 16px;
}
.sq-result-name {
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--black);
}
.sq-result-why {
    font-size: .9rem;
    color: var(--gray-txt);
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.sq-result-bullets {
    list-style: none;
    padding: 0;
    margin: 0 auto 20px;
    max-width: 380px;
    text-align: left;
}
.sq-result-bullets li {
    font-size: .85rem;
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    color: var(--black);
}
.sq-result-bullets li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--red);
    font-weight: 700;
}
.sq-result-meta {
    font-size: .8rem;
    color: var(--gray-txt);
    margin-bottom: 16px;
}
.sq-result-format-note {
    font-size: .8rem;
    color: var(--red);
    font-style: italic;
    margin-bottom: 24px;
}
.sq-result-advice {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #333;
    text-align: center;
}
.sq-advice-btn {
    border-color: #555;
    color: #aaa;
}
.sq-advice-btn:hover {
    border-color: var(--red);
    color: #fff;
}
.sq-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.sq-result-cta {
    flex: 1;
    min-width: 180px;
}
.sq-result-see {
    flex: 1;
    min-width: 180px;
    background: transparent;
    border: 1px solid #444;
    color: #ccc;
    cursor: pointer;
    transition: all .3s var(--ease);
}
.sq-result-see:hover {
    border-color: var(--red);
    color: #fff;
}

/* Alternatives */
.sq-result-alts {
    margin-top: 8px;
    padding-top: 32px;
    border-top: 1px solid #eee;
}
.sq-alts-title {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: .82rem;
    color: var(--gray-txt);
    margin-bottom: 16px;
}
.sq-alts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.sq-alt-card {
    padding: 20px 16px;
    border: 1px solid #eee;
    text-align: left;
}
.sq-alt-card h5 {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: .78rem;
    margin-bottom: 6px;
    color: var(--black);
}
.sq-alt-card p {
    font-size: .75rem;
    color: var(--gray-txt);
    line-height: 1.5;
    margin-bottom: 8px;
}
.sq-alt-card span {
    font-size: .72rem;
    font-weight: 600;
    color: var(--red);
}
.sq-alt-card a {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: .7rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--red);
    border-bottom: 1px solid var(--red);
    transition: opacity .2s;
}
.sq-alt-card a:hover { opacity: .7; }

.sq-restart {
    display: inline-block;
    margin-top: 24px;
    background: none;
    border: none;
    font-family: var(--font-b);
    font-size: .82rem;
    color: var(--gray-txt);
    cursor: pointer;
    text-decoration: underline;
    transition: color .2s;
}
.sq-restart:hover { color: var(--red); }

/* ── Quiz mobile ── */
@media (max-width: 768px) {
    .sq-modal {
        padding: 32px 20px;
        max-height: 95vh;
    }
    .sq-question { font-size: 1rem; }
    .sq-alts-grid { grid-template-columns: 1fr; }
    .sq-result-name { font-size: 1.1rem; }
}
