/* ==========================================================================
   Écran TV — interface smart TV (dimensions en px image : dalle 993 × 569)
   ========================================================================== */

.tvapp {
  position: absolute; inset: 0;
  container-type: inline-size;
  font-family: var(--f-mono);
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
}
.tvapp h1, .tvapp h2, .tvapp h3, .view-title, .row-title, .ep-title, .hero-role { font-family: var(--f-px); font-weight: 400; }
.tv-inner {
  position: absolute; inset: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(80, 60, 190, .45), transparent 60%),
    radial-gradient(80% 70% at 0% 100%, rgba(200, 30, 90, .22), transparent 60%),
    #0d0f26;
  overflow: hidden;
}
/* Trame de dalle + reflet */
.tv-inner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .06), transparent 35%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px);
}
.crt-flash { position: absolute; inset: 0; pointer-events: none; }

.px-icon { width: 15px; height: 15px; fill: currentColor; flex: none; }

/* ---------- Barre du haut ---------- */
.tv-top {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px 10px;
  border-bottom: 2px solid rgba(140, 150, 255, .18);
}
.tv-brand {
  display: inline-flex; align-items: baseline;
  padding: 6px 16px 7px; border: 0; border-radius: 999px;
  background: var(--red); color: #fff;
  font-family: var(--f-hud); font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 3px 0 #8d1022;
}
.tv-brand span { font-weight: 400; opacity: .85; }
.tv-tabs { display: flex; gap: 4px; flex: 1; min-width: 0; }
.tv-tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px; border: 0; background: none; cursor: pointer;
  color: #c9cdf5; font-size: 20px; border-radius: 6px;
  transition: background .15s, color .15s;
}
.tv-tab:hover, .tv-tab:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; outline: none; }
.tv-tab.is-active { color: #fff; }
.tv-tab.is-active::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: -1px; height: 3px; background: #fff;
}
.tv-right { display: flex; align-items: center; gap: 12px; color: #dfe2ff; font-family: var(--f-px); font-size: 24px; }
.tv-avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid #c9cdf5; font-size: 17px; font-family: var(--f-px);
}

/* ---------- Zone de contenu ---------- */
.tv-view {
  position: relative; overflow-y: auto; overflow-x: hidden;
  padding: 18px 22px 20px;
  scrollbar-width: thin; scrollbar-color: #5b57b8 transparent;
  outline: none;
}
.tv-view.is-swap > * { animation: tv-swap .35s ease-out both; }
@keyframes tv-swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tv-hint {
  padding: 4px 20px 6px; font-size: 17px; color: #9599c9;
  border-top: 2px solid rgba(140, 150, 255, .12);
  display: flex; gap: 8px; align-items: center;
}
.tv-hint kbd { padding: 0 6px; background: rgba(255, 255, 255, .12); border-radius: 3px; font-family: var(--f-mono); font-size: 16px; color: #fff; }

.kicker { margin: 0 0 4px; font-family: var(--f-hud); font-weight: 700; font-size: 13px; color: var(--red); letter-spacing: .06em; text-transform: uppercase; }
.view-title { margin: 0 0 12px; font-size: 38px; line-height: 1; }
.view-title small { font-family: var(--f-mono); font-size: 19px; color: #9599c9; margin-left: 8px; }
.row-title { margin: 16px 0 6px; font-size: 28px; line-height: 1; }
.row-title small { font-family: var(--f-mono); font-size: 18px; color: #9599c9; margin-left: 6px; }

/* Boutons « pilule » comme « Regarder maintenant » */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px 9px; border: 2px solid transparent; border-radius: 999px;
  background: rgba(150, 160, 230, .22); color: #fff; text-decoration: none;
  font-family: var(--f-px); font-size: 23px; line-height: 1; cursor: pointer;
  transition: background .15s, transform .15s, border-color .15s;
}
.btn:hover, .btn:focus-visible { background: rgba(170, 180, 255, .36); border-color: #fff; outline: none; transform: scale(1.04); }
.btn-primary { background: #fff; color: #10122a; }
.btn-primary:hover, .btn-primary:focus-visible { background: #fff; border-color: var(--red); }

/* ---------- Accueil ---------- */
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: center; }
.hero h1 { margin: 0; font-size: 66px; line-height: .9; text-shadow: 3px 3px 0 rgba(0, 0, 0, .45); }
.hero-role { margin: 6px 0 8px; font-size: 28px; line-height: 1; color: var(--amber); }
.hero-role span { color: #c9cdf5; font-family: var(--f-mono); font-size: 20px; }
.hero-pitch { margin: 0 0 14px; font-size: 20px; line-height: 1.2; color: #d9dbf5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hero-stats li {
  padding: 10px 12px; background: rgba(10, 10, 30, .55); border: 2px solid rgba(150, 160, 255, .22);
  clip-path: var(--notch);
}
.hero-stats b { display: block; font-family: var(--f-px); font-size: 38px; line-height: 1; color: #fff; }
.hero-stats span { font-size: 18px; line-height: 1.05; color: #b8bce6; }

/* Rangées de vignettes */
.row { display: flex; gap: 12px; overflow-x: auto; padding: 6px 4px 10px; margin: 0 -4px; scrollbar-width: none; }
.tile {
  flex: none; width: 188px; height: 106px; padding: 0; border: 0; background: none; cursor: pointer;
  transition: transform .18s;
}
.tile .poster { width: 100%; height: 100%; }
.tile:hover, .tile:focus-visible { transform: scale(1.06); outline: none; }
.tile:hover .poster, .tile:focus-visible .poster { box-shadow: 0 0 0 3px #fff, 0 8px 20px rgba(0, 0, 0, .5); }

/* Affiche générée (dégradé + trame pixel) */
.poster {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 10px 12px; overflow: hidden; text-align: left;
  background:
    repeating-conic-gradient(rgba(0, 0, 0, .14) 0 25%, transparent 0 50%) 0 0 / 4px 4px,
    linear-gradient(135deg, var(--c1), var(--c2));
  border-radius: 4px;
  color: #fff;
}
.poster-mono {
  position: absolute; right: -6px; top: -14px;
  font-family: var(--f-hud); font-weight: 700; font-size: 76px; line-height: 1;
  color: rgba(255, 255, 255, .16);
}
.poster-title { position: relative; font-family: var(--f-hud); font-weight: 700; font-size: 17px; line-height: 1.05; text-shadow: 2px 2px 0 rgba(0, 0, 0, .45); }
.poster-sub { position: relative; font-size: 17px; line-height: 1; opacity: .92; margin-top: 3px; }
.poster-badge {
  position: absolute; left: 0; top: 0;
  padding: 1px 8px 2px; background: var(--red); font-size: 16px;
}

/* ---------- Liste des expériences ---------- */
.episodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.episode {
  width: 100%; display: grid; grid-template-columns: 34px 170px 1fr; gap: 14px; align-items: center;
  padding: 10px; border: 2px solid transparent; border-radius: 6px;
  background: rgba(10, 10, 30, .45); text-align: left; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.episode:hover, .episode:focus-visible { background: rgba(80, 80, 170, .35); border-color: #fff; outline: none; }
.episode .poster { height: 96px; }
.ep-num { font-family: var(--f-px); font-size: 44px; color: #6d71b8; text-align: center; }
.ep-body { display: grid; gap: 4px; }
.ep-title { font-size: 27px; line-height: 1; }
.ep-meta { font-size: 19px; color: #b8bce6; }
.ep-meta b { color: var(--amber); font-weight: 400; }
.ep-ctx { font-size: 19px; color: #d0d2ee; }

/* ---------- Fiche expérience ---------- */
.detail { display: grid; grid-template-columns: 220px 1fr; gap: 22px; }
.detail-side .poster { height: 150px; }
.tags { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 0 8px; font-size: 17px; background: rgba(150, 160, 230, .18); border-radius: 3px; }
.detail h2 { margin: 0 0 4px; font-size: 36px; line-height: 1; }
.detail-meta { margin: 0 0 4px; font-size: 20px; color: #b8bce6; }
.detail-meta a { color: #fff; text-underline-offset: 3px; }
.detail-meta b { color: var(--amber); font-weight: 400; }
.detail-ctx { margin: 0 0 10px; font-size: 19px; color: #a9addb; }
.metrics { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.metrics li {
  min-width: 110px; padding: 7px 10px; background: rgba(232, 37, 63, .14);
  border-left: 4px solid var(--red);
}
.metrics b { display: block; font-family: var(--f-px); font-size: 32px; line-height: 1; }
.metrics span { font-size: 17px; line-height: 1; color: #c9cdf5; }
.bullets { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 18px; font-size: 20px; line-height: 1.15; color: #e3e4f7; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 7px; height: 7px; background: var(--red); }
.detail-nav { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Formation ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { background: rgba(10, 10, 30, .5); border-radius: 6px; overflow: hidden; outline: none; }
.card .poster { height: 120px; border-radius: 0; }
.card-body { padding: 12px 14px 14px; }
.card h3 { margin: 0 0 4px; font-size: 28px; line-height: 1; }
.card p { margin: 0 0 6px; font-size: 19px; color: #d0d2ee; }
.award {
  display: inline-block; margin-top: 4px !important; padding: 4px 10px;
  background: rgba(255, 196, 77, .16); color: var(--amber) !important; font-size: 19px !important;
}
.award:focus-visible { outline: 2px solid #fff; }

/* ---------- Compétences ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.skill { padding: 12px 14px; background: rgba(10, 10, 30, .5); border: 2px solid rgba(150, 160, 255, .16); border-radius: 6px; outline: none; transition: border-color .15s; }
.skill:focus-visible, .skill:hover { border-color: #fff; }
.skill h3 { margin: 0 0 8px; font-size: 24px; line-height: 1; color: var(--amber); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 0 9px; font-size: 18px; background: rgba(150, 160, 230, .2); border-radius: 999px; }
.langs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.langs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 20px; }
.langs small { color: #9599c9; }
.bar { display: inline-flex; gap: 3px; }
.bar i { width: 12px; height: 12px; background: rgba(150, 160, 230, .2); }
.bar i.on { background: var(--red); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-item {
  display: grid; gap: 4px; padding: 14px 16px; text-align: left; text-decoration: none;
  background: rgba(10, 10, 30, .5); border: 2px solid rgba(150, 160, 255, .16); border-radius: 6px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
div.contact-item { cursor: default; }
a.contact-item:hover, a.contact-item:focus-visible, button.contact-item:hover, button.contact-item:focus-visible { border-color: #fff; background: rgba(80, 80, 170, .35); outline: none; }
.contact-item span { font-size: 17px; color: var(--red); text-transform: uppercase; letter-spacing: .04em; }
.contact-item b { font-family: var(--f-px); font-size: 26px; line-height: 1; font-weight: 400; word-break: break-word; }

/* ---------- Plein écran (petits écrans) ---------- */
.tvapp.is-fullscreen { position: absolute; inset: 0; padding: 64px 10px 64px; }
.tvapp.is-fullscreen .tv-inner { inset: 64px 10px 64px; border: 4px solid #050508; border-radius: 6px; box-shadow: 0 0 40px rgba(170, 60, 255, .45); }

@container (max-width: 720px) {
  .tv-inner { font-size: 19px; }
  .tv-top { gap: 8px; padding: 10px 12px 8px; }
  .tv-tab span { display: none; }
  .tv-tab { padding: 8px; }
  .tv-tab .px-icon { width: 18px; height: 18px; }
  .tv-right .tv-clock { display: none; }
  .tv-view { padding: 14px 14px 16px; }
  .hero, .detail, .cards, .contact { grid-template-columns: 1fr; }
  .hero h1 { font-size: 52px; }
  .episode { grid-template-columns: 1fr; }
  .ep-num { display: none; }
  .tv-hint { display: none; }
}
