/* ==========================================================================
   Portfolio (index.php) — thème sombre
   Dépend de base.css pour le reset, les polices et les icônes.
   ========================================================================== */

:root {
  --text: #f6f7ff;
  --muted: #c9cee3;
  --accent: #2665f6;
  --accent2: #6b8cff;
  --stroke: rgba(255, 255, 255, .12);
  --glass: rgba(255, 255, 255, .06);
  --shadow: 0 20px 60px rgba(0, 0, 0, .35);
  --ico-ink: #fff;
}

html { scroll-behavior: smooth }

body {
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, var(--bg-3), var(--bg-2) 50%, var(--bg-1) 100%) fixed;
}

/* Cible de saut pour le lien d'évitement clavier */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 12px 16px; border-radius: 0 0 12px 0;
  background: var(--accent); color: #fff; font-weight: 800;
}
.skip-link:focus { left: 0 }

/* --------------------------------------------------------------------------
   NAV
   -------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  background: linear-gradient(180deg, rgba(15, 18, 35, .75), rgba(15, 18, 35, .35));
  border-bottom: 1px solid var(--stroke);
}
.nav .wrap {
  max-width: 1120px; margin: 0 auto; padding: 10px 18px;
  display: flex; align-items: center; gap: 18px; justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px }
.brand img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; box-shadow: var(--shadow);
}
.brand span {
  font-family: var(--font-display);
  font-weight: 700; font-size: 19px; line-height: 1.15; letter-spacing: .02em;
}

.menu { display: flex; gap: 14px; flex-wrap: wrap }
.menu a {
  padding: 10px 14px; border-radius: 12px; color: #e7ebff;
  font-weight: 800; letter-spacing: .2px; border: 1px solid transparent;
}
.menu a:hover { background: rgba(255, 255, 255, .08); border-color: var(--stroke) }
.menu a.active { background: linear-gradient(135deg, rgba(107, 140, 255, .25), rgba(255, 93, 162, .18)) }

.burger {
  display: none; width: 44px; height: 44px;
  border: 1px solid var(--stroke); border-radius: 12px;
  background: rgba(255, 255, 255, .06); cursor: pointer;
}
.burger .b {
  display: block; width: 20px; height: 2px;
  background: #e7ebff; margin: 4px auto; transition: .2s;
}
.burger .b:first-child { margin-top: 12px }
.burger[aria-expanded="true"] .b:nth-child(1) { transform: translateY(6px) rotate(45deg) }
.burger[aria-expanded="true"] .b:nth-child(2) { opacity: 0 }
.burger[aria-expanded="true"] .b:nth-child(3) { transform: translateY(-6px) rotate(-45deg) }

.drawer {
  position: fixed; inset: 0; z-index: 49;
  background: rgba(10, 12, 20, .6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: start end;
}
.drawer[hidden] { display: none }
.drawer-inner {
  width: min(86vw, 340px); height: 100%;
  background: linear-gradient(180deg, rgba(22, 24, 42, .98), rgba(14, 15, 23, .98));
  border-left: 1px solid var(--stroke); padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.drawer-inner a { font-weight: 800; padding: 12px; border-radius: 10px }
.drawer-inner a:hover { background: rgba(255, 255, 255, .08) }

@media (max-width: 920px) {
  .menu { display: none }
  .burger { display: block }
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 64vh;
  display: grid; place-items: center; overflow: hidden;
  border-bottom: 1px solid var(--stroke);
}
.hero .yt-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: hidden; pointer-events: none;
}
.hero .yt-bg #heroYT {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 120vw; height: 68vw; min-width: 177.78vh; min-height: 100vh;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 15, 23, .60), rgba(14, 15, 23, .62));
  transition: opacity .28s ease;
}
.hero.focus::after { opacity: .18 }

.hero .center {
  position: relative; z-index: 2; text-align: center; padding: 18px;
  transition: opacity .35s ease, transform .35s ease;
}
.hero.focus .center { opacity: 0; transform: translateY(10px); pointer-events: none }

.hero .avatar {
  width: 132px; height: 132px; border-radius: 50%;
  overflow: hidden; margin: 0 auto 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  border: 2px solid rgba(255, 255, 255, .7);
}
.hero .avatar img { width: 100%; height: 100%; object-fit: cover }

.hero .name {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.2vw, 62px);
  margin: 0; line-height: 1.06; font-weight: 700; letter-spacing: .01em;
}
.hero .tag { margin: .5rem 0 0; color: var(--muted); font-weight: 600 }

.social-inline { display: flex; gap: 12px; justify-content: center; margin-top: 14px }
.social-inline a {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; transition: transform .2s ease, background .2s ease;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .35));
}
.social-inline a:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px) }
.social-inline .ico { width: 30px; height: 30px }

/* Bouton son du hero */
.sound-btn {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .14); border: 1px solid var(--stroke);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.sound-btn:hover { background: rgba(255, 255, 255, .22) }
.sound-btn svg { width: 22px; height: 22px }
.sound-btn[aria-pressed="true"] .ic-muted { display: none }
.sound-btn[aria-pressed="false"] .ic-sound { display: none }

/* --------------------------------------------------------------------------
   SECTIONS
   -------------------------------------------------------------------------- */
.section { padding: clamp(28px, 7vh, 80px) 0 }
.title { margin: 0 0 16px; font-size: clamp(22px, 2.6vw, 32px); font-weight: 800 }
.surface {
  background: var(--glass); border: 1px solid var(--stroke);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}

/* Listes de projets (1 → 2 → 3 colonnes) */
.list {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.item {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--stroke); border-radius: 16px;
  padding: 14px 16px;
  display: flex; flex-direction: column; min-height: 150px;
}
.item .row { display: flex; flex-direction: column; gap: 10px }
.item .title { margin: 0 0 4px; font-weight: 800; font-size: 18px }

.kv { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #cdd8ff }
.kv b { color: #fff }

/* Carte de rôle : affiche + informations */
.role-card {
  flex-direction: row; gap: 14px;
  padding: 12px; min-height: 0;
}
.role-card .poster {
  flex: 0 0 88px; width: 88px; aspect-ratio: 2 / 3;
  border-radius: 12px; overflow: hidden;
  background: #0f1325; border: 1px solid var(--stroke);
}
.role-card .poster img { width: 100%; height: 100%; object-fit: cover; display: block }

.role-body { display: flex; flex-direction: column; flex: 1; min-width: 0 }
.role-body .title { margin: 0 0 2px; font-size: 17px }
.role-body .oeuvre {
  margin: 0 0 6px; font-size: 14px; color: #cbd7ff; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.role-body .vo { margin: 6px 0 0; font-size: 13px; color: var(--muted) }
.role-body .vo b { color: #e7ebff }

/* Zone d'actions collée en bas de carte */
.actions { margin-top: auto; display: flex; gap: 8px }

/* --------------------------------------------------------------------------
   BOUTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; font-weight: 800;
  border: 1px solid var(--stroke); background: rgba(255, 255, 255, .06);
  color: inherit; font: inherit; font-weight: 800; cursor: pointer;
}
.btn.play {
  background: linear-gradient(135deg, rgba(107, 140, 255, .18), rgba(38, 101, 246, .18));
  border-color: rgba(107, 140, 255, .4);
}
.btn.play:hover {
  background: linear-gradient(135deg, rgba(107, 140, 255, .28), rgba(38, 101, 246, .28));
}
.btn.play svg { width: 18px; height: 18px; flex: 0 0 18px }

/* --------------------------------------------------------------------------
   FAVORIS
   -------------------------------------------------------------------------- */
.fav-strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; margin-bottom: 12px }
.fav {
  grid-column: span 6;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 16px;
  background: radial-gradient(120% 120% at 0% 0%, rgba(38, 101, 246, .22), rgba(255, 255, 255, .04) 60%);
  border: 1px solid rgba(107, 140, 255, .42);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}
.fav .thumb {
  width: 96px; height: 96px; border-radius: 14px; overflow: hidden;
  flex: 0 0 96px; background: #0f1325; border: 1px solid var(--stroke);
}
.fav .thumb img { width: 100%; height: 100%; object-fit: cover }
.fav .txt { flex: 1; min-width: 0 }
.fav .tagline { margin: 0; font-weight: 800; font-size: 15px }
.fav .sub {
  margin: 3px 0 0; font-size: 13px; color: #cbd7ff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 820px) { .fav { grid-column: span 12 } }

/* --------------------------------------------------------------------------
   ÉTATS DE CHARGEMENT / VIDE
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  background-size: 200% 100%;
  animation: shimmer 1.1s infinite linear;
  border-radius: 12px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0 }
  100% { background-position: -200% 0 }
}
.empty { color: var(--muted); padding: 16px; text-align: center }

/* --------------------------------------------------------------------------
   MODALE MÉDIA
   -------------------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: center; justify-content: center; background: rgba(0, 0, 0, .72);
}
.modal.open { display: flex }
.modal .frame {
  width: min(1080px, 92vw); background: #0c0e18;
  border: 1px solid var(--stroke); border-radius: 16px;
  padding: 56px 20px 24px; position: relative;
}
.modal .frame audio { width: 100% }
.modal .media-title {
  margin: 0 0 14px; font-size: 16px; font-weight: 800; color: var(--text);
  padding-right: 40px;
}
.modal .close {
  position: absolute; right: 10px; top: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--stroke); background: rgba(255, 255, 255, .14);
  color: #fff; cursor: pointer; font-size: 16px; line-height: 1;
}
.modal .close:hover { background: rgba(255, 255, 255, .24) }

/* --------------------------------------------------------------------------
   PIED DE PAGE
   -------------------------------------------------------------------------- */
footer {
  color: #aebeea; text-align: center; padding: 28px;
  border-top: 1px solid var(--stroke); margin-top: 40px;
}

/* Sous-titres de section */
.subtitle {
  margin: 26px 0 12px; font-size: 15px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  display: flex; align-items: baseline; gap: 10px;
}
.subtitle:first-of-type { margin-top: 0 }
.subtitle .count {
  font-size: 12px; font-weight: 700; letter-spacing: 0;
  text-transform: none; color: #cbd7ff;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(107, 140, 255, .16); border: 1px solid rgba(107, 140, 255, .35);
}

/* Voxographie repliée : les rôles au-delà des premiers restent masqués
   tant que le bouton n'a pas été actionné. */
.list.is-collapsed .role-card.is-extra { display: none }
