/* =========================================================
   Bureau d'Ethan — interface façon système d'exploitation
   Couleurs, fonds d'écran et tailles : tout se règle dans :root
   ========================================================= */

:root {
  --primary: #CF1D3F;
  --primary-rgb: 207, 29, 63;
  --primary-soft: #F2647C;
  --primary-deep: #8E0F2A;
  /* Palette du fond d'écran (écrite par js/fonds.js) : principale, claire, profonde, très pâle, accent */
  --pal-1: #CF1D3F; --pal-2: #F2647C; --pal-3: #8E0F2A; --pal-4: #F6D5DA; --pal-5: #F7B08A;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --mb-h: 30px;
  --dock-s: 54px;
  --dock-pad: 8px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Fonds d'écran */
  --wall-cramoisi:
    radial-gradient(55% 75% at 12% 18%, #F2647C 0%, rgba(242, 100, 124, 0) 60%),
    radial-gradient(45% 60% at 88% 22%, #CF1D3F 0%, rgba(207, 29, 63, 0) 65%),
    radial-gradient(60% 70% at 72% 96%, #E0563A 0%, rgba(224, 86, 58, 0) 60%),
    radial-gradient(70% 90% at 18% 100%, #5A0F23 0%, rgba(90, 15, 35, 0) 70%),
    linear-gradient(140deg, #A3122F 0%, #5A0F23 55%, #2A0F18 100%);
  --wall-aube:
    radial-gradient(50% 70% at 14% 20%, #F6D5DA 0%, rgba(246, 213, 218, 0) 60%),
    radial-gradient(45% 60% at 86% 24%, #F2A7B0 0%, rgba(242, 167, 176, 0) 65%),
    radial-gradient(60% 70% at 62% 104%, #F2647C 0%, rgba(242, 100, 124, 0) 60%),
    linear-gradient(160deg, #FBF4EF 0%, #F3E2DC 60%, #E9C9C6 100%);
  --wall-nuit:
    radial-gradient(50% 60% at 80% 12%, rgba(207, 29, 63, .6) 0%, rgba(207, 29, 63, 0) 65%),
    radial-gradient(60% 70% at 8% 92%, rgba(142, 15, 42, .7) 0%, rgba(142, 15, 42, 0) 65%),
    linear-gradient(160deg, #1D1115 0%, #0E080A 100%);
  --wall-braise:
    radial-gradient(55% 70% at 18% 24%, #F7B08A 0%, rgba(247, 176, 138, 0) 60%),
    radial-gradient(50% 65% at 86% 28%, #E0563A 0%, rgba(224, 86, 58, 0) 62%),
    radial-gradient(70% 80% at 50% 104%, #CF1D3F 0%, rgba(207, 29, 63, 0) 65%),
    linear-gradient(150deg, #C9643F 0%, #8E0F2A 100%);

  /* Autres ambiances (la liste et les noms sont dans js/fonds.js) */
  --wall-lagon:
    radial-gradient(55% 70% at 14% 16%, #3CC9C0 0%, rgba(60, 201, 192, 0) 60%),
    radial-gradient(45% 60% at 86% 20%, #2B8FD6 0%, rgba(43, 143, 214, 0) 62%),
    radial-gradient(60% 70% at 70% 100%, #1FB5A0 0%, rgba(31, 181, 160, 0) 60%),
    radial-gradient(70% 90% at 14% 100%, #0A2E4A 0%, rgba(10, 46, 74, 0) 70%),
    linear-gradient(140deg, #13807E 0%, #0C4C6E 55%, #071D33 100%);
  --wall-foret:
    radial-gradient(50% 65% at 16% 18%, #8DB36A 0%, rgba(141, 179, 106, 0) 60%),
    radial-gradient(40% 55% at 84% 14%, rgba(216, 180, 106, .75) 0%, rgba(216, 180, 106, 0) 60%),
    radial-gradient(60% 70% at 70% 100%, #2F6B4A 0%, rgba(47, 107, 74, 0) 60%),
    radial-gradient(70% 90% at 12% 100%, #0B2218 0%, rgba(11, 34, 24, 0) 70%),
    linear-gradient(150deg, #3D7A55 0%, #1B4532 55%, #0C2219 100%);
  --wall-crepuscule:
    radial-gradient(70% 55% at 50% 108%, #FFB36B 0%, rgba(255, 179, 107, 0) 62%),
    radial-gradient(55% 60% at 14% 72%, #E2557A 0%, rgba(226, 85, 122, 0) 62%),
    radial-gradient(50% 60% at 88% 62%, #B3449A 0%, rgba(179, 68, 154, 0) 62%),
    radial-gradient(60% 50% at 30% 0%, #3A2470 0%, rgba(58, 36, 112, 0) 70%),
    linear-gradient(180deg, #24184A 0%, #5E2A78 45%, #C2457A 78%, #F08A5D 100%);
  --wall-boreal:
    radial-gradient(1.4px 1.4px at 24px 30px, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0)) 0 0 / 173px 157px,
    radial-gradient(1px 1px at 90px 100px, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0)) 0 0 / 241px 199px,
    radial-gradient(1.2px 1.2px at 140px 50px, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)) 0 0 / 307px 271px,
    radial-gradient(1px 1px at 60px 210px, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0)) 0 0 / 389px 331px,
    radial-gradient(1.6px 1.6px at 300px 120px, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0)) 0 0 / 457px 419px,
    radial-gradient(70% 20% at 36% 30%, rgba(52, 211, 153, .7) 0%, rgba(52, 211, 153, 0) 70%),
    radial-gradient(45% 16% at 68% 20%, rgba(45, 212, 191, .5) 0%, rgba(45, 212, 191, 0) 70%),
    radial-gradient(60% 24% at 60% 40%, rgba(139, 92, 246, .55) 0%, rgba(139, 92, 246, 0) 70%),
    radial-gradient(35% 28% at 16% 16%, rgba(16, 185, 129, .35) 0%, rgba(16, 185, 129, 0) 70%),
    radial-gradient(90% 60% at 50% 112%, #1B3A6B 0%, rgba(27, 58, 107, 0) 70%),
    linear-gradient(180deg, #040818 0%, #0A1430 60%, #11264A 100%);
  --wall-dune:
    radial-gradient(55% 70% at 14% 18%, #FFF4E2 0%, rgba(255, 244, 226, 0) 60%),
    radial-gradient(45% 60% at 86% 24%, #F2C9A0 0%, rgba(242, 201, 160, 0) 62%),
    radial-gradient(60% 70% at 64% 104%, #E39A6E 0%, rgba(227, 154, 110, 0) 60%),
    linear-gradient(160deg, #F8EBD8 0%, #EED7B8 60%, #E2B892 100%);
  --wall-brume:
    radial-gradient(55% 70% at 14% 18%, #FFFFFF 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(45% 60% at 86% 22%, #C9D6FF 0%, rgba(201, 214, 255, 0) 62%),
    radial-gradient(60% 70% at 66% 104%, #D7C8F5 0%, rgba(215, 200, 245, 0) 60%),
    radial-gradient(50% 60% at 10% 96%, #C6EBDD 0%, rgba(198, 235, 221, 0) 60%),
    linear-gradient(160deg, #F2F4FA 0%, #E3E7F4 60%, #D5D9EE 100%);
  --wall-graphite:
    radial-gradient(60% 70% at 16% 10%, #5A6170 0%, rgba(90, 97, 112, 0) 60%),
    radial-gradient(50% 60% at 92% 96%, rgba(120, 40, 58, .55) 0%, rgba(120, 40, 58, 0) 62%),
    linear-gradient(160deg, #30333A 0%, #1B1D21 60%, #0F1012 100%);
  --wall-ondes:
    repeating-radial-gradient(circle at 16% 112%, rgba(255, 255, 255, 0) 0 30px, rgba(255, 255, 255, .07) 31px 32px, rgba(255, 255, 255, 0) 33px 34px),
    radial-gradient(60% 70% at 84% 12%, rgba(242, 100, 124, .45) 0%, rgba(242, 100, 124, 0) 62%),
    radial-gradient(70% 80% at 10% 100%, rgba(99, 70, 200, .5) 0%, rgba(99, 70, 200, 0) 65%),
    linear-gradient(150deg, #281443 0%, #160C2A 60%, #0C0718 100%);

  /* Fond personnalisé : deux couleurs choisies dans les Réglages (--wc1, --wc2) et trois styles */
  --wc1: #CF1D3F;
  --wc2: #3A1C71;
  --wall-perso-maillage:
    radial-gradient(55% 75% at 12% 18%, color-mix(in oklab, var(--wc1), #fff 35%) 0%, transparent 60%),
    radial-gradient(45% 60% at 88% 22%, var(--wc2) 0%, transparent 65%),
    radial-gradient(60% 70% at 72% 96%, color-mix(in oklab, var(--wc1), var(--wc2)) 0%, transparent 60%),
    radial-gradient(70% 90% at 18% 100%, color-mix(in oklab, var(--wc1), #000 55%) 0%, transparent 70%),
    linear-gradient(140deg, var(--wc1) 0%, color-mix(in oklab, var(--wc1), #000 40%) 55%, color-mix(in oklab, var(--wc2), #000 55%) 100%);
  --wall-perso-degrade:
    radial-gradient(60% 70% at 14% 10%, color-mix(in oklab, var(--wc1), #fff 28%) 0%, transparent 62%),
    linear-gradient(150deg, var(--wc1) 0%, var(--wc2) 100%);
  --wall-perso-halo:
    radial-gradient(50% 60% at 80% 12%, color-mix(in srgb, var(--wc1) 62%, transparent) 0%, transparent 65%),
    radial-gradient(60% 70% at 8% 92%, color-mix(in srgb, var(--wc2) 72%, transparent) 0%, transparent 65%),
    linear-gradient(160deg, color-mix(in oklab, var(--wc1), #000 86%) 0%, #0B0A0C 100%);
  --wall-perso: var(--wall-perso-maillage);

  /* Thème clair */
  --text: #1E1417;
  --text-2: #6B5C60;
  --text-3: #9C8D91;
  --win-bg: rgba(251, 248, 246, .86);
  --win-solid: #FBF8F6;
  --win-side: rgba(242, 235, 231, .7);
  --win-line: rgba(30, 20, 23, .1);
  --win-shadow: 0 34px 90px rgba(20, 12, 15, .38), 0 0 0 .5px rgba(20, 12, 15, .28);
  --field: rgba(255, 255, 255, .85);
  --hover: rgba(30, 20, 23, .06);
  --sel: rgba(var(--primary-rgb), .12);
  --sel-text: var(--primary);
  --bar-bg: rgba(251, 248, 246, .5);
  --bar-text: #1E1417;
  --pop-bg: rgba(251, 248, 246, .9);
  --card: rgba(255, 255, 255, .7);
  --accent-text: var(--primary);
  --stage: rgba(60, 38, 44, .13);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --text: #F3EEE9; --text-2: rgba(243, 238, 233, .68); --text-3: rgba(243, 238, 233, .42);
    --win-bg: rgba(33, 24, 28, .86); --win-solid: #21181C; --win-side: rgba(24, 17, 20, .62);
    --win-line: rgba(243, 238, 233, .1); --win-shadow: 0 34px 90px rgba(0, 0, 0, .6), 0 0 0 .5px rgba(255, 255, 255, .14);
    --field: rgba(255, 255, 255, .06); --hover: rgba(255, 255, 255, .07);
    --sel: rgba(var(--primary-rgb), .3); --sel-text: #fff;
    --bar-bg: rgba(20, 12, 15, .42); --bar-text: #F3EEE9; --pop-bg: rgba(38, 28, 32, .92); --card: rgba(255, 255, 255, .05);
    --accent-text: var(--primary-soft); --stage: rgba(0, 0, 0, .28);
  }
}
:root[data-theme="dark"] {
  --text: #F3EEE9; --text-2: rgba(243, 238, 233, .68); --text-3: rgba(243, 238, 233, .42);
  --win-bg: rgba(33, 24, 28, .86); --win-solid: #21181C; --win-side: rgba(24, 17, 20, .62);
  --win-line: rgba(243, 238, 233, .1); --win-shadow: 0 34px 90px rgba(0, 0, 0, .6), 0 0 0 .5px rgba(255, 255, 255, .14);
  --field: rgba(255, 255, 255, .06); --hover: rgba(255, 255, 255, .07);
  --sel: rgba(var(--primary-rgb), .3); --sel-text: #fff;
  --bar-bg: rgba(20, 12, 15, .42); --bar-text: #F3EEE9; --pop-bg: rgba(38, 28, 32, .92); --card: rgba(255, 255, 255, .05);
    --accent-text: var(--primary-soft); --stage: rgba(0, 0, 0, .28);
}

/* Couleur du texte posé directement sur le fond d'écran (data-ton est donné par js/fonds.js) */
:root { --on-wall: #fff; --on-wall-shadow: 0 1px 3px rgba(0, 0, 0, .45); --glass: rgba(255, 255, 255, .16); --glass-line: rgba(255, 255, 255, .28); }
:root[data-wstyle="degrade"] { --wall-perso: var(--wall-perso-degrade); }
:root[data-wstyle="halo"] { --wall-perso: var(--wall-perso-halo); }
:root[data-ton="clair"] { --on-wall: #2A1A1E; --on-wall-shadow: 0 1px 2px rgba(255, 255, 255, .6); --glass: rgba(255, 255, 255, .42); --glass-line: rgba(255, 255, 255, .7); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { background: #0B0809; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text);
  background: var(--wall-base, #2A0F18); overflow: hidden;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--primary-soft); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.noscript { position: relative; z-index: 5; max-width: 520px; margin: 15vh auto; padding: 32px; border-radius: 18px; background: #FBF8F6; color: #1E1417; font-family: var(--font); }

/* ---------- Démarrage ---------- */
.boot { display: none; }
.js .boot {
  position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 44px;
  background: #0E080A; transition: opacity .7s ease;
}
.boot__logo { font-family: var(--serif); font-style: italic; font-size: 84px; line-height: 1; color: #F3EEE9; }
.boot__bar { width: 190px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.boot__bar i { display: block; width: 0; height: 100%; border-radius: 3px; background: #F3EEE9; animation: boot 1.5s var(--ease) forwards; }
@keyframes boot { 60% { width: 72%; } to { width: 100%; } }
.boot.is-done { opacity: 0; pointer-events: none; }

/* ---------- Fond d'écran ---------- */
.wallpaper { position: fixed; inset: 0; z-index: 0; background: var(--wall, var(--wall-cramoisi)); }
.wallpaper::after {
  content: ""; position: absolute; inset: 0; opacity: .14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Icônes d'applications ---------- */
.ico {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 23%;
  color: #fff; font-size: calc(var(--s, 54px) * .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 6px 14px rgba(0, 0, 0, .22);
}
.ico .i { width: 52%; height: 52%; stroke-width: 1.7; }
/* Les icônes prennent les couleurs du fond d'écran (variables --pal-1 à --pal-5) */
.t-note { background: linear-gradient(180deg, color-mix(in oklab, var(--pal-4), #fff 72%), color-mix(in oklab, var(--pal-4), #E9DCC8 50%)); color: color-mix(in oklab, var(--pal-3), #000 12%); }
.t-projets { background: linear-gradient(180deg, color-mix(in oklab, var(--pal-1), #fff 16%), color-mix(in oklab, var(--pal-1), #000 30%)); }
.t-apropos { background: linear-gradient(180deg, color-mix(in oklab, var(--pal-4), #fff 35%), color-mix(in oklab, var(--pal-2), var(--pal-4) 35%)); color: color-mix(in oklab, var(--pal-3), #000 20%); }
.t-competences { background: linear-gradient(180deg, color-mix(in oklab, var(--pal-3), #000 45%), color-mix(in oklab, var(--pal-3), #000 82%)); color: var(--pal-2); }
.t-contact { background: linear-gradient(180deg, color-mix(in oklab, var(--pal-5), #fff 12%), color-mix(in oklab, var(--pal-5), var(--pal-3) 45%)); }
.t-terminal { background: linear-gradient(180deg, color-mix(in oklab, var(--pal-3), #262626 86%), color-mix(in oklab, var(--pal-3), #0A0A0A 92%)); color: var(--pal-2); }
.t-reglages { background: linear-gradient(180deg, color-mix(in oklab, var(--pal-4), #D2D2D2 80%), color-mix(in oklab, var(--pal-3), #8A8A8A 85%)); color: #24201F; }
.t-corbeille { background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .2)); color: #2A1A1E; }
.t-cv { background: linear-gradient(180deg, #FFFFFF, color-mix(in oklab, var(--pal-4), #fff 45%)); color: var(--primary); }
.t-mentions { background: linear-gradient(180deg, color-mix(in oklab, var(--pal-3), #8C8C8C 65%), color-mix(in oklab, var(--pal-3), #2E2E2E 72%)); color: var(--pal-4); }
.t-systeme { background: linear-gradient(180deg, color-mix(in oklab, var(--pal-3), #000 65%), color-mix(in oklab, var(--pal-3), #000 90%)); color: #F3EEE9; font-family: var(--serif); font-style: italic; }

/* ---------- Barre de menus ---------- */
.menubar {
  position: fixed; z-index: 1000; inset: 0 0 auto 0; height: var(--mb-h);
  display: flex; justify-content: space-between; align-items: center; padding: 0 8px;
  background: var(--bar-bg); color: var(--bar-text); font-size: 13px;
  backdrop-filter: saturate(180%) blur(26px); -webkit-backdrop-filter: saturate(180%) blur(26px);
}
.mb__left, .mb__right { display: flex; align-items: center; gap: 2px; height: 100%; min-width: 0; }
.mb__logo, .mb__item, .mb__icon { height: 24px; border-radius: 6px; display: inline-flex; align-items: center; transition: background .15s; }
.mb__logo { padding: 0 10px; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1; }
.mb__item { padding: 0 10px; white-space: nowrap; }
.mb__app { font-weight: 600; }
.mb__icon { width: 32px; justify-content: center; font-size: 16px; }
.mb__logo:hover, .mb__item:hover, .mb__icon:hover, [aria-expanded="true"].mb__logo, [aria-expanded="true"].mb__item { background: rgba(127, 127, 127, .24); }
.mb__clock { padding: 0 8px 0 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Menus déroulants et contextuels ---------- */
.pop {
  position: fixed; z-index: 1100; min-width: 230px; padding: 5px;
  border-radius: 10px; background: var(--pop-bg); color: var(--text); font-size: 13px;
  backdrop-filter: blur(30px) saturate(170%); -webkit-backdrop-filter: blur(30px) saturate(170%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28), 0 0 0 .5px var(--win-line);
}
.mi { display: flex; align-items: center; justify-content: space-between; gap: 28px; width: 100%; padding: 5px 10px; border-radius: 6px; text-align: left; white-space: nowrap; }
.mi:hover, .mi:focus-visible { background: var(--primary); color: #fff; outline: none; }
.mi kbd { font: inherit; color: var(--text-3); }
.mi:hover kbd, .mi:focus-visible kbd { color: rgba(255, 255, 255, .8); }
.mi[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.mi .chk { width: 14px; display: inline-block; }
.msep { height: 1px; margin: 5px 8px; background: var(--win-line); }

/* ---------- Bureau ---------- */
.desktop {
  position: fixed; z-index: 1; inset: var(--mb-h) 0 0 0;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding: 22px 22px calc(var(--dock-s) + 44px);
}
.widgets {
  --cell: clamp(112px, calc((100dvh - var(--mb-h) - var(--dock-s) - 120px) / 4), 168px);
  display: grid; grid-template-columns: repeat(2, var(--cell)); grid-auto-rows: var(--cell); grid-auto-flow: row dense; gap: 14px;
}
.wdg {
  position: relative; overflow: hidden; display: flex; flex-direction: column; text-align: left;
  padding: 14px 16px; border-radius: 22px; color: var(--on-wall);
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(26px) saturate(160%); -webkit-backdrop-filter: blur(26px) saturate(160%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
  transition: transform .4s var(--ease), box-shadow .4s;
}
button.wdg:hover { transform: translateY(-3px) scale(1.01); box-shadow: 0 18px 40px rgba(0, 0, 0, .2); }
.wdg--2 { grid-column: span 2; }
.wlabel { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }

.wdg--clock { justify-content: center; }
.wclock__time { font-size: calc(var(--cell) * .42); font-weight: 300; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.wclock__date { margin-top: 6px; font-size: 14px; font-weight: 500; opacity: .85; }
.wclock__date::first-letter { text-transform: uppercase; }

.wdg--profile { flex-direction: row; align-items: center; gap: 16px; }
.avatar {
  flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(60% 60% at 50% 35%, rgba(var(--primary-rgb), .35), transparent 70%), linear-gradient(180deg, #E4D7CF, #C9B5AB);
  font-family: var(--serif); font-style: italic; font-size: 26px; color: rgba(30, 20, 23, .45);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.wprof { display: flex; flex-direction: column; min-width: 0; }
.wprof strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.wprof span { font-size: 13px; opacity: .85; }
.status { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 12px; font-weight: 500; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); }

.wdg--feat { justify-content: flex-end; color: #fff; border-color: rgba(255, 255, 255, .25); }
.wdg--feat .wlabel { position: absolute; top: 14px; left: 16px; }
.wfeat__name { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: calc(var(--cell) * .26); line-height: 1; }
.wfeat__meta { margin-top: 4px; font-size: 12px; opacity: .85; }
.wfeat__go { position: absolute; top: 12px; right: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .22); font-size: 12px; font-weight: 500; }

.wdg--cal { padding: 12px 12px 10px; }
.wcal__m { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary-soft); }
:root[data-ton="clair"] .wcal__m { color: var(--primary); }
.wcal__g { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); align-content: space-evenly; margin-top: 4px; font-size: calc(var(--cell) * .068); text-align: center; font-variant-numeric: tabular-nums; }
.wcal__g b { font-weight: 600; opacity: .6; }
.wcal__g span.is-today { background: var(--primary); color: #fff; border-radius: 50%; font-weight: 700; }

.wdg--skills { gap: 6px; }
.wsk { display: grid; gap: 7px; margin-top: auto; }
.wsk div { display: grid; gap: 3px; font-size: 12px; font-weight: 500; }
.wsk i { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
:root[data-ton="clair"] .wsk i { background: rgba(30, 20, 23, .12); }
.wsk i b { display: block; height: 100%; border-radius: 3px; background: var(--on-wall); }

/* ---------- Widgets qui remplacent une application (profil, CV, contact) ---------- */
.wgo {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 15px; transition: transform .3s var(--ease);
}
:root[data-ton="clair"] .wgo { background: rgba(30, 20, 23, .08); }
button.wdg:hover .wgo { transform: translateX(2px); }
.wdg--profile .wgo { top: auto; bottom: 12px; }

/* Boutons dans les widgets */
.wbtn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 34px; padding: 0 10px;
  border-radius: 99px; background: rgba(255, 255, 255, .22); color: inherit; font-size: 13px; font-weight: 600; white-space: nowrap;
  text-decoration: none; transition: transform .2s var(--ease), background .2s;
}
.wbtn:hover { background: rgba(255, 255, 255, .32); }
.wbtn .i { font-size: 15px; }
.wbtn--p, .wbtn--p:hover { background: var(--primary); color: #fff; }
.wbtn--p:hover { filter: brightness(1.08); }
.wbtn:active { transform: scale(.95); }
:root[data-ton="clair"] .wbtn:not(.wbtn--p) { background: rgba(30, 20, 23, .08); }

/* Contact */
.wcontact { justify-content: space-between; }
.wcontact .status { margin: 0; font-size: 11px; }
.wcontact__t { font-family: var(--serif); font-weight: 400; font-size: calc(var(--cell) * .19); line-height: 1; letter-spacing: -.01em; }
.wcontact__t em { color: var(--primary-soft); }
:root[data-ton="clair"] .wcontact__t em { color: var(--primary); }
.wcontact__btns { display: flex; gap: 8px; }

/* CV */
.wdg--cv { gap: 6px; }
.wcv__doc { flex: 1; min-height: 0; display: grid; place-items: center; }
.wcv__doc svg { width: auto; height: 100%; max-height: 74px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); transition: transform .35s var(--ease); }
.wcv__doc:hover svg { transform: translateY(-3px) rotate(-4deg); }
.wcv__btns { display: flex; gap: 6px; }
.wcv__btns .wbtn { height: 30px; padding: 0 6px; font-size: 12px; gap: 4px; }
.wcv__btns .wbtn .i { font-size: 13px; }

/* Projet à la une avec sa vraie image */
.wfeat__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
/* Série d'affiches : trois en éventail, qui s'ouvrent un peu au survol */
/* Tailles en em : 1em = hauteur d'une affiche (réglée par font-size) */
.wfeat__stack {
  position: absolute; z-index: 1; right: 18px; top: 50%; translate: 0 -50%; display: flex; align-items: center; pointer-events: none;
  font-size: calc(var(--cell) * .6);
}
.wfeat__stack img { flex: none; width: .707em; height: 1em; object-fit: cover; border-radius: 3px; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); transition: transform .45s var(--ease); }
.wfeat__stack img:nth-child(1) { transform: rotate(-9deg); }
.wfeat__stack img:nth-child(2) { position: relative; z-index: 1; width: .792em; height: 1.12em; margin: 0 -.3em; }
.wfeat__stack img:nth-child(3) { transform: rotate(9deg); }
button.wdg--feat:hover .wfeat__stack img:nth-child(1) { transform: translateX(-.08em) rotate(-13deg); }
button.wdg--feat:hover .wfeat__stack img:nth-child(3) { transform: translateX(.08em) rotate(13deg); }
.wdg--feat.has-stack .wfeat__go { display: none; }
.wdg--feat.has-stack .wfeat__name { max-width: 48%; font-size: calc(var(--cell) * .2); }
.wdg--feat.has-img::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0, 0, 0, .38), transparent 32%, transparent 45%, rgba(0, 0, 0, .66)); }
.wdg--feat .wlabel, .wdg--feat .wfeat__go { z-index: 2; }
.wdg--feat .wfeat__name, .wdg--feat .wfeat__meta { position: relative; z-index: 2; }

/* Icônes du bureau */
.dicons { display: flex; flex-direction: column; flex-wrap: wrap-reverse; align-content: flex-start; gap: 6px; max-height: 100%; }
.dicon {
  width: 96px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 4px;
  border-radius: 10px; color: var(--on-wall); text-align: center;
}
.dicon__img { display: grid; place-items: end center; width: 62px; height: 58px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.dicon__img svg { width: 100%; height: 100%; }
.dicon__img .ico { --s: 56px; width: 56px; }
.dicon__label { padding: 1px 6px; border-radius: 5px; font-size: 12px; font-weight: 500; line-height: 1.3; text-shadow: var(--on-wall-shadow); }
.dicon.is-sel { background: rgba(255, 255, 255, .16); }
.dicon.is-sel .dicon__label { background: var(--primary); color: #fff; text-shadow: none; }

/* ---------- Dock ---------- */
.dock {
  position: fixed; z-index: 900; left: 50%; bottom: 8px; translate: -50% 0;
  display: flex; align-items: flex-end; gap: 6px; height: calc(var(--dock-s) + 2 * var(--dock-pad)); padding: var(--dock-pad) 10px;
  border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(26px) saturate(170%); -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
  transition: translate .5s var(--ease), opacity .3s;
}
.dock__btn { position: relative; flex: none; width: var(--dock-s); height: var(--dock-s); transition: width .14s ease-out, height .14s ease-out; }
.dock__btn .ico { width: 100%; height: 100%; font-size: inherit; }
.dock__btn::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--on-wall); translate: -50% 0; opacity: 0; transition: opacity .3s;
}
.dock__btn.is-running::after { opacity: .9; }
.dock__tip {
  position: absolute; left: 50%; bottom: calc(100% + 14px); translate: -50% 0; padding: 4px 11px; border-radius: 7px;
  background: var(--pop-bg); color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2); opacity: 0; pointer-events: none; transition: opacity .15s;
}
.dock__btn:hover .dock__tip, .dock__btn:focus-visible .dock__tip { opacity: 1; }
.dock__sep { flex: none; width: 1px; align-self: stretch; margin: 4px 4px; background: var(--glass-line); }
.dock__btn.is-bouncing { animation: bounce .6s ease 2; }
@keyframes bounce { 0%, 100% { translate: 0 0; } 40% { translate: 0 -18px; } 70% { translate: 0 -4px; } }

/* ---------- Fenêtres ---------- */
.windows { position: fixed; z-index: 10; inset: var(--mb-h) 0 0 0; pointer-events: none; }
.win {
  position: absolute; display: flex; flex-direction: column; pointer-events: auto;
  border-radius: 14px; overflow: hidden; color: var(--text);
  background: var(--win-bg); box-shadow: var(--win-shadow);
  backdrop-filter: blur(40px) saturate(170%); -webkit-backdrop-filter: blur(40px) saturate(170%);
  outline: none;
}
.win[hidden] { display: none; }
.win:not(.is-active) { box-shadow: 0 18px 50px rgba(20, 12, 15, .25), 0 0 0 .5px var(--win-line); }
.win.is-max { border-radius: 0; }
.win.is-dragging { user-select: none; }
.win__bar {
  position: relative; flex: none; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px;
  border-bottom: 1px solid var(--win-line); touch-action: none; cursor: default;
}
.win__title { flex: 1; margin: 0 76px 0 0; text-align: center; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win:not(.is-active) .win__title { color: var(--text-3); }
.lights { display: flex; gap: 8px; }
.light { width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; background: #CFC6C8; color: transparent; }
.light .i { width: 9px; height: 9px; stroke-width: 2.6; }
.win.is-active .light--close, .lights:hover .light--close { background: #FF5F57; }
.win.is-active .light--min, .lights:hover .light--min { background: #FEBC2E; }
.win.is-active .light--max, .lights:hover .light--max { background: #28C840; }
.lights:hover .light, .light:focus-visible { color: rgba(0, 0, 0, .55); }
.win__back { display: none; }
.win__body { position: relative; flex: 1; min-height: 0; overflow: auto; user-select: text; -webkit-user-select: text; }
.win__resize { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; cursor: nwse-resize; touch-action: none; }
.win--dark { --text: #F3EEE9; --text-2: rgba(243, 238, 233, .68); --text-3: rgba(243, 238, 233, .42); --win-line: rgba(255, 255, 255, .08); background: rgba(18, 11, 14, .94); }

/* ---------- Éléments communs des applications ---------- */
.app-split { display: grid; grid-template-columns: 210px minmax(0, 1fr); height: 100%; }
.side { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; overflow: auto; background: var(--win-side); border-right: 1px solid var(--win-line); }
.side__h { margin: 10px 10px 4px; font-size: 11px; font-weight: 600; color: var(--text-3); }
.side__h:first-child { margin-top: 2px; }
.side__btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 10px; border-radius: 7px; font-size: 13px; text-align: left; white-space: nowrap; }
.side__btn .i { color: var(--primary); font-size: 16px; }
.side__btn:hover { background: var(--hover); }
.side__btn[aria-current="true"] { background: var(--sel); color: var(--sel-text); font-weight: 500; }
.side__btn[aria-current="true"] .i { color: inherit; }
.side__btn .count { margin-left: auto; font-size: 12px; color: var(--text-3); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
.scroll { flex: 1; min-height: 0; overflow: auto; }
.pane { padding: 26px 30px 40px; }
.tbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--win-line); }
.tbar__title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbar__title span { color: var(--text-3); font-weight: 400; }
.tbtn { height: 30px; min-width: 30px; padding: 0 9px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-size: 13px; }
.tbtn .i { font-size: 16px; }
.tbtn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.tbtn:disabled { opacity: .35; cursor: default; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--hover); }
.seg button { padding: 5px 14px; border-radius: 7px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.seg button .i { font-size: 15px; display: block; }
.seg--icons button { padding: 5px 8px; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--win-solid); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.search { margin-left: auto; display: flex; align-items: center; gap: 6px; height: 30px; width: min(220px, 40%); padding: 0 10px; border-radius: 8px; background: var(--field); border: 1px solid var(--win-line); color: var(--text-3); }
.search input { width: 100%; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 13px; }
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .2); }
.title-serif { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 40px; line-height: 1.05; letter-spacing: -.01em; }
.eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
:root[data-theme="dark"] .eyebrow { color: var(--primary-soft); }
.lead { font-size: 15px; line-height: 1.7; color: var(--text-2); max-width: 62ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 11px; border-radius: 99px; border: 1px solid var(--win-line); background: var(--card); font-size: 12px; font-weight: 500; }
a.btn, a.tbtn { text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 9px; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .2s, transform .2s; }
.btn .i { font-size: 15px; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-deep); }
.btn--ghost { border: 1px solid var(--win-line); background: var(--card); }
.btn--ghost:hover { background: var(--hover); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.card { padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--win-line); }
.card__n { font-size: 12px; font-weight: 700; color: var(--primary); }
.card h4 { margin: 10px 0 6px; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 26px; line-height: 1.05; }
.card p { margin: 0; font-size: 13px; color: var(--text-2); }
.empty { display: grid; place-items: center; align-content: center; gap: 8px; height: 100%; padding: 30px; text-align: center; color: var(--text-2); }
.empty .i { font-size: 54px; color: var(--text-3); stroke-width: 1.3; }
.empty strong { font-size: 16px; color: var(--text); }

/* Visuels de remplacement */
.art { display: grid; place-items: center; overflow: hidden; color: rgba(255, 255, 255, .94); }
.art em { font-family: var(--serif); font-size: 44px; line-height: .95; text-align: center; padding: 0 10px; }
.art-1 { background: radial-gradient(120% 90% at 20% 10%, var(--pal-2) 0%, var(--pal-1) 45%, color-mix(in oklab, var(--pal-3), #000 62%) 100%); }
.art-2 { background: radial-gradient(110% 80% at 80% 20%, color-mix(in oklab, var(--pal-5), #fff 25%) 0%, var(--pal-5) 45%, color-mix(in oklab, var(--pal-5), #000 75%) 100%); }
.art-3 { background: radial-gradient(120% 90% at 30% 80%, var(--pal-4) 0%, color-mix(in oklab, var(--pal-2), var(--pal-4) 35%) 50%, color-mix(in oklab, var(--pal-3), #000 55%) 100%); }
.art-4 { background: radial-gradient(120% 90% at 70% 70%, color-mix(in oklab, var(--pal-4), #B8B8B8 60%) 0%, color-mix(in oklab, var(--pal-3), #6A6A6A 70%) 50%, color-mix(in oklab, var(--pal-3), #101010 88%) 100%); }
.art-5 { background: radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--pal-1), #fff 12%) 0%, var(--pal-3) 50%, color-mix(in oklab, var(--pal-3), #000 72%) 100%); }
.wdg.art { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; place-items: normal; }

/* ---------- Lisez-moi ---------- */
.note { padding: 30px 34px 34px; background: linear-gradient(180deg, rgba(255, 248, 238, .5), transparent 120px); min-height: 100%; }
.note__date { margin: 0 0 14px; font-size: 12px; color: var(--text-3); text-align: center; }
.note p { margin: 12px 0; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.note strong { color: var(--text); }
.tips { list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 10px; }
.tips li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.tips .i { margin-top: 2px; font-size: 18px; color: var(--primary); }
.note__h { margin: 26px 0 12px !important; font-size: 12px !important; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3) !important; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick__btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 14px; font-size: 12px; font-weight: 500; transition: background .2s; }
.quick__btn:hover { background: var(--hover); }
.quick__btn .ico { --s: 48px; width: 48px; }

/* ---------- Projets ---------- */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 20px; }
.fitem { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 10px 10px 12px; border-radius: 12px; text-align: center; transition: background .15s; }
.fitem:hover { background: var(--hover); }
.fitem.is-sel { background: var(--sel); }
.fthumb { width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.fthumb > * { width: 100%; height: 100%; object-fit: cover; }
.fthumb .art em { font-size: 24px; }
.fitem__name { font-size: 13px; font-weight: 600; }
.fitem__meta { margin-top: -6px; font-size: 11px; color: var(--text-3); }
.flist { width: 100%; border-collapse: collapse; font-size: 13px; }
.flist th { position: sticky; top: 0; padding: 8px 14px; text-align: left; font-size: 11px; font-weight: 600; color: var(--text-3); background: var(--win-solid); border-bottom: 1px solid var(--win-line); }
.flist td { padding: 9px 14px; border-bottom: 1px solid var(--win-line); color: var(--text-2); }
.flist td:first-child { color: var(--text); font-weight: 500; }
.flist tr { cursor: default; }
.flist tbody tr:hover { background: var(--hover); }
.flist tr.is-sel { background: var(--sel); }
.flist .dotc { display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 3px; vertical-align: -1px; }
.fstatus { flex: none; padding: 6px 14px; border-top: 1px solid var(--win-line); font-size: 11px; color: var(--text-3); text-align: center; }
.mock { border-radius: 12px; overflow: hidden; background: #1B1216; box-shadow: 0 24px 60px rgba(20, 12, 15, .28); }
.mock__bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #2A2024; color: rgba(243, 238, 233, .55); font-size: 11px; white-space: nowrap; overflow: hidden; }
.mock__bar i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: rgba(243, 238, 233, .25); }
.mock__bar span { margin-left: 8px; }
.mock__view { aspect-ratio: 16 / 9; }
.mock__view > * { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mock__view .art em { font-size: clamp(36px, 6vw, 72px); }
.pdetail { padding: 24px 30px 34px; max-width: 980px; margin: 0 auto; }
.pdetail__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 26px 0 8px; }
.meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0; padding: 14px 0; border-block: 1px solid var(--win-line); }
.meta dt { font-size: 11px; font-weight: 600; color: var(--text-3); }
.meta dd { margin: 3px 0 0; font-size: 14px; font-weight: 500; }
.pnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }

/* ---------- À propos ---------- */
.about { display: grid; grid-template-columns: 270px minmax(0, 1fr); height: 100%; }
.about__card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 22px; overflow: auto; text-align: center; background: var(--win-side); border-right: 1px solid var(--win-line); }
.about__card .avatar { width: 128px; height: 128px; margin-bottom: 12px; font-size: 48px; box-shadow: 0 0 0 4px var(--win-solid), 0 10px 30px rgba(0, 0, 0, .18); }
.about__name { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.about__role { margin: 0; color: var(--text-2); }
.about__card .status { margin: 10px 0 18px; padding: 5px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--win-line); }
.facts { width: 100%; margin: 0; text-align: left; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--win-line); font-size: 13px; }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; font-weight: 500; text-align: right; }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 16px; }
.nums div { padding: 10px 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--win-line); }
.nums b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.03em; color: var(--primary); }
.nums span { font-size: 10px; color: var(--text-3); line-height: 1.2; display: block; }
.about__tabs { flex: none; display: flex; justify-content: center; padding: 12px 14px; border-bottom: 1px solid var(--win-line); }
.statement { margin: 0 0 22px; font-family: var(--serif); font-size: 30px; line-height: 1.18; letter-spacing: -.01em; }
.statement em { color: var(--primary); }
.prose p { margin: 0 0 14px; font-size: 15px; line-height: 1.75; color: var(--text-2); max-width: 64ch; }
.tl2 { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: grid; gap: 26px; }
.tl2::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: linear-gradient(var(--primary), rgba(var(--primary-rgb), .1)); }
.tl2 li { position: relative; }
.tl2 li::before { content: ""; position: absolute; left: -26px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--win-solid); border: 3px solid var(--primary); }
.tl2__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tl2__year { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.tl2 h4 { margin: 4px 0 2px; font-size: 16px; font-weight: 600; }
.tl2__where { font-size: 12px; color: var(--text-3); }
.tl2 p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); max-width: 60ch; }
.big-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.big-chips span { padding: 8px 18px; border-radius: 99px; border: 1px solid var(--win-line); background: var(--card); font-family: var(--serif); font-style: italic; font-size: 24px; transition: background .2s, color .2s, border-color .2s; }
.big-chips span:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Compétences ---------- */
.skhead { margin-bottom: 22px; }
.skhead p { margin: 8px 0 0; color: var(--text-2); }
.sklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.skrow { padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--win-line); }
.skrow__top { display: flex; align-items: center; gap: 14px; }
.skrow__top strong { flex: 1; font-size: 15px; font-weight: 600; }
.skrow p { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.skrow__lvl { min-width: 7.2em; text-align: right; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 20px; height: 6px; border-radius: 3px; background: var(--win-line); }
.meter i.on { background: var(--primary); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 12px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--win-line); }
.steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 700; }
.steps h4 { margin: 2px 0 4px; font-size: 15px; }
.steps p { margin: 0; font-size: 13px; color: var(--text-2); }

/* ---------- Contact ---------- */
.compose { display: flex; flex-direction: column; height: 100%; }
.compose__bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--win-line); }
.compose__hint { font-size: 12px; color: var(--text-3); }
.frow { flex: none; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 20px; border-bottom: 1px solid var(--win-line); }
.frow > label, .frow__lab { flex: none; width: 52px; font-size: 13px; color: var(--text-3); }
.frow input { flex: 1; min-width: 0; height: 32px; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.frow__val { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.to-chip { padding: 3px 10px; border-radius: 99px; background: var(--sel); color: var(--sel-text); font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices span { display: inline-flex; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--win-line); font-size: 13px; transition: background .2s, color .2s, border-color .2s; }
.choices input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.choices input:focus-visible + span { outline: 2px solid var(--primary-soft); outline-offset: 2px; }
.compose textarea { flex: 1; min-height: 160px; padding: 18px 20px; border: 0; outline: none; resize: none; background: transparent; color: var(--text); font: inherit; font-size: 15px; line-height: 1.6; }
.compose input::placeholder, .compose textarea::placeholder { color: var(--text-3); }
.compose__note { flex: none; margin: 0; padding: 10px 20px 14px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--win-line); }
.faq details { border-bottom: 1px solid var(--win-line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 2px; list-style: none; cursor: pointer; font-size: 15px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { font-size: 18px; color: var(--primary); transition: rotate .3s var(--ease); }
.faq details[open] summary .i { rotate: 45deg; }
.faq p { margin: 0 0 16px; font-size: 14px; color: var(--text-2); max-width: 62ch; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.links a, .links button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--win-line); text-decoration: none; text-align: left; font-size: 14px; font-weight: 500; transition: background .2s; }
.links a:hover, .links button:hover { background: var(--hover); }
.links .i { font-size: 18px; color: var(--primary); }
.links small { margin-left: auto; color: var(--text-3); font-weight: 400; }

/* ---------- Terminal ---------- */
.term { height: 100%; padding: 12px 16px 16px; overflow: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: #EDE4E0; cursor: text; }
.term__out div { white-space: pre-wrap; word-break: break-word; }
.term .c-p { color: var(--primary-soft); }
.term .c-a { color: #F7B08A; }
.term .c-d { color: rgba(237, 228, 224, .55); }
.term .c-ok { color: #8FE3B0; }
.term__line { display: flex; gap: 8px; }
.term__line input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: #fff; font: inherit; caret-color: var(--primary-soft); }
.term:focus { outline: none; }
.term__line input:disabled { opacity: .4; }
/* Easter eggs du terminal */
.term__out .neo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 32px; }
.term__out .neo > span { white-space: pre; }
.term__art { display: inline-block; line-height: 1.1; white-space: pre; vertical-align: middle; }
.term__rain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.term__out .term__train { white-space: pre; overflow: hidden; }
.term__out .term__train span { display: inline-block; }
.term__out .snake, .term__out .snake div { white-space: normal; }
.snake { display: grid; justify-items: start; gap: 8px; margin: 6px 0; }
.snake__bar { display: flex; align-items: center; gap: 22px; width: 100%; color: rgba(237, 228, 224, .75); }
.snake__quit { margin-left: auto; padding: 2px 12px; border-radius: 99px; background: rgba(255, 255, 255, .09); color: #fff; font-size: 12px; }
.snake__quit:hover { background: rgba(255, 255, 255, .16); }
.snake__bar b { color: #fff; font-weight: 600; }
.snake canvas { border-radius: 10px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); touch-action: none; }
.snake p { margin: 0; }
.fxlayer { position: fixed; inset: 0; z-index: 2600; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Réglages ---------- */
.set { padding: 24px 28px 34px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.set h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.set__group { padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--win-line); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.opt { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; }
.opt__prev { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--win-line); transition: border-color .2s; }
.opt[aria-checked="true"] .opt__prev { border-color: var(--primary); }
.opt[aria-checked="true"] { font-weight: 600; }
.opt__prev--light { background: linear-gradient(180deg, #FBF8F6 0 30%, #EFE6E2 30%); }
.opt__prev--dark { background: linear-gradient(180deg, #2A1F23 0 30%, #171013 30%); }
.opt__prev--auto { background: linear-gradient(90deg, #FBF8F6 0 50%, #2A1F23 50%); }
.opts__h { grid-column: 1 / -1; margin: 6px 0 -4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.opts__h:first-child { margin-top: 0; }
.opt__prev--heure { display: flex; overflow: hidden; }
.opt__prev--heure i { flex: 1; }
.opt small { margin-top: -6px; font-size: 11px; font-weight: 400; color: var(--text-3); }
.perso { display: grid; gap: 4px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--win-line); }
.perso[hidden] { display: none; }
.perso__cols { display: flex; align-items: center; gap: 10px; }
.colorpick { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; cursor: pointer; box-shadow: 0 0 0 1px var(--win-line), inset 0 0 0 2px rgba(255, 255, 255, .5); }
.colorpick input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; opacity: 0; cursor: pointer; }
.colorpick:focus-within { outline: 2px solid var(--primary-soft); outline-offset: 2px; }
.set__hint { margin: 8px 0 0; font-size: 12px; color: var(--text-3); }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0; }
.srow + .srow { border-top: 1px solid var(--win-line); padding-top: 12px; margin-top: 6px; }
.srow input[type="range"] { width: 200px; accent-color: var(--primary); }
.switch { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--win-line); transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: translate .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { translate: 18px 0; }

/* ---------- À propos de ce bureau ---------- */
.sys { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 30px 26px; text-align: center; }
.sys .ico { --s: 88px; width: 88px; font-size: 44px; margin-bottom: 12px; }
.sys h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.sys__v { margin: 0 0 16px; font-size: 13px; color: var(--text-3); }
.sys dl { width: 100%; margin: 0 0 18px; font-size: 13px; text-align: left; }
.sys dl div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-top: 1px solid var(--win-line); }
.sys dt { color: var(--text-3); }
.sys dd { margin: 0; font-weight: 500; text-align: right; }
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; background: var(--primary); vertical-align: -1px; }

/* ---------- Recherche ---------- */
.spot { position: fixed; z-index: 1200; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding: 17vh 16px 16px; background: rgba(0, 0, 0, .14); }
.spot[hidden] { display: none; }
.spot__box {
  width: min(660px, 100%); border-radius: 16px; overflow: hidden; color: var(--text); background: var(--pop-bg);
  backdrop-filter: blur(40px) saturate(170%); -webkit-backdrop-filter: blur(40px) saturate(170%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35), 0 0 0 .5px var(--win-line);
  animation: pop .25s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-6px); } }
.spot__in { display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-size: 22px; color: var(--text-3); }
.spot__in input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 21px; }
.spot__res { max-height: 52vh; overflow: auto; padding: 6px; border-top: 1px solid var(--win-line); }
.spot__res:empty { display: none; }
.sres { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 10px; border-radius: 9px; text-align: left; font-size: 14px; }
.sres .ico { --s: 30px; width: 30px; flex: none; }
.sres small { margin-left: auto; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.sres[aria-selected="true"] { background: var(--primary); color: #fff; }
.sres[aria-selected="true"] small { color: rgba(255, 255, 255, .8); }
.sres__h { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; color: var(--text-3); }

/* ---------- Notification ---------- */
.toast {
  position: fixed; z-index: 1300; left: 50%; bottom: calc(var(--dock-s) + 40px); translate: -50% 20px;
  padding: 10px 18px; border-radius: 12px; background: var(--pop-bg); color: var(--text); font-size: 13px; font-weight: 500;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; transition: opacity .25s, translate .35s var(--ease);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
.toast.is-on { opacity: 1; translate: -50% 0; }


/* ---------- Barre de menus : langue ---------- */
.mb__lang { width: auto; padding: 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; }

/* ---------- Compléments communs ---------- */
.seg button[aria-checked="true"] { background: var(--win-solid); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.links__static { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--win-line); font-size: 14px; font-weight: 500; }
.links small .i { font-size: 14px; color: inherit; vertical-align: -2px; }
.sys__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ---------- CV ---------- */
.cvapp { display: flex; flex-direction: column; height: 100%; }
/* CV fourni en PDF : fenêtre au format A4, la page la remplit bord à bord */
.cvpdf { display: flex; flex-direction: column; height: 100%; }
.cvpdf .tbar { justify-content: flex-end; }
.cvpdf__note { margin-right: auto; font-size: 12px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.cvpdf__page { position: relative; flex: 1; min-height: 0; background: var(--stage); overflow: hidden; }
.cvpdf__btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: none; cursor: zoom-in; }
.cvpdf__btn img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* téléphone à l'horizontale : la page prend la largeur et défile (sinon elle serait minuscule) */
@media (max-height: 500px) and (orientation: landscape) {
  .cvpdf__page { overflow-y: auto; }
  .cvpdf__btn { width: min(100%, 640px); height: auto; margin: 0 auto; }
  .cvpdf__btn img { height: auto !important; }
}
.cvapp .tbar { gap: 10px; }
.cvapp__zoom { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; }
.cvapp__pct { min-width: 62px; font-variant-numeric: tabular-nums; font-weight: 500; }
.cvapp__tab span { font-size: 13px; }
.cvapp__dl { height: 32px; }
.cvapp__dl-s { display: none; }
.cvapp__view { background: var(--stage); }
.cvapp__sheet { display: flex; justify-content: center; width: max-content; min-width: 100%; padding: 28px; }
.cvapp__sheet .cvdoc { border-radius: 3px; box-shadow: 0 24px 60px rgba(20, 12, 15, .28), 0 0 0 1px rgba(20, 12, 15, .06); }

/* ---------- Mentions légales ---------- */
.legalpane { max-width: 720px; margin: 0 auto; padding-top: 30px; }
.legalpane__load { color: var(--text-3); }
.legalpane .legal__kicker { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.legalpane h1 { margin: 6px 0 4px; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 48px; line-height: 1; letter-spacing: -.01em; }
.legalpane .legal__maj { margin: 0 0 18px; font-size: 12px; color: var(--text-3); }
.legalpane h2 { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 8px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.legalpane h2 span { font-size: 11px; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.legalpane p, .legalpane li { font-size: 14px; line-height: 1.7; color: var(--text-2); }
.legalpane p { margin: 0 0 10px; }
.legalpane ul { margin: 0 0 10px; padding-left: 20px; }
.legalpane li { margin-bottom: 6px; }
.legalpane strong { color: var(--text); font-weight: 600; }
.legalpane a { color: var(--accent-text); }
.legalpane .card { margin: 0 0 10px; padding: 14px 16px; }
.legalpane .card p { margin: 0; font-size: 14px; }
.legalpane .legal__note { font-size: 12.5px; color: var(--text-3); }
.legalpane__out { margin-top: 28px !important; padding-top: 16px; border-top: 1px solid var(--win-line); }
.legalpane__out a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; }

/* ---------- Écran de veille ---------- */
.saver {
  position: fixed; inset: 0; z-index: 3000; overflow: hidden; outline: none; cursor: none;
  --sv-1: #CF1D3F; --sv-2: #F2647C; --sv-3: #8E0F2A; --sv-4: #F6D5DA; --sv-5: #E0563A;
  background: radial-gradient(120% 90% at 50% 110%, color-mix(in oklab, var(--sv-3), #0D0709 62%) 0%, #0D0709 62%); color: #F3EEE9;
  opacity: 0; transition: opacity 1.4s ease;
  user-select: none; -webkit-user-select: none;
}
.saver.is-in { opacity: 1; }
.saver.is-out { opacity: 0; transition: opacity .6s ease; }
.saver__fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.saver__glow i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; mix-blend-mode: screen; will-change: transform; }
.saver__glow i:nth-child(1) { width: 62vmax; height: 62vmax; left: -18vmax; top: -24vmax; background: radial-gradient(closest-side, color-mix(in srgb, var(--sv-1) 85%, transparent), transparent); animation: sv-a 42s ease-in-out infinite alternate; }
.saver__glow i:nth-child(2) { width: 54vmax; height: 54vmax; right: -20vmax; bottom: -26vmax; background: radial-gradient(closest-side, color-mix(in srgb, var(--sv-5) 60%, transparent), transparent); animation: sv-b 36s ease-in-out infinite alternate; }
.saver__glow i:nth-child(3) { width: 40vmax; height: 40vmax; left: 30%; top: 40%; background: radial-gradient(closest-side, color-mix(in srgb, var(--sv-3) 90%, transparent), transparent); animation: sv-c 50s ease-in-out infinite alternate; }
@keyframes sv-a { to { transform: translate(22vw, 18vh) scale(1.15); } }
@keyframes sv-b { to { transform: translate(-26vw, -14vh) scale(.9); } }
@keyframes sv-c { to { transform: translate(-18vw, -30vh) scale(1.25); } }
.saver__veil {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(42% 38% at 50% 50%, rgba(13, 7, 9, .55), rgba(13, 7, 9, 0) 100%), radial-gradient(130% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55));
}
.saver__veil::after {
  content: ""; position: absolute; inset: 0; opacity: .1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.saver__center {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: max-content; max-width: calc(100vw - 32px); text-align: center;
  animation: sv-float 26s ease-in-out infinite alternate; transition: transform .7s var(--ease), filter .7s, opacity .7s;
}
@keyframes sv-float { from { transform: translate(-1.5vw, -1.2vh); } to { transform: translate(1.5vw, 1.2vh); } }
.saver.is-out .saver__center { transform: scale(1.06); filter: blur(10px); opacity: 0; animation: none; }
.saver__date { margin: 0 0 1.6vh; font-size: clamp(11px, 1.15vw, 14px); font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: rgba(243, 238, 233, .72); }
.saver__time {
  margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(104px, 21vw, 300px); line-height: .84; letter-spacing: -.02em; white-space: nowrap;
  text-shadow: 0 0 90px color-mix(in srgb, var(--sv-1) 45%, transparent), 0 2px 30px rgba(0, 0, 0, .35);
}
.saver__time i { display: inline-block; margin: 0 .03em; font-style: normal; color: var(--sv-2); translate: 0 -.06em; animation: sv-blink 2s ease-in-out infinite; }
.saver__time em { font-style: italic; color: var(--sv-4); }
@keyframes sv-blink { 50% { opacity: .2; } }
.saver__who { margin: 3.4vh 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1; }
.saver__who span { display: block; margin-top: 10px; font-family: var(--font); font-style: normal; font-size: 11px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: rgba(243, 238, 233, .55); }
.saver__mark { position: absolute; left: 30px; top: 22px; font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1; color: rgba(243, 238, 233, .85); }
.saver__hint { position: absolute; left: 16px; right: 16px; bottom: max(26px, env(safe-area-inset-bottom)); margin: 0; text-align: center; font-size: 12px; letter-spacing: .06em; color: rgba(243, 238, 233, .5); animation: sv-hint 4s ease-in-out infinite; }
@keyframes sv-hint { 50% { opacity: .45; } }

/* =========================================================
   PROJETS — galeries d'affiches et de vidéos, visionneuse
   ========================================================= */
/* Miniature du projet : plusieurs affiches en éventail, ▶ pour les vidéos */
.fthumb { position: relative; }
.pstack {
  display: flex; align-items: center; justify-content: center; padding: 9% 12%;
  background: linear-gradient(160deg, color-mix(in oklab, var(--pal-4), #fff 35%), color-mix(in oklab, var(--pal-2), var(--pal-4) 45%));
}
.pstack img { flex: none; height: 100%; width: auto; aspect-ratio: 707 / 1000; object-fit: cover; border-radius: 3px; box-shadow: 0 8px 18px rgba(0, 0, 0, .28); }
.pstack img:nth-child(1) { rotate: -7deg; margin-right: -9%; }
.pstack img:nth-child(2) { position: relative; z-index: 1; height: 108%; }
.pstack img:nth-child(3) { rotate: 7deg; margin-left: -9%; }
.pplay {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #fff; font-size: 20px;
  background: rgba(0, 0, 0, .42); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.pplay .i { translate: 1px 0; }
.fthumb > .pplay, .gal__img > .pplay { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; translate: -50% -50%; }

/* Galerie dans la fiche du projet */
.pdetail__head:first-child { margin-top: 0; }
.gal { margin: 22px 0 6px; }
.gal__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
.gal__head h4 { margin: 0; font-size: 15px; font-weight: 600; }
.gal__head h4 span { margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: var(--hover); font-size: 12px; color: var(--text-2); }
.gal__head p { margin: 0; font-size: 12px; color: var(--text-3); }
.gal__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; container-type: inline-size; }
.gal__grid--wide, .gal__grid:has(.is-video) { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.gal__item { display: flex; flex-direction: column; gap: 7px; text-align: left; border-radius: 10px; }
.gal__img {
  position: relative; display: block; width: 100%; aspect-ratio: 707 / 1000; border-radius: 8px; overflow: hidden; background: var(--stage);
  box-shadow: 0 8px 22px rgba(20, 12, 15, .2), 0 0 0 1px var(--win-line); transition: transform .35s var(--ease), box-shadow .35s;
}
.gal__item.is-video .gal__img, .gal__grid--wide .gal__img, .gal__item.is-wide .gal__img { aspect-ratio: 16 / 9; }
/* image horizontale au milieu d'affiches : deux colonnes (une seule si la galerie est trop étroite) */
.gal__item.is-wide { grid-column: span 2; }
@container (max-width: 313px) { .gal__item.is-wide { grid-column: auto; } }
.gal__img img, .gal__img .art { width: 100%; height: 100%; object-fit: cover; }
.gal__item:hover .gal__img { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(20, 12, 15, .28), 0 0 0 1px var(--win-line); }
.gal__item:active .gal__img { transform: scale(.97); }
.gal__dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gal__cap { font-size: 13px; font-weight: 500; color: var(--text-2); }

/* Visionneuse plein écran */
.viewer {
  position: fixed; inset: 0; z-index: 1250; display: flex; flex-direction: column;
  background: rgba(8, 5, 6, .94); color: #F3EEE9; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.viewer[hidden] { display: none; }
.viewer__top { flex: none; display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(18px, env(safe-area-inset-left)); }
.viewer__t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer__n { margin-right: 6px; font-size: 13px; color: rgba(243, 238, 233, .6); font-variant-numeric: tabular-nums; }
.viewer__b { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: inherit; font-size: 18px; transition: background .2s; }
.viewer__b:hover { background: rgba(255, 255, 255, .2); }
.viewer__dl { flex: none; display: inline-flex; text-decoration: none; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; transition: filter .2s; }
.viewer__dl[hidden] { display: none; }
.viewer__dl:hover { filter: brightness(1.1); }
.viewer__dl-s { display: none; }
.viewer__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: stretch; padding: 4px 76px 0; touch-action: pan-y pinch-zoom; }
.viewer__fig { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.viewer__media { position: relative; flex: 1; min-height: 0; }
.viewer__media > img, .viewer__media > video {
  position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto;
  border-radius: 6px; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.viewer__media > video { min-width: min(100%, 480px); }
.viewer__cap { flex: none; min-height: 18px; text-align: center; font-size: 13px; color: rgba(243, 238, 233, .75); }
.viewer__nav {
  position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: inherit; font-size: 22px; transition: background .2s, transform .2s var(--ease);
}
.viewer__nav:hover { background: rgba(255, 255, 255, .2); }
.viewer__nav:active { transform: scale(.92); }
.viewer__nav--prev { left: 16px; }
.viewer__nav--next { right: 16px; }
.viewer__strip { flex: none; display: flex; gap: 8px; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); overflow-x: auto; scrollbar-width: none; }
.viewer__strip::-webkit-scrollbar { display: none; }
.viewer__th { position: relative; flex: none; width: 46px; height: 64px; border-radius: 5px; overflow: hidden; opacity: .45; background: #222; transition: opacity .2s, box-shadow .2s; }
.viewer__th:first-child { margin-left: auto; }
.viewer__th:last-child { margin-right: auto; }
.viewer__th.is-video { width: 96px; height: 54px; }
.viewer__th img { width: 100%; height: 100%; object-fit: cover; }
.viewer__th .i { position: absolute; left: 50%; top: 50%; translate: -50% -50%; font-size: 18px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.viewer__th:hover { opacity: .8; }
.viewer__th[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--primary-soft); }

/* =========================================================
   PREMIER PASSAGE — « Par où commencer ? »
   ========================================================= */
.hello {
  position: fixed; inset: 0; z-index: 1180; display: grid; place-items: center; padding: 20px;
  background: rgba(12, 6, 9, .34); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.hello[hidden] { display: none; }
.hello__card {
  position: relative; width: min(580px, 100%); max-height: calc(100dvh - 40px); overflow: auto; padding: 30px 30px 18px;
  border-radius: 26px; background: var(--win-solid); color: var(--text); box-shadow: 0 40px 110px rgba(0, 0, 0, .42), 0 0 0 .5px var(--win-line);
}
.hello__x { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--hover); color: var(--text-2); font-size: 15px; }
.hello__head { display: flex; align-items: center; gap: 16px; padding-right: 30px; }
.hello__head .avatar { width: 68px; height: 68px; font-size: 26px; box-shadow: 0 0 0 3px var(--win-solid), 0 0 0 4.5px rgba(var(--primary-rgb), .35); }
.hello__t { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.02; letter-spacing: -.01em; }
.hello__t em { color: var(--accent-text); }
.hello__head p { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin: 5px 0 0; color: var(--text-2); }
.hello__head .status { margin: 0; }
.hello__lead { margin: 20px 0 14px; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.hello__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hello__c {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border-radius: 16px; text-align: left;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--win-line); transition: transform .25s var(--ease), background .2s, box-shadow .2s;
}
.hello__c:hover { background: var(--sel); box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), .4); transform: translateY(-1px); }
.hello__c:active { transform: scale(.98); }
.hello__c .ico { --s: 44px; flex: none; width: 44px; }
.hello__txt { min-width: 0; }
.hello__c strong { display: block; font-size: 14px; font-weight: 600; }
.hello__c small { display: block; margin-top: 1px; font-size: 12px; line-height: 1.35; color: var(--text-3); }
.hello__c small::first-letter { text-transform: uppercase; }
.hello__free { display: flex; align-items: center; gap: 4px; margin: 14px auto 0; padding: 8px 14px; border-radius: 99px; color: var(--accent-text); font-size: 13px; font-weight: 600; transition: background .2s; }
.hello__free:hover { background: var(--hover); }

/* =========================================================
   TÉLÉPHONE — écran d'accueil (pages, widgets, dossiers, bibliothèque d'apps)
   Les tailles suivent la grille d'un smartphone : 4 colonnes d'icônes,
   petit widget = 2 × 2 icônes, widget moyen = 4 × 2.
   Tout est calculé à partir de --sw (côté d'un petit widget), qui dépend
   de la largeur ET de la hauteur de l'écran pour que la page tienne sans défiler.
   ========================================================= */
.home {
  display: none; position: absolute; inset: 0; -webkit-touch-callout: none;
  --cols: 4; --hp: 22px; --gx: 20px; --lab: 22px; --top: 14px; --dots: 26px; --cwmax: 420px;
  --vh: 100vh;
  --cw: min(100vw - 2 * var(--hp), var(--cwmax));
  --avail: calc(var(--vh) - var(--mb-h) - var(--top) - var(--dock-h) - var(--dock-b) - var(--dots) - 16px);
  --sw-w: calc(2 * (var(--cw) - (var(--cols) - 1) * var(--gx)) / var(--cols) + var(--gx));
  --sw-h: calc((var(--avail) - var(--lab)) / 2.26);
  --sw: max(104px, min(var(--sw-w), var(--sw-h)));
  --col: calc((var(--sw) - var(--gx)) / 2);
  --ic: clamp(38px, calc(var(--sw) * .37), 62px);
  --row: calc(var(--ic) + var(--lab));
  --gy: calc(var(--sw) - 2 * var(--ic) - var(--lab));
  --gw: calc(var(--cols) * var(--col) + (var(--cols) - 1) * var(--gx));
  --cell: var(--sw);
}
@supports (height: 100dvh) { .home { --vh: 100dvh; } }

.home__pages {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.home__pages::-webkit-scrollbar { display: none; }
.hpage {
  flex: 0 0 100%; min-width: 0; height: 100%; overflow-y: auto; scrollbar-width: none; overscroll-behavior-y: contain;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; align-items: center;
  padding: var(--top) var(--hp) calc(var(--dock-h) + var(--dock-b) + var(--dots) + 16px);
}
.hpage::-webkit-scrollbar { display: none; }
.hgrid { display: grid; grid-template-columns: repeat(var(--cols), var(--col)); grid-auto-rows: var(--row); grid-auto-flow: row dense; gap: var(--gy) var(--gx); }

/* Icônes */
.happ { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; color: var(--on-wall); }
.happ__ico { position: relative; display: block; width: var(--ic); height: var(--ic); flex: none; transition: transform .2s var(--ease), filter .2s; }
.happ__ico > .ico { width: 100%; height: 100%; }
.happ:active .happ__ico, .hcat__more:active { transform: scale(.9); filter: brightness(.82); }
.happ__lbl {
  max-width: calc(var(--col) + var(--gx) - 2px); font-size: clamp(10px, calc(var(--ic) * .2), 11.5px); font-weight: 500; line-height: 1.25; letter-spacing: -.005em;
  text-shadow: var(--on-wall-shadow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ico--img { overflow: hidden; }
.ico--img img { width: 100%; height: 100%; object-fit: cover; }
.ico.art em { font-size: calc(var(--ic) * .52); padding: 0; line-height: 1; }

/* Dossier (icône) : aperçu en 3 × 3 des applications qu'il contient */
.hfold {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: calc(var(--ic) * .07);
  width: 100%; height: 100%; padding: calc(var(--ic) * .15); border-radius: 23%;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line), 0 6px 14px rgba(0, 0, 0, .16);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.hfold .ico, .hcat__more .ico { min-width: 0; font-size: calc(var(--ic) * .1); }
.hfold .ico { border-radius: 26%; box-shadow: none; }
.hfold .ico .i { stroke-width: 2.6; }
.hfold .ico em { font-size: calc(var(--ic) * .11); }

/* Widgets : boîte arrondie + nom en dessous, comme sur un téléphone */
.hw { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; min-width: 0; }
.hw--m { grid-column: span 4; }
.hw > .wdg, .hw > .hcat { flex: none; height: var(--sw); }
.hw__name {
  margin-top: 5px; text-align: center; font-size: 11.5px; font-weight: 500; line-height: 1.25; color: var(--on-wall);
  text-shadow: var(--on-wall-shadow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home .wdg {
  padding: calc(var(--sw) * .1); border-radius: calc(var(--sw) * .15);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
.home button.wdg:hover { transform: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.home button.wdg:active { transform: scale(.97); }

.home .wdg--profile { gap: calc(var(--sw) * .1); padding-right: calc(var(--sw) * .28); }
.home .wdg--profile .avatar { width: calc(var(--sw) * .46); height: calc(var(--sw) * .46); font-size: calc(var(--sw) * .17); }
.home .wprof strong { font-size: clamp(14px, calc(var(--sw) * .108), 19px); line-height: 1.2; }
.home .wprof > span { font-size: clamp(12px, calc(var(--sw) * .082), 14px); }
.home .status { margin-top: 8px; }

.home .wdg--feat { padding-bottom: calc(var(--sw) * .09); }
.home .wdg--feat .wlabel { top: calc(var(--sw) * .1); left: calc(var(--sw) * .1); font-size: 10px; }
.home .wfeat__name { font-size: calc(var(--sw) * .17); line-height: 1.02; }
.home .wfeat__meta { font-size: 11px; }
.home .wfeat__go { display: none; }
.home .wfeat__stack { right: auto; left: 50%; top: calc(var(--sw) * .1); translate: -50% 0; font-size: calc(var(--sw) * .34); }
.home .wdg--feat.has-stack .wlabel { display: none; }
.home .wdg--feat.has-stack .wfeat__name { max-width: none; font-size: calc(var(--sw) * .15); }
.home .wgo { top: calc(var(--sw) * .09); right: calc(var(--sw) * .09); }
.home .wclock__time { font-size: calc(var(--sw) * .3); }
.home .wclock__date { font-size: 12px; }
.home .wcv__doc svg { max-height: calc(var(--sw) * .36); }

.home .wdg--cal { padding: calc(var(--sw) * .085) calc(var(--sw) * .08) calc(var(--sw) * .06); }
.home .wcal__m { font-size: 10px; color: var(--on-wall); }
.home .wcal__g { font-size: max(9px, calc(var(--sw) * .066)); }

.home .wdg--skills .wlabel { font-size: 10px; }
.home .wsk { gap: calc(var(--sw) * .045); }
.home .wsk div { font-size: max(11px, calc(var(--sw) * .072)); }


/* Bibliothèque d'apps : la barre de recherche prend une ligne, les boîtes rétrécissent pour que tout tienne */
.hpage--lib {
  --libh: calc((var(--avail) - var(--lib-bar) - 12px - 2 * var(--lab)) / 2);
  --lib-bar: 54px;
  --sw: max(96px, min(var(--sw-w), var(--libh)));
  --col: calc((var(--sw) - var(--gx)) / 2);
  --gw: calc(var(--cols) * var(--col) + (var(--cols) - 1) * var(--gx));
}
.hpage--lib .hgrid { grid-auto-rows: auto; row-gap: 12px; }
.hpage--lib .hw { grid-row: auto; }
.hlib__search {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 7px; width: min(var(--gw), 100%); height: 38px; margin: 0 0 16px;
  border-radius: 12px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--on-wall);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  font-size: 15px; text-shadow: var(--on-wall-shadow);
}
.hlib__search .i { font-size: 16px; opacity: .85; }
.hcat {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: calc(var(--sw) * .09); padding: calc(var(--sw) * .1);
  border-radius: calc(var(--sw) * .15); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line), 0 8px 24px rgba(0, 0, 0, .12);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
}
.hcat .happ { gap: 0; }
.hcat .happ__ico { width: 100%; height: 100%; }
.hcat .happ__lbl { display: none; }
.hcat .ico.art em { font-size: calc(var(--sw) * .2); }
.hcat__more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: calc(var(--sw) * .035); padding: calc(var(--sw) * .02); transition: transform .2s var(--ease), filter .2s; }
.hcat__more .ico { border-radius: 26%; box-shadow: none; }
.hcat__more .ico .i { stroke-width: 2.4; }
.hcat__more .ico em { font-size: calc(var(--sw) * .09); }

/* Points de pagination */
.home__dots {
  position: absolute; left: 50%; bottom: calc(var(--dock-b) + var(--dock-h) + 6px); translate: -50% 0;
  display: flex; padding: 2px 4px; border-radius: 99px;
}
.home__dots button { display: grid; place-items: center; width: 20px; height: 20px; }
.home__dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--on-wall); opacity: .38; box-shadow: 0 0 2px rgba(0, 0, 0, .2); transition: opacity .25s; }
.home__dots button[aria-current="true"]::before { opacity: 1; }

/* Dossier ouvert */
.folder {
  position: fixed; z-index: 1150; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 20px; background: rgba(12, 6, 9, .26);
  backdrop-filter: blur(26px) saturate(150%); -webkit-backdrop-filter: blur(26px) saturate(150%);
  --ic: 60px; --col: 72px; --gx: 10px; --on-wall: #fff; --on-wall-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.folder[hidden] { display: none; }
.folder__name { margin: 0; color: #fff; font-size: 28px; font-weight: 600; letter-spacing: -.01em; text-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.folder__panel {
  display: grid; grid-template-columns: repeat(3, var(--col)); gap: 22px var(--gx); padding: 26px 18px 22px; border-radius: 38px;
  background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26), 0 24px 60px rgba(0, 0, 0, .25);
}
.folder .happ { color: #fff; }
.folder .happ__lbl { max-width: calc(var(--col) + 8px); white-space: normal; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 300px) { .folder { --ic: 52px; --col: 62px; } }

/* =========================================================
   TABLETTES
   ========================================================= */
@media (max-width: 1100px) and (min-width: 761px) {
  .widgets { --cell: clamp(104px, calc((100dvh - var(--mb-h) - var(--dock-s) - 120px) / 4), 140px); }
  .app-split { grid-template-columns: 180px minmax(0, 1fr); }
  .about { grid-template-columns: 230px minmax(0, 1fr); }
}
@media (max-height: 640px) and (min-height: 501px) and (min-width: 761px) {
  .widgets .wdg[data-w="competences"], .widgets .wdg[data-w="cv"], .widgets .wdg[data-w="calendrier"] { display: none; }
}

/* =========================================================
   MOBILE — écran d'accueil et applications plein écran
   ========================================================= */
@media (max-width: 760px), (max-height: 500px) {
  :root {
    --mb-h: 36px;
    --dk: clamp(46px, 13.5vw, 58px);              /* icônes du Dock */
    --dock-h: calc(var(--dk) + 30px);             /* hauteur du Dock (icônes + noms) */
    --dock-b: max(10px, env(safe-area-inset-bottom));
  }

  /* Barre d'état : transparente sur l'accueil, de la couleur de l'application ouverte */
  .menubar {
    padding: 0 max(8px, env(safe-area-inset-right)) 0 max(20px, calc(env(safe-area-inset-left) + 8px));
    background: transparent; color: var(--on-wall); backdrop-filter: none; -webkit-backdrop-filter: none;
    transition: background-color .3s, color .3s;
  }
  .has-win .menubar { background: var(--win-solid); color: var(--text); }
  .has-win.win-dark .menubar { background: #120B0E; color: #F3EEE9; }
  .mb__left { display: none; }
  .mb__right { flex: 1; gap: 0; }
  .mb__clock { order: -1; margin-right: auto; padding: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
  .mb__icon { width: 38px; height: 32px; font-size: 17px; }
  .mb__lang { width: auto; padding: 0 9px; font-size: 12px; }

  /* Bureau → écran d'accueil */
  .desktop { display: block; padding: 0; overflow: hidden; }
  .widgets, .dicons { display: none; }
  .home { display: block; }

  /* Dock du téléphone : 4 applications, avec leur nom pour s'y retrouver */
  .dock {
    z-index: 5; left: 50%; right: auto; bottom: var(--dock-b); translate: -50% 0;
    width: min(100vw - 20px, 440px); height: var(--dock-h); padding: 8px 6px 0; gap: 0;
    justify-content: space-around; align-items: flex-start; border-radius: 30px;
  }
  .dock__btn { flex: 1; width: auto; height: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .dock__btn .ico { width: var(--dk); height: var(--dk); transition: transform .2s var(--ease), filter .2s; }
  .dock__btn:active .ico { transform: scale(.9); filter: brightness(.82); }
  .dock__btn::after { display: none; }
  .dock__tip {
    position: static; translate: none; padding: 0; border-radius: 0; background: none; box-shadow: none; opacity: 1;
    color: var(--on-wall); font-size: 10.5px; line-height: 1.2; text-shadow: var(--on-wall-shadow);
  }
  .has-win .dock { translate: -50% 140%; opacity: 0; pointer-events: none; }

  .win { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; box-shadow: none; background: var(--win-solid); }
  .win--dark { background: #120B0E; }
  .win__bar { height: 50px; }
  .lights { display: none; }
  .win__back { display: inline-flex; align-items: center; gap: 2px; margin-left: -6px; padding: 8px 6px; font-size: 15px; font-weight: 500; color: var(--primary); }
  .win--dark .win__back { color: var(--primary-soft); }
  .win__back .i { font-size: 20px; }
  .win__title { position: absolute; left: 96px; right: 96px; margin: 0; font-size: 16px; }
  .win__resize { display: none; }

  .app-split, .about { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .side { flex-direction: row; gap: 6px; padding: 10px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--win-line); scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side__h { display: none; }
  .side__btn { width: auto; flex: none; padding: 7px 12px; border-radius: 99px; background: var(--hover); }
  .side__btn .count { margin-left: 4px; }
  .about__card { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 18px 16px; border-right: 0; border-bottom: 1px solid var(--win-line); overflow: visible; }
  .about__card .avatar { width: 76px; height: 76px; font-size: 30px; margin: 0 14px 0 0; }
  .about__id { text-align: left; }
  .about__card .status { margin: 8px 0 0; }
  .about__card .facts, .about__card .nums { display: none; }
  .pane { padding: 22px 18px 34px; }
  .title-serif { font-size: 32px; }
  .statement { font-size: 24px; }
  .tbar { flex-wrap: wrap; }
  .search { width: 100%; order: 5; margin-left: 0; }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
  .pdetail { padding: 16px 16px 30px; }
  .meta { grid-template-columns: 1fr 1fr; }
  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .note { padding: 22px 20px 28px; }
  .skrow__top { flex-wrap: wrap; }
  .skrow__top strong { flex-basis: 100%; }
  .frow { padding: 6px 16px; }
  .compose textarea { min-height: 200px; }
  .spot { padding-top: 10vh; }
  .toast { bottom: calc(var(--dock-b) + var(--dock-h) + 40px); }
}


/* Mobile : compléments (CV, réglages, écran de veille) */
@media (max-width: 760px), (max-height: 500px) {
  .cvapp .tbar { flex-wrap: nowrap; gap: 8px; padding: 8px 12px; }
  .cvapp__zoom { display: none; }
  .cvapp__tab { margin-left: auto; }
  .cvapp__tab span { display: none; }
  .cvapp__dl { padding: 0 12px; }
  .cvapp__sheet { padding: 12px; }
  .srow { flex-wrap: wrap; }
  .srow .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
  .srow .seg button { padding: 6px 4px; font-size: 12px; }
  .set { padding: 20px 16px 30px; }
  .legalpane { padding-top: 22px; }
  .legalpane h1 { font-size: 38px; }
  .saver__mark { left: 20px; top: 16px; font-size: 26px; }
  .saver__center { animation: none; }
  .set__dock { display: none; }
  .app-split .tbar .seg--icons { display: none; } /* Projets : la grille suffit sur téléphone */

  .hello { place-items: end center; padding: 0; }
  .hello__card { width: 100%; max-height: 94dvh; padding: 26px 18px calc(14px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; }
  .hello__card::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; border-radius: 3px; background: var(--win-line); translate: -50% 0; }
  .hello__head .avatar { width: 56px; height: 56px; font-size: 22px; }
  .hello__t { font-size: 30px; }
  .hello__lead { margin: 16px 0 12px; font-size: 14px; }
  .hello__grid { gap: 8px; }
  .hello__c { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; }
  .hello__c .ico { --s: 40px; width: 40px; }

  .viewer__stage { padding: 0 6px; }
  .viewer__nav { display: none; }
  .viewer__dl { padding: 0 14px; }
  .viewer__dl-l { display: none; }
  .viewer__dl-s { display: inline; }
  .gal__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .gal__grid--wide, .gal__grid:has(.is-video) { grid-template-columns: minmax(0, 1fr); }
  .gal__item.is-wide { grid-column: 1 / -1; }
}

/* Téléphone à l'horizontale : 8 colonnes, Dock compact sans noms */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --dk: 44px; --dock-h: calc(var(--dk) + 16px); }
  .dock { width: auto; padding: 7px 18px 0; gap: 22px; }
  .dock__btn { flex: none; }
  .dock__tip { display: none; }
  .home {
    --cols: 8; --hp: max(24px, env(safe-area-inset-left), env(safe-area-inset-right)); --cwmax: 900px;
    --top: 8px; --dots: 22px; --sw-h: calc(var(--avail) - var(--lab));
  }
  .hpage--lib { --lib-bar: 42px; --libh: calc(var(--avail) - var(--lab) - var(--lib-bar)); }
  .hlib__search { height: 32px; margin-bottom: 10px; font-size: 14px; }
}
/* Très petits téléphones */
@media (max-width: 359px) { .home { --hp: 14px; --gx: 14px; } }
/* Écrans très bas (petit téléphone avec les barres du navigateur) : on gagne quelques pixels */
@media (max-height: 480px) and (orientation: portrait) {
  .home { --top: 6px; --dots: 20px; }
  .hpage--lib { --lib-bar: 42px; }
  .hlib__search { height: 32px; margin-bottom: 10px; font-size: 14px; }
}
@media (max-height: 300px) {
  :root { --mb-h: 30px; }
  .home { --top: 4px; --dots: 18px; }
}
@media (max-width: 400px) {
  .cvapp__dl-l { display: none; }
  .cvapp__dl-s { display: inline; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
