/* ═══════════════════════════════════════════════════════════════════════════
   lyk-site — feuille de style unique

   Contraintes assumées :
   · Aucune police ni ressource externe (CSP stricte, pas de CDN) : la pile de
     polices système donne un rendu natif sur macOS, iOS, Windows et Android.
   · Aucun style en ligne dans les gabarits : la CSP interdit
     `style-src 'unsafe-inline'`. Les valeurs dynamiques (barres de
     statistiques) passent donc par des attributs SVG, pas par du CSS.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Jetons de conception ─────────────────────────────────────────────────── */
:root {
  /* Blanc nacré : légèrement chaud, jamais gris pur */
  --pearl-100: #fdfcfb;
  --pearl-200: #f6f3ef;
  --pearl-300: #ece7e1;

  --ink: #1b2127;
  --ink-soft: #4a555f;
  --muted: #8b959f;
  /* Signature : gris clair, discret mais toujours lisible */
  --whisper: #b9bfc5;

  --hairline: rgba(27, 33, 39, 0.09);
  --hairline-strong: rgba(27, 33, 39, 0.16);

  --accent-consulting: #3f6d99;
  --accent-corporation: #b08a3e;
  --accent-immo: #a8794f;

  --shadow-soft: 0 1px 2px rgba(27, 33, 39, 0.04),
    0 8px 24px -12px rgba(27, 33, 39, 0.14);
  --shadow-lift: 0 2px 4px rgba(27, 33, 39, 0.05),
    0 24px 48px -20px rgba(27, 33, 39, 0.22);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --slide-duration: 560ms;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── Réinitialisation ciblée ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  /* Le nacré : trois arrêts très proches + une lueur diagonale */
  background-color: var(--pearl-200);
  background-image: radial-gradient(
      120% 90% at 12% 0%,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0) 55%
    ),
    linear-gradient(155deg, var(--pearl-100) 0%, var(--pearl-200) 48%, var(--pearl-300) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Anneau de focus visible : la navigation au clavier doit rester praticable */
:focus-visible {
  outline: 2px solid var(--accent-consulting);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   ACCUEIL — le « drapeau » à trois bandes
   ═══════════════════════════════════════════════════════════════════════════ */

.page-home {
  overflow: hidden; /* aucune barre de défilement pendant la transition */
}

.flag {
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* évite le saut lié à la barre d'URL sur mobile */
}

.band {
  position: relative;
  flex: 1 1 33.3333%;
  min-width: 0;
  overflow: hidden;
  display: block;
  /* Le liséré nacré entre les bandes tient lieu de séparation : pas de trait */
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.75),
    inset 1px 0 0 rgba(27, 33, 39, 0.05);
  transition: flex-grow var(--slide-duration) var(--ease-out),
    opacity calc(var(--slide-duration) * 0.8) var(--ease-out),
    filter 400ms var(--ease-out);
}

.band:last-child {
  box-shadow: inset 1px 0 0 rgba(27, 33, 39, 0.05);
}

.band__visual {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 900ms var(--ease-out), opacity 500ms var(--ease-out);
}

/* Bande 3 : estompée, comme demandé — présence, pas affirmation */
.band--immo .band__visual {
  opacity: 0.55;
  filter: saturate(0.85);
}

/* Voile nacré : lie les trois visuels au fond et garantit la lisibilité
   du nom quelle que soit l'image placée en dessous. */
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(253, 252, 251, 0.55) 0%,
    rgba(253, 252, 251, 0.08) 38%,
    rgba(253, 252, 251, 0.72) 100%
  );
  transition: opacity 500ms var(--ease-out);
}

.band__label {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: clamp(2rem, 6vh, 4.5rem);
  padding: 0 1rem;
  text-align: center;
}

.band__name {
  display: block;
  font-size: clamp(0.95rem, 1.35vw, 1.3rem);
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.band__tagline {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Trait d'accent : seule couleur propre à chaque société */
.band__rule {
  display: block;
  width: 26px;
  height: 2px;
  margin: 1rem auto 0;
  border-radius: 2px;
  background: var(--muted);
  transform: scaleX(0.55);
  transform-origin: center;
  transition: transform 420ms var(--ease-out), background-color 420ms var(--ease-out);
}

.band--consulting .band__rule { background: var(--accent-consulting); }
.band--corporation .band__rule { background: var(--accent-corporation); }
.band--immo .band__rule { background: var(--accent-immo); }

/* Survol : uniquement sur les bandes cliquables */
.band--link { cursor: pointer; }

@media (hover: hover) {
  .band--link:hover .band__visual { transform: scale(1.06); }
  .band--link:hover::after { opacity: 0.6; }
  .band--link:hover .band__rule { transform: scaleX(1.6); }
}

.band__hint {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: clamp(0.9rem, 2.5vh, 1.6rem);
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--whisper);
  opacity: 0;
  transition: opacity 380ms var(--ease-out);
}

@media (hover: hover) {
  .band--link:hover .band__hint { opacity: 1; }
}

/* Déconnexion depuis l'accueil : posée par-dessus le drapeau, en haut à
   droite, assez discrète pour ne pas concurrencer les trois bandes. */
.home-logout {
  position: fixed;
  z-index: 42;
  top: 1rem;
  right: 1rem;
}

.home-logout .topbar__logout {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0.55;
  transition: opacity 240ms var(--ease-out), border-color 240ms, color 240ms;
}

.home-logout .topbar__logout:hover,
.home-logout .topbar__logout:focus-visible { opacity: 1; }

/* Masquée pendant la transition : elle ne doit pas rester flottante seule
   au-dessus d'une page en train de glisser. */
.is-leaving .home-logout { opacity: 0; transition: opacity 200ms; }

/* ── Transition « glissante » au clic ─────────────────────────────────────
   La bande choisie s'élargit, les deux autres se replient et s'effacent.
   La navigation n'est déclenchée qu'à la fin de l'animation (cf. site.js). */
.is-leaving .band:not(.is-active) {
  flex-grow: 0.001;
  opacity: 0;
  filter: blur(2px);
}

.is-leaving .band.is-active {
  flex-grow: 3;
}

.is-leaving .band.is-active::after {
  opacity: 0.25;
}

/* ── Entrée en scène des bandes au chargement ─────────────────────────────── */
@keyframes band-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.band { animation: band-in 700ms var(--ease-out) both; }
.band:nth-child(1) { animation-delay: 40ms; }
.band:nth-child(2) { animation-delay: 130ms; }
.band:nth-child(3) { animation-delay: 220ms; }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGES INTÉRIEURES
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes page-in {
  from { opacity: 0; transform: translateX(38px); }
  to   { opacity: 1; transform: translateX(0); }
}

.page-inner .shell {
  animation: page-in 480ms var(--ease-out) both;
}

.shell {
  width: min(1080px, 100% - 2.5rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 3rem) 0 6rem;
}

/* ── Barre supérieure ─────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  margin-bottom: clamp(1.5rem, 4vh, 2.75rem);
  border-bottom: 1px solid var(--hairline);
}

.topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 200ms;
}

.topbar__back:hover { color: var(--ink); }
.topbar__back svg { width: 14px; height: 14px; }

.topbar__spacer { flex: 1; }

.topbar__who {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.topbar__logout {
  background: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: border-color 200ms, color 200ms, background-color 200ms;
}

.topbar__logout:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

/* ── Titres de page ───────────────────────────────────────────────────────── */
.page-head { margin-bottom: clamp(1.75rem, 5vh, 3rem); }

.page-head__eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-head__title {
  margin: 0.5rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4.5vw, 2.9rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.page-head__sub {
  margin: 0.6rem 0 0;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  color: var(--ink-soft);
}

.page-head__rule {
  width: 44px;
  height: 3px;
  margin-top: 1.4rem;
  border-radius: 3px;
  background: var(--accent-consulting);
}

.page-head__rule--corporation { background: var(--accent-corporation); }
.page-head__rule--immo { background: var(--accent-immo); }

/* ── Cartes ───────────────────────────────────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: clamp(1.15rem, 3vw, 1.9rem);
}

.card + .card { margin-top: 1.25rem; }

/* ANNULATION dans la grille des réalisations.
   La règle ci-dessus sert aux cartes EMPILÉES (page paramètres). Dans une
   grille, elle s'applique quand même à toutes les fiches sauf la première :
   les fiches 2 et 3 descendaient de 1,25 rem tandis que la 1 restait en haut,
   d'où un décalage visible sur la première ligne. La grille gère déjà son
   espacement avec `gap`. */
.works .card + .card { margin-top: 0; }

.card__title {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONNEXION
   ═══════════════════════════════════════════════════════════════════════════ */

.page-login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.5rem;
}

.login {
  width: min(400px, 100%);
  animation: page-in 520ms var(--ease-out) both;
}

.login__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.login__logo { width: 76px; height: 76px; }

.login__wordmark {
  margin-top: 1rem;
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
}

.login__sub {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.login__card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  padding: 1.75rem;
}

.field + .field { margin-top: 1.05rem; }

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input {
  width: 100%;
  padding: 0.72rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline-strong);
  border-radius: 9px;
  transition: border-color 180ms, box-shadow 180ms;
}

.field input:focus {
  outline: none;
  border-color: var(--accent-consulting);
  box-shadow: 0 0 0 3px rgba(63, 109, 153, 0.14);
}

.btn {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.78rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 9px;
  transition: background-color 200ms, transform 120ms;
}

.btn:hover { background: #2b333b; }
.btn:active { transform: translateY(1px); }

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Bouton secondaire : présent mais visiblement moins engageant que
   « Se connecter », pour ne pas détourner l'administrateur de son formulaire. */
.btn--ghost {
  margin-top: 0;
  color: var(--ink);
  background: transparent;
  border-color: var(--hairline-strong);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--ink-soft);
}

/* Séparateur « ou » : un filet interrompu par le mot, centré */
.sep {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.4rem 0 1.1rem;
}

.sep::before,
.sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.sep span {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.login__hint {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.btn-inline--tiny {
  padding: 0.24rem 0.6rem;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.cv-head__reveal a {
  color: var(--accent-corporation);
}

.alert {
  margin-bottom: 1.25rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.86rem;
  border-radius: 9px;
  border: 1px solid;
}

.alert--error {
  color: #8c2f2f;
  background: rgba(180, 70, 70, 0.07);
  border-color: rgba(180, 70, 70, 0.28);
}

.alert--ok {
  color: #2f6b46;
  background: rgba(70, 150, 100, 0.08);
  border-color: rgba(70, 150, 100, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CV
   ═══════════════════════════════════════════════════════════════════════════ */

.cv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.5rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--hairline);
}

.cv-head__main { flex: 1 1 320px; }

.cv-head__name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
}

.cv-head__title {
  margin: 0.45rem 0 0;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  color: var(--accent-corporation);
}

.cv-head__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.cv-head__specialities {
  margin: 0.55rem 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.cv-head__contact {
  flex: 0 1 auto;
  font-size: 0.84rem;
  line-height: 1.9;
  color: var(--ink-soft);
  text-align: right;
}

.cv-head__contact a:hover { color: var(--accent-corporation); }

.cv-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.cv-section { margin-top: clamp(2rem, 5vh, 3rem); }

.cv-section__title {
  margin: 0 0 1.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.cv-profile {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.3rem 0.7rem;
  font-size: 0.76rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--hairline);
  border-radius: 999px;
}

.xp {
  position: relative;
  padding-left: 1.6rem;
  padding-bottom: 2.2rem;
}

/* Filet vertical reliant les expériences : lecture chronologique évidente */
.xp::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55rem;
  bottom: 0;
  width: 1px;
  background: var(--hairline-strong);
}

.xp:last-child::before { bottom: 1.8rem; }

.xp::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pearl-100);
  border: 2px solid var(--accent-corporation);
}

.xp__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}

.xp__company {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.xp__period {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.xp__role {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  color: var(--accent-corporation);
}

.xp__context {
  margin: 0.15rem 0 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.xp__block { margin-top: 1.35rem; }

.xp__block-head {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.xp__block-head::before {
  content: "▸ ";
  color: var(--accent-corporation);
}

.xp__items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.xp__items li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.xp__items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--hairline-strong);
}

.xp__item-label {
  color: var(--ink);
  font-weight: 600;
}

.xp__item-period {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.82em;
}

.xp__env {
  margin: 1.1rem 0 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.6);
  border-left: 2px solid var(--hairline-strong);
  border-radius: 0 8px 8px 0;
}

.xp__env strong {
  color: var(--ink);
  font-weight: 600;
}

/* Listes libellé / valeur : expertise, compétences */
.deflist {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.deflist > div {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 0.4rem 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--hairline);
}

.deflist dt {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}

.deflist dd {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.25rem, 4vw, 2.5rem);
}

.edu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.edu li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.88rem;
}

.edu__year {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-corporation);
}

.edu__school {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RÉALISATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.placeholder {
  text-align: center;
  padding: clamp(2.5rem, 9vh, 5rem) 1.5rem;
}

.placeholder__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
  opacity: 0.4;
}

.placeholder__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 400;
}

.placeholder__text {
  max-width: 46ch;
  margin: 0.9rem auto 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.35rem;
}

.work__media {
  /* PAS de ratio imposé. Un 16/9 avec object-fit: cover convenait à une capture
     paysage mais tronquait brutalement une capture en portrait : d'une carte de
     682 × 984 on ne voyait qu'une tranche horizontale. Les captures d'écran ont
     des proportions imprévisibles, on respecte donc celles du fichier. */
  margin: -0.4rem -0.4rem 1.1rem;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pearl-200), var(--pearl-300));
  border: 1px solid var(--hairline);
}

.work__media img {
  display: block;
  width: 100%;
  height: auto;
}

.work__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.work__title {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.work__tag {
  display: inline-block;
  margin: 0 0 0.85rem;
  padding: 0.18rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-consulting);
  background: rgba(63, 109, 153, 0.09);
  border: 1px solid rgba(63, 109, 153, 0.22);
  border-radius: 4px;
}

.work__text {
  margin: 0 0 0.9rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.work__list {
  margin: 0 0 0.9rem;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.work__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work__stack li {
  padding: 0.22rem 0.55rem;
  font-size: 0.7rem;
  color: var(--ink-soft);
  background: var(--pearl-200);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  font-family: var(--mono);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE PARAMÈTRES (administrateur)
   ═══════════════════════════════════════════════════════════════════════════ */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.kpi {
  padding: 1.05rem 1.15rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.kpi__label {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi__value {
  margin-top: 0.4rem;
  font-size: 1.75rem;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.kpi__hint {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Graphique : SVG, car la CSP interdit les styles en ligne qui seraient
   nécessaires pour dimensionner des barres en CSS. */
.chart { width: 100%; height: auto; }
.chart__bar { fill: var(--accent-consulting); opacity: 0.75; }
.chart__bar--empty { fill: var(--hairline-strong); opacity: 1; }
.chart__axis { stroke: var(--hairline-strong); stroke-width: 1; }
.chart__label { fill: var(--muted); font-size: 9px; font-family: var(--sans); }

.table-wrap {
  overflow-x: auto;
  margin: 0 -0.4rem;
  padding: 0 0.4rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th {
  padding: 0.5rem 0.7rem;
  text-align: left;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline-strong);
  white-space: nowrap;
}

td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-soft);
  vertical-align: top;
}

tbody tr:hover td { background: rgba(255, 255, 255, 0.6); }

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.truncate {
  max-width: 26ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  border-radius: 4px;
  border: 1px solid var(--hairline-strong);
  color: var(--ink-soft);
}

.tag--admin {
  color: #8a6a25;
  background: rgba(176, 138, 62, 0.12);
  border-color: rgba(176, 138, 62, 0.35);
}

.tag--warn {
  color: #8c2f2f;
  background: rgba(180, 70, 70, 0.09);
  border-color: rgba(180, 70, 70, 0.3);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.btn-inline {
  width: auto;
  margin: 0;
  padding: 0.48rem 0.95rem;
  font-size: 0.7rem;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--hairline-strong);
}

.btn-inline:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border-color: var(--ink-soft);
}

.btn-inline--danger { color: #8c2f2f; border-color: rgba(180, 70, 70, 0.35); }
.btn-inline--danger:hover { background: rgba(180, 70, 70, 0.08); color: #7a2727; }

.note {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--muted);
}

.note--center { text-align: center; }

.empty {
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIGNATURE ET ENGRENAGE — présents sur toutes les pages
   ═══════════════════════════════════════════════════════════════════════════ */

.signature {
  position: fixed;
  z-index: 40;
  /* En bas à DROITE, décalée de la largeur de l'engrenage pour former avec lui
     un même groupe dans le coin, sans jamais le recouvrir. L'engrenage occupe
     de 0,85 à 3 rem depuis le bord : la signature commence après. */
  right: 3.4rem;
  bottom: 0.95rem;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--muted);
  pointer-events: none;

  /* Pastille translucide plutôt qu'une simple ombre de texte.
     Un élément en position fixe finit toujours par recouvrir quelque chose :
     au-dessus du bloc sombre de l'Observability Suite, un gris clair devenait
     illisible. Sur le fond nacré cette pastille ne se voit pas ; sur un fond
     sombre elle détache le texte. La signature reste donc discrète ET
     toujours lisible, ce qui était la demande. */
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(253, 252, 251, 0.7);
  backdrop-filter: blur(5px);
}

.gear {
  position: fixed;
  z-index: 41;
  right: 0.85rem;
  bottom: 0.7rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  opacity: 0.3;
  transition: opacity 260ms var(--ease-out), transform 420ms var(--ease-out),
    background-color 260ms;
}

.gear:hover,
.gear:focus-visible {
  opacity: 0.85;
  transform: rotate(60deg);
  background: rgba(255, 255, 255, 0.75);
}

.gear svg { width: 19px; height: 19px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sous 768 px, le drapeau vertical devient trois bandes empilées : trois
   colonnes de 33 % de large sont illisibles sur un téléphone. */
@media (max-width: 768px) {
  .flag {
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
  }

  .band {
    flex: 1 1 auto;
    min-height: 33.333dvh;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.7),
      inset 0 1px 0 rgba(27, 33, 39, 0.05);
  }

  .band__label { bottom: 1.6rem; }

  /* La transition se joue alors sur la hauteur, pas sur la largeur */
  .is-leaving .band:not(.is-active) { flex-grow: 0.001; min-height: 0; }
  .is-leaving .band.is-active { flex-grow: 3; }

  .cv-head__contact { text-align: left; }

  .deflist > div { grid-template-columns: 1fr; }

  .signature {
    /* 3,6 rem et non 3 : l'engrenage occupe jusqu'à 3 rem depuis le bord, les
       deux boîtes se touchaient exactement sous 768 px. */
    right: 3.6rem;
    bottom: 0.75rem;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }
}

/* ── Accessibilité : mouvement réduit ─────────────────────────────────────
   Respect de la préférence système. Les animations décoratives disparaissent,
   les états fonctionnels restent (la navigation continue de marcher). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Impression du CV ────────────────────────────────────────────────────── */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
  }

  .topbar,
  .gear,
  .cv-actions,
  .home-logout,
  .signature { display: none !important; }

  .shell {
    width: 100%;
    padding: 0;
    animation: none;
  }

  .card,
  .xp__env { box-shadow: none; background: transparent; }

  .xp { page-break-inside: avoid; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   OBSERVABILITY SUITE — bloc de mise en avant
   Rupture volontaire avec le nacré : c'est une offre produit, elle doit se
   détacher. Palette sombre + accent turquoise reprise du flyer d'origine.
   ═══════════════════════════════════════════════════════════════════════════ */

.suite {
  --suite-ink: #0b1218;
  --suite-ink-2: #101c26;
  --suite-teal: #4fd1c5;
  --suite-violet: #a78bfa;
  --suite-text: #c7d3dd;
  --suite-muted: #8a9aa8;

  margin: 0 0 clamp(2rem, 5vh, 3.25rem);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border-radius: 18px;
  color: var(--suite-text);
  background: radial-gradient(
      120% 90% at 15% 0%,
      rgba(79, 209, 197, 0.13) 0%,
      rgba(79, 209, 197, 0) 55%
    ),
    linear-gradient(155deg, var(--suite-ink-2) 0%, var(--suite-ink) 100%);
  box-shadow: 0 2px 4px rgba(11, 18, 24, 0.12),
    0 30px 60px -28px rgba(11, 18, 24, 0.55);
}

.suite__head { max-width: 74ch; }

.suite__eyebrow {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.28rem 0.85rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--suite-teal);
  border: 1px solid rgba(79, 209, 197, 0.32);
  border-radius: 999px;
}

.suite__title {
  margin: 0;
  font-size: clamp(1.5rem, 3.6vw, 2.35rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: #f2f7fa;
}

.suite__claim {
  margin: 0.6rem 0 0;
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  font-weight: 500;
  color: var(--suite-teal);
}

.suite__intro {
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--suite-muted);
}

/* ── Les trois produits ──────────────────────────────────────────────────── */
.suite__products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
  margin-top: clamp(1.6rem, 4vh, 2.4rem);
}

.suite__product {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
}

.suite__product-name {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
  font-weight: 400;
  color: #eaf2f7;
}

.suite__glyph {
  color: var(--suite-violet);
  font-size: 0.9em;
}

.suite__accent {
  font-weight: 300;
  color: var(--suite-muted);
}

.suite__tagline {
  margin: 0 0 0.7rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--suite-teal);
}

.suite__text {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.68;
  color: var(--suite-muted);
}

.suite__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.suite__chips li {
  padding: 0.26rem 0.62rem;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--suite-text);
  border: 1px solid rgba(79, 209, 197, 0.26);
  border-radius: 999px;
}

.suite__figure {
  margin: 1.1rem 0 0;
}

.suite__figure img {
  width: 100%;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.suite__figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--suite-muted);
}

/* ── Bandeau de chiffres ─────────────────────────────────────────────────── */
.suite__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  align-items: center;
  margin-top: clamp(1.5rem, 4vh, 2.2rem);
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.suite__stat { text-align: center; }

.suite__stat--wide {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-align: left;
}

.suite__stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--suite-teal);
}

.suite__stat--wide .suite__stat-value {
  font-size: 2.1rem;
  color: var(--suite-violet);
}

.suite__stat-label {
  display: block;
  margin-top: 0.2rem;
  /* Les libellés portent des retours à la ligne explicites dans les données */
  white-space: pre-line;
  font-size: 0.64rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  line-height: 1.45;
  color: var(--suite-muted);
}

.suite__stat--wide .suite__stat-label {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.76rem;
}

/* ── Pied du bloc ───────────────────────────────────────────────────────── */
.suite__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.7rem;
  color: var(--suite-muted);
}

.suite__signature {
  font-style: italic;
  color: rgba(79, 209, 197, 0.75);
}

@media (max-width: 640px) {
  .suite__stat--wide {
    grid-column: span 2;
    flex-direction: column;
    text-align: center;
    gap: 0.3rem;
  }
}

/* À l'impression, le bloc sombre gaspillerait de l'encre sans rien apporter */
@media print {
  .suite { display: none !important; }
}
