/* ==========================================================================
   BTS FED option B – Feuille de style principale
   Palette : nuit polaire, acier, glacier, givre, turquoise, blanc
   Typographie : Archivo (une seule famille, l'axe de largeur sert aux titres)
   ========================================================================== */

:root {
  --nuit: #0A1C33;
  --acier: #16345A;
  --acier-2: #24507F;
  --glacier: #CFEAF5;
  --glacier-2: #E6F4FA;
  --givre: #F5FAFD;
  --turquoise: #12B5A6;
  --turquoise-fonce: #0B8A7E;
  --blanc: #FFFFFF;
  --texte: #1B2F48;
  --texte-doux: #4A627D;
  --ligne: #D3E3EE;
  --danger: #B42318;
  --ok: #0B7A5F;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --shadow: 0 1px 2px rgba(10, 28, 51, .06), 0 8px 24px -12px rgba(10, 28, 51, .18);
  --shadow-up: 0 2px 4px rgba(10, 28, 51, .06), 0 18px 40px -16px rgba(10, 28, 51, .28);
  --container: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  color: var(--texte); background: var(--blanc); font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--acier-2); text-underline-offset: 3px; }
a:hover { color: var(--turquoise-fonce); }
:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--glacier); color: var(--nuit); }

h1, h2, h3, h4 { color: var(--nuit); line-height: 1.12; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.25rem); font-variation-settings: "wdth" 120; letter-spacing: -.025em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-variation-settings: "wdth" 116; }
h3 { font-size: 1.25rem; font-variation-settings: "wdth" 108; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--texte-doux); max-width: 62ch; }
.muted { color: var(--texte-doux); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--givre { background: var(--givre); }
.section--glacier { background: linear-gradient(180deg, var(--glacier-2), var(--givre)); }
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { color: var(--texte-doux); font-size: 1.125rem; }

.skip-link { position: absolute; left: 1rem; top: -100px; background: var(--turquoise); color: var(--nuit); padding: .6rem 1rem; z-index: 200; border-radius: var(--radius-s); font-weight: 600; }
.skip-link:focus { top: 1rem; }

/* ---------- Boutons ---------- */
.btn {
  --bg: var(--nuit); --fg: var(--blanc); --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.35rem; border-radius: 999px; border: 1.5px solid var(--bd);
  background: var(--bg); color: var(--fg); font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, color .2s;
  font-variation-settings: "wdth" 106; white-space: nowrap;
}
.btn:hover { color: var(--fg); transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(10, 28, 51, .55); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--turquoise { --bg: var(--turquoise); --fg: var(--nuit); }
.btn--turquoise:hover { --bg: #19C7B7; }
.btn--light { --bg: transparent; --fg: var(--blanc); --bd: rgba(207, 234, 245, .55); }
.btn--light:hover { --bg: rgba(207, 234, 245, .1); }
.btn--outline { --bg: transparent; --fg: var(--nuit); --bd: var(--ligne); }
.btn--outline:hover { --bd: var(--acier-2); }
.btn--small { min-height: 40px; padding: .5rem 1rem; font-size: .9375rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s; }
.site-header.is-scrolled { border-bottom-color: var(--ligne); box-shadow: 0 6px 24px -18px rgba(10, 28, 51, .35); }
.demo-banner { background: #FFF6DB; color: #5B4300; font-size: .875rem; text-align: center; padding: .45rem 1rem; border-bottom: 1px solid #F3E2A6; }
.nav-wrap { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--nuit); }
.brand:hover { color: var(--nuit); }
.logo-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-variation-settings: "wdth" 120; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-text span { font-size: .8125rem; color: var(--texte-doux); }
.brand--light, .brand--light:hover { color: var(--blanc); }
.brand--light .brand-text span { color: var(--glacier); opacity: .8; }

.main-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.main-nav a { display: block; padding: .55rem .9rem; border-radius: 999px; text-decoration: none; color: var(--texte); font-weight: 500; font-size: .975rem; }
.main-nav a:hover { background: var(--glacier-2); color: var(--nuit); }
.main-nav a[aria-current="page"] { background: var(--nuit); color: var(--blanc); }
.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--ligne); border-radius: 12px; background: var(--blanc); cursor: pointer; align-items: center; justify-content: center; }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; background: var(--nuit); border-radius: 2px; position: relative; transition: transform .25s var(--ease), opacity .2s; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: absolute; inset: 100% 0 auto 0; background: var(--blanc); border-bottom: 1px solid var(--ligne); padding: .75rem 1.25rem 1.25rem; display: none; box-shadow: 0 20px 30px -24px rgba(10, 28, 51, .4); }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: .85rem 1rem; border-radius: 10px; font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--nuit); color: var(--glacier); overflow: hidden; isolation: isolate; }
.hero::before { /* isothermes très discrètes */
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 900px; height: 900px; z-index: -1; opacity: .5;
  background: repeating-radial-gradient(circle at 70% 30%, transparent 0 38px, rgba(207, 234, 245, .05) 38px 39px);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 140px; z-index: -1; background: linear-gradient(180deg, transparent, rgba(18, 181, 166, .07)); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(4rem, 8vw, 6.5rem); }
.hero h1 { color: var(--blanc); margin-bottom: .35em; }
.hero h1 .h1-sub { display: block; font-size: .5em; font-variation-settings: "wdth" 110; letter-spacing: -.01em; color: var(--glacier); font-weight: 500; margin-top: .35em; }
.hero .lead { color: #B9D3E3; }
.hero-campus { display: flex; align-items: center; gap: .6rem; color: var(--glacier); font-weight: 500; margin: 0 0 1.25rem; font-size: 1rem; }
.hero-campus svg { width: 18px; height: 18px; color: var(--turquoise); }
.hero .btn-row { margin-top: 2rem; }

/* Photo de classe encadrée par le cycle frigorifique */
.cycle-figure { margin: 0; }
.cycle { position: relative; padding: 34px; }
.cycle-photo { position: relative; border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 4 / 3; background: var(--acier); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.cycle-photo img { width: 100%; height: 100%; object-fit: cover; }
.cycle-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cycle-path { fill: none; stroke-width: 2; stroke-linecap: round; }
.cycle-path--hp { stroke: var(--glacier); }
.cycle-path--bp { stroke: var(--turquoise); }
.cycle-label {
  position: absolute; z-index: 2; font-size: .8125rem; font-weight: 600; color: var(--nuit); background: var(--glacier);
  padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; font-variation-settings: "wdth" 108;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5);
}
.cycle-label--bp { background: var(--turquoise); }
.cycle-label--top { top: 17px; left: 50%; transform: translate(-50%, -50%); }
.cycle-label--right { right: 17px; top: 50%; transform: translate(50%, -50%) rotate(-90deg); }
.cycle-label--bottom { bottom: 17px; left: 50%; transform: translate(-50%, 50%); }
.cycle-label--left { left: 17px; top: 50%; transform: translate(-50%, -50%) rotate(90deg); }
.cycle-caption { margin: .9rem 0 0 34px; font-size: .875rem; color: #9DBBD0; }
@media (prefers-reduced-motion: no-preference) {
  .cycle-path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 2.2s var(--ease) forwards; }
  .cycle-path--bp { animation-delay: .9s; }
  .cycle-label { opacity: 0; animation: fadeIn .5s ease forwards; }
  .cycle-label--right { animation-delay: .3s; } .cycle-label--top { animation-delay: .8s; }
  .cycle-label--left { animation-delay: 1.3s; } .cycle-label--bottom { animation-delay: 1.8s; }
  .cycle-flow { animation: flow 2.4s linear infinite; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes flow { to { stroke-dashoffset: -28; } }
.cycle-flow { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 2; stroke-dasharray: 2 26; stroke-linecap: round; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cycle-figure { max-width: 640px; }
}
@media (max-width: 520px) {
  .cycle { padding: 26px; }
  .cycle-label { font-size: .72rem; padding: .22rem .55rem; }
  .cycle-label--top { top: 13px; } .cycle-label--bottom { bottom: 13px; }
  .cycle-label--left { left: 13px; } .cycle-label--right { right: 13px; }
  .cycle-caption { margin-left: 26px; }
  .hero .btn { width: 100%; }
}

/* ---------- Formation ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split-aside { position: sticky; top: 110px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split-aside { position: static; } }

.domain-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ligne); }
.domain-list li { display: grid; grid-template-columns: 52px 1fr; gap: 1.1rem; padding: 1.4rem 0; border-bottom: 1px solid var(--ligne); }
.domain-list h3 { margin: .1rem 0 .3rem; font-size: 1.15rem; }
.domain-list p { margin: 0; color: var(--texte-doux); }
.icon-tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--glacier-2); color: var(--acier-2); }
.icon-tile svg { width: 26px; height: 26px; }

.skills-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.skill-col { background: var(--blanc); border-radius: var(--radius-m); padding: 1.5rem; border: 1px solid var(--ligne); }
.skill-col h3 { font-size: 1.1rem; margin-bottom: .9rem; padding-bottom: .8rem; border-bottom: 2px solid var(--glacier); }
.skill-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.skill-col li { position: relative; padding-left: 1.4rem; font-size: .975rem; color: var(--texte); }
.skill-col li::before { content: ""; position: absolute; left: 0; top: .5em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--turquoise); }
@media (max-width: 1000px) { .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .skills-grid { grid-template-columns: 1fr; } }

/* ---------- Promotion ---------- */
.promo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3.5rem; }
.promo-item { border-left: 3px solid var(--turquoise); padding-left: 1.25rem; }
.promo-item h3 { margin-bottom: .4rem; }
.promo-item p { color: var(--texte-doux); margin: 0; }
@media (max-width: 760px) { .promo-grid { grid-template-columns: 1fr; } }
.sector-bars { margin-top: 3rem; background: var(--nuit); color: var(--glacier); border-radius: var(--radius-l); padding: clamp(1.5rem, 4vw, 2.5rem); }
.sector-bars h3 { color: var(--blanc); margin-bottom: 1.25rem; }
.sector-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr 2.5rem; gap: 1rem; align-items: center; padding: .45rem 0; }
.sector-row a { color: var(--glacier); text-decoration: none; }
.sector-row a:hover { color: var(--blanc); text-decoration: underline; }
.sector-track { height: 10px; border-radius: 99px; background: rgba(207, 234, 245, .12); overflow: hidden; }
.sector-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--turquoise), #7FDCEB); }
.sector-count { text-align: right; font-weight: 600; color: var(--blanc); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .sector-row { grid-template-columns: 1fr 2rem; } .sector-track { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Parcours recruteur (vraie séquence) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; counter-reset: step; }
.steps li { counter-increment: step; background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--radius-m); padding: 1.6rem; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--nuit); color: var(--blanc); font-weight: 700; margin-bottom: 1rem; }
.steps h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.steps p { margin: 0; color: var(--texte-doux); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Cartes étudiants ---------- */
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.student-card { position: relative; display: flex; flex-direction: column; background: var(--blanc); border-radius: var(--radius-m); border: 1px solid var(--ligne); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.student-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-up); border-color: #BBD6E6; }
.student-card:focus-within { box-shadow: var(--shadow-up); }
.student-photo { position: relative; aspect-ratio: 4 / 5; background: var(--glacier-2); overflow: hidden; }
.student-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.student-card:hover .student-photo img { transform: scale(1.03); }
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; background: var(--glacier-2); color: var(--acier); }
.badge--demo { position: absolute; top: .75rem; left: .75rem; background: #FFF6DB; color: #5B4300; border: 1px solid #F3E2A6; }
.badge--seek { background: var(--nuit); color: var(--blanc); }
.student-body { padding: 1.2rem 1.25rem .5rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.student-body h3 { margin: 0; font-size: 1.25rem; }
.student-body h3 a { color: inherit; text-decoration: none; }
.student-body h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* toute la carte est cliquable */
.student-tagline { color: var(--texte-doux); font-size: .975rem; margin: 0; }
/* Plaque signalétique : le clin d'œil "matériel frigorifique" */
.nameplate { margin: .9rem 1.25rem 1.25rem; border-radius: 8px; background: linear-gradient(180deg, #EEF5F9, #E1ECF3); border: 1px solid #C9DAE6; padding: .7rem .9rem .7rem 1.6rem; position: relative; font-size: .875rem; }
.nameplate::before, .nameplate::after { content: ""; position: absolute; left: .6rem; width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #9DB4C6); box-shadow: 0 0 0 1px #AFC4D3; }
.nameplate::before { top: .6rem; } .nameplate::after { bottom: .6rem; }
.nameplate dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; }
.nameplate dt { color: var(--texte-doux); font-weight: 500; }
.nameplate dd { margin: 0; color: var(--nuit); font-weight: 600; }
.student-cta { position: relative; z-index: 2; margin: 0 1.25rem 1.25rem; }
.student-cta .btn { width: 100%; }

/* ---------- Page étudiants : barre d'outils ---------- */
.page-head { background: var(--nuit); color: var(--glacier); padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 5vw, 3.5rem); position: relative; overflow: hidden; isolation: isolate; }
.page-head::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 700px; height: 700px; z-index: -1; opacity: .5; background: repeating-radial-gradient(circle at 70% 30%, transparent 0 38px, rgba(207, 234, 245, .05) 38px 39px); }
.page-head h1 { color: var(--blanc); font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.page-head p { color: #B9D3E3; max-width: 62ch; font-size: 1.125rem; margin: 0; }
.toolbar { display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: .75rem; align-items: end; margin-top: -2.25rem; background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--radius-m); padding: 1rem; box-shadow: var(--shadow); position: relative; z-index: 3; }
@media (max-width: 860px) { .toolbar { grid-template-columns: 1fr 1fr; } .toolbar .field--search { grid-column: 1 / -1; } }
@media (max-width: 480px) { .toolbar { grid-template-columns: 1fr; } }
.results-info { margin: 1.5rem 0 1.25rem; color: var(--texte-doux); }
.empty-state { text-align: center; padding: 3.5rem 1rem; border: 1.5px dashed var(--ligne); border-radius: var(--radius-m); color: var(--texte-doux); }
.empty-state h2 { font-size: 1.4rem; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label, .field .label { font-weight: 600; font-size: .9375rem; color: var(--nuit); }
.field .hint { font-size: .85rem; color: var(--texte-doux); font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--texte); background: var(--blanc);
  border: 1.5px solid var(--ligne); border-radius: 10px; padding: .75rem .9rem; min-height: 48px;
  transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2316345A' stroke-width='2'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px; padding-right: 2.5rem; }
textarea.input { min-height: 160px; resize: vertical; line-height: 1.5; }
.input:hover { border-color: #B6CDDD; }
.input:focus { outline: none; border-color: var(--turquoise); box-shadow: 0 0 0 4px rgba(18, 181, 166, .18); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--texte-doux); pointer-events: none; }
.search-wrap .input { padding-left: 2.6rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.req { color: var(--danger); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; color: var(--texte); }
.check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--turquoise-fonce); flex: none; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.field-error { color: var(--danger); font-size: .875rem; }
.alert { border-radius: 10px; padding: 1rem 1.15rem; font-size: .975rem; border: 1px solid; }
.alert--ok { background: #E8F7F2; border-color: #A8DEC9; color: #0A5A45; }
.alert--err { background: #FDECEA; border-color: #F4B8B1; color: #8A1C12; }
.alert--warn { background: #FFF6DB; border-color: #F3E2A6; color: #5B4300; }
.segmented { display: inline-flex; background: var(--glacier-2); border-radius: 999px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; padding: .55rem 1.05rem; border-radius: 999px; font-weight: 600; font-size: .95rem; color: var(--acier); transition: background .2s, color .2s; }
.segmented input:checked + span { background: var(--nuit); color: var(--blanc); }
.segmented input:focus-visible + span { outline: 3px solid var(--turquoise); outline-offset: 2px; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-card { background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--radius-l); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.contact-aside { display: grid; gap: 1.25rem; }
.aside-box { background: var(--givre); border-radius: var(--radius-m); padding: 1.4rem; border: 1px solid var(--ligne); }
.aside-box h2 { font-size: 1.15rem; font-variation-settings: "wdth" 108; }
.aside-box p:last-child, .aside-box ul:last-child { margin-bottom: 0; }
.aside-box ul { padding-left: 1.1rem; color: var(--texte-doux); }
.selected-student { display: flex; align-items: center; gap: .9rem; padding: .8rem; border-radius: 12px; background: var(--glacier-2); margin-top: .5rem; }
.selected-student img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--blanc); }
.selected-student strong { display: block; color: var(--nuit); }
.selected-student span { font-size: .9rem; color: var(--texte-doux); }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

/* ---------- Profil ---------- */
.profile-hero { background: var(--nuit); color: var(--glacier); position: relative; overflow: hidden; isolation: isolate; }
.profile-hero::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 800px; height: 800px; z-index: -1; opacity: .5; background: repeating-radial-gradient(circle at 70% 30%, transparent 0 38px, rgba(207, 234, 245, .05) 38px 39px); }
.profile-hero-grid { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.profile-photo { border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 4 / 5; background: var(--acier); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); position: relative; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero h1 { color: var(--blanc); font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: .25em; }
.profile-hero .lead { color: #B9D3E3; }
.profile-hero .nameplate { margin: 1.5rem 0 1.75rem; max-width: 520px; font-size: .95rem; }
.backlink { display: inline-flex; align-items: center; gap: .4rem; color: var(--glacier); text-decoration: none; font-size: .95rem; margin-bottom: 1.25rem; }
.backlink:hover { color: var(--blanc); }
.backlink svg { width: 18px; height: 18px; }
@media (max-width: 800px) { .profile-hero-grid { grid-template-columns: 1fr; } .profile-photo { max-width: 320px; } }

.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.profile-main > section { padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--ligne); }
.profile-main > section:last-child { border-bottom: 0; margin-bottom: 0; }
.profile-main h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.profile-side { position: sticky; top: 100px; display: grid; gap: 1.25rem; }
@media (max-width: 960px) { .profile-layout { grid-template-columns: 1fr; } .profile-side { position: static; } }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chips li { padding: .4rem .85rem; border-radius: 999px; background: var(--glacier-2); color: var(--acier); font-weight: 500; font-size: .95rem; }
.chips--outline li { background: transparent; border: 1.5px solid var(--ligne); color: var(--texte); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }
.two-col h3 { font-size: 1.05rem; margin-bottom: .75rem; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--glacier); }
.timeline li { position: relative; padding: 0 0 1.4rem 2.1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: .35rem; width: 16px; height: 16px; border-radius: 50%; background: var(--blanc); border: 3px solid var(--turquoise); }
.timeline .period { font-size: .9rem; color: var(--texte-doux); font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline strong { display: block; color: var(--nuit); font-size: 1.05rem; }
.timeline span.place { color: var(--texte-doux); font-size: .95rem; }

.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.project-item { background: var(--givre); border-radius: var(--radius-m); padding: 1.15rem 1.25rem; border: 1px solid var(--ligne); }
.project-item h3 { font-size: .95rem; color: var(--texte-doux); font-weight: 600; margin-bottom: .3rem; font-variation-settings: "wdth" 100; letter-spacing: 0; }
.project-item p { margin: 0; color: var(--nuit); font-weight: 500; }
@media (max-width: 640px) { .project-grid { grid-template-columns: 1fr; } }

.skill-group + .skill-group { margin-top: 1.6rem; }
.skill-group h3 { font-size: 1rem; color: var(--acier-2); margin-bottom: .75rem; }
.skill-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; align-items: center; padding: .55rem 0; border-bottom: 1px dashed var(--ligne); }
.skill-row:last-child { border-bottom: 0; }
.skill-name { font-weight: 500; }
.gauge { display: inline-grid; grid-template-columns: repeat(5, 22px); gap: 4px; }
.gauge i { height: 10px; border-radius: 3px; background: var(--glacier); }
.gauge i.on { background: linear-gradient(90deg, var(--acier-2), var(--turquoise)); }
.gauge-legend { font-size: .85rem; color: var(--texte-doux); margin-top: .9rem; }

.doc-box { background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--radius-m); padding: 1.4rem; box-shadow: var(--shadow); }
.doc-box h2 { font-size: 1.15rem; font-variation-settings: "wdth" 108; margin-bottom: 1rem; }
.doc-item { display: grid; grid-template-columns: 44px 1fr; gap: .85rem; align-items: center; padding: .9rem 0; border-top: 1px solid var(--ligne); }
.doc-item:first-of-type { border-top: 0; padding-top: 0; }
.doc-icon { width: 44px; height: 52px; border-radius: 6px; background: var(--glacier-2); color: var(--acier); display: grid; place-items: center; font-size: .7rem; font-weight: 700; position: relative; }
.doc-icon::after { content: ""; position: absolute; top: 0; right: 0; border-width: 0 10px 10px 0; border-style: solid; border-color: var(--blanc) var(--blanc) #BFD8E6 #BFD8E6; }
.doc-item strong { display: block; color: var(--nuit); }
.doc-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.doc-locked { font-size: .925rem; color: var(--texte-doux); background: var(--givre); border-radius: 10px; padding: .9rem 1rem; }

/* Visionneuse PDF */
.pdf-dialog { width: min(1000px, 96vw); height: min(92vh, 1200px); padding: 0; border: 0; border-radius: var(--radius-l); overflow: hidden; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .5); }
.pdf-dialog::backdrop { background: rgba(10, 28, 51, .72); backdrop-filter: blur(3px); }
.pdf-dialog[open] { display: flex; flex-direction: column; }
.pdf-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; background: var(--nuit); color: var(--blanc); flex-wrap: wrap; }
.pdf-bar strong { font-variation-settings: "wdth" 110; }
.pdf-bar .btn-row { gap: .5rem; }
.pdf-frame { flex: 1; width: 100%; border: 0; background: #E9EEF2; }
.pdf-mobile-note { display: none; padding: 1.5rem; text-align: center; }
@media (max-width: 700px) {
  .pdf-dialog { width: 100vw; height: 100dvh; max-height: none; max-width: none; border-radius: 0; }
}

/* ---------- Pages texte ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.5rem; margin-top: 2.25rem; }
.prose h3 { margin-top: 1.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.todo { background: #FFF6DB; padding: 0 .3em; border-radius: 4px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--nuit); color: #A9C4D6; padding-block: 3.5rem 2.5rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.3fr; gap: 2rem; align-items: start; }
.footer-note { margin-top: 1rem; font-size: .95rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-links a, .footer-legal a { color: var(--glacier); text-decoration: none; }
.footer-links a:hover, .footer-legal a:hover { color: var(--blanc); text-decoration: underline; }
.footer-legal { font-size: .875rem; margin: 0; }
.footer-admin { display: inline-block; margin-top: .75rem; opacity: .7; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Bandeau CTA ---------- */
.cta-band { background: var(--nuit); color: var(--glacier); border-radius: var(--radius-l); padding: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; position: relative; overflow: hidden; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: auto -120px -220px auto; width: 480px; height: 480px; z-index: -1; background: repeating-radial-gradient(circle, transparent 0 30px, rgba(18, 181, 166, .12) 30px 31px); }
.cta-band h2 { color: var(--blanc); margin-bottom: .4rem; }
.cta-band p { margin: 0; color: #B9D3E3; max-width: 56ch; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Animations discrètes ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .student-card, .student-photo img, .btn { transition: none; }
}

.skeleton { background: linear-gradient(90deg, var(--glacier-2), #F2F8FB, var(--glacier-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-m); min-height: 420px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Impression ---------- */
@media print {
  .site-header, .site-footer, .btn, .demo-banner, .toolbar { display: none !important; }
  .hero, .page-head, .profile-hero { background: #fff !important; color: #000 !important; }
  .hero h1, .profile-hero h1, .page-head h1 { color: #000 !important; }
}

/* Ajustements formulaire */
.field label.check { font-weight: 400; font-size: .95rem; color: var(--texte); }
@media (max-width: 520px) {
  .segmented { display: flex; flex-wrap: nowrap; width: 100%; }
  .segmented label { flex: 1; }
  .segmented span { text-align: center; padding-inline: .5rem; }
}
