/* MMCore — palette calme « crépuscule »
   nuit #0E1720 · surface #15222C · texte #93A4AE · clair #E3E9EC
   sable #E2C39A (accent) · brume #8FC1BA (lumière du curseur) */

:root {
  --nuit: #0E1720;
  --surface: #15222C;
  --texte: #93A4AE;
  --clair: #E3E9EC;
  --sable: #E2C39A;
  --brume: #8FC1BA;
  --ligne: rgba(227, 233, 236, .1);
}

html { scroll-padding-top: 4rem; color-scheme: dark; }
body { overflow-x: clip; }
[hidden] { display: none !important; }
::selection { background: var(--sable); color: var(--nuit); }
:focus-visible { outline: 2px solid var(--sable); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 80;
  background: var(--sable); color: var(--nuit); padding: .6rem 1rem; border-radius: .5rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Lumière douce qui suit la souris (ordinateur) */
.spotlight {
  pointer-events: none; position: fixed; inset: 0; z-index: 30; transition: background .3s;
  background: radial-gradient(600px at var(--x, 50%) var(--y, -20%), rgba(143, 193, 186, .07), transparent 80%);
}
@media (hover: none) { .spotlight { display: none; } }

/* ---------- Colonne gauche ---------- */
.brand { font-size: clamp(2.4rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: -.03em; color: var(--clair); line-height: 1; }
.brand-mark { /* même fichier que l'icône de l'onglet : assets/favicon.svg */
  width: .9em; height: .9em; flex: none; border-radius: .25em;
  box-shadow: 0 0 0 1px rgba(227, 233, 236, .12); /* détache le carré sombre du fond */
}
.status-dot { position: relative; width: .5rem; height: .5rem; border-radius: 50%; background: var(--brume); }
.status-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2.4s ease-out infinite; }
@keyframes ping { to { transform: scale(2.6); opacity: 0; } }

.nav-item { display: flex; align-items: center; padding-block: .75rem; }
.nav-line { width: 2rem; height: 1px; margin-inline-end: 1rem; background: var(--texte); transition: width .25s, background-color .25s; }
.nav-text { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--texte); transition: color .25s; }
.nav-item:hover .nav-line, .nav-item:focus-visible .nav-line, .nav-item.is-active .nav-line { width: 4rem; background: var(--clair); }
.nav-item:hover .nav-text, .nav-item:focus-visible .nav-text, .nav-item.is-active .nav-text { color: var(--clair); }

.lang-switch { padding: .2rem; border-radius: 999px; border: 1px solid var(--ligne); background: rgba(21, 34, 44, .6); }
.lang-switch button {
  font-size: .78rem; font-weight: 600; letter-spacing: .06em; padding: .35rem .8rem; border-radius: 999px; color: var(--texte);
  transition: background-color .2s, color .2s;
}
.lang-switch button:hover { color: var(--clair); }
.lang-switch button[aria-pressed="true"] { background: var(--sable); color: var(--nuit); }

.social { display: block; color: var(--texte); transition: color .2s; }
.social:hover { color: var(--clair); }

/* ---------- Colonne droite ---------- */
.section { margin-bottom: 6rem; }
@media (min-width: 1024px) { .section { margin-bottom: 9rem; } }

/* Titre de section collant sur mobile (masqué visuellement sur grand écran, lu par les lecteurs d'écran) */
.section-sticky {
  position: sticky; top: 0; z-index: 20; margin: 0 -1.5rem 1rem; padding: 1.25rem 1.5rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--clair);
  background: rgba(14, 23, 32, .75); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
@media (min-width: 768px) { .section-sticky { margin-inline: -3rem; padding-inline: 3rem; } }
@media (min-width: 1024px) {
  .section-sticky { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Grand titre de section visible (Projets) */
.big-title { font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--clair); margin-bottom: 2rem; }
@media (min-width: 1024px) { .big-title { margin-bottom: 2.5rem; } }
.mini-title { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--clair); }

/* Étapes « comment on travaille » (vraie séquence, donc numérotée) */
.steps { display: grid; gap: 1rem; margin-top: 1.25rem; counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding: 1.1rem 1.1rem 1.2rem; border-radius: .75rem; background: rgba(21, 34, 44, .55); border: 1px solid var(--ligne); }
@media (min-width: 640px) {
  .step:not(:last-child)::after { /* fil qui relie les étapes */
    content: ""; position: absolute; top: 1.95rem; inset-inline-start: calc(100% + 1px); width: calc(1rem - 2px); height: 1px; background: rgba(226, 195, 154, .35);
  }
}
.step-num {
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-bottom: .8rem; border-radius: 50%;
  font-size: .8rem; font-weight: 700; color: var(--sable); border: 1px solid rgba(226, 195, 154, .4);
}

.tag {
  display: inline-flex; align-items: center; font-size: .75rem; font-weight: 500; line-height: 1.25rem;
  padding: .2rem .75rem; border-radius: 999px; background: rgba(226, 195, 154, .1); color: var(--sable);
}

/* Liste de cartes : au survol, les autres s'estompent (comme la référence) */
.card-list > li + li { margin-top: 1rem; }
.card {
  position: relative; display: grid; gap: .5rem; padding: 1rem; margin-inline: -1rem; border-radius: .6rem;
  transition: background-color .25s, box-shadow .25s, opacity .25s;
}
@media (min-width: 640px) { .card { grid-template-columns: 8rem 1fr; gap: 2rem; } }
@media (min-width: 1024px) {
  .card:hover { background: rgba(21, 34, 44, .6); box-shadow: inset 0 1px 0 rgba(148, 163, 184, .1); }
  .card-list:hover > li > .card:not(:hover) { opacity: .5; }
}
.card-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .8rem; color: var(--brume); background: rgba(143, 193, 186, .08); border: 1px solid rgba(143, 193, 186, .18); }
@media (min-width: 640px) { .card { grid-template-columns: 3rem 1fr; gap: 1.5rem; } }
.card h3 { color: var(--clair); font-weight: 600; line-height: 1.35; transition: color .25s; }
.card:hover h3 { color: var(--sable); }
.card p { margin-top: .4rem; font-size: .95rem; line-height: 1.6; }

/* ---------- Vitrine projet ---------- */
.project { margin-bottom: 3.5rem; }
.stage {
  position: relative; border-radius: 1rem; padding: 1.25rem 1.25rem 0; overflow: hidden;
  background:
    radial-gradient(28rem 16rem at 80% 0%, rgba(143, 193, 186, .14), transparent 70%),
    radial-gradient(24rem 14rem at 0% 100%, rgba(226, 195, 154, .1), transparent 70%),
    var(--surface);
  border: 1px solid var(--ligne);
}
@media (min-width: 640px) { .stage { padding: 1.75rem 1.75rem 0; } }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.view-switch { display: inline-flex; padding: .2rem; border-radius: 999px; background: rgba(14, 23, 32, .6); border: 1px solid var(--ligne); }
.view-switch button { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; padding: .4rem .85rem; border-radius: 999px; color: var(--texte); transition: background-color .2s, color .2s; }
.view-switch button[aria-pressed="true"] { background: var(--clair); color: var(--nuit); }
.live-link { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 600; color: var(--clair); }
.live-link:hover { color: var(--sable); }
.live-dot { width: .45rem; height: .45rem; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .2); }

/* Sélecteur de variantes de design (affiché seulement si un projet en a 2 ou plus) */
.variant-switch { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .2rem; margin-bottom: .9rem; border-radius: 999px; background: rgba(21, 34, 44, .6); border: 1px solid var(--ligne); }
.variant-switch button { font-size: .82rem; font-weight: 600; padding: .4rem 1rem; border-radius: 999px; color: var(--texte); transition: background-color .2s, color .2s; }
.variant-switch button:hover { color: var(--clair); }
.variant-switch button[aria-pressed="true"] { background: var(--sable); color: var(--nuit); }
.variant-note { margin-top: .9rem; font-size: .9rem; }

.device { display: none; }
.device.is-shown { display: block; animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } }

/* Cadre navigateur */
.browser { border-radius: .6rem .6rem 0 0; overflow: hidden; border: 1px solid rgba(227, 233, 236, .12); border-bottom: 0; background: #0A1118; }
.browser-bar { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; background: #111C25; }
.browser-dots { display: flex; gap: .3rem; }
.browser-dots i { width: .55rem; height: .55rem; border-radius: 50%; background: rgba(227, 233, 236, .18); }
.browser-url { flex: 1; font-size: .72rem; color: var(--texte); background: rgba(227, 233, 236, .06); border-radius: 999px; padding: .2rem .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen { position: relative; overflow: hidden; }
.browser .screen { aspect-ratio: 16 / 10; }

/* Cadre téléphone */
.phone { width: min(15.5rem, 70%); margin-inline: auto; border: 7px solid #05090D; border-bottom: 0; border-radius: 2.2rem 2.2rem 0 0; overflow: hidden; background: #05090D; box-shadow: 0 0 0 1px rgba(227, 233, 236, .12); }
.phone .screen { aspect-ratio: 9 / 16.5; border-radius: 1.6rem 1.6rem 0 0; }

/* La capture pleine page défile doucement ; pause au survol */
.pan { display: block; width: 100%; height: auto; will-change: transform; }
.has-pan .pan { animation: pan var(--dur, 40s) ease-in-out infinite alternate; }
.screen:hover .pan { animation-play-state: paused; }
@keyframes pan { 0%, 6% { transform: translateY(0); } 94%, 100% { transform: translateY(var(--dist, 0)); } }
.pan-hint { position: absolute; inset-inline-end: .6rem; bottom: .6rem; font-size: .7rem; padding: .25rem .6rem; border-radius: 999px; background: rgba(14, 23, 32, .7); color: var(--clair); opacity: 0; transition: opacity .25s; pointer-events: none; }
.screen:hover .pan-hint { opacity: 1; }

.project-body { margin-top: 1.5rem; }
.project-title { display: inline-flex; align-items: baseline; gap: .5rem; font-size: 1.35rem; font-weight: 600; color: var(--clair); transition: color .2s; }
.project-title:hover { color: var(--sable); }
.project-meta { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

.thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1.5rem; }
.thumbs figure { margin: 0; border-radius: .5rem; overflow: hidden; border: 1px solid var(--ligne); aspect-ratio: 16 / 10; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.thumbs figure:hover img { transform: scale(1.04); }

.soon-card { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-radius: .75rem; border: 1px dashed rgba(227, 233, 236, .18); }

/* ---------- Contact ---------- */
.contact-card { padding: 1.75rem; border-radius: 1rem; background: var(--surface); border: 1px solid var(--ligne); }
@media (min-width: 640px) { .contact-card { padding: 2.5rem; } }
.btn { display: inline-flex; align-items: center; gap: .6rem; align-self: flex-start; padding: .8rem 1.3rem; border-radius: 999px; background: var(--sable); color: var(--nuit); font-weight: 600; white-space: nowrap; transition: background-color .2s, transform .2s; }
.btn:hover { background: #EDD3AE; transform: translateY(-1px); }
.link { color: var(--clair); text-decoration: underline; text-decoration-color: rgba(226, 195, 154, .5); text-underline-offset: 4px; word-break: break-all; }
.link:hover { color: var(--sable); }

@media (prefers-reduced-motion: reduce) {
  .has-pan .pan { animation: none; }
  .has-pan .screen { overflow-y: auto; } /* on peut faire défiler la capture soi-même */
  .status-dot::after { animation: none; }
  .device.is-shown { animation: none; }
}
