/* Template site OF — Pilotis. Couleur principale modifiable via --pri. */
:root {
    --pri: #0f766e;
    --pri-dark: #115e59;
    --pri-light: #14b8a6;
    --pri-pale: #f0fdfa;
    --text: #1e293b;
    --muted: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;
    --orange: #d97706;
    --red: #dc2626;
    --green: #16a34a;
    --radius: 10px;
    --shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--pri); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }

/* ── Boutons ── */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    transition: all 0.15s;
    text-align: center;
}
.btn-primary { background: var(--pri); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--pri-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--pri); border: 2px solid var(--pri); }
.btn-outline:hover { background: var(--pri-pale); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ── Nav ── */
.nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 50;
}
.nav-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 68px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
}
.nav-logo {
    width: 38px; height: 38px;
    background: var(--pri);
    color: white;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    font-weight: 700;
}
.nav-links { display: flex; gap: 24px; flex: 1; }
.nav-links a { color: var(--text); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--pri); }
.nav-cta { flex-shrink: 0; }

/* ── Hero ── */
.hero {
    background: linear-gradient(160deg, var(--pri-pale) 0%, #ffffff 55%);
    padding: 72px 0 56px;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    background: white;
    border: 1px solid var(--pri-light);
    color: var(--pri-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}
.hero h1 {
    font-size: 44px;
    max-width: 760px;
    margin: 0 auto 18px;
    letter-spacing: -0.02em;
}
.hero-sub {
    font-size: 18px;
    color: var(--muted);
    max-width: 660px;
    margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-points {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 48px;
    flex-wrap: wrap;
}
.hero-point { text-align: center; }
.hero-point strong { display: block; font-size: 26px; color: var(--pri); }
.hero-point span { font-size: 13px; color: var(--muted); }

/* ── Bandeau indicateurs de résultats (Ind. 2 Qualiopi) ── */
.stats-band {
    background: var(--pri-dark);
    color: white;
    padding: 40px 0 28px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.stat-val { font-size: 38px; font-weight: 700; line-height: 1; }
.stat-val small { font-size: 20px; opacity: 0.7; }
.stat-label { font-size: 13px; opacity: 0.85; margin-top: 6px; }
.stats-note {
    text-align: center;
    font-size: 11px;
    opacity: 0.55;
    margin-top: 24px;
}
@media (max-width: 700px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Sections ── */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 44px; }
.section-header h2 { font-size: 32px; margin-bottom: 10px; }
.section-header p { color: var(--muted); font-size: 16px; }

/* ── Formations ── */
.formations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.formation-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}
.formation-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(15,23,42,0.1); }
.formation-code {
    display: inline-block;
    background: var(--pri);
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 5px;
    margin-bottom: 14px;
    align-self: flex-start;
}
.formation-card h3 { font-size: 19px; margin-bottom: 10px; }
.formation-desc { color: var(--muted); font-size: 14px; flex: 1; margin-bottom: 18px; }
.formation-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--muted);
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-bottom: 12px;
}
.formation-prix { font-size: 18px; font-weight: 700; color: var(--text); }
.formation-prix small { font-size: 11px; font-weight: 400; color: var(--muted); }
.formation-link { font-weight: 600; font-size: 14px; }

/* ── Sessions ── */
.sessions-filter {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.chip {
    background: white;
    border: 1px solid var(--border);
    padding: 7px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.15s;
}
.chip.active { background: var(--pri); color: white; border-color: var(--pri); }
.sessions-list { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin: 0 auto; }
.session-row {
    display: grid;
    grid-template-columns: 64px 1fr auto auto;
    gap: 20px;
    align-items: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
}
.session-date {
    text-align: center;
    background: var(--pri-pale);
    border-radius: 8px;
    padding: 8px 4px;
}
.session-day { font-size: 22px; font-weight: 700; color: var(--pri-dark); line-height: 1; }
.session-month { font-size: 11px; font-weight: 600; color: var(--pri); margin-top: 3px; }
.session-title { font-weight: 600; font-size: 15px; }
.session-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.places { font-size: 13px; font-weight: 600; white-space: nowrap; }
.places.ok { color: var(--green); }
.places.few { color: var(--orange); }
.places.full { color: var(--red); }

/* ── À propos ── */
.apropos-text { font-size: 16px; color: var(--text); line-height: 1.8; text-align: center; }

/* ── Footer ── */
.footer { background: #0f2027; color: rgba(255,255,255,0.8); padding: 56px 0 0; }
.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 48px;
    padding-bottom: 40px;
}
.footer-brand { color: white; margin-bottom: 14px; }
.footer-certif { font-size: 13px; color: rgba(255,255,255,0.55); }
.footer-contact h4 { color: white; margin-bottom: 12px; font-size: 15px; }
.footer-contact p { font-size: 14px; margin-bottom: 6px; }
.footer-contact a { color: var(--pri-light); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 18px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    text-align: center;
}
.footer-bottom a { color: rgba(255,255,255,0.75); }

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
/* L'attribut hidden doit gagner sur display:flex (sinon le modal s'affiche au chargement) */
.modal-overlay[hidden], [hidden] { display: none !important; }
.modal {
    background: white;
    border-radius: 14px;
    padding: 32px;
    max-width: 560px;
    width: 100%;
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--bg-alt);
    border: none;
    width: 34px; height: 34px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--muted);
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal h3 { font-size: 22px; margin-bottom: 8px; }
.modal-session {
    background: var(--pri-pale);
    border: 1px solid var(--pri-light);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    margin: 14px 0 20px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { margin-bottom: 14px; }
.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}
.form-field input, .form-field select, .form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none;
    border-color: var(--pri);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; }
.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--red);
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
    margin-bottom: 14px;
}
.form-rgpd { font-size: 11px; color: var(--muted); margin-top: 12px; text-align: center; }
.form-success { text-align: center; padding: 24px 0; }
.success-icon {
    width: 60px; height: 60px;
    background: #dcfce7;
    color: var(--green);
    font-size: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}
.form-success p { color: var(--muted); margin: 12px 0 24px; }

.empty-msg { text-align: center; color: var(--muted); padding: 32px; }

/* ── Hero avec image ── */
.hero-img {
    background-size: cover;
    background-position: center;
    color: white;
}
.hero-img h1, .hero-img .hero-sub { color: white; }
.hero-img .hero-sub { opacity: 0.92; }
.hero-img .hero-badge { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.4); color: white; }
.hero-img .hero-point strong { color: var(--pri-light); }
.hero-img .hero-point span { color: rgba(255,255,255,0.8); }
.hero-img .btn-outline { color: white; border-color: white; }
.hero-img .btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ── Cards formation avec image ── */
.formation-card { padding: 0; overflow: hidden; color: inherit; }
.formation-img {
    height: 160px;
    background-size: cover;
    background-position: center;
}
.formation-card-body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; }

/* ── Témoignages ── */
.tems-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.tem-card {
    margin: 0;
    background: white;
    border: 1px solid var(--border);
    border-left: 4px solid var(--pri);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
}
.tem-card blockquote {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    font-style: italic;
}
.tem-card figcaption { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tem-tag {
    background: var(--pri-pale);
    color: var(--pri-dark);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.tem-note { color: var(--pri-dark); font-weight: 700; }
.tem-note small { font-weight: 400; color: var(--muted); }

/* ── Page formation ── */
.fpage-hero {
    background: linear-gradient(160deg, var(--pri-dark) 0%, var(--pri) 100%);
    background-size: cover;
    background-position: center;
    color: white;
    padding: 48px 0 56px;
}
.fpage-hero h1 { font-size: 36px; max-width: 760px; margin: 14px 0; letter-spacing: -0.02em; }
.fpage-sub { font-size: 17px; opacity: 0.92; max-width: 720px; margin-bottom: 18px; }
.fpage-meta { display: flex; gap: 22px; font-size: 15px; margin-bottom: 26px; flex-wrap: wrap; }
.fpage-hero .formation-code { background: rgba(255,255,255,0.16); }
.fpage-hero .btn-outline { color: white; border-color: white; }
.fpage-hero .btn-outline:hover { background: rgba(255,255,255,0.12); }
.breadcrumb { font-size: 13px; opacity: 0.75; margin-bottom: 6px; }
.breadcrumb a { color: inherit; }
.page-hero {
    background: var(--pri-pale);
    padding: 40px 0;
}
.page-hero h1 { font-size: 32px; margin-top: 8px; }
.page-hero .breadcrumb { color: var(--muted); }

.fstats-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    background: var(--pri-pale);
    border: 1px solid var(--pri-light);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 6px;
}
.fstat { text-align: center; }
.fstat-val { font-size: 30px; font-weight: 700; color: var(--pri-dark); line-height: 1.1; }
.fstat-val small { font-size: 16px; color: var(--pri); }
.fstat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stats-note-dark { color: var(--muted); opacity: 1; margin: 8px 0 24px; text-align: center; font-size: 11px; }

.fpage-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 36px;
    margin: 32px 0;
}
.fpage-block { margin-bottom: 26px; }
.fpage-block h2 { font-size: 20px; margin-bottom: 12px; }
.fpage-objectifs { padding-left: 20px; font-size: 15px; line-height: 1.7; }
.fpage-objectifs li { margin-bottom: 8px; }
.fpage-block p { font-size: 15px; line-height: 1.7; }

/* ── Pages légales / contenu ── */
.legal-content h2 { font-size: 20px; margin: 26px 0 10px; }
.legal-content p { font-size: 15px; line-height: 1.75; margin-bottom: 10px; }

@media (max-width: 800px) {
    .tems-grid { grid-template-columns: 1fr; }
    .fpage-grid { grid-template-columns: 1fr; gap: 8px; }
    .fpage-hero h1 { font-size: 26px; }
    .formation-img { height: 130px; }
}

/* ── Modal détail formation + légal ── */
.modal-wide { max-width: 720px; }
.modal .formation-code { margin-bottom: 12px; }
.detail-desc { color: var(--muted); font-size: 15px; margin: 10px 0 22px; }
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 8px;
}
.detail-block { margin-bottom: 18px; }
.detail-block h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pri-dark);
    margin-bottom: 8px;
}
.detail-block ul { margin: 0; padding-left: 18px; font-size: 14px; }
.detail-block ul li { margin-bottom: 6px; }
.detail-block p { font-size: 14px; }
.detail-small { font-size: 12px !important; color: var(--muted); margin-top: 8px; }
.detail-sessions {
    border-top: 1px solid var(--border);
    padding-top: 18px;
    margin-top: 8px;
}
.detail-sessions h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pri-dark);
    margin-bottom: 12px;
}
.detail-session-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.detail-session-row:last-child { border-bottom: none; }
.detail-session-lieu { flex: 1; color: var(--muted); font-size: 13px; }
.legal-modal h4 {
    font-size: 14px;
    margin: 18px 0 6px;
    color: var(--pri-dark);
}
.legal-modal p { font-size: 14px; color: var(--text); margin-bottom: 8px; }
.footer-legal {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 14px 0;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    text-align: center;
}
.formation-card { cursor: pointer; }
@media (max-width: 700px) {
    .detail-grid { grid-template-columns: 1fr; }
}

/* ── Responsive ── */
@media (max-width: 800px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 30px; }
    .hero-points { gap: 28px; }
    .formations-grid { grid-template-columns: 1fr; }
    .session-row { grid-template-columns: 56px 1fr; }
    .session-places { grid-column: 2; }
    .session-row .btn { grid-column: 1 / -1; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .form-row { grid-template-columns: 1fr; }
    .section { padding: 48px 0; }
}
