/* ==========================================================================
   OV7 OS — feuille de style du système
   1. Jetons  2. Base  3. Démarrage  4. Bureau & fonds  5. Widgets
   6. Barre des tâches  7. Menu démarrer  8. Fenêtres  9. Composants d'apps
   10. Applications  11. Mobile  12. Mouvement réduit
   ========================================================================== */

/* 1. Jetons ---------------------------------------------------------------- */

:root {
  --accent: #ff5a1f;
  --ember: #d4162c;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);

  --font: Geist, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --taskbar-h: 52px;
  --radius-win: 10px;
  --radius: 8px;
  --radius-sm: 6px;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --fast: .16s;
  --base: .28s;

  --ok: #3ecf8e;
  --warn: #f5b84b;
  --danger: #ff5d5d;
}

:root,
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #08090a;
  --surface: #0e0f11;
  --surface-solid: #0e0f11;
  --surface-2: #111214;
  --surface-3: #18191c;
  --glass: #0b0c0d;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .12);
  --text: #ededef;
  --text-2: #a1a4ab;
  --text-3: #80848c;
  --shadow-win: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .08);
  --shadow-pop: 0 24px 60px -24px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .08);
  --label-shadow: none;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #e9eaec;
  --surface: #fafafb;
  --surface-solid: #fafafb;
  --surface-2: #f2f3f5;
  --surface-3: #e6e7ea;
  --glass: #f4f5f6;
  --line: rgba(15, 18, 25, .08);
  --line-strong: rgba(15, 18, 25, .15);
  --text: #14161b;
  --text-2: #4b515c;
  --text-3: #6b7078;
  --shadow-win: 0 30px 60px -30px rgba(20, 25, 40, .3), 0 0 0 1px rgba(15, 18, 25, .1);
  --shadow-pop: 0 18px 40px -20px rgba(20, 25, 40, .3), 0 0 0 1px rgba(15, 18, 25, .1);
  --label-shadow: none;
}

/* 2. Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.ico { width: 18px; height: 18px; flex: none; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.mono { font-family: var(--mono); }

.noscript { max-width: 760px; margin: 0 auto; padding: 40px 16px; overflow: auto; height: 100%; }
.noscript h1, .noscript h2, .noscript h3 { margin: 1.2em 0 .4em; }
.noscript p, .noscript li, .noscript blockquote { margin-bottom: .6em; color: var(--text-2); }

.os {
  position: fixed;
  inset: 0;
  overflow: hidden;
  user-select: none;
}

/* 3. Démarrage --------------------------------------------------------------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: #060709;
  color: #eef0f3;
  transition: opacity .5s var(--ease-out), visibility .5s;
  cursor: pointer;
}

.boot.is-done { opacity: 0; visibility: hidden; }

.boot__inner { width: min(420px, calc(100vw - 48px)); }

.boot__logo {
  width: 64px;
  height: 64px;
  margin-bottom: 32px;
  animation: boot-logo .7s var(--ease-out) both;
}

@keyframes boot-logo {
  from { opacity: 0; transform: scale(.85); filter: blur(6px); }
}

.boot__lines {
  min-height: 132px;
  font: 400 12.5px/1.75 var(--mono);
  color: #8a909b;
}

.boot__line { display: flex; gap: 10px; animation: fade-up .25s var(--ease-out) both; }
.boot__line b { color: var(--ok); font-weight: 500; }

.boot__bar {
  height: 2px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, .08);
}

.boot__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .3s var(--ease-out);
}

.boot__skip {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font: 400 11px/1 var(--mono);
  color: #4e545e;
  letter-spacing: .08em;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(4px); }
}

/* Écran d'extinction */
.shutdown {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  gap: 18px;
  align-content: center;
  background: #000;
  color: #8a909b;
  font: 400 13px/1.6 var(--mono);
  text-align: center;
  padding: 24px;
  animation: fade-in .6s ease both;
}
.shutdown button {
  margin-top: 8px;
  padding: 10px 18px;
  border: 1px solid #2a2e35;
  border-radius: 8px;
  color: #eef0f3;
}
.shutdown button:hover { border-color: var(--accent); }

@keyframes fade-in { from { opacity: 0; } }

/* 4. Bureau & fonds -------------------------------------------------------- */

.desktop {
  position: absolute;
  inset: 0 0 var(--taskbar-h) 0;
}

.wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bg);
  transition: background .6s ease;
}

.wallpaper::before,
.wallpaper::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Le filigrane du nom n'est plus affiché : le bureau reste un aplat. */
.wallpaper__mark { display: none; }

/* « ember », le fond par défaut : noir mat, sans dégradé. */
.wallpaper[data-wallpaper='ember'] { background: var(--bg); }

.wallpaper[data-wallpaper='aurora'] {
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(64, 196, 170, .28), transparent 60%),
    radial-gradient(1000px 700px at 90% 30%, rgba(124, 92, 255, .30), transparent 60%),
    radial-gradient(800px 500px at 50% 120%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%),
    var(--bg);
}

.wallpaper[data-wallpaper='blueprint'] {
  background:
    radial-gradient(1000px 700px at 70% 40%, rgba(47, 140, 255, .16), transparent 70%),
    #0a1220;
}
:root[data-theme='light'] .wallpaper[data-wallpaper='blueprint'] {
  background: radial-gradient(1000px 700px at 70% 40%, rgba(47, 140, 255, .14), transparent 70%), #e3ebf7;
}
.wallpaper[data-wallpaper='blueprint']::before {
  background-image:
    linear-gradient(rgba(120, 170, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, .12) 1px, transparent 1px),
    linear-gradient(rgba(120, 170, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, .05) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}

.wallpaper[data-wallpaper='mono'] { background: var(--bg); }

/* Icônes du bureau */
.icons {
  position: absolute;
  z-index: 1;
  top: 20px;
  left: 16px;
  bottom: 16px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 90px);
  grid-auto-columns: 84px;
  gap: 6px;
  align-content: start;
}

.dicon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 6px;
  border-radius: var(--radius);
  text-align: center;
  transition: background var(--fast);
}

.dicon:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.dicon.is-selected { background: color-mix(in srgb, var(--text) 6%, transparent); }
.dicon:hover .tile, .dicon.is-selected .tile { border-color: var(--line-strong); }

.dicon__label {
  max-width: 100%;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.dicon.is-selected .dicon__label { color: var(--text); }

/* Tuile d'application (bureau, menu, barre des tâches) : un carré mat et un
   pictogramme au trait. Les teintes (tone-*) ne colorent plus que l'accent. */
.tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
  transition: border-color var(--fast);
}

.tile .ico { width: 20px; height: 20px; stroke-width: 1.5; }
.tile--sm { width: 32px; height: 32px; border-radius: 8px; }
.tile--sm .ico { width: 16px; height: 16px; }
.tile--xs { width: 22px; height: 22px; border-radius: 6px; }
.tile--xs .ico { width: 13px; height: 13px; }

.toast .tone-accent { color: var(--accent); }

/* 5. Widgets --------------------------------------------------------------- */

/* Sur le bureau, les widgets ne sont plus des cartes : du texte posé à même
   le fond, aligné à droite, l'horloge en tête. */
.widgets {
  position: absolute;
  z-index: 1;
  top: 28px;
  right: 32px;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 28px;
  text-align: right;
}

.widget { animation: fade-up .5s var(--ease-out) both; }

.widget:nth-child(2) { animation-delay: .06s; }
.widget:nth-child(3) { animation-delay: .12s; }
.widget:nth-child(4) { animation-delay: .18s; }

.widget__kicker {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-2);
}

.widget--hello h1 {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.widget--hello p { margin-top: 4px; color: var(--text-3); font-size: 13px; text-wrap: pretty; }
.widget__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.widget--hello .widget__actions { justify-content: flex-end; }

.widget--clock { order: -1; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.clock__time { font: 400 44px/1 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.clock__date { color: var(--text-3); font-size: 13px; text-align: right; text-transform: capitalize; }

/* À la une et avis : retirés du bureau, ils restent dans leurs applications. */
.widget--featured, .widget--quote { display: none; }

.featured { display: grid; gap: 4px; }
.featured button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  margin: 0 -8px;
  width: calc(100% + 16px);
  border-radius: var(--radius);
  text-align: left;
  transition: background var(--fast);
}
.featured button:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.featured strong { display: block; font-weight: 500; font-size: 13.5px; }
.featured small { display: block; color: var(--text-3); font-size: 12px; }

.widget--quote blockquote { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.widget--quote blockquote p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.widget--quote footer { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 500; }

@media (max-width: 960px) {
  .widgets { width: 260px; }
}

/* 6. Barre des tâches ------------------------------------------------------ */

.taskbar {
  position: absolute;
  z-index: 9000;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--taskbar-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--glass);
  border-top: 1px solid var(--line);
}

.taskbar__start {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  transition: background var(--fast), transform var(--fast);
}
.taskbar__start:hover, .taskbar__start[aria-expanded='true'] { background: color-mix(in srgb, var(--text) 7%, transparent); }
.taskbar__start:active { transform: scale(.94); }
.taskbar__start svg { width: 30px; height: 30px; }

.taskbar__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  min-width: 200px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--text-3);
  background: none;
  border: 1px solid var(--line);
  font-size: 13px;
  transition: border-color var(--fast), color var(--fast);
}
.taskbar__search:hover { border-color: var(--line-strong); color: var(--text-2); }
.taskbar__search kbd {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  font: 500 10.5px/1.2 var(--mono);
}

.taskbar__apps {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

/* Application de la barre : pictogramme seul, puis nom quand elle est ouverte. */
.tb-app {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  flex: none;
  color: var(--text-2);
  font-size: 13px;
  transition: background var(--fast), color var(--fast), transform var(--fast);
}
.tb-app:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.tb-app:active { transform: scale(.96); }
.tb-app .tile { width: auto; height: auto; border: 0; border-radius: 0; background: none; color: inherit; }
.tb-app .tile .ico { width: 16px; height: 16px; }
.tb-app__label { white-space: nowrap; }

.tb-app.is-open { color: var(--text); }
.tb-app.is-active { background: color-mix(in srgb, var(--text) 6%, transparent); box-shadow: inset 0 -2px 0 var(--accent); }

.tb-sep { width: 1px; height: 24px; margin: 0 6px; background: var(--line-strong); flex: none; }

.taskbar__tray { display: flex; align-items: center; gap: 4px; }

.tray-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 12.5px;
  transition: background var(--fast), color var(--fast);
}
.tray-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }

.tray-clock { flex-direction: row; align-items: center; gap: 12px; font: 400 12px/1 var(--mono); font-variant-numeric: tabular-nums; }
.tray-clock span:first-child { order: 2; color: var(--text-2); }
.tray-clock span:last-child { color: var(--text-3); }

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}
.status-dot[data-status='limited'] { background: var(--warn); }
.status-dot[data-status='closed'] { background: var(--danger); }

@media (max-width: 1100px) {
  .taskbar__search { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  .taskbar__search span, .taskbar__search kbd { display: none; }
  .tray-status span { display: none; }
}

/* 7. Menu démarrer, menu contextuel, notifications ------------------------- */

.popover {
  position: absolute;
  z-index: 9500;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  animation: pop-in .2s var(--ease-out) both;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
}

.start {
  left: 10px;
  bottom: calc(var(--taskbar-h) + 10px);
  width: min(560px, calc(100vw - 20px));
  max-height: calc(100vh - var(--taskbar-h) - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom left;
}

.start__search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 16px 4px;
  padding: 0 14px;
  height: 42px;
  border-radius: var(--radius);
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--text-3);
}
.start__search:focus-within { border-color: var(--text-3); }
.start__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 14px; }

.start__body { flex: 1; overflow: auto; padding: 8px 16px 16px; }

.start__title {
  margin: 14px 4px 8px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.start__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px; }

.start__app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  transition: background var(--fast), color var(--fast);
}
.start__app:hover, .start__app:focus-visible, .result.is-active { background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); }

.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
}
.result:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.result strong { display: block; font-weight: 500; }
.result small { display: block; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result > span:nth-child(2) { min-width: 0; flex: 1; }
.result kbd { font: 500 10.5px/1 var(--mono); color: var(--text-3); }
.results__empty { padding: 24px 8px; color: var(--text-3); text-align: center; }

.start__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.start__foot .who { flex: 1; min-width: 0; }
.start__foot strong { display: block; font-weight: 500; }
.start__foot small { display: block; color: var(--text-3); font-size: 12px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--text-2);
  transition: background var(--fast), color var(--fast);
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }

.menu {
  min-width: 220px;
  padding: 6px;
  border-radius: 12px;
  font-size: 13px;
}
.menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 7px;
  text-align: left;
}
.menu button:hover, .menu button:focus-visible { background: color-mix(in srgb, var(--text) 7%, transparent); outline: 0; }
.menu button .ico { width: 16px; height: 16px; opacity: .85; }
.menu hr { border: 0; height: 1px; margin: 5px 6px; background: var(--line-strong); }
.menu .check { margin-left: auto; opacity: 0; }
.menu .is-checked .check { opacity: 1; }

.toasts {
  position: absolute;
  z-index: 9800;
  top: 16px;
  right: 16px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  pointer-events: auto;
  animation: toast-in .35s var(--ease-out) both;
}
.toast.is-leaving { animation: toast-out .25s ease both; }
.toast strong { display: block; font-weight: 600; }
.toast p { color: var(--text-2); font-size: 13px; margin-top: 2px; }

@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

.preview-banner {
  position: absolute;
  z-index: 9900;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: var(--warn);
  color: #1a1206;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-pop);
  white-space: nowrap;
}
.preview-banner a { padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .14); text-decoration: none; }

/* 8. Fenêtres -------------------------------------------------------------- */

.windows { position: absolute; inset: 0 0 var(--taskbar-h) 0; z-index: 5; pointer-events: none; }

.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 220px;
  border-radius: var(--radius-win);
  background: var(--surface);
  box-shadow: var(--shadow-win);
  overflow: hidden;
  pointer-events: auto;
  user-select: text;
  animation: win-in .26s var(--ease-out) both;
  transition: box-shadow var(--base);
}

.win:not(.is-focused) { box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .7), 0 0 0 1px var(--line); }
.win:not(.is-focused) .win__bar { opacity: .6; }

@keyframes win-in {
  from { opacity: 0; transform: translateY(14px) scale(.965); }
}

.win.is-closing { animation: win-out .18s ease-in both; pointer-events: none; }
@keyframes win-out { to { opacity: 0; transform: scale(.96); } }

.win.is-minimizing { animation: win-min .26s var(--ease-in-out) both; pointer-events: none; }
@keyframes win-min { to { opacity: 0; transform: translateY(40%) scale(.6); } }

.win.is-minimized { display: none; }

.win.is-max {
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0;
}
.win.is-snap-left, .win.is-snap-right {
  top: 0 !important;
  bottom: 0 !important;
  height: auto !important;
  width: 50% !important;
  border-radius: 0;
}
.win.is-snap-left { left: 0 !important; }
.win.is-snap-right { left: 50% !important; }
.win.is-animating { transition: left .22s var(--ease-out), top .22s var(--ease-out), width .22s var(--ease-out), height .22s var(--ease-out), box-shadow var(--base); }

.win__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  flex: none;
  padding: 0 6px 0 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 6%, transparent);
  cursor: default;
  user-select: none;
  touch-action: none;
  transition: opacity var(--base);
}
.win__bar .tile { display: none; }

.win__title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win__title small { font-weight: 400; color: var(--text-3); margin-left: 6px; }

.win__ctrl { display: flex; gap: 2px; }
.win__ctrl button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 30px;
  border-radius: 6px;
  color: var(--text-3);
  transition: background var(--fast), color var(--fast);
}
.win__ctrl button:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.win__ctrl button[data-act='close']:hover { background: #c4302b; color: #fff; }
.win__ctrl .ico { width: 14px; height: 14px; }

.win__back { display: none; }

.win__body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.win__grip { position: absolute; z-index: 2; touch-action: none; }
.win__grip[data-dir='e'] { top: 44px; right: 0; bottom: 12px; width: 6px; cursor: ew-resize; }
.win__grip[data-dir='w'] { top: 44px; left: 0; bottom: 12px; width: 6px; cursor: ew-resize; }
.win__grip[data-dir='s'] { left: 12px; right: 12px; bottom: 0; height: 6px; cursor: ns-resize; }
.win__grip[data-dir='se'] { right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.win__grip[data-dir='sw'] { left: 0; bottom: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.win.is-max .win__grip, .win.is-snap-left .win__grip, .win.is-snap-right .win__grip { display: none; }

.snap-ghost {
  position: absolute;
  z-index: 4;
  border-radius: var(--radius-win);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--line-strong);
  pointer-events: none;
  transition: all .18s var(--ease-out);
}

.dragging, .dragging * { cursor: grabbing !important; user-select: none !important; }

/* 9. Composants d'applications --------------------------------------------- */

.app { padding: 24px 28px 32px; max-width: 980px; margin: 0 auto; user-select: text; }
.app--flush { padding: 0; max-width: none; }

.kicker {
  font: 400 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.h1 { font-size: 26px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.h2 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.lead { font-size: 15px; color: var(--text-2); line-height: 1.6; text-wrap: pretty; }
.muted { color: var(--text-3); }
.prose p { font-size: 14.5px; line-height: 1.7; color: var(--text-2); text-wrap: pretty; }
.prose p + p { margin-top: 12px; }

.section { margin-top: 28px; }
.section > .h2 { margin-bottom: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  background: none;
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}
.btn:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.btn:active { transform: scale(.97); }
.btn .ico { width: 16px; height: 16px; }
.btn--primary {
  border-color: transparent;
  color: #fff;
  background: var(--accent);
}
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 7px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-2);
  background: none;
  border: 1px solid var(--line);
}
.chip--accent { color: var(--text); }
.chip--accent .ico { width: 10px; height: 10px; color: var(--accent); }
.chip--mono { font-family: var(--mono); font-size: 11.5px; }

.card {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

.stars { display: inline-flex; gap: 2px; color: var(--warn); }
.stars .ico { width: 14px; height: 14px; fill: currentColor; }
.stars .is-off { color: var(--text-3); fill: none; opacity: .5; }

.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius);
  background: none;
  border: 1px solid var(--line);
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}
.tabs button {
  height: 30px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  transition: background var(--fast), color var(--fast);
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected='true'] { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }

.empty {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-3);
}
.empty .ico { width: 34px; height: 34px; opacity: .6; }

.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  color: var(--text-2);
  font-size: 13.5px;
}
.callout .ico { color: var(--warn); margin-top: 1px; }

/* Couverture de projet : l'image fournie, sinon le pictogramme du projet,
   au trait, sur la carte elle-même (aucune composition générée). */
.cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  border-radius: 6px;
}
.cover:has(img) { aspect-ratio: 16 / 10; border: 1px solid var(--line); }
.cover__glyph { display: grid; color: var(--text-2); }
.cover__glyph .ico { width: 22px; height: 22px; stroke-width: 1.5; }
.cover__name {
  font: 400 11px/1 var(--mono);
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 10. Applications -------------------------------------------------------- */

/* À propos */
.profile { display: flex; gap: 18px; align-items: center; }
.avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 14px;
  color: var(--text);
  font: 500 22px/1 var(--mono);
  letter-spacing: -.02em;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
}
.profile__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--text-2); font-size: 13px; }
.profile__meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile__meta .ico { width: 14px; height: 14px; }

.specs { display: grid; gap: 0; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line-strong); font-size: 13.5px; }
.specs div:last-child { border-bottom: 0; }
.specs dt { color: var(--text-3); font: 500 11px/1.8 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.specs dd { margin: 0; font-weight: 500; text-align: right; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 28px; margin-top: 24px; }

.steps { display: grid; gap: 10px; counter-reset: step; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.step__num {
  display: grid;
  place-items: center;
  height: 44px;
  border-radius: var(--radius);
  font: 400 13px/1 var(--mono);
  color: var(--text-2);
  border: 1px solid var(--line-strong);
}
.step h3 { font-size: 14.5px; font-weight: 600; margin-top: 2px; }
.step p { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }

.adv { display: flex; gap: 14px; }
.adv .tile { width: 38px; height: 38px; border-radius: 9px; }
.adv .tile .ico { width: 18px; height: 18px; }
.adv h3 { font-size: 14.5px; font-weight: 600; }
.adv p { color: var(--text-2); font-size: 13.5px; margin-top: 3px; }

/* Services */
.pole + .pole { margin-top: 34px; }
.pole__head { display: flex; gap: 16px; align-items: baseline; margin-bottom: 14px; }
.pole__index { font: 500 12px/1 var(--mono); color: var(--accent); }
.service { display: flex; flex-direction: column; gap: 10px; }
.service__head { display: flex; align-items: center; gap: 12px; }
.service__head .tile { width: 36px; height: 36px; border-radius: 9px; }
.service__head .tile .ico { width: 17px; height: 17px; }
.service p { color: var(--text-2); font-size: 13.5px; }
.service .chips { margin-top: auto; padding-top: 4px; }
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

/* Explorateur de projets */
.explorer { display: grid; grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.explorer__bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); overflow: hidden; white-space: nowrap; }
.crumbs button { padding: 4px 8px; border-radius: 6px; }
.crumbs button:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.crumbs strong { padding: 4px 8px; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.crumbs .ico { width: 14px; height: 14px; opacity: .5; flex: none; }
.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  width: 220px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--text-3);
}
.searchbox:focus-within { border-color: var(--text-3); }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 13px; }
.searchbox .ico { width: 15px; height: 15px; }

.explorer__side { padding: 20px 12px; border-right: 1px solid color-mix(in srgb, var(--text) 6%, transparent); overflow: auto; }
.side-title { margin: 6px 10px 8px; font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-2);
  text-align: left;
}
.side-link:hover { background: color-mix(in srgb, var(--text) 4%, transparent); color: var(--text); }
.side-link[aria-current='true'] { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.side-link .ico { width: 16px; height: 16px; }
.side-link .count { margin-left: auto; font: 400 11.5px/1 var(--mono); color: var(--text-3); }

.explorer__main { overflow: auto; padding: 28px 32px; scrollbar-width: thin; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* Carte projet : pictogramme et statut en tête, catégorie, nom, résumé. */
.pcard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius);
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color var(--fast), background var(--fast);
}
.pcard:hover { border-color: var(--line-strong); background: color-mix(in srgb, var(--surface-2) 92%, var(--text)); }
.pcard__body { display: flex; flex-direction: column; gap: 8px; }
.pcard h3 { font-size: 15.5px; font-weight: 500; letter-spacing: -.01em; }
.pcard p { color: var(--text-2); font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__meta { order: -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 400 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

.project { max-width: 860px; margin: 0 auto; }
/* Sans image, la fiche commence directement par son titre. */
.project__hero:not(:has(img)) { display: none; }
.project__hero:not(:has(img)) + .project__head { margin-top: 0; }
.project__hero .cover { aspect-ratio: 21 / 8; border-radius: var(--radius); }
.project__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 20px; }
.project__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.project__cols h3 { font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.project__cols p { color: var(--text-2); font-size: 14px; line-height: 1.65; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 20px; }
.features li { display: flex; gap: 10px; font-size: 14px; color: var(--text-2); }
.features .ico { color: var(--text-3); width: 16px; height: 16px; margin-top: 3px; }
.arch { display: grid; gap: 0; border-left: 1px solid var(--line-strong); margin-left: 8px; }
.arch li { position: relative; padding: 0 0 18px 22px; }
.arch li::before { content: ''; position: absolute; left: -4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--surface-solid); border: 1px solid var(--text-2); }
.arch li:last-child { padding-bottom: 0; }
.arch h4 { font-size: 14px; font-weight: 600; }
.arch p { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.shots figure { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.shots figcaption { padding: 8px 12px; font-size: 12.5px; color: var(--text-2); }
.project__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.project__nav button { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; text-align: left; max-width: 48%; }
.project__nav button:last-child { text-align: right; margin-left: auto; align-items: flex-end; }
.project__nav button:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.project__nav small { color: var(--text-3); font-size: 12px; }
.project__nav strong { font-weight: 500; }

/* Stack */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.tech {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color var(--fast);
}
.tech:hover { border-color: var(--line-strong); }
.tech__mark { font: 400 20px/1 var(--mono); letter-spacing: -.02em; color: var(--text-2); }
.tech:hover .tech__mark { color: var(--accent); }
.tech__name { font-size: 13px; font-weight: 500; }

/* Avis */
.rating { display: flex; align-items: center; gap: 20px; padding: 20px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.rating__score { font: 400 44px/1 var(--mono); letter-spacing: -.02em; }
.rating .stars .ico { width: 18px; height: 18px; }
.reviews { display: grid; gap: 12px; margin-top: 16px; }
.review { position: relative; }
.review__quote { position: absolute; right: 18px; top: 16px; color: var(--text-3); opacity: .4; }
.review__quote .ico { width: 30px; height: 30px; }
.review__text { margin-top: 10px; }
.review__who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.review__who .avatar { width: 36px; height: 36px; border-radius: 9px; font-size: 13px; }
.review__who strong { display: block; font-weight: 600; }
.review__who small { display: block; color: var(--text-3); font-size: 12px; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); height: 100%; }
.contact__side { padding: 22px; border-right: 1px solid var(--line); overflow: auto; display: flex; flex-direction: column; gap: 22px; }
.contact__main { padding: 22px 26px; overflow: auto; }
.coord { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; margin: 0 -10px; width: calc(100% + 20px); border-radius: 10px; text-align: left; text-decoration: none; }
.coord:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.coord span { min-width: 0; flex: 1; }
.coord small { display: block; color: var(--text-3); font-size: 11.5px; }
.coord strong { display: block; font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.coord > .ico:last-child { color: var(--text-3); width: 15px; height: 15px; }
.prices { display: grid; gap: 8px; }
.price { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); }
.price strong { font-weight: 500; font-size: 13.5px; }
.price b { font: 400 13px/1.6 var(--mono); color: var(--text); }
.price small { grid-column: 1 / -1; color: var(--text-3); font-size: 12px; }

.form { display: grid; gap: 16px; margin-top: 20px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: none;
  font-size: 14px;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.field select option { background: var(--surface-solid); }
.field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--text-3); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field__error { font-size: 12px; color: var(--danger); }
.field__hint { font-size: 12px; color: var(--text-3); text-align: right; }
.choice { display: flex; flex-wrap: wrap; gap: 6px; }
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--fast);
}
.choice span:hover { border-color: var(--text-3); color: var(--text); }
.choice input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sent { display: grid; place-items: center; gap: 12px; padding: 60px 20px; text-align: center; }
.sent__check { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); animation: pop-in .4s var(--ease-out) both; }
.sent__check .ico { width: 30px; height: 30px; stroke-width: 2.4; }

/* Terminal */
.term {
  height: 100%;
  padding: 14px 16px;
  overflow: auto;
  background: #08090b;
  color: #d6d9de;
  font: 400 13px/1.6 var(--mono);
  cursor: text;
  scrollbar-width: thin;
  scrollbar-color: #2a2e35 transparent;
}
.term__out { white-space: pre-wrap; overflow-wrap: anywhere; }
.term__line { display: flex; gap: 8px; }
.term__prompt { color: var(--accent); white-space: nowrap; }
.term__prompt b { color: #6fd3a5; font-weight: 500; }
.term input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #f2f3f5; font: inherit; caret-color: var(--accent); }
.term .c-acc { color: var(--accent); }
.term .c-ok { color: #6fd3a5; }
.term .c-dim { color: #6e7581; }
.term .c-warn { color: #f5b84b; }
.term .c-err { color: #ff7b7b; }
.term a { color: #8ab4ff; }
.term button.t-link { color: #8ab4ff; text-decoration: underline; text-underline-offset: 2px; }

/* Paramètres */
.settings { display: grid; grid-template-columns: 190px minmax(0, 1fr); height: 100%; }
.settings__nav { padding: 12px 10px; border-right: 1px solid var(--line); }
.settings__main { padding: 22px 26px; overflow: auto; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting strong { display: block; font-weight: 500; }
.setting small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius); border: 1px solid var(--line); }
.seg button { height: 30px; padding: 0 12px; border-radius: 6px; font-size: 12.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed='true'] { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.seg .ico { width: 14px; height: 14px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); transition: transform var(--fast); }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--c); }
.walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.wall { display: grid; gap: 6px; font-size: 12.5px; text-align: left; color: var(--text-2); }
.wall__thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); }
.wall__thumb .wallpaper::after { display: none; }
.wall[aria-pressed='true'] .wall__thumb { border-color: var(--text-2); }
.wall[aria-pressed='true'] { color: var(--text); }
.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); transition: background var(--fast); pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform var(--base) var(--ease-out); }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sysinfo { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; font-size: 13px; }
.sysinfo dt { color: var(--text-3); }
.sysinfo dd { margin: 0; font-family: var(--mono); font-size: 12.5px; }

/* Corbeille */
.files { display: grid; }
.file-row { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; font-size: 13px; text-align: left; }
.file-row:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.file-row small { color: var(--text-3); font: 400 12px/1 var(--mono); }
.file-row.is-head { color: var(--text-3); font-size: 11.5px; pointer-events: none; text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.viewer { margin-top: 14px; padding: 14px; border-radius: 10px; background: #08090b; color: #c9ccd2; font: 400 12.5px/1.6 var(--mono); white-space: pre-wrap; }

/* Mentions légales */
.legal { max-width: 760px; }
.legal__panel { margin-top: 24px; }
.legal .prose a, .legal-specs a { color: var(--text); text-underline-offset: 3px; }
.legal-specs dd { font-weight: 400; }
.legal__date { margin-top: 32px; font-size: 12.5px; }

.legal-links {
  position: absolute;
  z-index: 1;
  right: 32px;
  bottom: 16px;
  display: flex;
  gap: 16px;
  font-size: 12px;
}
.legal-links a { color: var(--text-3); text-decoration: none; transition: color var(--fast); }
.legal-links a:hover { color: var(--text); }
.os.is-mobile .legal-links { position: static; justify-content: center; margin-top: 32px; }

/* Bandeau « aucun cookie » */
.notice {
  position: absolute;
  z-index: 9600;
  left: 50%;
  bottom: calc(var(--taskbar-h) + 16px);
  width: min(620px, calc(100vw - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 14px 14px 18px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  font-size: 13px;
  color: var(--text-2);
  animation: notice-in .35s var(--ease-out) both;
}
.notice strong { color: var(--text); font-weight: 500; }
.notice p { flex: 1; min-width: 0; text-wrap: pretty; }
.notice__actions { display: flex; gap: 8px; flex: none; }
.notice.is-leaving { animation: notice-out .25s ease both; pointer-events: none; }
@keyframes notice-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes notice-out { to { opacity: 0; transform: translate(-50%, 12px); } }

.os.is-mobile .notice {
  bottom: calc(86px + env(safe-area-inset-bottom));
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.os.is-mobile .notice__actions > * { flex: 1; }

/* 11. Mobile ---------------------------------------------------------------- */

.statusbar { display: none; }

.os.is-mobile { --taskbar-h: 74px; }

.os.is-mobile .statusbar {
  position: absolute;
  z-index: 9100;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(34px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 20px 0;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.statusbar span { display: inline-flex; align-items: center; gap: 8px; }

.os.is-mobile .desktop { top: calc(34px + env(safe-area-inset-top)); }
.os.is-mobile .desktop__scroll { position: absolute; inset: 0; overflow-y: auto; padding: 8px 16px 24px; }
.os.is-mobile .wallpaper { position: fixed; }
.os.is-mobile .wallpaper__mark { font-size: 62vw; }

.os.is-mobile .widgets { position: static; width: auto; gap: 10px; align-items: stretch; text-align: left; }
.os.is-mobile .widget__kicker, .os.is-mobile .widget--hello .widget__actions { justify-content: flex-start; }
.os.is-mobile .widget--clock, .os.is-mobile .widget--featured, .os.is-mobile .widget--quote { display: none; }
.os.is-mobile .widget--hello h1 { font-size: 20px; }

.os.is-mobile .icons {
  position: static;
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: none;
  gap: 18px 8px;
  margin-top: 24px;
}
.os.is-mobile .dicon { padding: 0; }
.os.is-mobile .dicon:hover, .os.is-mobile .dicon.is-selected { background: none; box-shadow: none; }
.os.is-mobile .dicon .tile { width: 56px; height: 56px; border-radius: 14px; }
.os.is-mobile .dicon .tile .ico { width: 24px; height: 24px; }
.os.is-mobile .dicon__label { font-size: 11.5px; }

.os.is-mobile .taskbar {
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  height: 64px;
  justify-content: space-around;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.os.is-mobile .taskbar__search,
.os.is-mobile .taskbar__tray,
.os.is-mobile .tb-sep,
.os.is-mobile .tb-app.is-running-only { display: none; }
.os.is-mobile .taskbar__apps { flex: 1; justify-content: space-around; }
.os.is-mobile .tb-app .tile { width: 44px; height: 44px; border-radius: 10px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--text) 9%, transparent); }
.os.is-mobile .tb-app .tile .ico { width: 20px; height: 20px; }
.os.is-mobile .tb-app { width: 52px; height: 52px; padding: 0; }
.os.is-mobile .tb-app.is-active { background: none; box-shadow: none; }
.os.is-mobile .taskbar__start svg { width: 36px; height: 36px; }

.os.is-mobile .windows { inset: 0; z-index: 9200; }
.os.is-mobile .win {
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  min-width: 0;
  border-radius: 0;
  background: var(--surface-solid);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  animation: sheet-in .32s var(--ease-out) both;
}
.os.is-mobile .win:not(.is-focused) { display: none; }
.os.is-mobile .win.is-closing { animation: sheet-out .22s ease-in both; }
@keyframes sheet-in { from { transform: translateY(6%); opacity: 0; } }
@keyframes sheet-out { to { transform: translateY(6%); opacity: 0; } }
.os.is-mobile .win__bar { height: 52px; padding: 0 8px; }
.os.is-mobile .win__bar .tile { display: none; }
.os.is-mobile .win__title { text-align: center; font-size: 15px; }
.os.is-mobile .win__ctrl { visibility: hidden; width: 44px; }
.os.is-mobile .win__back { display: grid; place-items: center; width: 44px; height: 40px; border-radius: 8px; color: var(--text); }
.os.is-mobile .win__back .ico { width: 22px; height: 22px; }
.os.is-mobile .win__grip { display: none; }

.os.is-mobile .start {
  left: 12px;
  right: 12px;
  width: auto;
  bottom: calc(84px + env(safe-area-inset-bottom));
  max-height: calc(100vh - 140px);
}
.os.is-mobile .toasts { top: calc(44px + env(safe-area-inset-top)); left: 16px; right: 16px; width: auto; }

@media (max-width: 760px) {
  .app { padding: 18px 16px 28px; }
  .h1 { font-size: 22px; }
  .about-grid { grid-template-columns: 1fr; }
  .explorer { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); }
  .explorer__side { display: flex; gap: 6px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .explorer__side .side-title { display: none; }
  .explorer__side .side-link { width: auto; white-space: nowrap; flex: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; }
  .explorer__side .side-link .ico { display: none; }
  .explorer__main { padding: 14px; }
  .searchbox { width: 150px; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact, .settings { grid-template-columns: 1fr; height: auto; }
  .contact__side { border-right: 0; border-bottom: 1px solid var(--line); order: 2; }
  .contact__main { padding: 18px 16px; }
  .form__row { grid-template-columns: 1fr; }
  .settings__nav { display: flex; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .settings__nav .side-link { width: auto; white-space: nowrap; flex: none; }
  .settings__main { padding: 18px 16px; }
  .rating { flex-wrap: wrap; }
  .project__nav button { max-width: 100%; }
}

/* 12. Mouvement réduit ------------------------------------------------------ */

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