/* ============================================================
   decodenow.css — bloc DecodeNOW de la page Projets (2026-10-12).
   À droite : maquette de téléphone qui joue un faux reel en boucle
   (assets/js/decodenow-reel.js) ; en bas à gauche : boutons réseaux.
   L'écran du téléphone reste sombre dans les deux thèmes (c'est un écran).
   ============================================================ */

/* Plus de contour animé autour de la carte (règle « pas de bordure ») */
.ng-spin-border:has(.dn-stage) { padding: 0; background: none; }
.ng-spin-border:has(.dn-stage)::before, .ng-spin-border:has(.dn-stage)::after { display: none; }
html:root body.ng-site:not(.ng-admin) .ng-spin-border:has(.dn-stage) > .ng-card-flat { box-shadow: none; background: var(--pro-s1); border-radius: 28px; }

/* ── Boutons ── */
.dn-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 4px; }
.dn-nets { display: flex; flex-wrap: wrap; gap: 8px; }
.dn-net {
  display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 12px 0 5px; border-radius: 999px;
  background: var(--pro-s2, rgba(255,255,255,.06)); color: var(--mb-1, var(--ng-heading));
  font-size: 13.5px; font-weight: 550; text-decoration: none;
  transition: background .2s ease;
}
.dn-net:hover { background: var(--pro-s3, rgba(255,255,255,.1)); }
.dn-net:focus-visible { outline: 2px solid var(--v3-blue, #4d6bff); outline-offset: 2px; }
.dn-net-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--dn-brand); color: #fff; flex: none; }
.dn-net-ico svg { width: 15px; height: 15px; }
.dn-net-go { width: 14px; height: 14px; color: var(--mb-3, var(--ng-t40)); transition: transform .25s cubic-bezier(.34,1.56,.64,1), color .2s; }
.dn-net:hover .dn-net-go { transform: translate(2px, -2px); color: var(--mb-1, var(--ng-heading)); }

/* ── Téléphone ── */
.dn-stage { position: relative; display: grid; place-items: center; padding: 8px 0; }
.dn-stage::before { /* halo de la couleur du sujet derrière le téléphone */
  content: ''; position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--dn-cur, #4d6bff) 30%, transparent), transparent 65%);
  transition: background 1s ease; pointer-events: none;
}
.dn-phone {
  position: relative; width: min(290px, 100%); aspect-ratio: 9 / 18.5; padding: 9px; border-radius: 44px;
  background: #050506; box-shadow: 0 0 0 1.5px #26262b inset, 0 40px 80px -30px rgba(0,0,0,.6);
}
.dn-phone::before { /* encoche */
  content: ''; position: absolute; z-index: 5; top: 17px; left: 50%; width: 76px; height: 21px; transform: translateX(-50%);
  border-radius: 999px; background: #050506;
}
.dn-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 36px; isolation: isolate;
  background: #0b0b0f; color: #fff; font-family: var(--v3-font, system-ui, sans-serif);
}
.dn-glow {
  position: absolute; inset: -20%; z-index: -1;
  background:
    radial-gradient(60% 45% at 30% 25%, color-mix(in srgb, var(--dn-hue) 55%, transparent), transparent 70%),
    radial-gradient(55% 40% at 80% 85%, color-mix(in srgb, var(--dn-hue) 35%, transparent), transparent 70%),
    #0b0b0f;
  transition: background .9s ease;
}
html.m-on .dn-glow { animation: dnDrift 9s ease-in-out infinite alternate; }
@keyframes dnDrift { to { transform: translate3d(4%, -3%, 0) scale(1.08); } }

/* barres façon stories */
.dn-bars { position: absolute; z-index: 4; top: 48px; left: 14px; right: 14px; display: flex; gap: 4px; }
.dn-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.28); overflow: hidden; }
.dn-bars i { display: block; height: 100%; width: 100%; background: #fff; transform: scaleX(var(--p, 0)); transform-origin: left; }

.dn-top { position: absolute; z-index: 4; top: 60px; left: 14px; right: 14px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.dn-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0b0b0f; font-weight: 800; font-size: 13px; }
.dn-timer { margin-left: auto; padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-variant-numeric: tabular-nums; font-size: 12px; }

/* sujet */
.dn-slide {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: 90px 52px 80px 18px; opacity: 0; transform: translateY(14px) scale(.98);
  transition: opacity .5s ease, transform .7s cubic-bezier(.16,1,.3,1);
}
.dn-slide.is-on { opacity: 1; transform: none; }
.dn-label { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.dn-key { font-size: clamp(36px, 4.4vw, 46px); font-weight: 800; letter-spacing: -.04em; line-height: .95; word-break: break-word; }
.dn-caption { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.35; }
.dn-caption span { color: rgba(255,255,255,.4); transition: color .25s ease, background .25s ease; border-radius: 4px; }
.dn-slide.is-on .dn-caption span { color: #fff; transition-delay: calc(.35s + var(--w) * .28s); }
html:not(.m-on) .dn-caption span { color: #fff; }

/* barre d'actions */
.dn-rail { position: absolute; z-index: 4; right: 10px; bottom: 82px; display: flex; flex-direction: column; gap: 14px; }
.dn-rail span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dn-rail svg { width: 17px; height: 17px; }
.dn-like.is-pop { color: #ff3b5c; animation: dnPop .6s cubic-bezier(.34,1.56,.64,1); }
@keyframes dnPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.dn-bottom { position: absolute; z-index: 4; left: 16px; right: 16px; bottom: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; }
.dn-sound { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: rgba(255,255,255,.75); }
.dn-sound svg { width: 13px; height: 13px; }
html.m-on .dn-sound svg { animation: dnSpin 3s linear infinite; }
@keyframes dnSpin { to { transform: rotate(360deg); } }

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

@media (max-width: 1023px) { .dn-phone { width: min(270px, 80vw); } }

/* ── Écran clair + bleu accent (2026-10-12, demande de l'utilisateur) ──
   Remplace l'écran sombre et la couleur par sujet : fond blanc, texte
   presque noir, tous les accents dans le bleu de la DA (#2f4cf0).
   --dn-hue est posé en ligne par le script : !important le fige au bleu. */
.dn-phone, .dn-stage { --dn-hue: #2f4cf0 !important; --dn-cur: #2f4cf0 !important; }
.dn-phone { background: #e7e8ee; box-shadow: 0 0 0 1.5px #d6d8e0 inset, 0 40px 80px -34px rgba(20,30,90,.35); }
.dn-phone::before { background: #111318; }
.dn-screen { background: #ffffff; color: #141414; }
.dn-glow {
  background:
    radial-gradient(60% 40% at 25% 22%, rgba(47,76,240,.16), transparent 70%),
    radial-gradient(55% 40% at 85% 88%, rgba(47,76,240,.10), transparent 70%),
    linear-gradient(180deg, #f6f7ff 0%, #ffffff 55%);
}
.dn-bars span { background: rgba(47,76,240,.16); }
.dn-bars i { background: #2f4cf0; }
.dn-avatar { background: #2f4cf0; color: #fff; }
.dn-handle { color: #141414; }
.dn-timer { background: rgba(47,76,240,.1); color: #2f4cf0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.dn-label { background: rgba(47,76,240,.1); color: #2f4cf0; }
.dn-key { color: #2f4cf0; }
.dn-caption span { color: rgba(20,20,20,.28); }
.dn-slide.is-on .dn-caption span, html:not(.m-on) .dn-caption span { color: #141414; }
.dn-rail span { background: #f1f2f7; color: #4a4f63; -webkit-backdrop-filter: none; backdrop-filter: none; }
.dn-like.is-pop { color: #2f4cf0; }
.dn-bottom { color: #141414; }
.dn-sound { color: #717171; }
.dn-stage::before { background: radial-gradient(circle, rgba(47,76,240,.18), transparent 65%); }
html:not(.light) .dn-stage::before { background: radial-gradient(circle, rgba(77,107,255,.28), transparent 65%); }

/* ── Projet phare choisi dans l'éditeur (2026-10-14) : capture dans une fenêtre de navigateur ── */
.fp-browser { position: relative; border-radius: 16px; overflow: hidden; background: var(--pro-s2, #161616); box-shadow: 0 0 0 1px var(--pro-line, rgba(255,255,255,.08)), 0 30px 60px -30px rgba(0,0,0,.45); }
.fp-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--pro-line, rgba(255,255,255,.08)); }
.fp-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--ng-t25, rgba(127,127,127,.35)); }
.fp-bar span { margin-left: 10px; flex: 1; max-width: 260px; height: 20px; border-radius: 999px; background: var(--ng-inner, rgba(127,127,127,.12)); color: var(--ng-t55); font-size: 11px; line-height: 20px; padding: 0 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fp-shot { aspect-ratio: 16 / 10; background: var(--ng-inner, rgba(127,127,127,.1)); }
.fp-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.fp-empty { display: grid; place-items: center; height: 100%; padding: 24px; text-align: center; font-size: 22px; font-weight: 600; color: var(--ng-t45); }
