/* Polices locales (aucun appel à Google Fonts) */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../fonts/manrope-normal-2.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-normal-1.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/instrument-serif-italic-0.woff2) format('woff2'); }

@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/atkinson-italic-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/atkinson-normal-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/atkinson-normal-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =========================================================================
   HYDREAULYS — compléments WordPress (le reste vient à l'identique de la maquette)
   ========================================================================= */

/* Masquage mobile (réglage commun des blocs) */
@media (max-width: 700px) { .hy-hide-mobile { display: none !important; } }

/* Éléments rendus côté serveur puis affichés par le JS */
.search-ov[hidden], .mega__inner[hidden], .mnav[hidden], .mnav__panel[hidden] { display: none; }
.mega:not(.mega--open) .mega__inner { display: none; }

/* Barre d'administration WordPress */
.admin-bar .header { top: 32px; }
@media (max-width: 782px) { .admin-bar .header { top: 46px; } }
.admin-bar .search-ov { top: 32px; }

/* La maquette réserve 100 px sous le header fixe (les styles globaux de WordPress remettent le body à 0) */
html body { padding-top: 100px; }
@media (scripting: none) { .orga-wrap { opacity: 1; transform: none; } }

/* Bouton burger + menu mobile (absents de la maquette, nécessaires sous 700 px) */
.header__burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hy-line); background: #fff; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 0; }
.header__burger span { display: block; width: 18px; height: 2px; background: var(--hy-blue-ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mnav { position: fixed; left: 0; right: 0; top: 0; bottom: 0; padding-top: 92px; background: #fff; z-index: -1; overflow-y: auto; }
.mnav__inner { padding: 8px 20px 40px; }
.mnav__group { border-bottom: 1px solid var(--hy-line); }
.mnav__trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 18px 4px; background: none; border: none; font: 700 16px/1.3 var(--font-sans); color: var(--hy-blue-ink); text-align: left; }
.mnav__trigger svg { transition: transform .2s ease; flex: none; }
.mnav__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.mnav__panel { padding: 0 4px 18px; }
.mnav__title { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--hy-muted); margin: 6px 0 8px; }
.mnav__panel ul { list-style: none; margin: 0; padding: 0; }
.mnav__panel li a { display: block; padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--hy-ink); }
.mnav__panel li.is-child a { padding-left: 18px; font-weight: 500; color: var(--hy-muted); }
body.hy-nav-open { overflow: hidden; }
.admin-bar .mnav { top: 32px; }
@media (max-width: 782px) { .admin-bar .mnav { top: 46px; } }
@media (max-width: 700px) { .header__burger { display: flex; } .header__search { margin-left: auto; } }

/* Contenus dynamiques */
.article__title a { color: inherit; }
.org-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.org-avatar--photo { overflow: hidden; }
.inst-card__docs { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.inst-card__docs a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--hy-blue); }
.inst-card__docs a:hover { text-decoration: underline; }
.inst-empty { margin: 24px 0 0; color: var(--hy-muted); }
.inst-empty[hidden], [data-past-wrap][hidden], .travx-card[hidden], .inst-card[hidden] { display: none; }

/* ----- Elementor ----- */
/* Titres : la maquette ne stylise que h2.display ; on étend aux autres balises choisies dans le widget « Titre ». */
h1.display, h3.display { font-size: clamp(40px, 5vw, 72px); font-weight: 700; line-height: 1.02; color: var(--hy-blue-ink); }
h1.display em, h3.display em { font-family: var(--font-sans); font-style: normal; font-weight: 400; color: var(--hy-blue); }

/* Marges portées par les conteneurs (équivalent des style="margin-bottom:…" de la maquette) */
.e-con.hy-mb0 { margin-bottom: 0; }
.e-con.hy-mb8 { margin-bottom: 8px; }

/* Widget « Image » */
.hy-image { margin: 0; }
.hy-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hy-image--rounded { border-radius: 28px; overflow: hidden; }
.hy-image--circle { border-radius: 50%; overflow: hidden; }

/* Frise : « :last-child » vaut pour chaque étape (chaque widget est seul dans son enveloppe) → on le recalcule sur l'enveloppe. */
.qsn-frise .elementor-widget .qsn-frise__item { padding-bottom: 44px; }
.qsn-frise > .elementor-element:last-child .qsn-frise__item { padding-bottom: 0; }

/* Éditeur Elementor : les enveloppes de widgets sont visibles (sélection). On les adapte pour garder la mise en page du site :
   - widgets purement décoratifs / positionnés en absolu : l'enveloppe couvre le conteneur parent (même repère que sur le site) ;
   - cartes : l'enveloppe s'étire comme une cellule de grille et la carte la remplit. */
body.elementor-editor-active .elementor-widget-hy-hero-background,
body.elementor-editor-active .elementor-widget-hy-scroll-link,
body.elementor-editor-active .elementor-widget-hy-decor { position: absolute; inset: 0; width: auto; pointer-events: none; z-index: 0; }
body.elementor-editor-active .elementor-widget-hy-hero-background .elementor-widget-container,
body.elementor-editor-active .elementor-widget-hy-scroll-link .elementor-widget-container,
body.elementor-editor-active .elementor-widget-hy-decor .elementor-widget-container { position: static; }
body.elementor-editor-active .elementor-widget[class*="elementor-widget-hy-card-"] { height: 100%; }
body.elementor-editor-active .elementor-widget[class*="elementor-widget-hy-card-"] > .elementor-widget-container { display: flex; flex-direction: column; height: 100%; }
body.elementor-editor-active .elementor-widget[class*="elementor-widget-hy-card-"] > .elementor-widget-container > * { flex: 1 1 auto; }

/* Éditeur Elementor : le header fixe ne masque pas l'édition, pas de menus ouverts */
body.elementor-editor-active .header { position: relative; }
body.elementor-editor-active .mega, body.elementor-editor-active .mega__backdrop, body.elementor-editor-active .mnav { display: none; }
body.elementor-editor-active .hero__scroll { pointer-events: none; }

/* Elementor impose « .elementor img { height:auto; border-radius:0; border:none } » : on restaure les règles de la maquette. */
.elementor .bureau-card__photo { height: 100%; border-radius: 0; }
.elementor .qsn-mot__portrait { height: 64px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); }
.elementor .org-avatar img { height: 100%; border-radius: 50%; }
.elementor .elementor-widget .elementor-widget-container figure.qsn-mot__card,
.elementor figure.qsn-mot__card { margin: 40px 0 0; }

/* ---- Éléments génériques (photo recadrée) ---- */
image-slot.hy-slot { display: block; position: relative; width: 100%; height: 100%; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--hy-slot-radius, 12px); background: rgba(127,127,127,.08); }
image-slot.hy-slot > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; border-radius: 0; }
.hy-slot__empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; font: 13px/1.3 var(--font-sans, system-ui); opacity: .75; border: 1.5px dashed currentColor; border-radius: inherit; }

/* ---- Marges et retraits par défaut des navigateurs, perdus quand la balise est un conteneur Elementor.
   Spécificité volontairement basse : toute règle de classe de la maquette (ou de hy-compat) reprend la main. ---- */
:where(.elementor) figure.e-con, :where(.elementor) blockquote.e-con { margin-block: 1em; margin-inline: 40px; }
:where(.elementor) ul.e-con, :where(.elementor) ol.e-con { margin-block: 1em; padding-inline-start: 40px; }
:where(.elementor) dl.e-con { margin-block: 1em; }
:where(.elementor) summary.e-con { display: list-item; }
.hy-dyn { display: contents; }
.hy-dyn [hidden], .hy-dyn[hidden] { display: none !important; }

/* Cartes d'actualité : des liens (la maquette utilisait des boutons) */
a.actu-feat, a.actu-card { text-decoration: none; color: inherit; }
a.actu-feat { padding: 1px 6px; } /* le bouton de la maquette avait le retrait par défaut des navigateurs */

/* ---- « :last-child » des textes : chaque texte est seul dans son enveloppe Elementor, il se croirait toujours dernier.
   On rétablit la marge des textes qui ne sont pas réellement les derniers de leur bloc. ---- */
.cde-acc .faqp__body .elementor-widget:not(:last-child) > .elementor-widget-container > p { margin: 0 0 10px; }
.elementor .elementor-widget:not(:last-child) > .elementor-widget-container > .cp-para { margin-bottom: 18px; }
.qsn-mot__text .elementor-widget:not(:last-child) > .elementor-widget-container > p { margin: 0 0 14px; }
