/* ───────────── PAGE PROJET ─────────────
   Utilise les couleurs et polices de ../style.css */

.page-projet .topbar { position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.page-projet .topbar a.back { display: inline-flex; gap: 8px; align-items: center; }
.page-projet .topbar a.back:hover { color: var(--accent); }

.p {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

/* apparition en douceur */
.reveal { opacity: 0; transform: translateY(24px); animation: rise 0.8s cubic-bezier(.2,.8,.2,1) forwards; }
.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── titre ── */
.p-hero { padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 3vw, 40px); }
.p-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  color: var(--muted);
  margin-bottom: 18px;
}
.p-hero__meta b { color: var(--ink); font-weight: 500; }
.p-hero__meta::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  border: 1px solid var(--line);
  align-self: center;
}
.p-title {
  position: relative;
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  font-size: clamp(40px, 9vw, 140px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

/* ── image principale ── */
.p-cover {
  background: var(--c);
  border-radius: 22px;
  padding: clamp(16px, 4vw, 56px);
  display: grid;
  place-items: center;
  min-height: min(70svh, 640px);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}
.p-cover img {
  max-width: 100%;
  max-height: min(64svh, 580px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.p-cover.is-logo img { box-shadow: none; max-height: 300px; }

/* ── intro ── */
.p-intro {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(48px, 8vw, 110px) 0;
  border-bottom: 1px solid var(--line);
}
.p-lead {
  font-weight: 600;
  font-stretch: 105%;
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.3;
}
.p-facts { display: grid; gap: 22px; align-content: start; }
.p-facts dt { color: var(--muted); margin-bottom: 6px; }
.p-facts dd { font-family: var(--display); font-size: 17px; text-transform: none; letter-spacing: 0; }
.p-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.p-tags li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.p-link {
  display: inline-flex;
  margin-top: 6px;
  background: var(--ink);
  color: var(--paper);
  padding: 13px 20px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.p-link:hover { background: var(--accent); }

/* ── titres de section ── */
.p-h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  font-size: clamp(26px, 4vw, 52px);
  line-height: 1;
  margin-bottom: 28px;
}
.p-h2 span { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0.08em; }

/* ── points forts ── */
.p-features { padding: clamp(48px, 8vw, 110px) 0; border-bottom: 1px solid var(--line); }
.p-features ol { list-style: none; counter-reset: f; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.p-features li {
  counter-increment: f;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.45;
}
.p-features li::before {
  content: counter(f, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  padding-top: 4px;
}

/* ── galerie ── */
.p-gallery { padding: clamp(48px, 8vw, 110px) 0; }
.p-gallery__tall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 42vw), 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.p-gallery__wide {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.p-gallery__wide figure:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.p-gallery figure { margin: 0; }
.p-gallery a {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: transform 0.3s, box-shadow 0.3s;
}
.p-gallery a:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.14); }
.p-gallery img { display: block; width: 100%; height: auto; }
.p-gallery__wide img { aspect-ratio: 16 / 10; object-fit: contain; }
.p-gallery figcaption { margin-top: 10px; color: var(--muted); }

/* ── projet suivant ── */
.p-next {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  padding: 0 0 clamp(48px, 8vw, 96px);
}
.p-next a {
  border-radius: 22px;
  padding: clamp(20px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 200px;
  transition: transform 0.3s;
}
.p-next a:hover { transform: translateY(-4px); }
.p-next__prev { border: 1px solid var(--line); }
.p-next__next { background: var(--c); color: var(--k); }
.p-next__name {
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  font-size: clamp(24px, 4.4vw, 60px);
  line-height: 0.95;
}
.p-next__prev .p-next__name { font-size: clamp(18px, 2.2vw, 28px); }

.p-missing { padding: 20vh 0; text-align: center; display: grid; gap: 24px; justify-items: center; }

@media (max-width: 760px) {
  .p-intro { grid-template-columns: 1fr; }
  .p-features ol { grid-template-columns: 1fr; }
  .p-gallery__wide { grid-template-columns: 1fr; }
  .p-next { grid-template-columns: 1fr; }
  .p-next__prev { order: 2; }
  .p-cover { min-height: 0; border-radius: 16px; }
  .p-hero__meta { gap: 6px 16px; }
  .p-intro, .p-features, .p-gallery { padding: 48px 0; }
  .p-features li { font-size: 16px; grid-template-columns: 36px 1fr; padding: 14px 0; }
  .p-next a { min-height: 0; gap: 24px; border-radius: 16px; }
  .p-next__prev .p-next__name { font-size: 20px; }
  .page-projet .sound__label { display: none; }
}

@media (hover: none) {
  .p-gallery a:hover, .p-next a:hover { transform: none; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* ── console rétro (LevelUp-Bot) ── */
.p-console {
  margin: clamp(24px, 4vw, 48px) 0;
  background: #0A0F1E;
  color: #F2F1EC;
  border: 4px solid var(--ink);
  border-radius: 10px;
  box-shadow: 10px 10px 0 var(--c);
  padding: clamp(20px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-family: var(--mono);
}
.p-console__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: #8FA6E8; }
.p-console__live { color: #7CFF9E; }
.p-console__log { list-style: none; display: flex; flex-direction: column; gap: 12px; min-height: 260px; font-size: clamp(14px, 1.5vw, 18px); line-height: 1.4; }
.p-console__log li { opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }
.p-console__log li.is-on { opacity: 1; transform: none; }
.p-console__log time { color: #8FA6E8; margin-right: 12px; }
.p-console__log time::before { content: "["; }
.p-console__log time::after { content: "]"; }
.p-console__log em { font-style: normal; color: #FFE36A; }
.p-console__log strong { font-weight: 500; color: #7CFF9E; }
.p-console__log li:last-child.is-on::after { content: " ▌"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.p-console__xp { display: flex; flex-direction: column; gap: 10px; }
.p-console__xp .mono { color: #FFE36A; }
.p-console__bar { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 4px; }
.p-console__bar i { height: 16px; background: #26304F; transition: background 0.15s; }
.p-console__bar i.is-on { background: #FFE36A; }

/* ── blocs communs aux autres projets ── */
.p-map, .p-browser, .p-tiles, .p-drop, .p-split, .p-eq, .p-shop { margin: clamp(24px, 4vw, 48px) 0; }

/* Orbisol : carte en points jour / nuit */
.p-map {
  position: relative;
  aspect-ratio: 16 / 8;
  background: #111;
  border-radius: 28px;
  overflow: hidden;
}
.p-map__dots i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #2A2A2E; }
.p-map__dots i.on { background: #F2F1EC; }
.p-map__night {
  position: absolute; inset: 0 54% 0 0;
  background: rgba(0,0,0,0.55);
  border-right: 2px solid var(--c);
}
.p-map__city { position: absolute; display: flex; align-items: center; gap: 10px; }
.p-map__city.is-right { flex-direction: row-reverse; transform: translateX(calc(-100% + 14px)); }
.p-map__city b { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 30%, transparent); }
.p-map__city span { color: #F2F1EC; background: rgba(17,17,17,0.85); padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.p-map__city em { font-style: normal; }
.p-map__city .short { display: none; }
.p-map__legend { position: absolute; left: 24px; bottom: 20px; color: #A8A8A4; }

/* Orbisol, le site : navigateur + fiche technique */
.p-browser { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; }
.p-browser__win { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.p-browser__bar { height: 42px; border-bottom: 1.5px solid var(--ink); display: flex; align-items: center; gap: 8px; padding: 0 16px; }
.p-browser__bar i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink); }
.p-browser__bar span { margin-left: 14px; flex: 1; height: 24px; border-radius: 99px; background: var(--bg); display: flex; align-items: center; padding: 0 12px; }
.p-browser__page { flex: 1; background: #FF8A00; padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 340px; }
.p-browser__big { font-weight: 900; font-stretch: 120%; text-transform: uppercase; font-size: clamp(36px, 5.5vw, 68px); line-height: 0.9; color: var(--ink); }
.p-browser__cards { display: flex; gap: 14px; }
.p-browser__cards i { flex: 1; height: 120px; border-radius: 16px; background: var(--ink); }
.p-browser__cards i:nth-child(2) { background: var(--paper); }
.p-spec { display: grid; gap: 10px; align-content: start; }
.p-spec dt { color: var(--muted); margin-top: 6px; }
.p-spec dd { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 14px 16px; font-size: 18px; font-weight: 500; }
.p-spec dd.hot { background: #FF8A00; color: var(--ink); }

/* La suite Tout : lanceur d'applications */
.p-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 14px; }
.p-tile { background: var(--t, var(--paper)); color: var(--tk, var(--ink)); border-radius: 26px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; }
.p-tile .mono { opacity: 0.8; }
.p-tile b { font-weight: 900; font-stretch: 115%; font-size: 34px; line-height: 0.95; }
.p-tile b.small { font-size: 20px; font-weight: 700; font-stretch: 100%; line-height: 1.2; }
.p-tile--big { grid-column: span 2; grid-row: span 2; }
.p-tile--big b { font-size: clamp(48px, 7vw, 88px); }
.p-tile--soon { background: transparent; border: 2px dashed #2B2FBF; color: #2B2FBF; }

/* ToutConvert : zone de dépôt + formats */
.p-drop { background: var(--c); color: #F2F1EC; border-radius: 28px; padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 24px; }
.p-drop__zone { border: 3px dashed rgba(242,241,236,0.7); border-radius: 22px; padding: clamp(32px, 6vw, 72px) 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.p-drop__big { font-weight: 900; font-stretch: 120%; text-transform: uppercase; font-size: clamp(32px, 5vw, 56px); line-height: 0.95; }
.p-drop__flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; font-size: 15px; font-weight: 500; }
.p-drop__in, .p-drop__out { display: flex; flex-wrap: wrap; gap: 8px; }
.p-drop__in { justify-content: flex-end; }
.p-drop__in span { background: #F2F1EC; color: var(--ink); padding: 9px 14px; border-radius: 10px; }
.p-drop__out span { background: var(--ink); color: #F2F1EC; padding: 9px 14px; border-radius: 10px; }
.p-drop__arrow { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 22px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }

/* ToutConvert extension : clair / sombre + popup */
.p-split {
  position: relative;
  min-height: 560px;
  border-radius: 28px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  background: linear-gradient(to right, #FFFFFF 50%, #111111 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 16px 40px;
}
.p-split__label { position: absolute; left: 22px; top: 20px; }
.p-split__label--dark { left: auto; right: 22px; color: #F2F1EC; }
.p-popup { width: min(100%, 380px); border-radius: 24px; background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,0.35); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.p-popup__head { display: flex; justify-content: space-between; align-items: center; }
.p-popup__head b { font-size: 22px; font-weight: 900; font-stretch: 115%; }
.p-popup__head span { font-size: 10px; padding: 4px 8px; border-radius: 99px; background: #0E7C78; color: #F2F1EC; }
.p-popup__drop { height: 110px; border: 2px dashed #0E7C78; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #0E7C78; }
.p-popup__lbl { color: var(--muted); }
.p-popup__q { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; font-weight: 700; font-size: 14px; }
.p-popup__q span { padding: 10px 0; border-radius: 10px; border: 1.5px solid var(--ink); }
.p-popup__q span.on { background: var(--ink); color: var(--paper); }
.p-popup__go { min-height: 48px; border-radius: 999px; background: #0E7C78; color: #F2F1EC; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* Coinly : l'équation géante + familles qui défilent */
.p-eq { background: var(--c); color: #F2F1EC; border-radius: 28px; padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 32px; align-items: center; }
.p-eq__main { display: flex; flex-direction: column; line-height: 0.85; }
.p-eq__a { font-weight: 900; font-stretch: 120%; font-size: clamp(64px, 12vw, 150px); letter-spacing: -0.04em; }
.p-eq__eq { font-weight: 300; font-size: clamp(64px, 12vw, 150px); color: var(--k); }
.p-eq__b { font-weight: 900; font-stretch: 115%; font-size: clamp(64px, 12vw, 150px); color: #A9AECB; animation: pulse 2.5s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.p-eq__list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.p-eq__list li { padding: 18px 20px; border-radius: 16px; background: rgba(255,255,255,0.06); font-size: 22px; font-weight: 800; animation: spot 10s infinite; }
.p-eq__list li:nth-child(2) { animation-delay: 2s; }
.p-eq__list li:nth-child(3) { animation-delay: 4s; }
.p-eq__list li:nth-child(4) { animation-delay: 6s; }
.p-eq__list li:nth-child(5) { animation-delay: 8s; }
@keyframes spot { 0%, 18% { background: var(--k); color: var(--c); } 22%, 100% { background: rgba(255,255,255,0.06); color: #F2F1EC; } }

/* Coinly extensions : boutique + bulle */
.p-shop { position: relative; background: #FFFFFF; border: 1.5px solid var(--ink); border-radius: 22px; overflow: hidden; }
.p-shop__bar { height: 46px; border-bottom: 1.5px solid var(--ink); display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.p-shop__bar span { flex: 1; height: 26px; border-radius: 99px; background: var(--bg); display: flex; align-items: center; padding: 0 12px; }
.p-shop__bar b { width: 30px; height: 30px; border-radius: 8px; background: var(--c); color: #FFF; display: flex; align-items: center; justify-content: center; }
.p-shop__page { padding: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 32px; }
.p-shop__img { height: 280px; border-radius: 18px; background: var(--bg); }
.p-shop__txt { display: flex; flex-direction: column; gap: 14px; }
.p-shop__txt i { height: 16px; width: 80%; border-radius: 6px; background: var(--bg); }
.p-shop__txt i.short { width: 55%; }
.p-shop__price { margin-top: auto; align-self: flex-start; font-size: clamp(28px, 4vw, 44px); font-weight: 900; background: #FFE36A; padding: 2px 10px; }
.p-shop__txt i.p-shop__btn { height: 50px; width: 200px; border-radius: 999px; background: var(--ink); }
.p-bubble {
  position: absolute; left: clamp(160px, 38%, 420px); top: 110px;
  width: min(320px, 70%);
  background: var(--c); color: #F2F1EC; border-radius: 20px; padding: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; gap: 12px;
  animation: float 3s ease-in-out infinite;
}
.p-bubble .mono { color: #A9AECB; }
.p-bubble b { font-size: 40px; font-weight: 900; line-height: 1; }
.p-bubble__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.p-bubble__chips span { padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,0.12); color: #F2F1EC; }
@keyframes float { 50% { transform: translateY(-8px); } }

@media (max-width: 700px) {
  .p-map { aspect-ratio: 4 / 3; }
  .p-map__city span { font-size: 9px; padding: 4px 6px; }
  .p-map__city .full { display: none; }
  .p-map__city .short { display: inline; }
  .p-browser, .p-eq { grid-template-columns: 1fr; }
  .p-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; }
  .p-tile b { font-size: 26px; }
  .p-drop__flow { grid-template-columns: 1fr; justify-items: center; }
  .p-drop__in { justify-content: center; }
  .p-drop__arrow { transform: rotate(90deg); animation: none; }
  .p-shop__page { grid-template-columns: 1fr; }
  .p-shop__img { height: 160px; }
  .p-bubble { left: 16px; right: 16px; width: auto; top: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .p-drop__arrow, .p-eq__b, .p-eq__list li, .p-bubble { animation: none; }
}
