/* MesActes — thème du site public : mise en page aérée (boutons en pilule, titres centrés, cartes,
   pied de page sombre) aux couleurs du Brand Book v2 : bleu encre (action), papier (fond),
   vermillon (accent rare : filets et petits décors, jamais de texte ni de bouton), Spectral + Inter.
   Les noms --cap-* sont conservés (« vert » = rôle historique) mais pointent vers les jetons --ma-*.
   CSP stricte : décors en SVG data: (img-src data: autorisé), aucun style en ligne. */
.cap {
    /* mesactes-pont.css aliase --ma-* vers les jetons Scolarix sur :root ; le site public reprend ici
       les valeurs du Brand Book (mesactes-tokens.css) pour tout ce qui est sous body.cap. */
    --ma-bleu: #1D2B6B; --ma-bleu-fonce: #15204F; --ma-bleu-pale: #E9EDF8; --ma-vermillon: #D63A2F;
    --ma-encre: #15172B; --ma-texte-2: #3E4252; --ma-gris: #5E6272; --ma-gris-clair: #8A8D9A;
    --ma-filet: #DCDDE3; --ma-filet-leger: #ECEDF1; --ma-papier: #FAF8F3; --ma-surface: #FFFFFF;
    --ma-rouge-texte: #B8322A; --ma-vert-succes: #1E6B47; --ma-danger: #B8322A; --ma-success: #1E6B47;
    --ma-warning-bg: #FDF1E3; --ma-warning-text: #75420B; --ma-info-bg: #E9EDF8; --ma-info-text: #1D2B6B;
    --ma-danger-bg: #FBEDEC; --ma-success-bg: #E6F2EC;
    --ma-border-control: #5E6272; --ma-focus: #1D2B6B; --ma-radius-md: 8px;
    --ma-font-titre: "Spectral", Georgia, "Times New Roman", serif;
    --ma-font-texte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --cap-vert: var(--ma-bleu);           /* décor : icônes, chevrons */
    --cap-vert-pale: var(--ma-bleu-pale);  /* fond des boutons secondaires et pastilles */
    --cap-vert-pale-h: #DCE2F3;            /* survol du bleu pâle */
    --cap-vert-btn: var(--ma-bleu);        /* bouton plein, texte blanc */
    --cap-vert-btn-h: var(--ma-bleu-fonce);
    --cap-vert-texte: var(--ma-bleu);      /* texte d'accent sur blanc ou bleu pâle */
    --cap-cyan: var(--ma-focus);           /* anneau de focus */
    --cap-titre: var(--ma-encre);
    --cap-texte: var(--ma-texte-2);
    --cap-gris: var(--ma-gris);            /* sur-titres */
    --cap-gris-fond: var(--ma-papier);
    --cap-ligne: var(--ma-filet-leger);
    --cap-anthracite: var(--ma-bleu-fonce);
    --cap-or: var(--ma-vermillon);
    --cap-violet: var(--ma-bleu);
    --cap-rouge: var(--ma-vermillon);
    --cap-ombre: 0 6px 24px rgba(21, 23, 43, .06);
    --cap-ombre-forte: 0 12px 36px rgba(21, 23, 43, .10);
    --sx-sans: var(--ma-font-texte);
    --sx-serif: var(--ma-font-titre);
    background: var(--ma-papier);
    color: var(--cap-texte);
    font-family: var(--ma-font-texte);
    font-weight: 400;
}
.cap :where(h1, h2, h3, h4) { font-family: var(--ma-font-titre); color: var(--cap-titre); font-weight: 600; letter-spacing: -.005em; }
.cap a { color: var(--cap-vert-texte); }

/* ---------- utilitaires de section (sur-titre, titre à dégradé, décors) ---------- */
.cap-kicker { display: block; margin: 0 0 .9rem; font-size: var(--sx-fs-14); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cap-gris); }
.cap-title { margin: 0 auto; max-width: 720px; font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); line-height: 1.2; font-weight: 600; color: var(--cap-titre); }
.cap-grad { color: var(--ma-bleu); font-style: italic; font-weight: 500; } /* mot mis en avant : Spectral italique bleu (pas de dégradé, §3.1) */
.cap-head { position: relative; text-align: center; margin: 0 auto 2.6rem; max-width: 820px; }
.cap-head .cap-lead { margin: 1.2rem auto 0; max-width: 620px; color: var(--cap-texte); line-height: 1.7; }
/* étoiles dorées (à droite) et boucle pointillée violette (à gauche) */
.cap-head::before, .cap-head::after { content: ""; position: absolute; pointer-events: none; background-repeat: no-repeat; background-size: contain; }
.cap-head::after { top: -1.4rem; right: 4%; width: 64px; height: 56px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 56'%3E%3Cg fill='none' stroke='%23D63A2F' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M18 2c1 10 4 13 12 14-8 1-11 4-12 14-1-10-4-13-12-14 8-1 11-4 12-14z'/%3E%3Cpath d='M46 22c.7 7 3 9 9 10-6 1-8.3 3-9 10-.7-7-3-9-9-10 6-1 8.3-3 9-10z'/%3E%3C/g%3E%3C/svg%3E"); }
.cap-head::before { top: 3.6rem; left: 0; width: 84px; height: 62px; opacity: .35;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 62'%3E%3Cpath d='M82 6C62-2 40 8 42 30c1 10 14 10 12 2-2-9-17-8-26-2C16 38 6 46 4 60' fill='none' stroke='%231D2B6B' stroke-width='1.6' stroke-dasharray='4 4' stroke-linecap='round'/%3E%3C/svg%3E"); }
@media (max-width: 767.98px) { .cap-head::before { display: none; } .cap-head::after { right: 0; top: -2rem; width: 44px; height: 40px; } }

/* ---------- boutons en pilule ---------- */
.cap-btn, .cap-btn-pale { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.6rem; border: 0; border-radius: 1000px; font: 600 var(--sx-fs-16)/1.25 var(--ma-font-texte); text-align: center; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s, box-shadow .2s; }
.cap a.cap-btn, .cap .cap-btn { background: var(--cap-vert-btn); color: #fff; box-shadow: 0 8px 20px rgba(29, 43, 107, .22); }
.cap a.cap-btn:hover, .cap .cap-btn:hover { background: var(--cap-vert-btn-h); color: #fff; text-decoration: none; transform: translateY(-1px); }
.cap a.cap-btn-pale, .cap .cap-btn-pale { background: var(--cap-vert-pale); color: var(--cap-vert-texte); }
.cap a.cap-btn-pale:hover, .cap .cap-btn-pale:hover { background: var(--cap-vert-pale-h); color: var(--cap-vert-btn-h); text-decoration: none; }
.cap-btn-sm { min-height: 46px; padding: .55rem 1.3rem; }
.cap-btn:focus-visible, .cap-btn-pale:focus-visible { outline: 3px solid var(--cap-cyan); outline-offset: 3px; }
/* les boutons existants des pages publiques (sx-btn) prennent le même style */
.cap .sx-btn { border-radius: 1000px; font-weight: 600; }
.cap .sx-btn-primary { background: var(--cap-vert-btn); border-color: var(--cap-vert-btn); color: #fff; box-shadow: 0 8px 20px rgba(29, 43, 107, .22); }
.cap .sx-btn-primary:hover { background: var(--cap-vert-btn-h); border-color: var(--cap-vert-btn-h); color: #fff; }
.cap .sx-btn-outline { background: var(--cap-vert-pale); border-color: var(--cap-vert-pale); color: var(--cap-vert-texte); }
.cap .sx-btn-outline:hover { background: var(--cap-vert-pale-h); color: var(--cap-vert-btn-h); }

/* ---------- bandeau d'information ---------- */
.cap-info { background: var(--ma-bleu-fonce); color: #fff; border-bottom: 3px solid var(--ma-vermillon); } /* filet signature */
.cap-info-in { display: flex; align-items: center; justify-content: center; gap: .8rem; min-height: 46px; padding-top: .5rem; padding-bottom: .5rem; text-align: center; }
.cap-info p { margin: 0; font-size: var(--sx-fs-14); line-height: 1.4; color: #fff; }
.cap .cap-info a { color: #fff; text-decoration: underline; font-weight: 700; }
.cap-info-tag { display: none; align-items: center; gap: .35rem; flex: 0 0 auto; padding: .15rem .6rem; border-radius: 6px; background: #fff; color: var(--ma-bleu); font-size: var(--sx-fs-12); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
@media (min-width: 768px) { .cap-info-tag { display: inline-flex; } }

/* ---------- en-tête ---------- */
.cap-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--cap-ligne); }
.cap-header-in { display: flex; align-items: center; gap: .8rem; min-height: 76px; }
.cap-brand { display: inline-flex; align-items: center; gap: .7rem; margin-right: auto; min-height: 44px; text-decoration: none; }
.cap-brand img { display: block; height: 40px; width: auto; }
.cap-brand-tag { display: none; padding-left: .7rem; border-left: 2px solid var(--cap-rouge); font-size: 11px; line-height: 1.2; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--cap-titre); }
.cap-nav { display: none; }
.cap-nav ul, .cap-menu-panel ul { list-style: none; margin: 0; padding: 0; }
.cap-nav ul { display: flex; align-items: center; gap: .3rem; }
.cap .cap-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem; color: var(--cap-titre); font-weight: 600; text-decoration: none; border-radius: 1000px; transition: color .15s, background .15s; }
.cap .cap-nav a:hover { color: var(--cap-vert-texte); background: var(--cap-vert-pale); }
.cap .cap-nav a[aria-current] { color: var(--cap-vert-texte); }
.cap-menu > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 1000px; background: var(--cap-gris-fond); color: var(--cap-titre); cursor: pointer; font-size: 1.4rem; }
.cap-menu > summary::-webkit-details-marker { display: none; }
.cap-menu[open] > summary { background: var(--cap-vert-pale); color: var(--cap-vert-texte); }
.cap-menu-panel { position: absolute; left: 0; right: 0; top: 100%; padding: .4rem 16px 1rem; background: #fff; border-bottom: 1px solid var(--cap-ligne); box-shadow: var(--cap-ombre); }
.cap .cap-menu-panel a { display: flex; align-items: center; min-height: 52px; padding: 0 .3rem; border-bottom: 1px solid var(--cap-ligne); color: var(--cap-titre); font-weight: 600; text-decoration: none; }
.cap .cap-menu-panel a[aria-current] { color: var(--cap-vert-texte); }
@media (max-width: 359.98px) { .cap-header .cap-btn-sm { padding-left: .9rem; padding-right: .9rem; } .cap-header .cap-btn-sm .sx-i { display: none; } }
@media (min-width: 576px) { .cap-brand-tag { display: block; } }
@media (min-width: 1100px) { .cap-nav { display: block; } .cap-menu { display: none; } .cap-header .cap-btn-sm { margin-left: .4rem; } }

/* ---------- héros des pages intérieures (bandeau sombre centré + courbe) ---------- */
.cap-phero { position: relative; overflow: hidden; color: #fff; text-align: center; background:
    linear-gradient(180deg, rgba(21, 32, 79, .62) 0%, rgba(21, 32, 79, .86) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 400' preserveAspectRatio='xMidYMax slice'%3E%3Cdefs%3E%3ClinearGradient id='c' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%234B7BA8'/%3E%3Cstop offset='1' stop-color='%23A9C3D6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1440' height='400' fill='url(%23c)'/%3E%3Cg fill='%23364C63' opacity='.9'%3E%3Cpath d='M0 300h60v-60h40v-40h50v100h30v-80h60v80h40v-130h70v130h40v-70h50v70h60v-110h40v-30h30v140h50v-90h70v90h40v-60h60v60h40v-150h60v150h50v-80h40v80h60v-100h50v100h40v-70h60v70h50v-120h60v120h40v-60h50v60h40v100H0z'/%3E%3C/g%3E%3Cg fill='%2321354A'%3E%3Cpath d='M0 340h90v-40h60v40h80v-50h50v50h100v-30h70v30h90v-60h60v60h110v-40h60v40h90v-50h70v50h100v-30h60v30h90v-60h50v60h110v-40h60v40h100v60H0z'/%3E%3C/g%3E%3C/svg%3E") center bottom / cover no-repeat; }
.cap-phero-in { position: relative; z-index: 1; padding-top: 3.4rem; padding-bottom: 5.4rem; }
.cap-phero .cap-kicker { color: #fff; opacity: .95; }
.cap-phero h1 { margin: 0 auto; max-width: 820px; color: #fff; font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); line-height: 1.15; font-weight: 700; }
.cap-phero p { margin: 1rem auto 0; max-width: 660px; color: #E9EDF8; line-height: 1.65; }
.cap-phero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; background: var(--ma-papier); clip-path: ellipse(75% 100% at 50% 100%); }

/* ---------- sections ---------- */
.cap-sec { padding: 4.5rem 0; }
.cap-sec-menthe { background: linear-gradient(180deg, var(--ma-bleu-pale) 0%, var(--ma-papier) 75%); }
.cap-sec-gris { background: var(--ma-surface); border-top: 1px solid var(--ma-filet-leger); border-bottom: 1px solid var(--ma-filet-leger); }
.cap-card { background: #fff; border: 1px solid var(--cap-ligne); border-radius: 10px; box-shadow: var(--cap-ombre); }
.cap-num { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; background: var(--cap-vert-pale); color: var(--cap-vert-texte); font-size: var(--sx-fs-20); font-weight: 700; }
.cap-tile { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 80px; width: 80px; height: 80px; border-radius: 14px; background: var(--ma-bleu-pale); color: var(--ma-bleu); font-size: 1.9rem; }
.cap-tile.is-bleu { background: var(--ma-bleu-pale); }
.cap-tile.is-vert { background: var(--ma-filet-leger); }
.cap-tile.is-ciel { background: #F3EEE3; } /* papier soutenu */

/* ---------- FAQ en deux colonnes (cartes à chevron vert) ---------- */
.cap-faq { display: grid; gap: 1.4rem; align-items: start; }
.cap-faq-col { display: grid; gap: 1.4rem; }
.cap-faq details { background: #fff; border: 1px solid var(--cap-ligne); border-radius: 8px; box-shadow: 0 2px 10px rgba(21, 23, 43, .04); }
.cap-faq summary { display: flex; align-items: flex-start; gap: .8rem; min-height: 64px; padding: 1.15rem 1.5rem; cursor: pointer; list-style: none; color: var(--cap-titre); font-weight: 600; line-height: 1.6; }
.cap-faq summary::-webkit-details-marker { display: none; }
.cap-faq summary .sx-i { flex: 0 0 auto; margin-top: .35em; color: var(--cap-vert); font-size: .9rem; transition: transform .2s; }
.cap-faq details[open] summary .sx-i { transform: rotate(180deg); }
.cap-faq summary:focus-visible { outline: 3px solid var(--cap-cyan); outline-offset: 2px; border-radius: 8px; }
.cap-faq details p { margin: 0; padding: 0 1.5rem 1.3rem 3.2rem; color: var(--cap-texte); line-height: 1.7; }
@media (min-width: 992px) { .cap-faq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- encart contact (gris, chevauche le pied de page) ---------- */
.cap-contact-wrap { position: relative; z-index: 1; margin-bottom: -4rem; }
.cap-contact { padding: 4rem 1.4rem 3.4rem; border-radius: 10px; background: var(--ma-bleu-pale); border-top: 4px solid var(--ma-vermillon); }
.cap-contact-grid { display: grid; gap: 1.6rem; max-width: 820px; margin: 0 auto; }
.cap-contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.cap-contact-item .sx-i { flex: 0 0 auto; margin-top: .2rem; font-size: 1.4rem; color: var(--cap-vert); }
.cap-contact-item b { display: block; color: var(--cap-titre); }
.cap-contact-item p { margin: .2rem 0 0; line-height: 1.6; }
.cap-contact-item a { font-weight: 600; }
@media (min-width: 768px) { .cap-contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cap-contact { padding: 4.4rem 3rem 3.8rem; } }

/* ---------- pied de page anthracite ---------- */
.cap-footer { padding: 4rem 0 1.6rem; background: var(--cap-anthracite); color: #C9CEE0; }
.cap-contact-wrap + .cap-footer, main:has(.cap-contact-wrap:last-child) + .cap-footer { padding-top: 8rem; }
.cap-footer-grid { display: grid; gap: 2rem; }
.cap-footer-brand img { display: block; height: 40px; width: auto; margin-bottom: 1rem; }
.cap-footer p { margin: 0; max-width: 560px; line-height: 1.7; color: #C9CEE0; }
.cap-footer h2 { margin: 0 0 .6rem; font-size: var(--sx-fs-14); letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.cap-footer ul { list-style: none; margin: 0; padding: 0; }
.cap .cap-footer a { display: inline-flex; align-items: center; min-height: 40px; color: #C9CEE0; text-decoration: none; }
.cap .cap-footer a:hover { color: #fff; text-decoration: underline; }
.cap-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: var(--sx-fs-14); }
@media (min-width: 768px) { .cap-footer-grid { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); } }

/* ---------- pages intérieures existantes (sx-sec, messages, flash) ---------- */
.cap .sx-sec { background: var(--ma-papier); }
.cap .sx-eyebrow { color: var(--cap-gris); letter-spacing: .06em; font-weight: 600; }
.cap .sx-divider { background: var(--ma-vermillon); }
.cap .sx-sec h1 { color: var(--cap-titre); }
.cap > .container-fluid, .cap main ~ .container-fluid { max-width: var(--sx-wrap); margin: 0 auto; }
.cap .alert { border-radius: 10px; font-weight: 600; }
.cap .alert-info { background: var(--ma-info-bg); color: var(--ma-info-text); border: 1px solid #CDD5EE; }
.cap .alert-success { background: var(--ma-success-bg); color: var(--ma-success); border: 1px solid #C5DFD1; }

@media (prefers-reduced-motion: reduce) { .cap-btn, .cap-btn-pale, .cap-faq summary .sx-i { transition: none; } }

/* ---------- champs des pages publiques (vérification…) : blancs, bord gris ≥ 3:1, focus bleu ---------- */
.cap .sx-input, .cap .form-control { min-height: 48px; background-color: #fff; border: 1px solid var(--ma-border-control); border-radius: var(--ma-radius-md); box-shadow: none; color: var(--cap-titre); }
.cap .sx-input:hover, .cap .form-control:hover { border: 1px solid var(--ma-encre); background-color: #fff; }
.cap .sx-input:focus, .cap .form-control:focus { outline: 0; border-color: var(--cap-vert); box-shadow: 0 0 0 3px rgba(29, 43, 107, .18); }

/* sur-titres en capitales : Inter (Spectral reste réservé aux titres éditoriaux, Brand Book §5.1) */
.cap .cap-footer h2, .cap .at-cycle { font-family: var(--ma-font-texte); }
