/* =====================================================================
   CERPE — Système de design (Direction C : Affirmé & contemporain)
   Mobile-first. Unités relatives : rem / em / % / fr / clamp() / ch.
   Les px ne servent qu'aux filets/hairlines (1px).
   Contraste : tout texte vise ≥ 4.5:1. Le jaune ne porte JAMAIS de texte
   sur fond clair — il sert d'aplat/bloc avec texte foncé par-dessus.
   ===================================================================== */

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* ---------- Tokens ---------- */
:root {
  /* Couleurs (charte CERPE — V5) */
  --ink:      #333333;   /* texte principal / fonds foncés (adouci vs #1c1b16) */
  --ink-soft: #4f4d3e;   /* texte secondaire (≥ 4.5:1 sur blanc) */
  --yellow:   #FFD45C;   /* OR principal — aplats (doux, issu de l'affiche) */
  --yellow-2: #FBE254;   /* jaune logo — ticks, survols, états actifs */
  --orange:   #F48221;   /* touche secondaire — petites doses */
  --grey:     #A8A8A8;   /* touches discrètes : filets, inactifs, texte sur sombre */
  --olive:    #6f662f;   /* labels / liens (assombri vs #736A3C pour le contraste) */
  --paper:    #ffffff;
  --paper-2:  #FAF9F3;   /* fond de section chaud */
  --paper-3:  #F2F0E6;   /* fond placeholder */
  --line:     #e6e4d7;   /* filets */
  --line-2:   #d9d6c6;
  --field-border: #8a8674; /* bordure des champs de saisie — 3.64:1 sur blanc (RGAA 3.3) */
  --grad:     linear-gradient(180deg, #FFFEF9 0%, #FFF1B8 45%, #FFD45C 100%); /* grandes surfaces */

  /* Typo */
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;

  /* Échelle typographique fluide */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.3rem + 0.75vw, 1.95rem);
  --step-3:  clamp(1.8rem, 1.55rem + 1.25vw, 2.6rem);
  --step-4:  clamp(2.2rem, 1.75rem + 2.25vw, 3.6rem);
  --step-5:  clamp(2.6rem, 1.9rem + 3.5vw, 5rem);

  /* Espacements (rem) */
  --sp-1: 0.5rem; --sp-2: 0.75rem; --sp-3: 1rem; --sp-4: 1.5rem;
  --sp-5: 2rem;   --sp-6: 3rem;    --sp-7: 4.5rem; --sp-8: 6.5rem;

  /* Conteneur */
  --maxw: 78rem;            /* ~1248px */
  --gutter: clamp(1.1rem, 4vw, 3rem);

  /* Divers */
  --radius: 0.15rem;        /* coins quasi-droits (C = sharp) */
  --ring: 0 0 0 0.18rem rgba(244,130,33,.55); /* focus — orange, bien visible */
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--sp-7); }
.section--tight { padding-block: var(--sp-6); }
.stack > * + * { margin-top: var(--sp-3); }
.eyebrow {
  font-family: var(--font-head); font-weight: 700;
  font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--olive); display: inline-flex; align-items: center; gap: 0.6em;
}
.eyebrow::before { content:""; width: 1.6rem; height: 0.18rem; background: var(--yellow-2); display:inline-block; }

/* Accessibilité : focus visible */
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: none; box-shadow: var(--ring); border-radius: var(--radius);
}
.skip-link {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 200;
  background: var(--ink); color: #fff; padding: 0.7rem 1.1rem; border-radius: var(--radius);
  transition: top .15s ease;
}
.skip-link:focus { top: 0.5rem; }

/* ---------- Boutons ---------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  font-family: var(--font-head); font-weight: 600; font-size: var(--step-0);
  line-height: 1; text-decoration: none; border: 0.12rem solid transparent;
  padding: 0.85em 1.4em; border-radius: var(--radius);
  background: var(--btn-bg); color: var(--btn-fg);
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(0.2em); }
.btn--primary { --btn-bg: var(--ink); --btn-fg:#fff; }
.btn--accent  { --btn-bg: var(--yellow); --btn-fg: var(--ink); }
.btn--accent:hover { --btn-bg: var(--yellow-2); } /* s'illumine au survol */
.btn--ghost   { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light   { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn--on-dark-ghost { --btn-bg: transparent; --btn-fg:#fff; border-color: rgba(255,255,255,.4); }
.btn--on-dark-ghost:hover { border-color:#fff; }
.btn--block { display:flex; width:100%; justify-content:center; }

/* petit carré-flèche accent (signature C) */
.arrow-sq { background: var(--orange); color: #fff; width: 1.6em; height: 1.6em;
  display:inline-flex; align-items:center; justify-content:center; flex:none; font-weight:700; }

/* ---------- En-tête ---------- */
.site-header { background: var(--ink); color: #f3f1e6; position: sticky; top: 0; z-index: 100; box-shadow: 0 0.3rem 0.9rem -0.2rem rgba(0, 0, 0, .45); }
.site-header__inner { display: flex; align-items: center; gap: var(--sp-4); min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: clamp(2.1rem, 5vw, 2.4rem); width: auto; }
.brand:focus-visible { box-shadow: 0 0 0 0.18rem rgba(255,212,92,.85); }

/* nav desktop */
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; padding: 0; display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.7rem); }
.main-nav a { text-decoration: none; color: #ece9da; font-family: var(--font-head); font-weight: 500;
  font-size: var(--step--1); letter-spacing: 0.01em; padding-block: 0.4rem; position: relative; white-space: nowrap; }
.main-nav a:hover { color: #fff; }
.main-nav a[aria-current="page"] { color: var(--yellow-2); }
.main-nav a[aria-current="page"]::after { content:""; position:absolute; left:0; right:0; bottom:-0.15rem; height:0.16rem; background: var(--yellow-2); }

/* Sous-menu déroulant « Formations » (CSS pur, sans JS) */
.main-nav .has-sub { position: relative; }
.main-nav .has-sub > a .caret { display:inline-block; width:0; height:0; margin-left:0.4em;
  border:0.3em solid transparent; border-top-color: currentColor; border-bottom:0; vertical-align:0.15em; transition: transform .2s ease; }
.subnav { list-style:none; margin:0; padding:0; }
.main-nav ul.subnav { display:block; }
@media (min-width: 60.01rem) {
  .subnav { position:absolute; top:100%; left:50%; transform:translateX(-50%) translateY(0.45rem);
    min-width:16rem; background:#23221b; border:1px solid #3a382a; border-radius:0.3rem;
    box-shadow:0 1rem 2.4rem -0.8rem rgba(0,0,0,.65); padding:0.4rem; z-index:120;
    opacity:0; visibility:hidden; pointer-events:none; transition:opacity .16s ease, transform .16s ease; }
  .main-nav .has-sub:hover > .subnav, .main-nav .has-sub:focus-within > .subnav {
    opacity:1; visibility:visible; pointer-events:auto; transform:translateX(-50%) translateY(0); }
  .main-nav .has-sub:hover > a .caret, .main-nav .has-sub:focus-within > a .caret { transform: rotate(180deg); }
  .subnav a { display:block; white-space:nowrap; padding:0.6rem 0.85rem; border-radius:0.2rem; font-weight:500; }
  .subnav a:hover { background:#33312f; color:#fff; }
}
@media (max-width: 60rem) {
  .main-nav .has-sub > a .caret { display:none; }
  .subnav { background:#1d1c16; }
  .subnav li { border-bottom:1px solid #2c2a1e; }
  .subnav li:last-child { border-bottom:0; }
  .subnav a { padding:0.8rem 0 0.8rem 1.4rem !important; font-size:var(--step--1) !important; color:#cbc8b8; }
}

.header-actions { display: flex; align-items: center; gap: var(--sp-3); }
.icon-btn { background:#2a2920; color:#f3f1e6; width:2.5rem; height:2.5rem; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center; border:0; text-decoration:none; }
.icon-btn:hover { background:#3a3829; color:#fff; }
.icon-btn svg { width: 1.2rem; height:1.2rem; }
.header-actions .btn { padding: 0.7em 1.15em; font-size: var(--step--1); }

/* hamburger (CSS-only via checkbox) */
.nav-toggle-label { display: inline-flex; flex-direction: column; gap: 0.32rem; padding: 0.6rem; cursor: pointer; border: 0; background: none; }
.nav-toggle-label:focus-visible { outline: 0.18rem solid var(--yellow-2); outline-offset: 0.1rem; }
.nav-toggle-label span { width: 1.5rem; height: 0.16rem; background: #f3f1e6; transition: .2s ease; }

/* ---------- En-tête : mobile par défaut ---------- */
@media (max-width: 60rem) {
  .main-nav {
    position: fixed; inset: 4.5rem 0 auto 0; background: var(--ink);
    border-top: 1px solid #33312455; max-height: 0; overflow: hidden;
    transition: max-height .28s ease; margin: 0;
  }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.5rem; }
  .main-nav li { border-bottom: 1px solid #2c2a1e; }
  .main-nav a { display: block; padding: 1rem 0; font-size: var(--step-0); }
  .main-nav a[aria-current="page"]::after { display: none; }
  .site-header.is-nav-open .main-nav { max-height: 80vh; }
  .site-header.is-nav-open .nav-toggle-label span:nth-child(1) { transform: translateY(0.48rem) rotate(45deg); }
  .site-header.is-nav-open .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .site-header.is-nav-open .nav-toggle-label span:nth-child(3) { transform: translateY(-0.48rem) rotate(-45deg); }
  .site-header__inner > .header-actions { margin-left: auto; }
  .header-actions .btn--connexion-text { display: none; } /* gardé dans le menu */
}
@media (min-width: 60.01rem) {
  .nav-toggle-label { display: none; }
  /* Évite le doublon "Connexion" : le bouton jaune suffit sur desktop,
     le lien du menu n'apparaît qu'en version mobile. */
  .main-nav li:has(> .nav-connexion-mobile) { display: none; }
}

/* ---------- Placeholders image ---------- */
.ph {
  position: relative; background-color: var(--paper-3);
  background-image: repeating-linear-gradient(135deg, #e4e1d2 0 0.12rem, transparent 0.12rem 0.7rem);
  display: flex; align-items: center; justify-content: center; color: #908c78; overflow: hidden;
}
.ph__label { font-family: var(--font-head); font-size: var(--step--1); letter-spacing: .04em;
  text-align: center; max-width: 80%; background: rgba(255,255,255,.9); color:#6f6c58;
  padding: 0.4em 0.7em; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Cartes ---------- */
.card { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; }
.card .ph { aspect-ratio: 16 / 10; }
.card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card__num { font-family: var(--font-head); font-weight: 700; font-size: var(--step--1);
  letter-spacing: .08em; color: var(--olive); text-transform: uppercase; }
.card__title { font-size: var(--step-1); }
.card__text { color: var(--ink-soft); font-size: var(--step-0); }
.card__link { margin-top: auto; font-family: var(--font-head); font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5em; color: var(--ink); }

/* ---------- Tag / chip ---------- */
.tag { display:inline-flex; align-items:center; gap:.4em; font-family:var(--font-head); font-weight:600;
  font-size: var(--step--1); letter-spacing:.04em; background: var(--yellow); color: var(--ink);
  padding: 0.35em 0.7em; }
.tag--olive { background: transparent; color: var(--olive); border:1px solid var(--line-2); }

/* ---------- Bandeau (signature) ---------- */
.band-yellow { background: var(--grad); color: var(--ink); }
.band-dark { background: var(--ink); color: #f1efe4; }
.band-dark .eyebrow { color: var(--yellow-2); }
.band-dark .eyebrow::before { background: var(--yellow-2); }

/* ---------- En-tête de page (pages intérieures) ---------- */
.page-hero { background: var(--ink); color: #f3f1e6; position: relative; }
.page-hero::after { content:""; position:absolute; left:0; bottom:0; width: min(40%, 16rem); height: 0.4rem; background: var(--yellow-2); }
.page-hero__inner { padding-block: clamp(2.5rem, 7vw, 4.5rem); display: grid; gap: var(--sp-4); }
.page-hero .eyebrow { color: var(--yellow-2); }
.page-hero .eyebrow::before { background: var(--yellow-2); }
.page-hero h1 { font-size: var(--step-4); max-width: 18ch; }
.page-hero p { color: #c9c6b6; max-width: 56ch; font-size: var(--step-1); }
.breadcrumb { font-size: var(--step--1); color:var(--grey); font-family: var(--font-head); }
.breadcrumb ol { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; align-items:center; gap:0.4em; }
.breadcrumb li { display:flex; align-items:center; gap:0.4em; }
.breadcrumb li:not(:first-child)::before { content:"/"; color:#5a5747; }
.breadcrumb a { color:#cbc8b8; text-decoration:none; }
.breadcrumb a:hover { color:#fff; }

/* ---------- Sommaire « Sur cette page » (fiches formation, Le CERPE, multi-accueil) ---------- */
.page-toc { max-width: var(--maxw); margin: var(--sp-4) auto 0; padding: 0 var(--gutter);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-4);
  font-family: var(--font-head); font-size: var(--step--1); }
.page-toc__label { border-left: 0.18rem solid var(--yellow); padding-left: var(--sp-2);
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--olive); }
.page-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.page-toc a { color: var(--ink-soft); text-decoration: none; }
.page-toc a:hover, .page-toc a:focus-visible { color: var(--ink); text-decoration: underline; }
h2[id] { scroll-margin-top: 1.5rem; }
@media (min-width: 56rem) {
  .page-hero__inner { grid-template-columns: 1.3fr 1fr; align-items: end; }
  .page-hero__inner .page-hero__lead { justify-self: end; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d9d6c8; }
.site-footer a { color: #d9d6c8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); padding-block: var(--sp-7); }
.footer-brand img { height: 2.4rem; margin-bottom: var(--sp-3); }
.footer-brand p { color: #b7b4a4; font-size: var(--step--1); max-width: 32ch; }
.footer-contact-block { margin-top: var(--sp-4); }
.footer-contact { font-style: normal; display: flex; flex-direction: column; gap: 0.45rem;
  margin-top: 0.2rem; font-size: var(--step--1); color:#cbc8b8; }
.footer-contact .fc-line strong { color:#e9e6d7; font-weight:600; }
.footer-contact a { color:#d9d6c8; }
.footer-contact a:hover { color: var(--yellow-2); }
.footer-contact .fc-link { color: var(--yellow-2); font-weight:600; }
.footer-contact .fc-link:hover { color:#fff; }
.footer-cert { margin-top: var(--sp-4); }
.footer-cert img { width: 9rem; height: auto; background: #fff; padding: 0.5rem 0.6rem; border-radius: 0.2rem; display: block; }
.footer-col h3, .footer-contact-block h3 { font-family: var(--font-head); font-size: var(--step--1); letter-spacing:.12em;
  text-transform: uppercase; color: #ada891; font-weight: 700; margin-bottom: var(--sp-3); }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a { font-size: var(--step--1); }
.newsletter-form { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.3rem; }
.newsletter-form .field { display:flex; gap:0.5rem; }
.newsletter-form input { flex:1; background:#2a2920; border:1px solid #3c3a2b; color:#fff;
  padding: 0.75em 0.9em; border-radius: var(--radius); font: inherit; min-width: 0; }
.newsletter-form input::placeholder { color:#9b977f; }
.newsletter-form .btn { padding: 0.75em 1.1em; }

/* --- Formulaire AcyMailing dans le footer : calqué sur .newsletter-form (markup AcyMailing réel) --- */
.footer-newsletter .newsletter-form .acym_module,
.footer-newsletter .newsletter-form .acym_fulldiv,
.footer-newsletter .newsletter-form .acym_form,
.footer-newsletter .newsletter-form .onefield { margin: 0; padding: 0; }
/* Input + bouton sur une ligne (comme le design d'origine), avec repli en colonne si trop étroit */
.footer-newsletter .newsletter-form .acym_module_form { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.footer-newsletter .newsletter-form .acym_form { flex: 1 1 12rem; min-width: 0; }
.footer-newsletter .newsletter-form .acysubbuttons { flex: 0 0 auto; }
/* IMPORTANT : l'input est DANS le <label> → on masque seulement le texte "E-mail" (le span), pas le label ! */
.footer-newsletter .newsletter-form .acym__users__creation__fields__title {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.footer-newsletter .newsletter-form label { display: block; margin: 0; }
/* Champ e-mail : même look que l'input d'origine */
.footer-newsletter .newsletter-form input[type="email"],
.footer-newsletter .newsletter-form input[type="text"] {
  width: 100%; box-sizing: border-box;
  background: #2a2920; border: 1px solid #3c3a2b; color: #fff;
  padding: 0.75em 0.9em; border-radius: var(--radius); font: inherit; min-width: 0;
}
.footer-newsletter .newsletter-form input::placeholder { color: #9b977f; }
/* Bouton "S'inscrire" : jaune, comme .btn--accent */
.footer-newsletter .newsletter-form .acysubbuttons { margin: 0; }
.footer-newsletter .newsletter-form button[type="submit"],
.footer-newsletter .newsletter-form .subbutton {
  display: inline-block; cursor: pointer; border: 0;
  background: var(--yellow); color: var(--ink);
  font-family: var(--font-head); font-weight: 600; line-height: 1.2;
  padding: 0.75em 1.3em; border-radius: var(--radius); font-size: var(--step--1);
}
.footer-newsletter .newsletter-form button[type="submit"]:hover,
.footer-newsletter .newsletter-form .subbutton:hover { background: var(--yellow-2); }

.social { display:flex; gap:0.6rem; margin-top: var(--sp-3); }
.social a { width:2.4rem; height:2.4rem; border:1px solid #3c3a2b; display:inline-flex; align-items:center; justify-content:center; }
.social a:hover { background:#2a2920; }
.social svg { width:1.15rem; height:1.15rem; }
.footer-bottom { border-top: 1px solid #2c2a1e; padding-block: var(--sp-4); display:flex; flex-wrap:wrap;
  gap: 0.4rem var(--sp-4); align-items:center; font-size: var(--step--1); color:var(--grey); }
.footer-bottom nav { display:flex; flex-wrap:wrap; }
.footer-legal { list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; align-items:center; row-gap:0.4rem; }
.footer-legal li:not(:last-child)::after { content:"·"; color:#5a5747; margin:0 var(--sp-4); }
.footer-bottom .copy { margin-right:auto; }

/* ---------- Responsive : tablette / desktop ---------- */
@media (min-width: 40rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr; }
  .footer-newsletter { grid-column: 1 / -1; }
}
@media (min-width: 60rem) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1.4fr; }
  .footer-newsletter { grid-column: auto; }
}

/* ---- En-tête de section (titre + lien "voir tout") — utilisé sur plusieurs pages ---- */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--ink-soft); max-width: 42ch; }

/* utilitaires grilles réutilisables */
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 38rem) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 58rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: 1fr 1fr; } }

.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* Lien externe (RGAA 13.1, pattern DSFR) : icône "nouvel onglet" après le texte.
   - Dans un article Joomla : régler le lien sur "Nouvelle fenêtre" -> l'icône apparaît toute seule
     (via .prose a[target="_blank"]), il reste juste à remplir le Titre "Intitulé - nouvelle fenêtre".
   - En dur dans un template : ajouter class="lien-externe" + target="_blank" + title.
   L'icône est décorative (CSS) ; la mention "nouvelle fenêtre" est portée par le title. */
.lien-externe::after,
.prose a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.25em;
  vertical-align: -0.02em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h5v2H5v12h12v-5h2v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zM5 5h5v2H5v12h12v-5h2v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- Prose : corps d'article (base globale) ----------
   S'applique à TOUT corps d'article (.prose), notamment le layout générique
   (actualités, pages diverses). Les CSS de page (formation-detail, légale…)
   peuvent surcharger localement. Objectif : un contenu rédigé dans Joomla
   (titres, paragraphes, listes, images, liens) toujours stylé proprement,
   sans que l'éditeur ait à toucher au HTML/CSS. */
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: var(--step-2); margin-top: var(--sp-5); }
.prose h3 { font-size: var(--step-1); margin-top: var(--sp-4); }
.prose p { color: var(--ink-soft); margin-top: var(--sp-3); }
.prose ul, .prose ol { margin-top: var(--sp-3); padding-left: 1.4rem; color: var(--ink-soft); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 0.4rem; }
.prose li::marker { color: var(--yellow-2); }
.prose a { color: var(--ink); text-decoration: underline; }
.prose a:hover { color: var(--olive); }
.prose strong { color: var(--ink); }
.prose img { height: auto; border-radius: 0.4rem; margin-top: var(--sp-4); }
.prose blockquote {
  margin-top: var(--sp-4); padding-left: var(--sp-4);
  border-left: 0.2rem solid var(--yellow-2); color: var(--ink-soft); font-style: italic;
}

/* ---------- Messages système Joomla (alertes) ----------
   Confirmations (formulaire envoyé), erreurs, avertissements. Le template ne charge
   pas Bootstrap → on stylise nous-mêmes les classes .alert générées par Joomla. */
.system-messages { margin: var(--sp-4) 0; }
/* Masqué tant qu'il n'y a pas de vrai message (Joomla y laisse un conteneur vide) */
.system-messages:not(:has(.alert)) { display: none; }
.system-messages joomla-alert { display: none; } /* alerte native Joomla (non stylée) masquée : on rend nos propres .alert thémées (JS dans index.php) */
.alert {
  position: relative;
  padding: var(--sp-3) var(--sp-5) var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-3);
  border: 1px solid var(--line);
  border-left: 0.35rem solid var(--ink);
  border-radius: 0.3rem;
  background: var(--paper);
  color: var(--ink);
}
.alert-success { border-left-color: #2e7d32; background: #eef7ee; }
.alert-danger, .alert-error { border-left-color: #c0392b; background: #fdecea; }
.alert-warning { border-left-color: #b8860b; background: #fff8e6; }
.alert-info { border-left-color: var(--olive); background: var(--paper-2); }
.alert-heading { font-family: var(--font-head); font-weight: 600; margin-bottom: 0.2rem; }
.alert .alert-message { margin: 0; }
.alert .btn-close, .alert .close {
  position: absolute; top: 0.4rem; right: 0.6rem;
  background: none; border: 0; cursor: pointer;
  font-size: 1.3rem; line-height: 1; color: inherit; opacity: 0.6;
}
.alert .btn-close:hover, .alert .close:hover { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
