/* ==========================================================
   PORTFOLIO — BUREAU macOS
   ========================================================== */

:root {
  --bg: #bee0a8;
  --star: #fbe48b;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --win: #ffffff;
  --win-bar: #f6f6f6;
  --accent: #0a84ff;
  --pink: #BF3369;
  --sticky: #fdf39b;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --menubar-h: 28px;
  --radius-win: 12px;
  --shadow-win: 0 0 0 0.5px rgba(0, 0, 0, 0.18), 0 22px 60px rgba(0, 0, 0, 0.18), 0 6px 16px rgba(0, 0, 0, 0.08);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg) url("assets/images/wallpaper.png?v=2") center bottom / cover no-repeat;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ===== BARRE DE MENU ===== */
.menubar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: calc(var(--menubar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  font-size: 13px;
}
.menubar__left, .menubar__right { display: flex; align-items: center; gap: 4px; min-width: 0; }
.menubar__logo { width: 18px; height: auto; margin-right: 8px; }
.menubar__item {
  text-decoration: none;
  padding: 2px 9px;
  border-radius: 5px;
  white-space: nowrap;
}
.menubar__item:hover { background: rgba(0, 0, 0, 0.07); }
.menubar__item--bold { font-weight: 700; }
.menubar__right { gap: 14px; color: var(--ink); }
.menubar__glyph { width: 15px; height: 15px; }
.menubar__glyph--battery { width: 24px; height: 12px; }
.menubar__clock { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ===== BUREAU ===== */
.desktop {
  position: fixed;
  inset: calc(var(--menubar-h) + env(safe-area-inset-top, 0px)) 0 0 0;
}

/* Post-it */
.sticky {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 230px;
  padding: 14px 16px 18px;
  background: var(--sticky);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06), 0 10px 24px rgba(120, 100, 0, 0.12);
  font-size: 11.5px;
  line-height: 1.5;
  transform: rotate(-0.6deg);
}
.sticky__title { font-weight: 700; margin-bottom: 6px; }
.sticky__list li.is-done { text-decoration: line-through; opacity: 0.55; }

/* Titre central */
.welcome {
  position: absolute;
  left: 50%;
  top: 26%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  user-select: none;
}
.welcome__small {
  font-size: clamp(16px, 1.6vw, 22px);
  color: #55555a;
  letter-spacing: 0.2px;
}
.welcome__big {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(64px, 9vw, 132px);
  line-height: 0.95;
  letter-spacing: -1px;
  color: var(--ink);
}

/* Survol lettre par lettre */
.welcome__small,
.welcome__big { pointer-events: auto; }
.welcome__char {
  display: inline-block;
  transition: transform 0.6s cubic-bezier(0.2, 1.6, 0.4, 1), color 0.4s ease;
}
.welcome__char:hover {
  transform: translateY(-0.1em) rotate(-7deg) scale(1.06);
  color: var(--star);
  text-shadow: 0 0 1px rgba(60, 50, 10, 0.55), 0 4px 10px rgba(120, 100, 20, 0.18);
  transition-duration: 0.25s, 0.1s;
}
.welcome__char:has(+ .welcome__char:hover),
.welcome__char:hover + .welcome__char {
  transform: translateY(-0.045em) rotate(-3deg);
  color: #e6cf73;
  text-shadow: 0 0 1px rgba(60, 50, 10, 0.35);
  transition-duration: 0.3s, 0.15s;
}

/* Icônes */
.icon {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translateX(-50%);
}
.icon__btn {
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}
.icon__img {
  width: 58px;
  height: 46px;
  padding: 3px;
  border-radius: 5px;
  transition: transform 0.15s ease;
}
.icon__img--file { width: 44px; height: 52px; }
.icon__img--folder { width: 56px; height: 56px; padding: 0; object-fit: contain; }
.icon__img--trash { width: 52px; height: 52px; object-fit: contain; }
.icon__label {
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  padding: 1px 5px;
  border-radius: 4px;
  text-shadow: 0 0 6px var(--bg);
}
.icon__btn { user-select: none; -webkit-user-select: none; }
.icon.is-dragging { z-index: 5; }
.icon.is-dragging .icon__btn { cursor: grabbing; opacity: 0.85; }
.icon.is-dragging .icon__img { transform: none; }
.icon__btn:hover .icon__img { transform: translateY(-2px); }
.icon__btn.is-selected .icon__img,
.icon__btn:active .icon__img { background: rgba(0, 0, 0, 0.1); }
.icon__btn.is-selected .icon__label,
.icon__btn:active .icon__label { background: var(--accent); color: #fff; text-shadow: none; }

/* ===== FENÊTRES ===== */
.win {
  position: absolute;
  top: 0;
  left: 0;
  width: min(var(--w, 480px), calc(100vw - 24px));
  max-height: calc(100% - 110px);
  display: flex;
  flex-direction: column;
  background: var(--win);
  border-radius: var(--radius-win);
  box-shadow: var(--shadow-win);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.win.is-visible { opacity: 1; transform: none; }
.win[hidden] { display: none; }
.win:focus { outline: none; }
.win.is-dragging { transition: none; user-select: none; }
.win.is-max {
  left: 12px !important;
  top: 12px !important;
  width: calc(100vw - 24px);
  height: calc(100% - 110px);
  max-height: calc(100% - 110px) !important;
}

.win__bar {
  position: relative;
  flex: none;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--win-bar);
  border-bottom: 0.5px solid var(--line);
  cursor: default;
  touch-action: none;
}
.win__lights {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
}
.light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15);
  position: relative;
}
.light--close { background: #ff5f57; }
.light--min { background: #febc2e; }
.light--max { background: #28c840; }
.win:not(.is-front) .light { background: #d9d9d9; }
.win__lights:hover .light::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  color: rgba(0, 0, 0, 0.55);
}
.win__lights:hover .light--close::after { content: "×"; font-size: 11px; }
.win__lights:hover .light--min::after { content: "–"; }
.win__lights:hover .light--max::after { content: "+"; }
.win__lights:hover .light--close { background: #ff5f57; }
.win__lights:hover .light--min { background: #febc2e; }
.win__lights:hover .light--max { background: #28c840; }

.win__title {
  font-size: 13px;
  font-weight: 600;
  color: #4a4a4f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 140px);
  pointer-events: none;
}
.win__title--left { max-width: none; text-align: left; }
.win__body { overflow: auto; overscroll-behavior: contain; }

/* --- Document (TextEdit) --- */
.doc {
  padding: 22px 26px 26px;
  font-size: 13px;
  line-height: 1.6;
}
.doc p + p { margin-top: 10px; }
.doc__lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
  margin-bottom: 12px;
}
.doc__h { font-size: 13px; font-weight: 700; margin: 18px 0 6px; }
.doc__list li { padding-left: 14px; position: relative; }
.doc__list li + li { margin-top: 4px; }
.doc__more { margin-top: 16px !important; }
.doc__more a { color: var(--accent); text-decoration: none; font-weight: 500; }
.doc__more a:hover { text-decoration: underline; }
.doc__list li::before { content: "•"; position: absolute; left: 0; color: var(--pink); }

/* --- Photos --- */
.photo { background: #111; }
.photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.photo--avatar { background: linear-gradient(160deg, #fbdaeb, #f2afcc); }

/* --- Lecteur musique --- */
.win--music { background: transparent; box-shadow: none; overflow: visible; }
.music {
  position: relative;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(140deg, #8e1d3f, #5b1230);
  box-shadow: var(--shadow-win);
  touch-action: none;
  cursor: grab;
}
.music__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.12);
}
.music__cover {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fbdaeb, #BF3369);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding-bottom: 16px;
}
.music__cover span {
  width: 5px;
  height: 14px;
  border-radius: 3px;
  background: #fff;
  transform-origin: bottom;
  transform: scaleY(0.4);
}
.music.is-playing .music__cover span { animation: eq 0.9s ease-in-out infinite alternate; }
.music__cover span:nth-child(2) { animation-delay: -0.3s !important; }
.music__cover span:nth-child(3) { animation-delay: -0.6s !important; }
.music__cover span:nth-child(4) { animation-delay: -0.15s !important; }
.music__cover span:nth-child(5) { animation-delay: -0.45s !important; }
@keyframes eq { from { transform: scaleY(0.3); } to { transform: scaleY(2.2); } }
.music__info { min-width: 0; padding-top: 2px; padding-right: 18px; }
.music__label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; }
.music__track { font-weight: 700; font-size: 14px; margin-top: 2px; }
.music__artist { font-size: 11px; opacity: 0.75; margin-top: 2px; }
.music__progress {
  grid-column: 1 / 2;
  align-self: center;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.music__progress span { display: block; height: 100%; width: 35%; background: #fff; }
.music.is-playing .music__progress span { animation: progress 30s linear infinite; }
@keyframes progress { from { width: 0; } to { width: 100%; } }
.music__play {
  justify-self: end;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #5b1230;
  display: grid;
  place-items: center;
}
.music__play svg { width: 16px; height: 16px; }
.music__icon-pause, .music.is-playing .music__icon-play { display: none; }
.music.is-playing .music__icon-pause { display: block; }

/* --- Messages --- */
.chat { display: flex; flex-direction: column; min-height: 0; background: #fff; }
.chat__thread {
  flex: 1;
  min-height: 140px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px 8px;
}
.chat__meta { align-self: center; font-size: 10.5px; color: var(--ink-soft); margin-bottom: 4px; }
.bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 18px;
  line-height: 1.4;
  font-size: 13px;
  animation: pop 0.25s ease both;
}
.bubble a { color: inherit; font-weight: 600; }
.bubble--in { align-self: flex-start; background: #e9e9eb; color: var(--ink); border-bottom-left-radius: 5px; }
.bubble--out { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.bubble--typing { display: flex; gap: 4px; padding: 12px 14px; }
.bubble--typing span {
  width: 7px; height: 7px; border-radius: 50%; background: #9a9aa0;
  animation: blink 1s infinite;
}
.bubble--typing span:nth-child(2) { animation-delay: 0.15s; }
.bubble--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: none; } }
.chat__suggest {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 14px;
  border-top: 0.5px solid var(--line);
  background: #fafafa;
}
.chat__q {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 16px;
  background: #1d1d1f;
  color: #fff;
  font-size: 12.5px;
  text-align: left;
  transition: transform 0.15s ease, background 0.15s ease;
}
.chat__q::after {
  content: "+";
  width: 16px; height: 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.2);
  flex: none;
}
.chat__q:hover { transform: translateX(3px); background: #000; }
.chat__q:disabled { opacity: 0.4; cursor: default; transform: none; }

/* --- Finder --- */
.win__bar--finder { justify-content: flex-start; height: 52px; padding-left: 90px; }
.finder__heading { line-height: 1.2; }
.finder__sub { font-size: 11px; color: var(--ink-soft); }
.finder { display: grid; grid-template-columns: 150px 1fr; min-height: 0; flex: 1; }
.finder__side {
  padding: 10px 8px;
  background: #f2f2f4;
  border-right: 0.5px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: auto;
}
.finder__side-h { font-size: 10.5px; font-weight: 600; color: #9a9aa0; padding: 10px 8px 4px; }
.finder__side-h:first-child { padding-top: 2px; }
.finder__side-item {
  text-align: left;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12.5px;
}
.finder__side-item:hover { background: rgba(0, 0, 0, 0.05); }
.finder__side-item.is-active { background: rgba(0, 0, 0, 0.08); font-weight: 500; }
.finder__main { padding: 24px 18px; min-height: 260px; overflow: auto; min-height: 0; }
.finder__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.finder__grid .icon__btn { width: 100%; }

/* --- Aperçu image --- */
.shot { background: #fbdaeb; display: grid; place-items: center; padding: 18px; }
.shot img { width: 100%; height: auto; max-height: 60vh; object-fit: contain; }

/* Boutons façon macOS */
.mac-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.08);
  transition: filter 0.15s ease;
}
.mac-btn:hover { filter: brightness(0.96); }
.mac-btn--primary { background: var(--accent); border-color: transparent; color: #fff; }

/* --- CV --- */
.cv-wrap { background: #8a8a8f; padding: 18px; }
.cv {
  background: #fff;
  padding: 30px 32px 34px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  line-height: 1.5;
}
.cv__head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.cv__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #fbdaeb; }
.cv__name { font-family: var(--font-serif); font-size: 30px; line-height: 1; }
.cv__role { color: var(--ink-soft); margin-top: 4px; }
.cv__h {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--pink);
  margin: 22px 0 10px;
}
.cv__item { display: grid; grid-template-columns: 120px 1fr; gap: 14px; }
.cv__item + .cv__item { margin-top: 12px; }
.cv__date { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cv__title { font-weight: 600; }
.cv__place { color: var(--ink-soft); }
.cv__desc { margin-top: 3px; color: #3a3a3f; }
.cv__sub { font-weight: 600; margin: 10px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips li {
  padding: 3px 9px;
  border-radius: 12px;
  background: #fbdaeb;
  color: #7a1f43;
  font-size: 11px;
  font-weight: 500;
}
.chips--soft li { background: #f1f1f3; color: var(--ink); }
.chips--tools li { background: #e8f1ff; color: #0b4fa8; }
/* Contact : carte de visite sur papier */
.win--card { background: transparent; }
.contact-card {
  position: relative;
  height: 310px;
  padding: 30px 30px 0;
  overflow: hidden;
  border-radius: inherit;
  background-color: #f7f7f6;
  background-image:
    radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  cursor: default;
  touch-action: none;
  user-select: none;
}
.contact-card__close {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.contact-card:hover .contact-card__close,
.contact-card__close:focus-visible { opacity: 1; }
.win:not(.is-front) .contact-card__close { background: #ff5f57; }
.contact-card__title {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: #3a3a3c;
}
.contact-card__lead {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.35;
  color: #8a8a8e;
}
.contact-card__avatar {
  position: absolute;
  left: 22px;
  bottom: -70px;
  width: auto;
  height: 250px;
  pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}
.contact-card__links {
  position: absolute;
  right: 28px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 18px;
  color: #3a3a3c;
}
.contact-card__links a { color: inherit; text-decoration: none; }
.contact-card__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Corbeille --- */
.trash { padding: 18px; }
.trash__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px 8px; }
.trash__grid li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.trash__grid svg { width: 38px; height: 48px; }
.trash__grid span { font-size: 11px; line-height: 1.25; word-break: break-word; }
.trash__foot { margin-top: 18px; text-align: center; font-size: 11px; color: var(--ink-soft); }

/* ===== DOCK ===== */
.dock {
  --dock-icon: 48px;
  position: fixed;
  left: 50%;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 900;
  max-width: calc(100vw - 16px);
  border-radius: 22px;
}

/* Verre du dock macOS : transparent et doux */
.dock::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--grow, 0px) / -2);
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(8px) saturate(105%);
  -webkit-backdrop-filter: blur(8px) saturate(105%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 0.5px rgba(0, 0, 0, 0.1),
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Liseré discret */
.dock::after {
  content: "";
  position: absolute;
  inset: 0 calc(var(--grow, 0px) / -2);
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.15) 35%,
    rgba(255, 255, 255, 0.08) 70%,
    rgba(255, 255, 255, 0.2) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.dock__list {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 6px 8px;
  border-radius: inherit;
}
.dock__sep { width: 1px; align-self: stretch; margin: 6px 4px 10px; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.18) 20%, rgba(0, 0, 0, 0.18) 80%, rgba(0, 0, 0, 0)); box-shadow: 1px 0 0 rgba(255, 255, 255, 0.6); }
.dock__item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: calc(var(--dock-icon) + 6px);
  padding-bottom: 6px;
  text-decoration: none;
}
.dock__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--dock-icon);
  height: var(--dock-icon);
  border-radius: 11px;
  overflow: hidden;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  transform-origin: bottom;
}
/* Grossissement façon macOS (piloté par dock.js) */
.dock.is-magnify .dock__icon { transform: scale(var(--s, 1)); transition: none; will-change: transform; }
.dock.is-magnify .dock__list > li { will-change: transform; }
.dock.is-magnify .dock__item:hover .dock__icon,
.dock.is-magnify .dock__item:focus-visible .dock__icon { transform: scale(var(--s, 1)); }
.dock__icon svg { width: 100%; height: 100%; }
.dock__item:hover .dock__icon,
.dock__item:focus-visible .dock__icon { transform: scale(1.28) translateY(-6px); }
.dock__item::before {
  content: "Ouvre moi";
  position: absolute;
  bottom: calc(var(--size, var(--dock-icon)) + 20px);
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(240, 240, 240, 0.95);
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.dock__item:hover::before { opacity: 1; }
.dock__item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #3a3a3c;
  opacity: 0;
}
.dock__item.is-open::after { opacity: 1; }
.dock__item.is-bouncing .dock__icon { animation: bounce 0.5s ease; }
@keyframes bounce { 40% { transform: translateY(-14px); } }

.dock__icon--finder,
.dock__icon--messages,
.dock__icon--notes,
.dock__icon--photos,
.dock__icon--music,
.dock__icon--mail,
.dock__icon--linkedin,
.dock__icon--instagram { background: none; box-shadow: none; border-radius: 0; }
.dock__icon--finder img,
.dock__icon--messages img,
.dock__icon--notes img,
.dock__icon--photos img,
.dock__icon--music img,
.dock__icon--mail img,
.dock__icon--linkedin img,
.dock__icon--instagram img { display: block; width: 100%; height: 100%; }

.dock__icon--trash { background: none; box-shadow: none; border-radius: 0; }
.dock__icon--trash img { display: block; width: 100%; height: 100%; }

/* Icônes d'apps du dock (Safari, Contacts, Figma, Slack) */
.dock__icon--app { background: none; box-shadow: none; border-radius: 0; }
.dock__icon--app img { display: block; width: 100%; height: 100%; }

@media (max-width: 1240px) {
  .legal { display: none; }
  .dock__list { gap: 4px; }
  .dock { --dock-icon: 42px; }
}

/* ===== Liens légaux ===== */
.legal {
  position: fixed;
  right: 14px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 10.5px;
  color: var(--ink-soft);
}
.legal > span { display: none; }
.legal a { text-decoration: none; }
.legal a:hover { text-decoration: underline; }

/* ===== TABLETTE ===== */
@media (max-width: 1100px) {
  .menubar__glyph { display: none; }
  .legal { display: none; }
  .finder { grid-template-columns: 1fr; }
  .finder__side { display: none; }
  .win__bar--finder { padding-left: 90px; }
}

/* ===== MOBILE ===== */
@media (max-width: 760px) {
  body { overflow: auto; }

  .menubar { padding-inline: 10px; }
  .menubar__item--bold { display: none; }
  .menubar__item { padding: 2px 6px; }
  .menubar__right { gap: 8px; font-size: 12px; }

  .desktop {
    position: relative;
    inset: auto;
    min-height: 100dvh;
    padding: calc(var(--menubar-h) + env(safe-area-inset-top, 0px) + 24px) 16px 120px;
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .welcome {
    position: static;
    transform: none;
    order: 1;
  }
  .welcome__big { font-size: clamp(64px, 20vw, 96px); }
  .icons {
    order: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 4px;
  }
  .icon { position: static; transform: none; display: flex; justify-content: center; }
  .icon__btn { width: 100%; }
  .sticky {
    order: 3;
    position: static;
    width: auto;
    max-width: 280px;
    align-self: center;
  }

  /* Fenêtres plein écran façon sheet */
  .win {
    position: fixed;
    left: 8px !important;
    top: calc(var(--menubar-h) + env(safe-area-inset-top, 0px) + 8px) !important;
    width: calc(100vw - 16px);
    max-height: calc(100dvh - var(--menubar-h) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 96px);
    transform: translateY(24px);
  }
  .win.is-visible { transform: none; }
  .win.is-max { height: auto; }
  .win--photo { width: min(320px, calc(100vw - 16px)); left: 50% !important; margin-left: calc(min(320px, calc(100vw - 16px)) / -2); }
  .win--music { top: auto !important; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .music { cursor: default; }
  .win__bar--finder { padding-left: 80px; }
  .contact-card { height: 300px; padding: 26px 22px 0; }
  .contact-card__close { opacity: 1; }
  .contact-card__avatar { height: 190px; left: 10px; bottom: -50px; }
  .contact-card__links { right: 20px; bottom: 20px; font-size: 15px; }
  .cv-wrap { padding: 8px; }
  .cv { padding: 20px 18px; }
  .cv__item { grid-template-columns: 1fr; gap: 2px; }

  .dock__list { gap: 4px; padding: 5px 6px; overflow-x: auto; scrollbar-width: none; }
  .dock__list::-webkit-scrollbar { display: none; }
  .dock { --dock-icon: 40px; }
  .dock__icon { border-radius: 9px; }
  .dock__item:hover .dock__icon { transform: none; }
  .dock__item::before { display: none; }
}

@media (max-width: 430px) {
  .dock { --dock-icon: 33px; }
  .dock__icon { border-radius: 8px; }
  .dock__list { gap: 3px; }
  .dock__sep { margin-inline: 1px; }
}

@media (max-width: 380px) {
  .menubar__glyph--battery { display: none; }
  .icons { grid-template-columns: repeat(3, 1fr); }
  .dock { --dock-icon: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome__char,
  .welcome__char:hover,
  .welcome__char:hover + .welcome__char,
  .welcome__char:has(+ .welcome__char:hover) { transform: none; }

  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ===== Démarrage façon Mac ===== */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 64px;
  background: #000;
  transition: opacity 0.5s ease;
}
.boot.is-done { opacity: 0; pointer-events: none; }
html.is-booting body { overflow: hidden; }
.boot__logo {
  width: 92px;
  height: auto;
  animation: boot-logo 0.6s ease both;
}
@keyframes boot-logo { from { opacity: 0; } }
.boot__bar {
  width: 190px;
  height: 5px;
  border-radius: 99px;
  background: #3a3a3c;
  overflow: hidden;
  animation: boot-logo 0.4s 0.5s ease both;
}
.boot__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  animation: boot-progress 1.9s 0.5s both;
  transition: width 0.3s ease;
}
/* Avance par à-coups, comme le vrai démarrage */
@keyframes boot-progress {
  0% { width: 0; }
  20% { width: 12%; }
  35% { width: 18%; }
  55% { width: 46%; }
  70% { width: 52%; }
  100% { width: 78%; }
}
.boot__fill[style*="100%"] { animation: none; }
@media (max-width: 760px) {
  .boot__logo { width: 80px; }
  .boot__bar { width: 150px; }
}
