/* What's Sup Orientation — feuille de style unique, sans dépendance externe */

/* ============ Jetons ============
   Charte graphique : pour adapter les couleurs du site, modifier --brand (couleur principale)
   et --accent (couleur secondaire) ci-dessous, ainsi que leurs variantes « -soft » (fonds pâles). */
:root {
  /* Charte What's Sup Orientation */
  --brand: #2c499f;          /* bleu principal */
  --brand-ink: #ffffff;      /* texte posé sur --brand */
  --brand-soft: #e8edf8;
  --accent: #00afd8;         /* cyan : aplats et décors uniquement (contraste insuffisant pour du texte sur blanc) */
  --accent-ink: #00708c;     /* cyan foncé pour le texte (5,7:1 sur blanc) */
  --on-accent: #0b1b3a;      /* texte posé sur --accent */
  --accent-soft: #e0f6fb;
  --ink: #0f1a33;
  --ink-2: #3f4a64;
  --ink-3: #5f6b84;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --line: #dde4ef;
  --ok: #157f4c;
  --ok-soft: #e1f5ea;
  --warn: #8a5a00;
  --warn-soft: #fff3d6;
  --err: #b42318;
  --err-soft: #fde7e5;
  --focus: #00708c;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(15 26 51 / .05), 0 6px 20px rgb(44 73 159 / .07);
  --shadow-lg: 0 2px 4px rgb(15 26 51 / .06), 0 18px 44px rgb(44 73 159 / .14);
  --grad: linear-gradient(135deg, var(--brand) 0%, #1f7fc4 55%, var(--accent) 100%);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", var(--font);
  --max: 1160px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #8fa8ff;
    --brand-ink: #0f1426;
    --brand-soft: #1e2a52;
    --accent: #33c3e6;
    --accent-ink: #5fd3ef;
    --on-accent: #0b1b3a;
    --accent-soft: #0e3442;
    --ink: #eef2fb;
    --ink-2: #c3cbe0;
    --ink-3: #95a0bb;
    --bg: #0f1426;
    --surface: #161d35;
    --surface-2: #1b2340;
    --line: #2c3659;
    --ok: #5fd39a;
    --ok-soft: #173327;
    --warn: #f5c35b;
    --warn-soft: #3a2f12;
    --err: #ff8a80;
    --err-soft: #3d1c1a;
    --focus: #5fd3ef;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 6px 20px rgb(0 0 0 / .25);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 18px 44px rgb(0 0 0 / .4);
    --grad: linear-gradient(135deg, #3b5bc4 0%, #1f7fc4 55%, #00afd8 100%);
    color-scheme: dark;
  }
}

/* Teintes des secteurs : --t (fond doux) et --tc (couleur forte) */
.tone-1  { --t: var(--brand-soft); --tc: var(--brand); } /* suit la couleur principale de la charte */
.tone-2  { --t: #ffe6df; --tc: #c2410c; }
.tone-3  { --t: #dcf5e9; --tc: #0f7a4a; }
.tone-4  { --t: #fdf0cf; --tc: #946200; }
.tone-5  { --t: #e0f6fb; --tc: #00708c; }
.tone-6  { --t: #fbe3f1; --tc: #a3196b; }
.tone-7  { --t: #ece6dc; --tc: #6b4f2a; }
.tone-8  { --t: #e3f6f6; --tc: #0e7470; }
.tone-9  { --t: #f1e5fb; --tc: #7a2bb0; }
.tone-10 { --t: #e8edf3; --tc: #3a4a5e; }
@media (prefers-color-scheme: dark) {
  [class*="tone-"] { --t: color-mix(in srgb, var(--tc) 22%, var(--surface)); }
  .tone-1 { --tc: var(--brand); } .tone-2 { --tc: #ff9e7a; } .tone-3 { --tc: #6fd8a5; } .tone-4 { --tc: #f2c55c; }
  .tone-5 { --tc: #7cc8f0; } .tone-6 { --tc: #f08cc4; } .tone-7 { --tc: #d1b48a; } .tone-8 { --tc: #6fd6d0; }
  .tone-9 { --tc: #c99af0; } .tone-10 { --tc: #a8b7c9; }
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-soft); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
.narrow { max-width: 820px; }
.narrow-sm { max-width: 480px; }
.center { text-align: center; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.block { display: block; }
.mt { margin-top: 2.5rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ============ Boutons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .7em 1.2em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--surface); }
.btn-light { background: #fff; color: #17162b; }
.btn-danger { background: transparent; color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.btn-danger:hover { background: var(--err-soft); }
.btn-sm { padding: .45em .85em; font-size: .85rem; }
.btn-lg { padding: .95em 1.6em; font-size: 1.05rem; }
.btn-block { width: 100%; margin-bottom: .5rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }

/* ============ En-tête ============ */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { position: relative; display: flex; align-items: center; gap: .75rem 1rem; min-height: 68px; }
/* Le logo garde ses proportions sans jamais pousser les autres éléments hors de l'écran */
.brand { display: inline-flex; align-items: center; gap: .6rem; flex: 0 1 auto; min-width: 0; text-decoration: none; color: var(--ink); }
.brand-logo { display: block; height: auto; max-height: 44px; width: auto; max-width: min(240px, 42vw); object-fit: contain; }
.brand-mark { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); font: 800 1rem/1 var(--font-display); transform: rotate(-6deg); box-shadow: 3px 3px 0 var(--accent); }
.brand-name { font: 600 1.05rem/1.15 var(--font-display); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-name b { color: var(--brand); font-weight: 800; }
@media (max-width: 420px) { .brand.has-logo .brand-name { display: none; } .brand-name { font-size: .95rem; } }

/* Menu principal : en ligne quand il y a la place */
.main-nav { flex: 1 1 auto; min-width: 0; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: .15rem; }
.main-nav a { display: block; padding: .5rem .8rem; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.main-nav a:hover { background: var(--surface-2); }
.main-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }

/* Outils : recherche, compte, menu */
.header-tools { display: flex; align-items: center; gap: .4rem; flex: none; margin-left: auto; }
.icon { flex: none; vertical-align: middle; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.icon-btn[aria-current="page"] { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.icon-btn-primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.icon-btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); color: var(--brand-ink); }
/* Info-bulle (texte issu de data-tip, aucun style en ligne) */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -4px); padding: .3rem .55rem; border-radius: 6px; background: var(--ink); color: var(--bg); font: 600 .75rem/1.2 var(--font); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; z-index: 60; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
/* En-tête : info-bulles alignées à droite de l'icône pour ne jamais sortir de l'écran */
.header-tools [data-tip]::after { left: auto; right: 0; transform: translateY(-4px); }
.header-tools [data-tip]:hover::after, .header-tools [data-tip]:focus-visible::after { transform: none; }
.user-menu[open] summary::after { display: none; }

.site-header.is-measuring .brand, .site-header.is-measuring .main-nav { flex: none; }
.nav-toggle { display: none; }
.nav-toggle .nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline; }

/* Mode compact : posé par JavaScript dès que le menu ne tient plus (logo large, écran étroit, beaucoup de liens) */
.js .site-header.is-compact .nav-toggle { display: inline-grid; }
.js .site-header.is-compact .main-nav { position: absolute; left: 0; right: 0; top: 100%; display: none; padding: .75rem 16px 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.js .site-header.is-compact .main-nav.is-open { display: block; animation: wso-drop .2s var(--ease-out); }
.js .site-header.is-compact .main-nav ul { flex-direction: column; gap: .15rem; max-width: var(--max); margin: 0 auto; }
.js .site-header.is-compact .main-nav a { padding: .75rem .9rem; border-radius: var(--radius-sm); font-size: 1.05rem; }
@keyframes wso-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* Sans JavaScript, sur petit écran : le menu passe simplement à la ligne */
@media (max-width: 959px) {
  html:not(.js) .header-inner { flex-wrap: wrap; padding-bottom: .5rem; }
  html:not(.js) .main-nav { order: 3; flex-basis: 100%; }
  html:not(.js) .main-nav ul { flex-wrap: wrap; }
}

.user-menu { position: relative; }
.user-menu summary { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; list-style: none; }
.user-menu summary:hover { border-color: var(--brand); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .avatar-sm { width: 34px; height: 34px; }
.user-menu-name { margin: 0; padding: .55rem .75rem .45rem; font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .4rem; z-index: 50; animation: wso-drop .18s var(--ease-out); }
.user-menu-panel a, .user-menu-panel .linklike { display: block; width: 100%; text-align: left; padding: .55rem .75rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: .95rem; }
.user-menu-panel a:hover, .user-menu-panel .linklike:hover { background: var(--surface-2); }
.user-menu-panel form { border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .3rem; }

/* ============ Messages ============ */
.flash-stack { margin-top: 1rem; }
.flash { padding: .8rem 1rem; border-radius: var(--radius-sm); margin: 0 0 .75rem; border: 1px solid transparent; }
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash-error { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }
.flash-warning { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }

/* ============ Hero (accueil) ============ */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6.5rem);
  background:
    radial-gradient(600px 300px at 85% 10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(700px 380px at 5% 90%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%);
}
.hero-inner { max-width: 880px; }
.eyebrow { display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: .3rem .7rem; border-radius: 999px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); margin-top: .6rem; }
.hl { color: var(--brand); background: linear-gradient(transparent 62%, var(--accent-soft) 62%); padding: 0 .1em; }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: var(--ink-2); max-width: 62ch; }
.hero-search { display: flex; gap: .5rem; margin: 1.75rem 0 1.5rem; max-width: 620px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem; box-shadow: var(--shadow-lg); }
.hero-search input[type="search"] { flex: 1; box-shadow: none; min-width: 0; border: 0; background: transparent; padding: .6rem .9rem; font: inherit; color: var(--ink); }
.hero-search input[type="search"]:focus { outline: none; box-shadow: none; }
.hero-search:focus-within { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); }
.hero-stats { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; list-style: none; padding: 0; margin: 0; color: var(--ink-2); }
.hero-stats strong { font: 800 1.6rem/1 var(--font-display); color: var(--brand); font-variant-numeric: tabular-nums; margin-right: .25rem; }

/* ============ Sections ============ */
.section { padding-block: clamp(2.5rem, 5vw, 4rem); } /* uniquement vertical : garde les marges latérales de .container */
.section-alt { background: var(--surface-2); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.more { font-weight: 600; text-decoration: none; }
.subhead { margin: 2.5rem 0 1rem; }
.more-link { margin-top: 1rem; }

.page-head { padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(1.5rem, 3vw, 2rem); background: radial-gradient(color-mix(in srgb, var(--tc, var(--brand)) 16%, transparent) 1.2px, transparent 1.6px) 0 0 / 20px 20px, var(--t, var(--surface-2)); border-bottom: 1px solid var(--line); }
.page-head .lead { margin-bottom: 0; }
.page-head .chip { background: var(--surface); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.breadcrumb { font-size: .9rem; color: var(--ink-3); margin-bottom: .75rem; }
.breadcrumb a { color: var(--ink-2); }

/* ============ Grilles et cartes ============ */
.grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--tc, var(--brand)) 35%, var(--line)); }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.card-title { margin: .6rem 0 .4rem; font-size: 1.12rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.stretched:focus-visible { outline: none; }
.card-text { color: var(--ink-2); font-size: .95rem; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .5rem; padding-top: .8rem; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.story-card { border-top: 4px solid var(--tc, var(--brand)); }
.job-card { background: linear-gradient(180deg, var(--t, var(--surface-2)) 0, var(--surface) 70px); }
.author { display: flex; align-items: center; gap: .55rem; font-size: .88rem; line-height: 1.25; }
.author small { display: block; color: var(--ink-3); }
.meta { font-size: .85rem; color: var(--ink-3); }

.chip { display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start; margin: 0; padding: .25rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 650; color: var(--tc, var(--brand)); background: var(--t, var(--brand-soft)); }
.chip-event { color: var(--accent-ink); background: var(--accent-soft); }

.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; object-fit: cover; background: var(--brand-soft); color: var(--brand); font-weight: 750; font-family: var(--font-display); }
.avatar-sm { width: 32px; height: 32px; font-size: .8rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.stars { color: #f5a524; letter-spacing: .05em; }
.stars .off { color: var(--line); }

/* Secteurs */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; list-style: none; margin: 0; padding: 0; }
.sector a { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: 1rem; border-radius: var(--radius); background: var(--t); color: var(--ink); text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, border-color .15s ease; }
.sector a:hover { transform: translateY(-2px); border-color: var(--tc); }
.sector-icon { font-size: 1.6rem; line-height: 1; margin-bottom: .35rem; }
.sector-name { font-weight: 700; line-height: 1.25; }
.sector-count { font-size: .8rem; color: var(--tc); font-weight: 600; }

/* Comment ça marche */
.steps-3 { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 760px) { .steps-3 { grid-template-columns: repeat(3, 1fr); } }
.steps-3 li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.step-num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font: 800 1.1rem/1 var(--font-display); margin-bottom: .75rem; }
.steps-3 p { color: var(--ink-2); margin: 0; }

/* Bandeau d'appel */
.cta-band { position: relative; overflow: hidden; background: radial-gradient(520px 260px at 100% 0%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%), var(--brand-solid, #2c499f); color: var(--brand-solid-ink, #fff); padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.cta-inner { display: flex; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-inner h2 { margin-bottom: .4rem; }
.cta-inner p { margin: 0; opacity: .9; max-width: 60ch; }

/* États vides */
.empty-state { text-align: center; padding: 2.5rem 1.25rem; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.empty { color: var(--ink-3); padding: 1rem 0; }

/* ============ Filtres et formulaires ============ */
.filters { display: grid; gap: .75rem; margin-top: 1.5rem; align-items: end; }
@media (min-width: 760px) { .filters { grid-template-columns: 2fr 1.3fr 1.3fr auto auto; } }
.filters .field { margin: 0; }
.filters-compact { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
.filters-compact input, .filters-compact select { width: auto; min-width: 180px; }
.filters-compact .btn, .filters .btn { min-height: 50px; }
.inline-search { display: flex; gap: .5rem; max-width: 620px; margin-top: 1rem; }
.inline-search input { flex: 1; }
.result-count { color: var(--ink-3); font-weight: 600; }

.form .field, .field { margin-bottom: 1.1rem; }
label, .field > span { display: block; font-weight: 650; font-size: .92rem; margin-bottom: .35rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="url"], input[type="datetime-local"], input[type="file"], select, textarea {
  width: 100%; padding: .7rem .85rem; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 3rem; line-height: 1.55; }
/* Menus déroulants : même gabarit que les champs, flèche dessinée en CSS (suit la charte et le mode sombre) */
select {
  -webkit-appearance: none; appearance: none; cursor: pointer; line-height: inherit;
  padding-right: 2.6rem; min-height: 46px; text-overflow: ellipsis;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%),
    linear-gradient(to right, var(--line), var(--line));
  background-position: calc(100% - 1.15rem) 50%, calc(100% - .8rem) 50%, calc(100% - 2.2rem) 50%;
  background-size: 6px 6px, 6px 6px, 1px 55%;
  background-repeat: no-repeat;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
select:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
select:focus {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--brand) 50%),
    linear-gradient(135deg, var(--brand) 50%, transparent 50%),
    linear-gradient(to right, var(--line), var(--line));
}
select:disabled { opacity: .6; cursor: not-allowed; }
select::-ms-expand { display: none; }
select option, select optgroup { color: var(--ink); background: var(--surface); font-weight: 400; }
select optgroup { font-weight: 700; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="url"], input[type="datetime-local"] { min-height: 46px; }
/* Bouton « Choisir un fichier » aux couleurs du site */
input[type="file"] { padding: .4rem; cursor: pointer; color: var(--ink-3); font-size: .92rem; }
input[type="file"]::file-selector-button {
  margin-right: .8rem; padding: .5rem 1rem; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface-2); color: var(--ink); font: 600 .88rem/1.2 var(--font); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
input[type="file"]:hover::file-selector-button { border-color: var(--brand); background: var(--brand-soft); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type="file"] { padding: .5rem; }
.hint { font-size: .84rem; color: var(--ink-3); margin: .35rem 0 0; }
.counter { font-size: .78rem; color: var(--ink-3); text-align: right; margin: .25rem 0 0; }
.counter.is-over { color: var(--err); font-weight: 700; }
.req { color: var(--accent-ink); }
.has-error input, .has-error select, .has-error textarea, [aria-invalid="true"] { border-color: var(--err); }
.field-error { display: block; color: var(--err); font-size: .86rem; font-weight: 600; margin: .35rem 0 0; }
.field-check { margin-bottom: .8rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--brand); flex: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 1rem; }
.form-narrow { max-width: 760px; }
.row-2 { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.panel { padding: 1.4rem; }
legend { font: 750 1.15rem/1.3 var(--font-display); padding: 0; margin-bottom: 1rem; float: left; width: 100%; }
legend + * { clear: both; }

/* Étapes du formulaire de parcours */
.step { position: relative; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1rem; background: var(--bg); }
.step legend { font-size: .95rem; margin-bottom: .75rem; }
.step-grid { display: grid; gap: 0 .9rem; clear: both; }
@media (min-width: 640px) { .step-grid { grid-template-columns: 1fr 1fr; } .field-full { grid-column: 1 / -1; } }
@media (min-width: 900px) { .step-grid { grid-template-columns: 1.1fr 1.6fr 1.6fr .8fr .8fr; } .field-full { grid-column: 1 / -1; } }
.step-grid .field { margin-bottom: .75rem; }
.step-actions { display: flex; justify-content: flex-end; gap: .4rem; }

/* ============ Mises en page de contenu ============ */
.layout-2 { display: grid; gap: 2rem; padding-top: 2rem; padding-bottom: 3rem; }
@media (min-width: 940px) { .layout-2 { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; } .side { position: sticky; top: 90px; align-self: start; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.panel-title { font-size: 1.05rem; margin-bottom: .75rem; }
.panel-sub { font-size: .95rem; margin: 1rem 0 .5rem; }
.facts { margin: 0 0 1rem; }
.facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; }
.facts dd { margin: 0 0 .75rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.tags li { padding: .25rem .65rem; border-radius: 999px; background: var(--surface-2); font-size: .85rem; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 0; }

.prose { font-size: 1.04rem; line-height: 1.75; color: var(--ink); }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.not-prose { font-size: 1rem; line-height: 1.6; }

/* ============ Page parcours ============ */
.byline { display: flex; align-items: center; gap: .85rem; margin-top: 1.25rem; }
.byline h1 { margin: 0; }
.facts-inline { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.facts-inline li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; font-size: .9rem; }
.facts-inline .k { font-weight: 700; color: var(--ink-3); margin-right: .25rem; }
.story-body { padding-top: 2.5rem; padding-bottom: 3rem; }
.story-body > section { margin-bottom: 2.25rem; }

.timeline { list-style: none; margin: 1rem 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--tc, var(--brand)), var(--accent)); border-radius: 2px; }
.timeline-item { position: relative; padding: 0 0 1.25rem 2.5rem; }
.timeline-item::before { content: ""; position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--tc, var(--brand)); }
.timeline-item.kind-work::before { border-color: var(--accent); background: var(--accent); }
.timeline-item.kind-training::before { border-color: var(--accent); }
.timeline-year { display: block; font: 750 .9rem/1.2 var(--font-display); color: var(--tc, var(--brand)); margin-bottom: .4rem; }
.timeline-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1.1rem; }
.timeline-card h3 { margin: 0 0 .2rem; }
.timeline-card .muted { margin: 0; font-size: .92rem; }
.timeline-card .prose { font-size: .96rem; margin-top: .5rem; }
.timeline-card .prose p:last-child { margin: 0; }
.timeline-kind { margin: 0 0 .2rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }

.pros-cons { display: grid; gap: 1rem; margin-bottom: 2.25rem; }
@media (min-width: 720px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-cons .panel { margin: 0; box-shadow: none; }
.pros-cons h2 { font-size: 1.1rem; }
.pros { background: var(--ok-soft); border-color: transparent; }
.cons { background: var(--warn-soft); border-color: transparent; }
.advice { background: var(--brand-soft); border-radius: var(--radius); padding: 1.5rem; border-left: 5px solid var(--brand); }
.advice .prose p:last-child { margin: 0; }

.helpful-box { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.helpful-box form { margin: 0; }
.comment-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.comment { display: flex; gap: .75rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment > div { min-width: 0; flex: 1; }
.comment-meta { margin: 0 0 .25rem; font-size: .92rem; }
.comment .prose { font-size: .98rem; }
.comment .prose p:last-child { margin: 0; }
.author-box { display: flex; gap: 1rem; align-items: flex-start; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--accent); color: var(--on-accent); vertical-align: middle; }
.badge-wait { background: var(--warn-soft); color: var(--warn); }

/* ============ Agenda ============ */
.tabs { display: inline-flex; gap: .25rem; padding: .25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin: 1.25rem 0 .75rem; }
.tabs a { padding: .45rem 1rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; }
.tabs a[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.pills a { display: inline-block; padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 600; }
.pills a:hover { border-color: var(--ink-3); }
.pills a[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.month-title { margin: 2rem 0 1rem; font-size: 1.2rem; color: var(--ink-2); }
.month-title:first-child { margin-top: 0; }
.event-card { flex-direction: row; gap: 1rem; align-items: flex-start; }
.date-block { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 68px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.date-day { font: 800 1.6rem/1 var(--font-display); }
.date-month { font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.event-body { min-width: 0; }
.event-body .card-title { margin-top: .45rem; }
.event-body .meta { margin: 0; }
.is-cancelled { opacity: .65; }
.is-cancelled .card-title a { text-decoration: line-through; }

/* ============ Authentification / erreurs ============ */
.auth-page { padding: clamp(2rem, 6vw, 4rem) 0; }
.auth-card { padding: clamp(1.4rem, 4vw, 2.25rem); }
.auth-card h1 { font-size: 1.8rem; }
.error-page { padding: clamp(3rem, 10vw, 6rem) 0; }
.error-code { font: 900 clamp(4rem, 14vw, 7rem)/1 var(--font-display); color: var(--brand); margin: 0; opacity: .25; }
.error-page .btn { margin: .25rem; }

/* ============ Espace membre ============ */
.item-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.item { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .6rem; }
.item-main { flex: 1 1 320px; min-width: 0; }
.item-title { font-weight: 700; margin: 0 0 .2rem; }
.item-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.item-actions form { margin: 0; }
.status { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.status-published, .status-active { background: var(--ok-soft); color: var(--ok); }
.status-pending, .status-draft { background: var(--warn-soft); color: var(--warn); }
.status-rejected, .status-cancelled, .status-banned { background: var(--err-soft); color: var(--err); }
.avatar-edit { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.avatar-edit > div { flex: 1; min-width: 0; }
.danger-zone { border-color: color-mix(in srgb, var(--err) 30%, var(--line)); }
.danger-zone h3 { font-size: 1rem; margin-top: 1.25rem; }

/* ============ Pied de page ============ */
.site-footer { position: relative; margin-top: clamp(2.5rem, 6vw, 4.5rem); padding: 0 0 1.25rem; background: var(--surface); border-top: 1px solid var(--line); color: var(--ink-2); }
.site-footer a:not(.btn) { color: inherit; }
/* Carte d'appel, posée à cheval sur la bordure */
.footer-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; transform: translateY(-50%); margin-bottom: -1rem; padding: 1.25rem clamp(1.25rem, 3vw, 2rem); border-radius: calc(var(--radius) + 4px); background: linear-gradient(120deg, var(--brand-soft), var(--accent-soft)); border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line)); box-shadow: var(--shadow); }
.footer-callout h2 { margin: 0 0 .2rem; font-size: 1.15rem; color: var(--ink); }
.footer-callout p { margin: 0; font-size: .95rem; }
.footer-callout-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.footer-callout .btn .icon { width: 16px; height: 16px; }
@media (max-width: 640px) { .footer-callout { transform: none; margin: 1.5rem 0 0; } }
.footer-main { display: grid; gap: 2rem 2.5rem; padding-top: clamp(1.25rem, 3vw, 2rem); }
.no-callout .footer-main { padding-top: clamp(2rem, 5vw, 3rem); }
.home .site-footer { margin-top: 0; }
@media (min-width: 640px) { .footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer-about { grid-column: 1 / -1; } }
@media (min-width: 980px) { .footer-main { grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); } .footer-about { grid-column: auto; } }
.footer-brand-link { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.footer-brand { color: var(--ink); font-size: 1.1rem; white-space: normal; }
.footer-logo img { display: block; height: 40px; width: auto; max-width: 200px; object-fit: contain; }
.footer-text { margin: .9rem 0 0; max-width: 40ch; line-height: 1.65; font-size: .95rem; }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin: 0 0 .9rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-col a { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; font-size: .95rem; transition: color .15s ease, transform .15s ease; }
.footer-col a::after { content: "→"; opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s ease; color: var(--brand); }
.footer-col a:hover { color: var(--brand); }
.footer-col a:hover::after { opacity: 1; transform: none; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: .85rem; }
.footer-bottom p { margin: 0; color: var(--ink-3); }
.footer-top { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; transition: border-color .15s ease, color .15s ease; }
.footer-top:hover { border-color: var(--brand); color: var(--brand); }
.footer-top .icon { width: 16px; height: 16px; }
.btn .icon { width: 18px; height: 18px; }

/* ============ Pagination ============ */
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; list-style: none; padding: 0; margin: 2rem 0 0; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.pagination .current { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.pagination .gap { border: 0; background: none; }

/* ============ Administration ============ */
body.admin { background: var(--surface-2); }
.admin-shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
@media (min-width: 900px) { .admin-shell { grid-template-columns: 240px minmax(0, 1fr); } }
.admin-side { background: #0f1a33; color: #e9e8f5; padding: 1rem; }
@media (prefers-color-scheme: dark) { .admin-side { background: #0a0f1f; } }
@media (min-width: 900px) { .admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1.5rem 1rem; } }
.admin-side .brand { display: inline-flex; justify-content: flex-start; padding: 0; color: #fff; margin-bottom: 1rem; }
.admin-side .brand:hover { background: none; }
.admin-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
@media (min-width: 900px) { .admin-side ul { display: block; } }
.admin-side a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .75rem; border-radius: var(--radius-sm); color: #d6d5e6; text-decoration: none; font-weight: 600; font-size: .93rem; }
.admin-side a:hover { background: rgb(255 255 255 / .08); color: #fff; }
.admin-side a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }
.admin-side-foot { margin-top: 1rem; }
.admin-main { padding: clamp(1rem, 3vw, 2rem); min-width: 0; }
.admin-head { margin-bottom: 1.25rem; }
.admin-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .25rem; }
.admin-head p { margin: 0 0 .35rem; }
.admin-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.kpis li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.kpi-value { display: block; font: 800 1.9rem/1.1 var(--font-display); color: var(--ink); }
.kpi-label { color: var(--ink-3); font-size: .88rem; }
.admin-grid { display: grid; gap: 1rem; }
@media (min-width: 1000px) { .admin-grid { grid-template-columns: 1fr 1fr; } }
.admin-review { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .admin-review { grid-template-columns: minmax(0, 1fr) 340px; } .review-actions { position: sticky; top: 1rem; } }
.review-content h2 { font-size: 1.1rem; margin-top: 1.5rem; }
.review-steps { padding-left: 1.2rem; }
.review-steps li { margin-bottom: .6rem; }
.table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.table .actions { display: flex; gap: .4rem; justify-content: flex-end; white-space: nowrap; }
.table .actions form, .inline-form { margin: 0; }
.table select { width: auto; min-height: 36px; padding: .35rem 2.2rem .35rem .6rem; font-size: .88rem; background-position: calc(100% - .95rem) 50%, calc(100% - .6rem) 50%, calc(100% - 1.8rem) 50%; }
.row-muted td { opacity: .6; }
.swatch { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--t); margin-right: .35rem; }

/* ============ Illustrations ============ */
.hero-grid { position: relative; z-index: 1; display: grid; gap: 2rem; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 3rem; } }
.hero-art { max-width: 520px; width: 100%; margin: 0 auto; }
@media (max-width: 979px) { .hero-art { max-width: 380px; order: -1; margin-bottom: -.5rem; } }
@media (max-width: 520px) { .hero-art { max-width: 300px; } }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.hero-orb-a { width: 380px; height: 380px; right: -120px; top: -140px; background: var(--accent); opacity: .28; }
.hero-orb-b { width: 420px; height: 420px; left: -180px; bottom: -200px; background: var(--brand); opacity: .2; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(36px, 6vw, 80px); fill: var(--bg); }

.illus { display: block; width: 100%; height: auto; overflow: visible; }
.illus text { font-family: var(--font); }
.il-blob-a { fill: var(--brand-soft); }
.il-blob-b { fill: var(--accent-soft); }
.il-road { fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 13; }
.il-junction { fill: var(--accent); stroke: var(--surface); stroke-width: 4; }
.il-school rect, .il-school path { fill: var(--brand); }
.il-school .il-door { fill: var(--accent); }
.il-school .il-window { fill: var(--surface); }
.il-label { fill: var(--ink-2); font-size: 16px; font-weight: 700; }
.il-node circle { fill: var(--surface); stroke: var(--accent); stroke-width: 3; filter: drop-shadow(0 8px 14px rgb(44 73 159 / .18)); }
.il-node text { font-size: 30px; }
.il-spark { fill: var(--accent); }

.il-bubble rect, .il-bubble path { fill: #fff; }
.il-b1 .il-line { fill: var(--accent); }
.il-b1 .il-line + .il-line { fill: #c9d4ef; }
.il-b2 rect, .il-b2 path { fill: var(--accent); }
.il-b2 text { font-size: 36px; }

.il-ring { fill: var(--brand-soft); }
.il-face { fill: var(--surface); stroke: var(--line); stroke-width: 3; }
.il-ticks rect { fill: var(--ink-3); }
.il-needle-n { fill: var(--brand); }
.il-needle-s { fill: var(--accent); }
.il-pin { fill: var(--surface); stroke: var(--brand); stroke-width: 4; }

.il-shadow { fill: var(--line); }
.il-card { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.illus-empty .il-line { fill: var(--brand-soft); }
.il-plus { fill: var(--accent); }
.il-plus-mark { stroke: var(--on-accent); stroke-width: 3; stroke-linecap: round; }
.illus-empty { width: 140px; margin: 0 auto .75rem; }

.cta-inner { position: relative; }
.cta-art { width: 150px; flex: none; }
.cta-text { flex: 1 1 380px; }
@media (max-width: 700px) { .cta-art { width: 120px; } }
.error-art { position: relative; width: 170px; margin: 0 auto 1rem; }
.error-art .error-code { font-size: 2.6rem; opacity: 1; margin-top: .5rem; color: var(--brand); }

/* ============ Micro-interactions ============ */
.site-header { transition: box-shadow .25s ease, background-color .25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgb(15 26 51 / .08); }
.brand-mark { transition: transform .35s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(6deg) scale(1.06); }
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s var(--ease-out); }
.btn-primary:hover::after { transform: translateX(120%); }
.sector-icon { display: inline-block; transition: transform .45s var(--ease-out); }
.sector a:hover .sector-icon { transform: translateY(-4px) rotate(-8deg) scale(1.15); }
.sector a { box-shadow: 0 0 0 0 transparent; }
.sector a:hover { box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--tc) 55%, transparent); }
.card .chip { transition: transform .3s var(--ease-out); }
.card:hover .chip { transform: translateX(3px); }
.step-num { transition: transform .4s var(--ease-out); }
.steps-3 li { transition: transform .3s var(--ease-out), box-shadow .3s ease; }
.steps-3 li:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.steps-3 li:hover .step-num { transform: rotate(-10deg) scale(1.1); }
.timeline-card { transition: transform .3s var(--ease-out), border-color .3s ease; }
.timeline-card:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--tc, var(--brand)) 40%, var(--line)); }

/* ============ Animations (uniquement si l'utilisateur n'a pas demandé à les réduire) ============ */
@media (prefers-reduced-motion: no-preference) {
  @keyframes wso-fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes wso-pop { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes wso-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
  @keyframes wso-march { to { stroke-dashoffset: -28; } }
  @keyframes wso-twinkle { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }
  @keyframes wso-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, 24px); } }
  @keyframes wso-sway { 0%, 100% { transform: rotate(-28deg); } 40% { transform: rotate(22deg); } 70% { transform: rotate(-8deg); } }

  .hero-inner > * { animation: wso-fade-up .8s var(--ease-out) both; }
  .hero-inner > :nth-child(2) { animation-delay: .08s; }
  .hero-inner > :nth-child(3) { animation-delay: .16s; }
  .hero-inner > :nth-child(4) { animation-delay: .24s; }
  .hero-inner > :nth-child(5) { animation-delay: .32s; }
  .hero-art { animation: wso-pop 1s .15s var(--ease-out) both; }
  .hero-orb-a { animation: wso-drift 14s ease-in-out infinite; }
  .hero-orb-b { animation: wso-drift 18s ease-in-out infinite reverse; }

  .il-road { animation: wso-march 1.4s linear infinite; }
  .il-node, .il-spark, .il-bubble, .il-float, .il-blob-b { transform-box: fill-box; transform-origin: center; }
  .il-node { animation: wso-float 5s ease-in-out infinite; }
  .il-n2 { animation-delay: -1.2s; } .il-n3 { animation-delay: -2.4s; } .il-n4 { animation-delay: -3.6s; }
  .il-blob-b { animation: wso-float 7s ease-in-out infinite; }
  .il-spark { animation: wso-twinkle 2.6s ease-in-out infinite; }
  .il-s2 { animation-delay: -.9s; } .il-s3 { animation-delay: -1.7s; }
  .il-b1 { animation: wso-float 6s ease-in-out infinite; }
  .il-b2 { animation: wso-float 6s -3s ease-in-out infinite; }
  .il-float { animation: wso-float 4s ease-in-out infinite; }
  .il-needle { transform-box: view-box; transform-origin: 100px 100px; animation: wso-sway 4.5s ease-in-out infinite; }
  /* Boussole : l'orbite tourne lentement, les pastilles restent droites, l'aiguille cherche puis se fixe */
  @keyframes wso-orbit { to { transform: rotate(360deg); } }
  @keyframes wso-orbit-counter { to { transform: rotate(-360deg); } }
  @keyframes wso-needle {
    0%   { transform: rotate(-70deg); }  8%  { transform: rotate(48deg); }  14% { transform: rotate(-22deg); }
    19%  { transform: rotate(14deg); }   23% { transform: rotate(-6deg); }  27%, 45% { transform: rotate(4deg); }
    52%  { transform: rotate(120deg); }  58% { transform: rotate(78deg); }  63% { transform: rotate(98deg); }
    67%, 88% { transform: rotate(92deg); }  100% { transform: rotate(290deg); }
  }
  @keyframes wso-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
  .ib-orbit { transform-box: view-box; transform-origin: 260px 250px; animation: wso-orbit 60s linear infinite; }
  .ib-badge { transform-box: fill-box; transform-origin: center; animation: wso-orbit-counter 60s linear infinite; }
  .ib-needle { transform-box: view-box; transform-origin: 260px 250px; animation: wso-needle 9s cubic-bezier(.45, .05, .25, 1) infinite; }
  .ib-bezel-ring { animation: wso-pulse 4s ease-in-out infinite; }

  /* Apparition au défilement : n'agit que si JavaScript est actif (classe .js posée par boot.js) */
  .js [data-reveal], .js [data-stagger] > * { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
  .js [data-reveal].is-visible, .js [data-stagger].is-visible > * { opacity: 1; transform: none; }
  .js [data-stagger].is-visible > :nth-child(2) { transition-delay: .07s; }
  .js [data-stagger].is-visible > :nth-child(3) { transition-delay: .14s; }
  .js [data-stagger].is-visible > :nth-child(4) { transition-delay: .21s; }
  .js [data-stagger].is-visible > :nth-child(5) { transition-delay: .28s; }
  .js [data-stagger].is-visible > :nth-child(6) { transition-delay: .35s; }
  .js [data-stagger].is-visible > :nth-child(n+7) { transition-delay: .42s; }
}

/* ============ Assistant d'installation ============ */
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem .8rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.check-icon { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: .85rem; }
.is-ok .check-icon { background: var(--ok-soft); color: var(--ok); }
.is-ko .check-icon { background: var(--err-soft); color: var(--err); }
.is-warn .check-icon { background: var(--warn-soft); color: var(--warn); }
textarea.code, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ============ Boussole d'accueil ============ */
.ib-halo { fill: var(--brand-soft); }
.ib-orbit-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 2 12; stroke-linecap: round; opacity: .45; }
.ib-badge circle { fill: var(--surface); stroke: var(--accent); stroke-width: 3; filter: drop-shadow(0 8px 14px rgb(15 26 51 / .16)); }
.ib-badge text { font-size: 28px; font-family: var(--font); }
.ib-shadow { fill: rgb(15 26 51 / .16); filter: blur(10px); }
.ib-bezel { fill: var(--brand); }
.ib-bezel-ring { fill: none; stroke: var(--accent); stroke-width: 3; opacity: .9; }
.ib-face { fill: var(--surface); }
.ib-ticks rect { fill: var(--ink-3); }
.ib-rose-a { fill: var(--brand-soft); }
.ib-rose-b { fill: color-mix(in srgb, var(--brand) 22%, var(--surface)); }
.ib-rose-diag path { fill: var(--accent-soft); }
.ib-cardinal text { font: 800 17px/1 var(--font-display); fill: var(--ink-3); }
.ib-cardinal .ib-north { fill: var(--accent-ink); font-size: 20px; }
.ib-needle-n { fill: var(--accent); }
.ib-needle-n-shade { fill: color-mix(in srgb, var(--accent) 70%, black); }
.ib-needle-s { fill: #c7cede; }
.ib-needle-s-shade { fill: #a9b2c6; }
.ib-pin { fill: var(--brand); stroke: var(--surface); stroke-width: 4; }
.ib-pin-dot { fill: var(--accent); }
.ib-glass { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; opacity: .35; }
@media (prefers-color-scheme: dark) { .ib-needle-s { fill: #56607c; } .ib-needle-s-shade { fill: #475069; } .ib-glass { opacity: .12; } }

/* ============ Indicateurs de chargement ============ */
/* Barre fine en haut de page : n'apparaît que si la page suivante tarde (> 250 ms). */
.page-loader { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 200; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.page-loader span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); box-shadow: 0 0 10px var(--accent); border-radius: 0 3px 3px 0; }
.is-loading .page-loader { opacity: 1; }
.is-loading .page-loader span { animation: wso-load 8s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes wso-load { 0% { width: 0; } 20% { width: 45%; } 60% { width: 80%; } 100% { width: 94%; } }
/* Bouton d'envoi en cours : pastille tournante + texte « Envoi… » */
.btn.is-busy { position: relative; pointer-events: none; opacity: .85; }
.btn.is-busy::before { content: ""; width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: wso-spin .7s linear infinite; }
@keyframes wso-spin { to { transform: rotate(360deg); } }
/* Voile avec mini-boussole pour les opérations longues (logo, installation…), affiché après 700 ms */
.loading-veil { position: fixed; inset: 0; z-index: 190; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s ease; }
.loading-veil.is-on { opacity: 1; }
.loading-card { display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: 1.5rem 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); font-weight: 650; }
.mini-compass { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--brand); box-shadow: inset 0 0 0 5px var(--brand), inset 0 0 0 7px var(--accent), inset 0 0 0 30px var(--surface); }
.mini-compass::before { content: ""; position: absolute; left: 50%; top: 9px; width: 0; height: 0; margin-left: -6px; border: 6px solid transparent; border-bottom: 19px solid var(--accent); border-top: 0; transform-origin: 6px 19px; animation: wso-seek 1.6s ease-in-out infinite; }
.mini-compass::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--brand); }
@keyframes wso-seek { 0% { transform: rotate(-40deg); } 35% { transform: rotate(50deg); } 60% { transform: rotate(-15deg); } 80% { transform: rotate(8deg); } 100% { transform: rotate(-40deg); } }
@media (prefers-reduced-motion: reduce) {
  .is-loading .page-loader span { width: 70%; animation: none; }
  .btn.is-busy::before { animation: none; border-right-color: currentColor; opacity: .5; }
}

/* ============ Personnalisation, pages, menus ============ */
.admin-side-sep { height: 1px; background: rgb(255 255 255 / .12); margin: .6rem .5rem; }
.flash-info { background: var(--brand-soft); color: var(--ink); border-color: color-mix(in srgb, var(--brand) 20%, transparent); }
.row-3 { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .row-3 { grid-template-columns: repeat(3, 1fr); } }
.logo-edit { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .5rem; }
.logo-edit > div:last-child { flex: 1 1 280px; }
.logo-preview { display: grid; place-items: center; gap: .4rem; width: 200px; min-height: 96px; padding: .75rem; border: 2px dashed var(--line); border-radius: var(--radius-sm); background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 50% / 16px 16px; }
.logo-preview img { max-width: 100%; max-height: 80px; object-fit: contain; }
.color-field { display: flex; gap: .5rem; align-items: center; }
.color-field input[type="color"] { width: 52px; height: 44px; padding: 3px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; flex: none; }
.color-field input[type="text"] { font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: lowercase; }
.theme-preview { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .9rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.tp-btn { padding: .45rem .9rem; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-weight: 650; font-size: .9rem; }
.tp-chip { padding: .2rem .65rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; font-size: .85rem; }
.tp-link { color: var(--brand); text-decoration: underline; font-weight: 600; }
.tp-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.md-help .md-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-bottom: .75rem; }
.md-help .md-table td { padding: .35rem .25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.menu-list { list-style: none; padding: 0; margin: 0; counter-reset: m; }
.menu-list li { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .45rem; background: var(--bg); }
.menu-item-main { display: flex; flex-direction: column; min-width: 0; }
.menu-item-main code { color: var(--ink-3); overflow-wrap: anywhere; }
.menu-item-actions { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0; }
.mail-art { font-size: 3rem; line-height: 1; margin-bottom: .5rem; }
.auth-card.center .form.left { text-align: left; }
.page-content blockquote { margin: 1.25rem 0; padding: .9rem 1.1rem; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.page-content blockquote p { margin: 0; }
.page-content h2 { margin-top: 2rem; }
.page-content hr { margin: 2rem 0; }
.admin-edit-link { margin-top: 2.5rem; border-top: 1px dashed var(--line); padding-top: 1rem; }

/* ============ Pages de compte (connexion, inscription…) ============ */
.auth-page { padding: clamp(1.5rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); background: radial-gradient(color-mix(in srgb, var(--brand) 12%, transparent) 1.2px, transparent 1.6px) 0 0 / 22px 22px; }
.auth-split { display: grid; max-width: 1020px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow-lg); overflow: hidden; }
@media (min-width: 880px) { .auth-split { grid-template-columns: 1fr 1.05fr; min-height: 560px; } }
.auth-aside { position: relative; overflow: hidden; color: var(--brand-solid-ink, #fff); background: radial-gradient(420px 260px at 100% 0%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%), var(--brand-solid, #2c499f); padding: clamp(1.5rem, 4vw, 2.75rem); display: flex; }
.auth-aside-inner { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: .25rem; }
.auth-aside h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: .5rem 0 .4rem; color: inherit; }
.auth-aside p { opacity: .92; margin: 0 0 1rem; max-width: 40ch; }
.auth-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.auth-orb-a { width: 260px; height: 260px; right: -90px; bottom: -110px; border: 36px solid rgb(255 255 255 / .07); }
.auth-orb-b { width: 120px; height: 120px; left: -40px; top: -40px; background: rgb(255 255 255 / .06); }
.auth-compass { width: 108px; margin-bottom: .25rem; }
.auth-compass .il-ring { fill: rgb(255 255 255 / .14); }
.auth-compass .il-face { fill: #fff; stroke: transparent; }
.auth-points { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .55rem; }
.auth-points li { display: flex; gap: .6rem; align-items: flex-start; }
.auth-points li::before { content: "✓"; flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; margin-top: .1rem; }
.auth-trust { font-size: .82rem; opacity: .75 !important; margin-top: auto !important; padding-top: .5rem; }
.auth-split .auth-card { padding: clamp(1.5rem, 4vw, 2.75rem); display: flex; flex-direction: column; justify-content: center; }
.auth-card h1 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: .35rem; }
.auth-card > .muted:first-of-type { margin-bottom: 1.25rem; }
.auth-card .btn-block { margin-top: .5rem; min-height: 50px; font-size: 1rem; }
.auth-card hr { margin: 1.25rem 0; }
.auth-alt { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--surface-2); margin-top: 1rem; }
.auth-alt p { margin: 0; }
@media (max-width: 879px) {
  .auth-aside { padding-bottom: 1.25rem; }
  .auth-aside .auth-points, .auth-aside .auth-trust { display: none; }
  .auth-compass { width: 64px; }
  .auth-aside-inner { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 1rem; }
  .auth-aside h2 { margin: 0; }
  .auth-aside p { flex-basis: 100%; margin: .4rem 0 0; }
}
/* Afficher / masquer le mot de passe (bouton ajouté par JavaScript) */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 6.5rem; }
.password-toggle { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); padding: .35rem .7rem; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 600 .8rem/1 var(--font); cursor: pointer; }
.password-toggle:hover { background: var(--brand-soft); color: var(--brand); }

/* ============ Page de recherche ============ */
.search-hero { position: relative; overflow: hidden; padding: clamp(2.25rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem); background: radial-gradient(color-mix(in srgb, var(--brand) 14%, transparent) 1.2px, transparent 1.6px) 0 0 / 20px 20px, linear-gradient(180deg, var(--brand-soft), var(--bg)); border-bottom: 1px solid var(--line); }
.search-hero-inner { position: relative; z-index: 1; text-align: center; }
.search-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin: .6rem 0 1.25rem; overflow-wrap: anywhere; }
.search-big { position: relative; display: flex; gap: .5rem; align-items: center; max-width: 680px; margin: 0 auto 1rem; padding: .45rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-lg); transition: border-color .2s ease, box-shadow .2s ease; }
.search-big:focus-within { border-color: var(--brand); box-shadow: var(--shadow-lg), 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.search-big input[type="search"] { flex: 1; min-width: 0; border: 0; background: transparent; box-shadow: none; padding: .7rem .5rem .7rem 2.6rem; font-size: 1.08rem; }
.search-big input[type="search"]:focus { box-shadow: none; }
.search-big .btn { min-height: 48px; padding-inline: 1.4rem; }
.search-icon { position: absolute; left: 1.25rem; top: 50%; width: 18px; height: 18px; margin-top: -10px; border: 2.5px solid var(--ink-3); border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ""; position: absolute; width: 2.5px; height: 8px; background: var(--ink-3); border-radius: 2px; right: -4px; bottom: -6px; transform: rotate(-45deg); }
.search-ideas { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; align-items: center; }
.idea-chip { padding: .3rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 600; transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.idea-chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.search-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .9rem 1.1rem; margin-bottom: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 76px; z-index: 5; }
.search-summary p { margin: 0; }
.search-summary ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.search-summary a { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .85rem; border-radius: 999px; background: var(--surface-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.search-summary a:hover { background: var(--brand-soft); color: var(--brand); }
.search-summary .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .35rem; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: .75rem; }
.search-block { margin-bottom: 2.75rem; scroll-margin-top: 150px; }
.search-section-title { display: flex; align-items: center; gap: .6rem; font-size: 1.3rem; margin-bottom: 1rem; }
.search-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
mark.hl-q { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; padding: 0 .1em; border-radius: 3px; }

/* ============ Assistant de saisie de parcours ============ */
.page-head-compact { padding-block: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 3vw, 1.5rem); }
.wizard-progress { display: none; list-style: none; padding: 0; margin: 0 0 1.25rem; counter-reset: w; }
.is-wizard .wizard-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.wizard-progress button { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 100%; padding: .25rem 0 0; border: 0; background: none; color: var(--ink-3); font: 600 .82rem/1.2 var(--font); cursor: pointer; }
.wizard-progress button::before { content: ""; position: absolute; top: 18px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 3px; border-radius: 3px; background: var(--line); }
.wizard-progress li:first-child button::before { display: none; }
.wizard-progress .is-done button::before, .wizard-progress .is-current button::before { background: var(--brand); }
.wizard-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--ink-3); font-weight: 800; transition: all .2s ease; }
.is-done .wizard-num { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.is-current .wizard-num { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 18%, transparent); }
.is-current .wizard-label { color: var(--ink); }
@media (max-width: 520px) { .wizard-label { font-size: .72rem; } }
.wizard-kicker { display: block; font: 700 .75rem/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: .2rem; }
.is-wizard .wizard-step { animation: wso-drop .25s var(--ease-out); }
.wizard-step legend:focus { outline: none; }
.wizard-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); position: sticky; bottom: .75rem; z-index: 5; box-shadow: var(--shadow); }
.wizard-spacer { flex: 1; }
html:not(.js) [data-wizard-prev], html:not(.js) [data-wizard-next] { display: none; }
@media (max-width: 560px) {
  .wizard-nav { position: static; padding: .6rem; }
  .wizard-nav .btn { flex: 1 1 40%; padding-inline: .6rem; }
  .wizard-nav .btn[value="draft"] { order: 3; flex-basis: 100%; }
  .wizard-spacer { display: none; }
}
details.inline-more { margin: .5rem 0 1rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: .2rem .9rem; }
details.inline-more[open] { padding-bottom: .5rem; background: var(--bg); }
details.inline-more > summary { cursor: pointer; padding: .6rem 0; color: var(--brand); font-weight: 650; list-style: none; }
details.inline-more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: .5rem; border-radius: 50%; background: var(--brand-soft); font-weight: 800; }
details.inline-more[open] > summary::before { content: "–"; }
details.inline-more > summary::-webkit-details-marker { display: none; }
.field-label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: .5rem; }
/* Étapes du parcours, en une ligne */
.steps-list { display: grid; gap: .6rem; margin-bottom: .9rem; }
.step { position: relative; padding: .75rem .75rem .5rem 3rem; margin: 0; border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.step-dot { position: absolute; left: .75rem; top: 22px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 800 .8rem/1 var(--font); }
.step-row { display: grid; gap: .5rem .6rem; align-items: start; grid-template-columns: minmax(0, 1fr); grid-template-areas: "kind" "title" "years" "actions"; }
@media (min-width: 440px) { .step-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind kind" "title title" "years actions"; } }
@media (min-width: 640px) { .step-row { grid-template-columns: 13.5rem minmax(0, 1fr); grid-template-areas: "kind title" "years actions"; } }
.step-kind { grid-area: kind; } .step-title { grid-area: title; } .step-years { grid-area: years; } .step-row .step-actions { grid-area: actions; }
.step-row .field { margin: 0; }
.step-row select, .step-row input { height: 46px; min-height: 46px; }
.step-row .step-actions { align-self: center; justify-content: flex-end; }
.step-years { align-self: center; }
.step-errors { display: grid; gap: .15rem; margin-top: .4rem; }
.step-errors .field-error { margin: 0; }
.step-years { display: flex; align-items: center; gap: .35rem; color: var(--ink-3); }
.step-years input { width: 5.6rem; min-width: 0; }
@media (max-width: 439px) { .step-years .field { flex: 1; } .step-years input { width: 100%; } .step-row .step-actions { justify-content: flex-end; } }
.step .step-actions { display: flex; gap: .25rem; justify-content: flex-end; }
.icon-btn-sm { width: 34px; height: 34px; font-weight: 800; }
.icon-btn-sm .icon { width: 16px; height: 16px; }
.icon-btn:disabled { opacity: .35; cursor: default; transform: none; }
.step-more > summary { cursor: pointer; padding: .45rem 0 .2rem; font-size: .86rem; color: var(--ink-3); font-weight: 600; }
.step-more-body { display: grid; gap: .5rem; padding-top: .4rem; }
@media (min-width: 720px) { .step-more-body { grid-template-columns: 1fr 1.6fr; } }
.step-more-body .field { margin: 0; }
/* Humeur en un clic */
.mood-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; }
.mood { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .7rem .3rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; text-align: center; font-weight: 500; transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
.mood:hover { border-color: var(--brand); transform: translateY(-2px); }
.mood input { position: absolute; opacity: 0; pointer-events: none; }
.mood-face { font-size: 1.8rem; line-height: 1; filter: grayscale(.6); transition: filter .15s ease, transform .2s var(--ease-out); }
.mood-label { font-size: .74rem; line-height: 1.25; color: var(--ink-3); }
.mood:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.mood:has(input:checked) .mood-face { filter: none; transform: scale(1.15); }
.mood:has(input:checked) .mood-label { color: var(--ink); font-weight: 650; }
.mood:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 520px) { .mood-label { display: none; } }

/* ============ Agenda ============ */
/* Une couleur par type d'événement (--ev) */
.type-forum { --ev: #2c7be5; } .type-conference { --ev: #7a2bb0; } .type-atelier { --ev: #0f7a4a; }
.type-portes_ouvertes { --ev: #c2410c; } .type-webinaire { --ev: #00708c; } .type-rencontre { --ev: #a3196b; }
@media (prefers-color-scheme: dark) {
  .type-forum { --ev: #7cb3ff; } .type-conference { --ev: #c99af0; } .type-atelier { --ev: #6fd8a5; }
  .type-portes_ouvertes { --ev: #ffa77a; } .type-webinaire { --ev: #5fd3ef; } .type-rencontre { --ev: #f08cc4; }
}
.agenda-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0 .9rem; }
.segmented { display: inline-flex; padding: .2rem; gap: .15rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.segmented a { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .85rem; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.segmented a:hover { color: var(--ink); background: var(--surface-2); }
.segmented a[aria-current="true"] { background: var(--brand); color: var(--brand-ink); }
.segmented .icon { width: 16px; height: 16px; }
.type-pills a[class^="type-"]::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .4rem; border-radius: 50%; background: var(--ev); vertical-align: middle; }
.count-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 .4rem; margin-left: .35rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); font-size: .78rem; vertical-align: middle; }
/* Carte d'événement */
.event-card { border-left: 4px solid var(--ev, var(--accent)); }
.event-card .date-block { background: color-mix(in srgb, var(--ev, var(--accent)) 14%, var(--surface)); color: var(--ev, var(--accent-ink)); height: auto; padding: .45rem 0; }
.date-weekday { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.event-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.event-card .chip-event, .event-page .chip-event { color: var(--ev, var(--accent-ink)); background: color-mix(in srgb, var(--ev, var(--accent)) 14%, var(--surface)); }
.chip-ok { color: var(--ok); background: var(--ok-soft); }
.chip-danger { color: var(--err); background: var(--err-soft); }
.chip-soon { color: var(--warn); background: var(--warn-soft); }
.chip .icon { width: 14px; height: 14px; }
.event-meta { list-style: none; padding: 0; margin: .2rem 0 0; display: grid; gap: .2rem; font-size: .88rem; color: var(--ink-3); }
.event-meta li { display: flex; align-items: center; gap: .4rem; }
.event-meta .icon { width: 15px; height: 15px; }
/* Jauge des places */
.seats { display: flex; align-items: center; gap: .6rem; margin-top: .65rem; font-size: .82rem; color: var(--ink-3); }
.seats-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; max-width: 160px; }
.seats-fill { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.seats.is-low .seats-fill { background: var(--warn); } .seats.is-low .seats-text { color: var(--warn); font-weight: 650; }
.seats.is-full .seats-fill { background: var(--err); } .seats.is-full .seats-text { color: var(--err); font-weight: 650; }
.seats-lg { flex-direction: column; align-items: stretch; gap: .4rem; margin: 0 0 1rem; font-size: .95rem; color: var(--ink-2); }
.seats-lg .seats-bar { max-width: none; height: 8px; }
.seats-0 { width: 0%; }
.seats-10 { width: 10%; }
.seats-20 { width: 20%; }
.seats-30 { width: 30%; }
.seats-40 { width: 40%; }
.seats-50 { width: 50%; }
.seats-60 { width: 60%; }
.seats-70 { width: 70%; }
.seats-80 { width: 80%; }
.seats-90 { width: 90%; }
.seats-100 { width: 100%; }
/* Calendrier mensuel */
.calendar-nav { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.calendar-title { margin: 0 .4rem; min-width: 10ch; text-align: center; font-size: 1.4rem; }
.calendar { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.calendar-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-days span { padding: .55rem; text-align: center; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); background: var(--surface-2); }
.calendar-cell { min-height: 110px; padding: .4rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.calendar-cell:first-child { border-left: 0; }
.calendar-cell.is-out { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.calendar-cell.is-out .calendar-date { opacity: .45; }
.calendar-date { font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.calendar-cell.is-today .calendar-date span[aria-hidden] { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); }
.calendar-event { display: block; padding: .25rem .4rem; border-radius: 6px; border-left: 3px solid var(--ev); background: color-mix(in srgb, var(--ev) 12%, var(--surface)); color: var(--ink); font-size: .76rem; line-height: 1.3; text-decoration: none; }
.calendar-event .calendar-time { display: block; font-size: .7rem; }
/* Titre complet sur 3 lignes au plus (plus de coupure sur une seule ligne) */
.calendar-label { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
/* Calendrier + programme du mois côte à côte sur grand écran */
.calendar-layout { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 1100px) { .calendar-layout { grid-template-columns: minmax(0, 1fr) 340px; } .month-agenda { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; } }
.month-agenda { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.month-agenda-title { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin: 0 0 .75rem; }
.month-agenda-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.month-agenda-list a { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--ev, var(--brand)); color: var(--ink); text-decoration: none; transition: background-color .15s ease, transform .15s ease; }
.month-agenda-list a:hover { background: color-mix(in srgb, var(--ev, var(--brand)) 8%, var(--surface)); transform: translateX(2px); }
.ma-date { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 50px; border-radius: 10px; background: color-mix(in srgb, var(--ev, var(--brand)) 14%, var(--surface)); color: var(--ev, var(--brand)); font-size: .68rem; font-weight: 700; text-transform: uppercase; line-height: 1.1; }
.ma-date b { font: 800 1.25rem/1 var(--font-display); }
.ma-body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.ma-type { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ev, var(--brand)); }
.ma-mine { color: var(--ok); }
.ma-title { font-size: .95rem; line-height: 1.3; }
.ma-meta { font-size: .8rem; color: var(--ink-3); }
.month-agenda-list .is-cancelled .ma-title { text-decoration: line-through; opacity: .7; }
}
.calendar-event:hover { background: color-mix(in srgb, var(--ev) 22%, var(--surface)); }
.calendar-event.is-mine { box-shadow: inset 0 0 0 1.5px var(--ok); }
.calendar-event.is-cancelled { text-decoration: line-through; opacity: .6; }
.calendar-time { font-weight: 700; color: var(--ev); }
/* Petit écran : la grille serait illisible ; le programme du mois (sous la navigation) donne tout le détail */
@media (max-width: 720px) { .calendar-main .calendar { display: none; } .calendar-layout { gap: .5rem; } }
/* Fiche d'un événement */
.event-hero { background: radial-gradient(color-mix(in srgb, var(--ev) 18%, transparent) 1.2px, transparent 1.6px) 0 0 / 20px 20px, color-mix(in srgb, var(--ev) 8%, var(--bg)); }
.event-facts { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.event-facts li { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.event-facts .icon { width: 17px; height: 17px; color: var(--ev); }
.event-box .btn-block + form .btn-block, .event-box form + .event-box-title { margin-top: .25rem; }
.event-box-title { margin: 1.1rem 0 .5rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.event-cal-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.event-cal-links .btn { flex: 1 1 auto; }
.share-btn { margin-top: .4rem; }

/* ============ Bibliothèque ============ */
.library-head .eyebrow { display: inline-flex; align-items: center; gap: .35rem; }
.library-head .eyebrow .icon { width: 15px; height: 15px; }
.library-count { margin: 0; padding: .6rem 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); }
.library-count strong { display: block; font: 800 1.8rem/1 var(--font-display); color: var(--brand); }
.library-search { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; max-width: 820px; }
.library-search .search-icon { left: 1rem; top: 25px; }
.library-search input[type="search"] { flex: 1 1 280px; padding-left: 2.6rem; }
.library-search select { width: auto; flex: 0 0 auto; }
.library-layout { display: grid; gap: 1.5rem 2rem; }
@media (min-width: 900px) { .library-layout { grid-template-columns: 240px minmax(0, 1fr); align-items: start; } .library-filters { position: sticky; top: 90px; } }
.filter-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 .6rem; }
.filter-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .15rem; }
.filter-list a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem .7rem; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .93rem; }
.filter-list a span { min-width: 24px; padding: 0 .4rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); font-size: .75rem; text-align: center; }
.filter-list a:hover { background: var(--surface-2); color: var(--ink); }
.filter-list a[aria-current="true"] { background: var(--brand-soft); color: var(--brand); }
.filter-list a[aria-current="true"] span { background: var(--brand); color: var(--brand-ink); }
.segmented-block { display: flex; flex-wrap: wrap; border-radius: var(--radius-sm); }
@media (min-width: 900px) { .library-filters .segmented-block { flex-direction: column; align-items: stretch; width: 100%; } .library-filters .segmented-block a { border-radius: var(--radius-sm); } }
@media (max-width: 899px) { .library-filters { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; } .filter-list { display: flex; flex-wrap: wrap; margin: 0; } .filter-title { display: none; } }
/* Carte de document : une couleur par famille de format */
.doc-pdf { --doc: #d93025; } .doc-texte { --doc: #2b5fd9; } .doc-tableur { --doc: #1e8e3e; } .doc-presentation { --doc: #d56e0c; }
.doc-image { --doc: #8e3ab8; } .doc-archive { --doc: #5f6b84; } .doc-lien { --doc: var(--accent-ink); }
@media (prefers-color-scheme: dark) { .doc-pdf { --doc: #ff8a80; } .doc-texte { --doc: #8ab4ff; } .doc-tableur { --doc: #7ee2a0; } .doc-presentation { --doc: #ffb366; } .doc-image { --doc: #d6a2f5; } .doc-archive { --doc: #a8b3c9; } }
.doc-card { gap: .5rem; }
.doc-top { display: flex; gap: .85rem; align-items: flex-start; }
.doc-badge { flex: none; display: grid; place-items: center; width: 54px; height: 64px; border-radius: 8px 16px 8px 8px; background: color-mix(in srgb, var(--doc) 14%, var(--surface)); color: var(--doc); border: 1.5px solid color-mix(in srgb, var(--doc) 35%, transparent); font: 800 .78rem/1 var(--font); letter-spacing: .02em; }
.doc-badge .icon { width: 24px; height: 24px; }
.doc-head { min-width: 0; }
.doc-head .card-title { margin: .4rem 0 0; }
.doc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: auto; padding-top: .75rem; border-top: 1px dashed var(--line); }
.doc-foot .meta { display: inline-flex; align-items: center; gap: .3rem; }
.doc-foot .meta .icon { width: 14px; height: 14px; }
/* Choix « fichier / lien » dans l'administration */
.choice-cards { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choice-card { display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 500; }
.choice-card input { accent-color: var(--brand); }
.choice-card span { display: flex; flex-direction: column; }
.choice-card small { color: var(--ink-3); font-size: .8rem; }
.choice-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.admin-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

@media print {
  .site-header, .site-footer, .cta-band, .helpful-box, .comments form, .nav-toggle, .page-loader { display: none !important; }
  body { background: #fff; color: #000; }
  .page-head { background: none; }
}
