/* ============================================================
   PROJET CO — PROJET DE JEU, PLAN DE JEU, PROJET TOUCHE
   ============================================================
   js/pages/projet-de-jeu.js, plan-de-jeu.js, projet-touche.js et
   projet-co-studio.js. Le studio est CELUI DE L'APPLI (www/pdj/studio.js) :
   ses classes .pdj-* sont reprises de www/styles.css de l'appli (bloc
   « PLAN DE JEU »), accordées à la nuit du site. Ce qui bouge ne passe que
   par transform et opacity.
*/

.pco { --pco-gazon: #1f6b39; --pco-turquoise: #73fdeb; --pco-jaune: #ffd84d; }
.pco h1, .pco h2, .pco h3 { font-family: var(--titre); font-weight: 600; letter-spacing: .02em; }

/* ---------------- Attente ---------------- */
.pco-attente { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 70px 20px; color: var(--texte-3); font-weight: 650; }
.pco-attente i { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--bleu-2); border-right-color: transparent; animation: tourne .8s linear infinite; }

/* ---------------- Le bandeau de tête ---------------- */
.pco-hero {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap;
  margin: 6px 0 18px; padding: 34px 34px 28px; border-radius: 26px; isolation: isolate;
  background: radial-gradient(120% 140% at 0% 0%, rgba(47, 107, 255, .26), transparent 55%),
              radial-gradient(90% 120% at 100% 100%, rgba(199, 40, 45, .18), transparent 60%),
              linear-gradient(160deg, #0b1a44, #060c22 70%);
  border: 1px solid var(--ligne-2); box-shadow: var(--ombre);
}
.pco-hero-fond { position: absolute; inset: 0; z-index: -1; color: rgba(143, 179, 255, .13); pointer-events: none; }
.pco-hero-fond svg { position: absolute; right: -4%; top: -30%; width: 62%; height: 160%; }
.pco-hero-plan .pco-hero-fond svg { transform: perspective(900px) rotateX(52deg) rotateZ(-18deg); transform-origin: 60% 40%; }
.pco-tirets { stroke-dasharray: 10 14; opacity: .7; }
.pco-trajets path { stroke-dasharray: 520; stroke-dashoffset: 520; animation: pco-trace 5.5s var(--doux) infinite; }
.pco-trajets .t1 { stroke: var(--pco-turquoise); opacity: .55; }
.pco-trajets .t2 { stroke: #fff; opacity: .4; animation-delay: 1.1s; }
.pco-trajets .t3 { stroke: var(--pco-jaune); opacity: .45; animation-delay: 2.2s; }
@keyframes pco-trace { 0% { stroke-dashoffset: 520; } 45%, 70% { stroke-dashoffset: 0; opacity: .6; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.pco-cloche { stroke: var(--pco-jaune); stroke-dasharray: 360; stroke-dashoffset: 360; animation: pco-trace 4.5s var(--doux) infinite; opacity: .7; }
.pco-alignement { fill: rgba(143, 179, 255, .32); }
.pco-dj { animation: pco-saut 4.5s var(--doux) infinite; animation-delay: calc(var(--i) * 40ms); transform-box: fill-box; transform-origin: 50% 100%; }
.pco-dj:nth-child(4) { animation-name: pco-saut-haut; fill: rgba(255, 216, 77, .55); }
@keyframes pco-saut { 0%, 40%, 100% { transform: none; } 50% { transform: translateY(-6px); } }
@keyframes pco-saut-haut { 0%, 35%, 100% { transform: none; } 52% { transform: translateY(-58px) scale(1.06); } 70% { transform: translateY(-40px); } }
.pco-aiguille { fill: rgba(199, 40, 45, .35); transform-origin: 260px 200px; animation: pco-aiguille 9s var(--doux) infinite alternate; }
@keyframes pco-aiguille { 0% { transform: rotate(-24deg); } 100% { transform: rotate(32deg); } }
.pco-hero-c { flex: 1 1 420px; min-width: 0; }
.pco-kicker { font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--ciel); }
.pco-hero h1 { margin: 8px 0 0; font-size: clamp(36px, 4.6vw, 64px); line-height: .95; text-transform: uppercase; }
.pco-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--bleu-2), var(--pco-turquoise)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pco-hero p { margin: 12px 0 0; max-width: 680px; color: var(--texte-2); font-size: 15.5px; }
.pco-secret { display: flex; gap: 8px; align-items: flex-start; font-size: 13px !important; color: var(--texte-3) !important; }
.pco-secret svg { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: var(--or); stroke-width: 2; }
.pco-chiffres { display: flex; gap: 10px; flex-wrap: wrap; }
.pco-chiffres > div { min-width: 104px; padding: 12px 16px; border-radius: 16px; background: rgba(9, 18, 46, .78); border: 1px solid var(--ligne); backdrop-filter: blur(6px); }
.pco-chiffres b { display: block; font: 600 30px/1 var(--titre); color: #fff; }
.pco-chiffres span { display: block; margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--texte-3); }
html.allege .pco-chiffres > div { backdrop-filter: none; }

/* ---------------- Barre d'onglets ---------------- */
.pco-barre { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.pco-barre-info { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--texte-3); font-weight: 650; }
.pco-onglet[hidden] { display: none !important; }

/* ---------------- Bandeaux ---------------- */
.pco-bandeau { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px;
  background: rgba(47, 107, 255, .1); border: 1px solid rgba(91, 140, 255, .3); color: var(--texte-2); font-size: 13.5px; }
.pco-bandeau b { color: #fff; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.pco-bandeau.est-essai { background: rgba(255, 159, 67, .1); border-color: rgba(255, 159, 67, .35); }

/* ---------------- Boutons ---------------- */
.pco-b { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 10px; border: 1px solid var(--ligne-2);
  background: var(--surface-2); color: var(--texte); font-size: 13px; font-weight: 700; transition: background .2s, border-color .2s, transform .15s; }
.pco-b:hover { background: var(--surface-3); border-color: rgba(143, 179, 255, .4); }
.pco-b:active { transform: scale(.96); }
.pco-b.est-plein { background: linear-gradient(135deg, var(--rouge-co), #9e1c21); border-color: transparent; color: #fff; box-shadow: 0 10px 26px -12px rgba(199, 40, 45, .8); }
.pco-b svg { width: 14px; height: 14px; fill: currentColor; stroke: currentColor; stroke-width: 0; }
.pco-b[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------------- Bibliothèque : filtres ---------------- */
.pco-filtres { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.pco-familles { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.pco-famille { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--ligne-2); background: var(--surface); color: var(--texte-2); font-size: 13px; font-weight: 700; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.pco-famille span { font-size: 11px; color: var(--texte-3); background: var(--surface-2); padding: 1px 7px; border-radius: 999px; }
.pco-famille:hover { color: var(--texte); border-color: rgba(143, 179, 255, .4); }
.pco-famille.est-actif { color: #fff; background: linear-gradient(135deg, rgba(47, 107, 255, .5), rgba(47, 107, 255, .2)); border-color: rgba(91, 140, 255, .6); }
.pco-famille.est-actif span { color: #fff; background: rgba(255, 255, 255, .16); }
.pco-filtres-l { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pco-cherche { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--ligne); min-width: 230px; flex: 0 1 300px; }
.pco-cherche svg { width: 16px; height: 16px; fill: none; stroke: var(--texte-3); stroke-width: 2; flex: none; }
.pco-cherche input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; }

/* ---------------- Bibliothèque : cartes ---------------- */
.pco-groupe { margin-bottom: 26px; content-visibility: auto; contain-intrinsic-size: auto 420px; }
.pco-groupe-t { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 19px; text-transform: uppercase; }
.pco-groupe-t span { font: 800 11px/1 var(--corps); color: var(--texte-3); background: var(--surface-2); padding: 4px 9px; border-radius: 999px; letter-spacing: 0; }
.pco-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pco-carte { position: relative; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--ligne);
  transition: transform .35s var(--ressort), border-color .25s, box-shadow .35s; }
.pco-carte:hover { transform: translateY(-4px); border-color: rgba(143, 179, 255, .38); box-shadow: 0 22px 44px -22px rgba(47, 107, 255, .55); }
.pco-carte.est-valide { border-color: rgba(54, 210, 122, .45); }
.pco-carte.est-retire { opacity: .55; }
.pco-carte-img { position: relative; display: block; padding: 0; border: 0; background: #0a1736; cursor: zoom-in; aspect-ratio: 16 / 9; overflow: hidden; }
.pco-carte-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(4, 8, 22, .55)); pointer-events: none; }
.pco-img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s var(--doux), transform .6s var(--doux); }
.pco-img.est-charge { opacity: 1; }
.pco-carte:hover .pco-img { transform: scale(1.045); }
.pco-carte-img:not(:has(.est-charge))::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(143, 179, 255, .08) 50%, transparent 70%); background-size: 220% 100%; animation: pco-reflet 1.4s linear infinite; }
@keyframes pco-reflet { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.pco-carte-anime { position: absolute; z-index: 1; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 800; color: #fff; background: rgba(199, 40, 45, .85); box-shadow: 0 6px 16px -6px rgba(199, 40, 45, .9); }
.pco-carte-anime svg { width: 11px; height: 11px; fill: #fff; }
.pco-carte-c { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; }
.pco-carte-t { font-weight: 800; font-size: 14.5px; line-height: 1.25; }
.pco-carte-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 20px; font-size: 11.5px; color: var(--texte-3); }
.pco-meta { display: inline-flex; align-items: center; gap: 4px; font-weight: 750; }
.pco-meta svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.pco-carte-a { display: flex; gap: 8px; margin-top: auto; }
.pco-carte-a .pco-b { flex: 1; justify-content: center; padding: 7px 8px; }
.pco-statut { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; border: 1px solid transparent; }
.pco-statut.est-a_tester { color: #ffe3a1; background: rgba(245, 196, 81, .14); border-color: rgba(245, 196, 81, .32); }
.pco-statut.est-valide { color: #a9f0c6; background: rgba(54, 210, 122, .13); border-color: rgba(54, 210, 122, .3); }
.pco-statut.est-retire { color: var(--texte-3); background: var(--surface-2); border-color: var(--ligne); }

/* ---------------- Fenêtre ---------------- */
.pco-fenetre { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 22px;
  background: rgba(2, 5, 16, .72); backdrop-filter: blur(8px); opacity: 0; transition: opacity .25s; }
.pco-fenetre.est-ouverte { opacity: 1; }
html.allege .pco-fenetre { backdrop-filter: none; background: rgba(2, 5, 16, .9); }
.pco-fenetre-boite { position: relative; width: min(1180px, 100%); max-height: calc(100vh - 44px); overflow: auto; border-radius: 24px;
  background: linear-gradient(170deg, #0d1c48, #070e26); border: 1px solid var(--ligne-2); box-shadow: 0 40px 120px -30px #000;
  transform: translateY(18px) scale(.98); transition: transform .35s var(--ressort); }
.pco-fenetre.est-ouverte .pco-fenetre-boite { transform: none; }
.pco-fenetre-x { position: sticky; z-index: 2; top: 12px; float: right; margin: 12px 12px 0 0; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--ligne-2); background: rgba(4, 8, 22, .7); display: grid; place-items: center; }
.pco-fenetre-x svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
.pco-fenetre-c { padding: 22px 26px 26px; }
.pco-voir-tete h2 { margin: 6px 0 14px; font-size: clamp(24px, 3vw, 36px); text-transform: uppercase; }
.pco-voir-img { border-radius: 16px; overflow: hidden; background: #0a1736; aspect-ratio: 16 / 9; }
.pco-voir-img.est-portrait { aspect-ratio: auto; max-height: 72vh; }
.pco-voir-img .pco-img { object-fit: contain; }
.pco-voir-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: 12.5px; color: var(--texte-3); font-weight: 650; }
.pco-voir-statuts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 12px; }
.pco-statut-choix { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--ligne-2); background: var(--surface-2); color: var(--texte-2); font-weight: 750; font-size: 13px; }
.pco-statut-choix.est-actif.est-a_tester { background: rgba(245, 196, 81, .22); border-color: var(--or); color: #fff; }
.pco-statut-choix.est-actif.est-valide { background: rgba(54, 210, 122, .22); border-color: var(--vert); color: #fff; }
.pco-statut-choix.est-actif.est-retire { background: var(--surface-3); border-color: var(--texte-3); color: #fff; }
.pco-statut-choix[disabled] { cursor: default; }
.pco-statut-choix[disabled]:not(.est-actif) { opacity: .45; }
.pco-voir-par { font-size: 12px; color: var(--texte-3); }
.pco-coms { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow: auto; margin-bottom: 10px; }
.pco-com { padding: 9px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; white-space: pre-wrap; }
.pco-com small { display: block; margin-top: 3px; font-size: 11px; color: var(--texte-3); }
.pco-coms-vide, .pco-voir-lecture { font-size: 13px; color: var(--texte-3); }
.pco-com-ecrire { display: flex; gap: 10px; align-items: flex-end; }
.pco-com-ecrire textarea { flex: 1; min-height: 46px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ligne-2); background: rgba(255, 255, 255, .04); color: var(--texte); font: inherit; }
.pco-voir-pied { display: flex; justify-content: flex-end; margin-top: 16px; }

/* ---------------- Listes d'animations ---------------- */
.pco-anims-tete { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 12px; }
.pco-anims-tete h2, .pco-resultats-tete h2 { margin: 0; font-size: 21px; text-transform: uppercase; }
.pco-anims-n { color: var(--texte-3); font-size: 13px; font-weight: 700; }
.pco-anims-vide { padding: 22px; border-radius: 16px; border: 1px dashed var(--ligne-2); color: var(--texte-3); text-align: center; font-size: 14px; }
.pco-anims-g { margin-bottom: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--ligne); overflow: hidden; }
.pco-anims-g summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; font-weight: 800; list-style: none; }
.pco-anims-g summary::-webkit-details-marker { display: none; }
.pco-anims-g summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--texte-3); border-bottom: 2px solid var(--texte-3); transform: rotate(-45deg); transition: transform .25s; }
.pco-anims-g[open] summary::before { transform: rotate(45deg); }
.pco-anims-g-n { font-size: 11px; color: var(--texte-3); background: var(--surface-2); padding: 2px 8px; border-radius: 999px; }
.pco-anims { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 10px; }
.pco-anim { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto minmax(0, 220px); gap: 12px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 12px;
  border: 1px solid transparent; background: none; transition: background .2s, border-color .2s; }
.pco-anim:hover { background: var(--surface-2); border-color: var(--ligne-2); }
.pco-anim.est-ouverte { background: rgba(47, 107, 255, .14); border-color: rgba(91, 140, 255, .45); }
.pco-anim-jouer { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(199, 40, 45, .18); transition: background .2s, transform .25s var(--ressort); }
.pco-anim-jouer svg { width: 13px; height: 13px; fill: #ff8a8f; }
.pco-anim:hover .pco-anim-jouer { background: var(--rouge-co); transform: scale(1.1); }
.pco-anim:hover .pco-anim-jouer svg { fill: #fff; }
.pco-anim-nom { font-weight: 750; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pco-anim-maj { font-size: 12px; color: var(--texte-3); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Analyse vidéo ---------------- */
.pco-resultats-tete { margin: 26px 0 12px; }
.pco-resultats { display: flex; flex-direction: column; gap: 14px; }
.pco-resultat { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--ligne); }
.pco-resultat-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pco-resultat-imgs figure, .pco-vid-apercus figure { margin: 0; }
.pco-resultat-imgs img, .pco-vid-apercus img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #0a1736; }
.pco-resultat-imgs figcaption, .pco-vid-apercus figcaption { margin-top: 5px; font-size: 11.5px; color: var(--texte-3); font-weight: 700; }
.pco-resultat-c h3 { margin: 4px 0 6px; font-size: 22px; text-transform: uppercase; }
.pco-resultat-src { font-size: 12.5px; color: var(--texte-3); }
.pco-resultat-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.pco-resultat-chiffres > div { padding: 10px; border-radius: 12px; background: var(--surface-2); }
.pco-resultat-chiffres b { display: block; font: 600 24px/1 var(--titre); }
.pco-resultat-chiffres span { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 800; color: var(--texte-3); text-transform: uppercase; letter-spacing: .06em; }
.pco-resultat-err { margin: 12px 0; color: #ffb3b7; }
.pco-resultat-av { margin: 0 0 10px 18px; padding: 0; font-size: 12.5px; color: var(--texte-2); }
.pco-resultat-a { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pco-resultat-bib { font-size: 12px; color: var(--texte-3); }

.pco-video { display: flex; flex-direction: column; gap: 12px; }
.pco-vid-etape { display: flex; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--ligne); }
.pco-vid-num { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 16px var(--titre); background: linear-gradient(135deg, var(--bleu), #1d47c9); box-shadow: var(--ombre-bleue); }
.pco-vid-corps { flex: 1; min-width: 0; }
.pco-vid-corps h3 { margin: 4px 0 6px; font-size: 18px; text-transform: uppercase; }
.pco-vid-suite { display: flex; flex-direction: column; gap: 12px; }
.pco-vid-suite[hidden] { display: none; }
.pco-vid-aide { margin: 0 0 12px; font-size: 13px; color: var(--texte-3); }
.pco-vid-ligne { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: flex-end; margin-bottom: 10px; }
.pco-vid-fichier { cursor: pointer; }
.pco-champ-l { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 750; color: var(--texte-3); }
.pco-champ { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ligne-2); background: rgba(255, 255, 255, .05); color: var(--texte); font-size: 14px; min-width: 240px; }
.pco-champ option { background: #0b1636; }
.pco-vid-envoi { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texte-2); }
.pco-vid-envoi i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--bleu-2); border-right-color: transparent; animation: tourne .8s linear infinite; }
.pco-vid-passage { display: grid; gap: 8px; }
.pco-vid-passage label { display: grid; grid-template-columns: 50px minmax(0, 1fr) 190px; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; color: var(--texte-2); }
.pco-vid-passage input, .pco-vid-pas input { accent-color: var(--rouge-co); width: 100%; }
.pco-vid-passage output, .pco-vid-pas output { font-variant-numeric: tabular-nums; color: var(--texte); font-weight: 750; white-space: nowrap; }
.pco-vid-pas output { min-width: 44px; }
.pco-vid-pas { display: flex; align-items: center; gap: 10px; min-width: 220px; height: 38px; }
.pco-vid-apercus { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; transition: opacity .3s; }
.pco-vid-apercus.est-attente { opacity: .45; }
.pco-vid-choix { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 750; color: var(--texte-3); }
.pco-vid-go { height: 40px; }
.pco-vid-prog { margin-top: 6px; }
.pco-vid-barre { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pco-vid-barre i { display: block; height: 100%; background: linear-gradient(90deg, var(--bleu), var(--pco-turquoise)); transition: width .5s; }
.pco-vid-prog-t { margin-top: 5px; font-size: 13px; font-weight: 700; color: var(--texte-2); }
.pco-vid-fin { margin-top: 8px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; }
.pco-vid-fin.est-ok { background: rgba(54, 210, 122, .12); border: 1px solid rgba(54, 210, 122, .35); }
.pco-vid-fin.est-erreur { background: rgba(224, 49, 58, .12); border: 1px solid rgba(224, 49, 58, .4); }
.pco-vid-fin ul { margin: 6px 0 0 18px; padding: 0; }
/* Le calage (www/pdj/video.css de l'appli, clair) accordé à la nuit. */
.pco-video .pdj-vc-etat { color: var(--or); }
.pco-video .pdj-vc-etat.est-pret { color: var(--vert); }
.pco-video .pdj-vc-barre button { background: var(--surface-2); color: var(--texte); border-color: var(--ligne-2); }
.pco-video .pdj-vc-modes button.est-actif { background: var(--bleu); border-color: var(--bleu); color: #fff; }

/* ---------------- Projet Touche : les structures du carnet ---------------- */
.pco-structures { margin: 0 0 14px; }
.pco-structures[hidden] { display: none; }
.pco-structures-t { margin: 0 0 8px; font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--pco-jaune); }
.pco-structures-t small { margin-left: 8px; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--texte-3); font-weight: 650; }
.pco-structures-l { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.pco-struct { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--ligne-2);
  background: var(--surface); transition: transform .25s var(--ressort), background .2s, border-color .2s; }
.pco-struct b { font-size: 13px; letter-spacing: .04em; }
.pco-struct span { font-size: 11px; color: var(--texte-3); font-weight: 700; }
.pco-struct:hover { transform: translateY(-2px); border-color: rgba(255, 216, 77, .5); }
.pco-struct.est-actif { background: rgba(255, 216, 77, .14); border-color: var(--pco-jaune); }

/* ---------------- Projet de Jeu ---------------- */
.pco-chantier { display: flex; gap: 18px; align-items: center; margin: 0 0 28px; padding: 22px 24px; border-radius: 22px; border: 1px dashed rgba(143, 179, 255, .35); background: var(--surface); }
.pco-chantier-icone { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(47, 107, 255, .16); }
.pco-chantier-icone svg { width: 28px; height: 28px; fill: none; stroke: var(--ciel); stroke-width: 1.8; }
.pco-chantier-t { font: 600 20px var(--titre); text-transform: uppercase; letter-spacing: .04em; }
.pco-chantier p { margin: 4px 0 0; color: var(--texte-2); max-width: 760px; }
.pco-sous-titre { margin: 0 0 14px; font-size: 21px; text-transform: uppercase; }
.pco-portes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pco-porte { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--ligne);
  transition: transform .4s var(--ressort), border-color .25s, box-shadow .4s; }
.pco-porte::before { content: ""; position: absolute; inset: -40% -40% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; filter: blur(40px); opacity: .35; transition: opacity .4s; }
.pco-porte.est-plan::before { background: var(--bleu); }
.pco-porte.est-touche::before { background: var(--pco-jaune); }
.pco-porte.est-vision::before { background: var(--rouge-co); }
.pco-porte:hover { transform: translateY(-5px); border-color: var(--ligne-2); box-shadow: var(--ombre); }
.pco-porte:hover::before { opacity: .6; }
.pco-porte-icone { position: relative; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); }
.pco-porte-icone svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pco-porte-t { position: relative; font: 600 22px var(--titre); text-transform: uppercase; }
.pco-porte-x { position: relative; color: var(--texte-2); font-size: 14px; flex: 1; }
.pco-porte-n { position: relative; font-size: 12.5px; color: var(--texte-3); font-weight: 700; }
.pco-porte-n b { color: #fff; }

/* ============================================================
   LE STUDIO DE L'APPLI (classes .pdj-* de www/pdj/studio.js)
   ============================================================ */
.pco-studio-place { min-height: 120px; }
.pdj-studio { border-radius: 22px; color: #fff; padding: 12px; margin-bottom: 4px;
  background: linear-gradient(170deg, #0f2452, #081431); border: 1px solid var(--ligne-2); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9); scroll-margin-top: 80px; }
.pdj-studio.pdj-enreg { box-shadow: 0 0 0 4px var(--rouge-co); }
.pdj-entete { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.pdj-champ { background: rgba(255, 255, 255, .95); color: #172033; border: 1px solid #c8d0dc; border-radius: 9px; padding: 5px 9px; font-size: 13px; font-weight: 700; }
.pdj-nom { font-weight: 900; min-width: 210px; font-size: 14px; }
.pdj-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: rgba(255, 255, 255, .85); margin: 0; }
.pdj-etat { font-size: 12px; font-weight: 800; color: #8fe0a2; margin-left: auto; }
.pdj-etat.est-modifie { color: #fbbf24; }
.pdj-b { border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 9px; padding: 5px 11px; font-size: 12.5px; font-weight: 800; white-space: nowrap; transition: background .2s; }
.pdj-b:hover { background: rgba(255, 255, 255, .18); }
.pdj-b.est-actif { background: #fff; color: #092966; }
.pdj-b-ok { background: var(--rouge-co); border-color: var(--rouge-co); }
.pdj-b-ok:hover { background: #a91f24; }
.pdj-b-danger { border-color: rgba(255, 120, 120, .5); color: #ffb3b3; }
.pdj-props .pdj-b { width: 100%; margin-top: 6px; }
.pdj-corps { display: grid; grid-template-columns: 46px minmax(0, 1fr) 210px; gap: 9px; }
.pdj-outils { display: flex; flex-direction: column; gap: 5px; }
.pdj-outil { width: 42px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07); color: #fff; font-size: 17px; transition: background .2s; }
.pdj-outil:hover { background: rgba(255, 255, 255, .18); }
.pdj-outil.est-actif { background: #fff; color: #092966; }
.pdj-sep { height: 1px; background: rgba(255, 255, 255, .18); margin: 2px 0; }
.pdj-vues { display: grid; gap: 9px; grid-template-columns: 1fr 1fr; }
.pdj-vues-d2, .pdj-vues-d3 { grid-template-columns: 1fr; }
.pdj-vues-d2 .pdj-vue3d { display: none; }
.pdj-vues-d3 .pdj-vue2d { display: none; }
.pdj-vue2d, .pdj-vue3d { position: relative; border-radius: 14px; overflow: hidden; background: #1e5a2c; height: clamp(520px, 66vh, 860px); min-height: 0; }
#pdj-svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; user-select: none; }
.pdj-j { cursor: grab; }
.pdj-j:active { cursor: grabbing; }
.pdj-halo { fill: rgba(255, 216, 77, .35); stroke: #ffd84d; stroke-width: .18; }
.pdj-num { font-weight: 900; text-anchor: middle; font-family: system-ui, sans-serif; pointer-events: none; }
.pdj-num-adv { fill: #0b2a5b; }
.pdj-f-hit { stroke: transparent; stroke-width: 1.6; fill: none; cursor: pointer; }
.pdj-f.est-fantome { opacity: .28; pointer-events: none; }
.pdj-ballon { cursor: grab; }
.pdj-aide { position: absolute; left: 8px; bottom: 7px; right: 8px; width: fit-content; background: rgba(4, 18, 51, .78); padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; pointer-events: none; }
.pdj-vue3d canvas { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
.pdj-cams { position: absolute; top: 7px; left: 7px; right: 7px; display: flex; flex-wrap: wrap; gap: 5px; z-index: 2; }
.pdj-cam { border: 0; border-radius: 999px; background: rgba(4, 18, 51, .72); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; }
.pdj-cam.est-actif { background: var(--rouge-co); }
.pdj-3d-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .7); font-weight: 800; }
.pdj-props { background: rgba(255, 255, 255, .06); border-radius: 14px; padding: 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.pdj-props-titre { font-weight: 900; font-size: 13.5px; }
.pdj-props-l { color: rgba(255, 255, 255, .75); }
.pdj-props-lbl { display: flex; flex-direction: column; gap: 3px; font-weight: 800; color: rgba(255, 255, 255, .85); }
.pdj-props-lbl input, .pdj-props-lbl select, .pdj-props-lbl textarea { background: #fff; color: #172033; border-radius: 8px; border: 0; padding: 5px 7px; font-size: 13px; font-weight: 700; }
.pdj-studio textarea { font-family: var(--corps); }
.pdj-legende { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; font-size: 11px; color: rgba(255, 255, 255, .8); }
.pdj-legende i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.pdj-temps { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pdj-lecteur { display: flex; align-items: center; gap: 8px; }
.pdj-lire { min-width: 46px; font-size: 15px; background: var(--rouge-co); border-color: var(--rouge-co); }
.pdj-piste { position: relative; flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .18); cursor: pointer; }
.pdj-curseur { position: absolute; top: -4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); left: 0; }
.pdj-duree { font-size: 12px; font-weight: 800; color: rgba(255, 255, 255, .75); }
.pdj-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pdj-chip { border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .07); color: #fff; border-radius: 10px; padding: 4px 10px; display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; }
.pdj-chip small { color: #73fdeb; font-weight: 800; }
.pdj-chip.est-actif { background: #fff; color: #092966; }
.pdj-duree-in { width: 64px; }
.pdj-spacer { flex: 1; }
.pdj-vue-choix { display: inline-flex; gap: 3px; }
.pdj-fantome { opacity: .42; pointer-events: none; }
.pdj-cadre { fill: rgba(115, 253, 235, .12); stroke: #73fdeb; stroke-width: .25; stroke-dasharray: .8 .5; }
.pdj-mode-mvt { display: inline-flex; gap: 3px; padding: 2px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
/* Le carnet de touche (ptc_page_ui de l'appli). */
.pdj-carnet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; margin: 0 0 10px; background: #0f2550; border: 1px solid #23407a; border-radius: 14px; }
.pdj-carnet-t { font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; color: #ffd84d; }
.pdj-carnet .pdj-lbl { color: #dfe7f5; }
.pdj-carnet-annonce { width: 180px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pdj-carnet-case { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pdj-carnet-msg { flex-basis: 100%; font-size: 12.5px; color: #cfe0ff; }
.pdj-carnet-msg:empty { display: none; }
.pdj-carnet-msg em { color: #9fb3d9; }
.pdj-carnet-msg.est-alerte span { color: #ffcf6b; }
.pdj-carnet-msg.est-erreur { color: #ff9b9b; }
/* En consultation (en ligne, ou sans droit) : ni « Enregistrer » ni
   « Supprimer » — le bandeau au-dessus dit pourquoi. */
.pdj-studio.pco-lecture .pdj-b[data-a="enregistrer"], .pdj-studio.pco-lecture .pdj-b[data-a="supprimer"] { display: none; }
.pdj-studio.pco-lecture .pdj-etat.est-modifie { color: var(--texte-3); }

@media (max-width: 1250px) {
  .pdj-corps { grid-template-columns: 46px minmax(0, 1fr); }
  .pdj-props { grid-column: 1 / -1; }
  .pdj-vues { grid-template-columns: 1fr; }
}

/* ---------------- Téléphone ---------------- */
@media (max-width: 760px) {
  .pco-hero { padding: 24px 18px 20px; border-radius: 22px; gap: 18px; }
  .pco-hero-fond svg { width: 100%; right: -30%; opacity: .5; }
  .pco-trajets, .pco-cloche, .pco-alignement, .pco-aiguille { display: none; }
  .pco-hero h1 { font-size: 34px; }
  .pco-hero p { font-size: 14.5px; }
  .pco-filtres-l .segments { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .pco-chiffres { width: 100%; }
  .pco-chiffres > div { flex: 1 1 40%; min-width: 0; padding: 10px 12px; }
  .pco-chiffres b { font-size: 24px; }
  .pco-barre .segments { max-width: 100%; overflow-x: auto; }
  .pco-barre-info { margin-left: 0; }
  .pco-cherche { flex: 1 1 100%; min-width: 0; }
  .pco-grille { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pco-carte-c { padding: 10px; }
  .pco-carte-t { font-size: 13px; }
  .pco-carte-a { flex-direction: column; gap: 6px; }
  .pco-fenetre { padding: 0; align-items: flex-end; }
  .pco-fenetre-boite { max-height: 92vh; border-radius: 22px 22px 0 0; }
  .pco-fenetre-c { padding: 16px 14px 22px; }
  .pco-com-ecrire { flex-direction: column; align-items: stretch; }
  .pco-anim { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .pco-anim-maj { display: none; }
  .pco-resultat { grid-template-columns: 1fr; }
  .pco-resultat-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pco-vid-etape { padding: 14px 12px; gap: 10px; }
  .pco-vid-passage label { grid-template-columns: 40px minmax(0, 1fr); }
  .pco-vid-passage output { grid-column: 2; }
  .pco-champ { min-width: 0; width: 100%; }
  .pco-chantier { flex-direction: column; align-items: flex-start; padding: 18px; }
  .pdj-studio { padding: 8px; border-radius: 16px; margin-left: -6px; margin-right: -6px; }
  .pdj-entete .pdj-nom { min-width: 0; flex: 1 1 100%; }
  .pdj-entete .pdj-champ { max-width: 100%; }
  .pdj-corps { grid-template-columns: 40px minmax(0, 1fr); gap: 6px; }
  .pdj-outil { width: 38px; height: 34px; font-size: 15px; }
  .pdj-vue2d, .pdj-vue3d { height: clamp(320px, 58vh, 520px); }
  .pdj-carnet { padding: 8px 10px; }
  .pdj-carnet-annonce { width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .pco-trajets path, .pco-cloche, .pco-dj, .pco-aiguille { animation: none; }
}
