/* ==========================================================================
   Nouvelle Saison Formation — styles partagés
   Chargé après les styles propres à chaque page : reprend la palette
   existante, corrige les contrastes et définit les composants communs.
   ========================================================================== */

:root {
    --sage-green: #9CAF88;
    --deep-teal: #2C5F6F;
    --warm-beige: #E8D5C4;
    --soft-pink: #F4E8E8;
    --cream: #FAF7F2;
    --dark-text: #2B3A3F;
    --accent-coral: #E8998D;
    /* Variantes foncées pour le texte (contraste WCAG AA ≥ 4.5:1) */
    --sage-text: #566A49;
    --coral-text: #A9473A;
    --muted-text: #5F6B6E;
    --teal-hover: #3D7F92;
}

/* ---------- Base (utilisée par les nouvelles pages) ---------- */
.nsf-page * { margin: 0; padding: 0; box-sizing: border-box; }
.nsf-page {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-text);
    background: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
}
html { scroll-behavior: smooth; }
img { max-width: 100%; }

/* Les adresses e-mail et URL longues ne doivent pas élargir la page sur mobile */
body { overflow-wrap: break-word; }
a[href^="mailto:"], .info-details p, .contact-info strong, .info-value { overflow-wrap: anywhere; }
.contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 968px) {
    .contact-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

.nsf-page .nav {
    position: fixed; top: 0; width: 100%;
    padding: 1.5rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(156, 175, 136, 0.2);
}
.nsf-page .logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem; font-weight: 600;
    color: var(--deep-teal); letter-spacing: 2px; text-decoration: none;
}
.nsf-page .nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nsf-page .nav-links a {
    text-decoration: none; color: var(--dark-text);
    font-size: 0.95rem; font-weight: 500; transition: color 0.3s ease;
}
.nsf-page .hamburger { display: none; flex-direction: column; cursor: pointer; z-index: 1001; }
.nsf-page .hamburger span {
    width: 28px; height: 3px; background: var(--deep-teal);
    margin: 4px 0; transition: all 0.3s ease; border-radius: 3px;
}
.nsf-page .mobile-menu {
    position: fixed; top: 0; right: -100%;
    width: 75%; max-width: 300px; height: 100vh;
    background: var(--cream); box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    transition: right 0.4s ease; z-index: 999; padding-top: 80px;
}
.nsf-page .mobile-menu.active { right: 0; }
.nsf-page .mobile-menu ul { list-style: none; }
.nsf-page .mobile-menu ul li { border-bottom: 1px solid rgba(156, 175, 136, 0.2); }
.nsf-page .mobile-menu ul li a {
    display: block; padding: 1.5rem 2rem; text-decoration: none;
    color: var(--dark-text); font-size: 1.1rem; font-weight: 500; transition: all 0.3s ease;
}
.nsf-page .mobile-menu ul li a:hover { background: var(--sage-green); padding-left: 2.5rem; }
.nsf-page .menu-overlay {
    position: fixed; inset: 0; height: 100vh; background: rgba(0,0,0,0.5);
    opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 998;
}
.nsf-page .menu-overlay.active { opacity: 1; visibility: visible; }
.nsf-page .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(9px, 9px); }
.nsf-page .hamburger.active span:nth-child(2) { opacity: 0; }
.nsf-page .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(8px, -8px); }

.nsf-page .fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.nsf-page .fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---------- Navigation : bouton hamburger accessible, page active ---------- */
button.hamburger {
    background: none;
    border: 0;
    padding: 6px;
    font: inherit;
}
.nav-links a[aria-current="page"] {
    color: var(--deep-teal);
    font-weight: 600;
    border-bottom: 2px solid var(--sage-green);
    padding-bottom: 2px;
}
.mobile-menu a[aria-current="page"] { font-weight: 700; color: var(--deep-teal); }

/* 6 entrées de menu : on resserre puis on bascule plus tôt sur le menu mobile */
@media (max-width: 1150px) {
    .nav-links { gap: 1.6rem !important; }
}
@media (max-width: 960px) {
    .nav-links { display: none !important; }
    .hamburger { display: flex !important; }
}

/* ---------- Correctifs de contraste (texte blanc sur vert sauge / corail) ---------- */
.mobile-menu ul li a:hover { color: var(--dark-text) !important; }
.btn-coral,
.formation-cta.cta-coral,
.badge-distanciel,
.review-avatar,
.formations-section .formation-duration,
.hero .badge,
.tag-sage {
    color: var(--dark-text) !important;
}
a.btn-primary[style*="sage-green"],
.cta-band a {
    color: var(--dark-text) !important;
}
.carousel-dot-duo { cursor: pointer; }

/* Mouvements réduits */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in { opacity: 1 !important; transform: none !important; }
}

/* Focus clavier visible partout */
a:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--deep-teal);
    outline-offset: 3px;
}

/* ---------- Finitions visuelles communes ---------- */
::selection { background: var(--sage-green); color: var(--dark-text); }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

.nav { transition: box-shadow 0.3s ease, padding 0.3s ease, background 0.3s ease; }
.nav.nav--scrolled {
    box-shadow: 0 6px 24px rgba(44, 95, 111, 0.10);
    background: rgba(250, 247, 242, 0.98) !important;
}
@media (min-width: 961px) {
    .nav.nav--scrolled { padding-top: 1rem !important; padding-bottom: 1rem !important; }
}

.btn, .formation-cta, .submit-btn, .btn-submit, .nsf-btn, .cta-band a {
    letter-spacing: 0.02em;
    box-shadow: 0 6px 18px rgba(44, 95, 111, 0.14);
}
.nsf-card, .formation-card, .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.nsf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(44, 95, 111, 0.12);
}
.nsf-featured img { transition: transform 0.6s ease; }
.nsf-featured figure:hover img { transform: scale(1.03); }
.nsf-kicker::after {
    content: "";
    display: block;
    width: 36px;
    height: 2px;
    margin: 0.5rem auto 0;
    background: var(--sage-green);
}
.nsf-hero .nsf-kicker::after { background: rgba(255, 255, 255, 0.7); }
.nsf-refs li { transition: border-color 0.3s ease, transform 0.3s ease; }
.nsf-refs li:hover { border-color: var(--deep-teal); transform: translateY(-2px); }
.formation-card .formation-title { line-height: 1.2; }
.review-card { border-top: 3px solid var(--sage-green); }

/* ---------- Pied de page : mention financement ---------- */
.footer-financement {
    max-width: 900px;
    margin: 0 auto 1.5rem;
    font-size: 0.82rem;
    line-height: 1.6;
    opacity: 0.92;
    text-align: center;
}
.footer-financement a { color: white; text-decoration: underline; }

/* ==========================================================================
   Composants des nouvelles sections
   ========================================================================== */
.nsf-section { padding: 5.5rem 5%; }
.nsf-section--white { background: white; }
.nsf-section--soft { background: linear-gradient(135deg, var(--cream), var(--soft-pink)); }
.nsf-section--green { background: linear-gradient(180deg, var(--cream) 0%, #f2f6ef 100%); }
.nsf-container { max-width: 1200px; margin: 0 auto; }
.nsf-container--narrow { max-width: 860px; margin: 0 auto; }

.nsf-head { text-align: center; margin-bottom: 3rem; }
.nsf-kicker {
    display: inline-block;
    font-size: 0.85rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
    color: var(--sage-text); margin-bottom: 0.6rem;
}
.nsf-head h2, .nsf-h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem; line-height: 1.2;
    color: var(--deep-teal); margin-bottom: 1rem;
}
.nsf-head p { font-size: 1.1rem; color: var(--muted-text); max-width: 760px; margin: 0 auto; }

.nsf-grid { display: grid; gap: 1.5rem; }
.nsf-grid--2 { grid-template-columns: repeat(2, 1fr); }
.nsf-grid--3 { grid-template-columns: repeat(3, 1fr); }
.nsf-grid--4 { grid-template-columns: repeat(4, 1fr); }
.nsf-grid--5 { grid-template-columns: repeat(5, 1fr); }

.nsf-card {
    background: white;
    border-radius: 18px;
    padding: 1.8rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border-top: 4px solid var(--sage-green);
}
.nsf-card--beige { background: linear-gradient(135deg, var(--warm-beige) 0%, var(--cream) 100%); }
.nsf-card--pink { background: linear-gradient(135deg, var(--soft-pink) 0%, var(--cream) 100%); }
.nsf-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.55rem; line-height: 1.25;
    color: var(--deep-teal); margin-bottom: 0.6rem;
}
.nsf-card p { color: #4A5559; font-size: 0.97rem; line-height: 1.7; }
.nsf-card .nsf-link {
    display: inline-block; margin-top: 0.9rem;
    color: var(--deep-teal); font-weight: 600; text-decoration: none;
    border-bottom: 2px solid var(--sage-green);
}
.nsf-card .nsf-link:hover { border-color: var(--deep-teal); }
.nsf-icon { font-size: 1.8rem; line-height: 1; margin-bottom: 0.8rem; display: block; }

.nsf-btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0.4rem;
    border: 2px solid transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    cursor: pointer;
}
.nsf-btn-primary { background: var(--deep-teal); color: white; }
.nsf-btn-primary:hover { background: var(--teal-hover); transform: translateY(-3px); }
.nsf-btn-light { background: white; color: var(--deep-teal); }
.nsf-btn-light:hover { background: var(--cream); transform: translateY(-3px); }
.nsf-btn-outline { background: transparent; color: white; border-color: white; }
.nsf-btn-outline:hover { background: rgba(255,255,255,0.15); transform: translateY(-3px); }
.nsf-btn-coral { background: var(--accent-coral); color: var(--dark-text); }
.nsf-btn-coral:hover { background: #df8679; transform: translateY(-3px); }

/* Encadré d'information (financement, avertissement) */
.nsf-notice {
    background: white;
    border-left: 5px solid var(--sage-green);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    color: var(--dark-text);
    font-size: 0.97rem;
    line-height: 1.75;
}
.nsf-notice strong { color: var(--deep-teal); }
.nsf-notice a { color: var(--deep-teal); font-weight: 600; }
.nsf-notice--warn { border-left-color: var(--accent-coral); background: #FFF9F7; }

/* Chiffres clés */
.nsf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 3rem; }
.nsf-stat {
    background: white; border-radius: 16px; padding: 1.6rem 1rem; text-align: center;
    box-shadow: 0 6px 22px rgba(0,0,0,0.06);
}
.nsf-stat-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem; font-weight: 700; line-height: 1.1; color: var(--deep-teal);
}
.nsf-stat-label { font-size: 0.92rem; color: var(--muted-text); margin-top: 0.3rem; }
.nsf-stat a { color: var(--deep-teal); }

/* Références */
.nsf-featured { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.nsf-featured figure {
    background: white; border-radius: 18px; overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08); margin: 0;
}
.nsf-featured img { width: 100%; height: 340px; object-fit: cover; object-position: center 30%; display: block; }
.nsf-featured figcaption { padding: 1.2rem 1.4rem; }
.nsf-featured figcaption strong {
    display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; color: var(--deep-teal);
}
.nsf-featured figcaption span { color: var(--muted-text); font-size: 0.95rem; }
.nsf-refs {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem;
    list-style: none; padding: 0; margin: 0 auto 1rem; max-width: 1000px;
}
.nsf-refs li {
    background: white; border: 1px solid rgba(156,175,136,0.45);
    border-radius: 50px; padding: 0.55rem 1.2rem;
    font-size: 0.92rem; color: var(--dark-text);
}
.nsf-refs li strong { color: var(--deep-teal); }

/* Étapes (page financement / déroulement) */
.nsf-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; position: relative; }
.nsf-steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 2rem 4.2rem;
}
.nsf-steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: 0;
    width: 2.8rem; height: 2.8rem; border-radius: 50%;
    background: var(--deep-teal); color: white;
    font-weight: 700; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.nsf-steps li::after {
    content: ""; position: absolute; left: 1.35rem; top: 2.9rem; bottom: 0.2rem;
    width: 2px; background: rgba(156,175,136,0.5);
}
.nsf-steps li:last-child::after { display: none; }
.nsf-steps h3 {
    font-family: 'Cormorant Garamond', serif; font-size: 1.6rem;
    color: var(--deep-teal); margin-bottom: 0.3rem; padding-top: 0.25rem;
}
.nsf-steps p { color: #4A5559; line-height: 1.75; }

/* Listes à puces cochées */
.nsf-checklist { list-style: none; padding: 0; margin: 0; }
.nsf-checklist li { position: relative; padding: 0.45rem 0 0.45rem 1.9rem; line-height: 1.6; }
.nsf-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--sage-text); font-weight: 700; }

/* Programme jour par jour */
.nsf-day { background: white; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,0.06); margin-bottom: 1.8rem; }
.nsf-day-title {
    background: var(--deep-teal); color: white;
    font-family: 'Cormorant Garamond', serif; font-size: 1.7rem;
    padding: 1rem 1.6rem;
}
.nsf-day-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.nsf-day-part { padding: 1.5rem 1.6rem; }
.nsf-day-part + .nsf-day-part { border-left: 1px solid rgba(156,175,136,0.3); }
.nsf-day-part h4 { color: var(--sage-text); font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.7rem; }
.nsf-day-part p { color: #4A5559; font-size: 0.95rem; line-height: 1.7; margin-bottom: 0.6rem; }

/* Tableau d'informations pratiques */
.nsf-info-table { width: 100%; border-collapse: collapse; background: white; border-radius: 14px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.06); }
.nsf-info-table th, .nsf-info-table td { padding: 0.95rem 1.2rem; text-align: left; border-bottom: 1px solid #EFE7DD; vertical-align: top; }
.nsf-info-table th { background: var(--warm-beige); color: var(--dark-text); width: 34%; font-weight: 600; }
.nsf-info-table tr:last-child th, .nsf-info-table tr:last-child td { border-bottom: 0; }

/* Mots-clés / valeurs */
.nsf-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; list-style: none; padding: 0; }
.nsf-tags li { background: var(--soft-pink); color: var(--deep-teal); padding: 0.5rem 1.1rem; border-radius: 50px; font-weight: 600; font-size: 0.92rem; }

/* FAQ */
.nsf-faq details { background: white; border-radius: 12px; margin-bottom: 0.9rem; box-shadow: 0 4px 16px rgba(0,0,0,0.05); }
.nsf-faq summary { cursor: pointer; padding: 1.1rem 1.4rem; font-weight: 600; color: var(--deep-teal); list-style-position: inside; }
.nsf-faq details p { padding: 0 1.4rem 1.2rem; color: #4A5559; line-height: 1.75; }

/* Bandeau CTA */
.nsf-cta {
    background: linear-gradient(135deg, var(--deep-teal) 0%, var(--teal-hover) 100%);
    color: white; text-align: center; padding: 4.5rem 5%;
}
.nsf-cta h2 { font-family: 'Cormorant Garamond', serif; font-size: 2.6rem; margin-bottom: 1rem; }
.nsf-cta p { font-size: 1.1rem; max-width: 720px; margin: 0 auto 1.8rem; opacity: 0.95; }

/* Hero des nouvelles pages */
.nsf-hero {
    position: relative; overflow: hidden; margin-top: 80px;
    min-height: 58vh; display: flex; align-items: center; justify-content: center;
    text-align: center; color: white; padding: 4rem 5%;
}
.nsf-hero-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center 35%;
    filter: brightness(0.5) saturate(1.15); z-index: 0;
}
.nsf-hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(135deg, rgba(44,95,111,0.8) 0%, rgba(90,138,148,0.62) 50%, rgba(156,175,136,0.62) 100%);
}
.nsf-hero-content { position: relative; z-index: 2; max-width: 880px; }
.nsf-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: 3.6rem; line-height: 1.15; margin-bottom: 1rem; }
.nsf-hero p { font-size: 1.2rem; opacity: 0.97; margin-bottom: 0.6rem; }
.nsf-hero .nsf-kicker { color: white; opacity: 0.95; }
.nsf-hero-meta { font-style: italic; }

.nsf-breadcrumb { padding: 1.5rem 5% 0; font-size: 0.9rem; max-width: 1200px; margin: 0 auto; }
.nsf-breadcrumb a { color: var(--sage-text); text-decoration: none; font-weight: 600; }

/* Footer des nouvelles pages (identique aux pages existantes) */
.nsf-page footer a:hover { opacity: 1 !important; text-decoration: underline !important; }

/* ---------- Nouveautés : pastille et encart de notification ---------- */
.nsf-new-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.12rem 0.5rem;
    border-radius: 50px;
    background: var(--accent-coral);
    color: var(--dark-text);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.5;
    vertical-align: 2px;
    animation: nsfPulse 2.4s ease-in-out infinite;
}
.nav-links a .nsf-new-badge { border-bottom: 0; }
@keyframes nsfPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232, 153, 141, 0.55); }
    50% { box-shadow: 0 0 0 6px rgba(232, 153, 141, 0); }
}
.nsf-news {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 990;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: white;
    border-radius: 16px;
    border-top: 4px solid var(--accent-coral);
    box-shadow: 0 14px 40px rgba(44, 95, 111, 0.22);
    padding: 1.1rem 1.2rem 0.9rem;
    font-family: 'Montserrat', sans-serif;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.nsf-news.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.nsf-news-kicker { font-size: 0.8rem; font-weight: 700; color: var(--deep-teal); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.6rem; }
.nsf-news-kicker .nsf-new-badge { margin: 0 0.3rem 0 0; }
.nsf-news ul { list-style: none; margin: 0; padding: 0; }
.nsf-news li + li { border-top: 1px solid #EFE7DD; }
.nsf-news a { display: block; padding: 0.55rem 0; text-decoration: none; color: var(--dark-text); }
.nsf-news a strong { display: block; color: var(--deep-teal); font-size: 0.95rem; }
.nsf-news a span { font-size: 0.82rem; color: var(--muted-text); }
.nsf-news a:hover strong { text-decoration: underline; }
.nsf-news-close {
    position: absolute; top: 6px; right: 8px;
    background: none; border: 0; cursor: pointer;
    font-size: 1.4rem; line-height: 1; color: var(--muted-text); padding: 4px 6px;
}
@media (max-width: 600px) {
    .nsf-news { left: 16px; bottom: 16px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .nsf-grid--5 { grid-template-columns: repeat(3, 1fr); }
    .nsf-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nsf-section { padding: 4rem 5%; }
    .nsf-head h2, .nsf-h2 { font-size: 2.1rem; }
    .nsf-grid--2, .nsf-grid--3, .nsf-grid--4, .nsf-grid--5 { grid-template-columns: 1fr; }
    .nsf-stats { grid-template-columns: repeat(2, 1fr); }
    .nsf-stat-number { font-size: 2.2rem; }
    .nsf-featured { grid-template-columns: 1fr; }
    .nsf-featured img { height: 280px; }
    .nsf-day-body { grid-template-columns: 1fr; }
    .nsf-day-part + .nsf-day-part { border-left: 0; border-top: 1px solid rgba(156,175,136,0.3); }
    .nsf-hero h1 { font-size: 2.4rem; }
    .nsf-cta h2 { font-size: 2rem; }
    .nsf-info-table th { width: 40%; }
    .nsf-btn { display: block; margin: 0.6rem auto; max-width: 360px; text-align: center; }
    footer > div > div:first-child { grid-template-columns: 1fr !important; }
}
@media (max-width: 420px) {
    .nsf-stats { grid-template-columns: 1fr; }
    .nsf-steps li { padding-left: 3.6rem; }
}
