/* ============================================================
   POLITUBE — Pages "platform" (annuaire, méthodo, à-propos,
   santé des données, avis) alignées sur la DA app (Vidéos).
   Style le markup rendu/écrit pour platform.js dans la DA validée.
   Chargé À LA PLACE de platform.css, avec polyyoutube.css (coquille).
   ============================================================ */
body.platform-da .poly-main { padding: 1.6rem 2.2rem 3.5rem; max-width: 1060px; }
body.platform-da .content-page { max-width: 860px; }

/* Bandeau démo / info */
.demo-banner { margin: 0 0 1.6rem; padding: .7rem 1.1rem; border-radius: 12px; font-size: .82rem; color: #e9d7a3;
  background: rgba(230, 178, 60, .08); border: 1px solid rgba(230, 178, 60, .28); border-left: 3px solid var(--status-warn);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.demo-banner .platform-shell { display: contents; }
.demo-banner strong { color: #f4e6bc; }
.demo-banner a { color: var(--status-warn); font-weight: 600; }
.data-banner-public { background: rgba(53, 208, 127, .09) !important; border-color: rgba(53, 208, 127, .3) !important; border-left-color: #35d07f !important; color: #b9e7d5 !important; }
.data-banner-public strong { color: #d8f7e6; }
.data-banner-observation { background: rgba(55, 196, 214, .08) !important; border-color: rgba(55, 196, 214, .3) !important; border-left-color: #37c4d6 !important; color: #bfebf1 !important; }
.data-banner-observation strong { color: #dbfbff; }
.data-banner-observation a { color: #71dceb; }
.data-banner-unavailable { background: rgba(232, 73, 95, .10) !important; border-color: rgba(232, 73, 95, .32) !important; border-left-color: #e8495f !important; color: #f0babf !important; }
.data-banner-unavailable strong { color: #ffe0e3; }
.data-banner-unavailable a { color: #ffb8c1; }

/* Fil d'ariane / shell utilitaire */
.platform-shell { display: contents; }

/* Hero */
.platform-hero { padding: .4rem 0 1.6rem; border-bottom: 1px solid var(--yt-line); margin-bottom: 1.8rem; }
.platform-kicker { display: block; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--yt-brand); font-weight: 700; margin-bottom: .55rem; }
.platform-hero h1, .content-page h1 { font: 700 clamp(2rem, 5vw, 3.4rem)/1.02 var(--font-grotesk); letter-spacing: -.01em; margin: 0; color: #fff; }
.platform-hero h1 em, .content-page h1 em { color: var(--yt-brand); font-style: normal; font-weight: 700; }
.platform-hero h1 br, .content-page h1 br { display: none; }
.platform-intro { margin-top: .8rem; max-width: 68ch; color: var(--yt-muted); font-size: 1rem; line-height: 1.6; }
.profile-submission-jump { width: fit-content; display: inline-flex; flex-wrap: wrap; gap: .35rem; margin-top: 1rem; padding: .55rem .75rem; border: 1px solid var(--yt-line); border-radius: 10px; color: var(--yt-muted); background: rgba(255, 255, 255, .025); font-size: .78rem; transition: color .15s, border-color .15s, background .15s; }
.profile-submission-jump strong { color: var(--yt-brand); }
.profile-submission-jump:hover { color: var(--yt-text); border-color: rgba(55, 196, 214, .38); background: rgba(55, 196, 214, .06); }
.corpus-line { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--yt-muted); font-size: .82rem; }
.corpus-line b { color: var(--yt-text); }

/* Barre d'outils (recherche + filtres) */
.platform-tools { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, auto)) auto; gap: .7rem; padding: 0 0 1.4rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--yt-line); align-items: end; }
.platform-tools label span { display: block; margin-bottom: .4rem; color: var(--yt-muted); font-size: .82rem; }
.platform-tools input, .platform-tools select { width: 100%; min-height: 44px; border: 1px solid var(--yt-line-strong); border-radius: 11px; background: rgba(255, 255, 255, .03); color: var(--yt-text); padding: 0 .9rem; font: inherit; font-size: .9rem; }
.platform-tools input:focus, .platform-tools select:focus { outline: none; border-color: rgba(55, 196, 214, .6); background: rgba(255, 255, 255, .05); }
.result-count { align-self: end; min-height: 44px; display: flex; align-items: center; justify-content: flex-end; color: var(--yt-brand); font-size: .82rem; font-weight: 600; }

/* Annuaire — lignes */
.directory-list { padding: 0; }
.directory-row { display: grid; grid-template-columns: minmax(220px, 1.2fr) 120px minmax(160px, .8fr) 130px 110px; gap: 1.2rem; align-items: center; min-height: 78px; padding: 1rem 1rem; border: 1px solid var(--yt-line); border-radius: 14px; background: var(--yt-card); margin-bottom: .6rem; transition: border-color .15s, transform .15s; }
.directory-row:hover { border-color: rgba(55, 196, 214, .4); transform: translateX(2px); }
.directory-row h2 { font: 600 1.1rem/1.2 var(--font-grotesk); margin: 0; }
.directory-row h2 a { color: var(--yt-text); }
.directory-row:hover h2 a { color: var(--yt-brand-soft); }
.directory-row p { margin-top: .3rem; color: var(--yt-muted); font-size: .8rem; line-height: 1.4; }
.directory-cell { color: var(--yt-muted); font-size: .8rem; }

/* identité : logo + nom + description */
.directory-id { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.directory-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; background: var(--yt-card-2); border: 1px solid var(--yt-line); display: grid; place-items: center; overflow: hidden; position: relative; }
.directory-logo::after { content: attr(data-ini); font: 700 .95rem var(--font-grotesk); color: var(--yt-muted); }
.directory-logo.has-img::after { display: none; }
.directory-logo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.directory-id > div { min-width: 0; }
.directory-id p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42ch; }

/* pastille positionnement */
.directory-pos { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .7rem; border-radius: 999px; font: 700 .72rem var(--font-grotesk); text-transform: uppercase; letter-spacing: .04em; }
.directory-pos::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.directory-pos.gauche { color: var(--pos-gauche); background: rgba(232, 73, 95, .12); box-shadow: inset 0 0 0 1px rgba(232, 73, 95, .3); }
.directory-pos.centre { color: var(--pos-centre); background: rgba(244, 241, 232, .09); box-shadow: inset 0 0 0 1px rgba(244, 241, 232, .3); }
.directory-pos.droite { color: var(--pos-droite); background: rgba(74, 144, 226, .12); box-shadow: inset 0 0 0 1px rgba(74, 144, 226, .3); }
.directory-pos.unpublished { color: #9fd9e2; background: rgba(55, 196, 214, .1); box-shadow: inset 0 0 0 1px rgba(55, 196, 214, .28); }
.directory-aud { font-variant-numeric: tabular-nums; color: var(--yt-text); font-weight: 600; font-size: .92rem; }
.directory-aud small { display: block; color: var(--yt-faint); font-weight: 400; font-size: .72rem; }
.status { display: inline-flex; padding: .22rem .65rem; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.status-insufficient { color: var(--status-warn); background: rgba(230, 178, 60, .13); box-shadow: inset 0 0 0 1px rgba(230, 178, 60, .3); }
.status-stale { color: var(--pos-indep); background: rgba(154, 166, 184, .12); box-shadow: inset 0 0 0 1px rgba(154, 166, 184, .3); }
.status-confirmed, .status-published { color: #35d07f; background: rgba(53, 208, 127, .12); box-shadow: inset 0 0 0 1px rgba(53, 208, 127, .3); }

/* Candidature à l'Hémicycle */
.profile-submission { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(230px, .78fr) minmax(380px, 1.22fr); gap: clamp(1.6rem, 4vw, 3.2rem); margin-top: 3rem; padding: clamp(1.5rem, 4vw, 2.8rem); border: 1px solid rgba(55, 196, 214, .28); border-radius: 24px; background: linear-gradient(135deg, rgba(55, 196, 214, .08), rgba(10, 16, 27, .94) 46%, rgba(232, 73, 95, .07)); box-shadow: 0 24px 70px rgba(0, 0, 0, .24); }
.profile-submission::before { content: ""; position: absolute; z-index: -1; width: 280px; height: 280px; right: -130px; top: -150px; border-radius: 50%; border: 1px solid rgba(55, 196, 214, .22); box-shadow: 0 0 0 44px rgba(55, 196, 214, .025), 0 0 0 92px rgba(232, 73, 95, .018); }
.profile-submission-intro h2 { margin: 0; color: var(--yt-text); font: 700 clamp(1.85rem, 4vw, 3rem)/1.03 var(--font-grotesk); letter-spacing: -.025em; }
.profile-submission-intro h2 em { color: var(--yt-brand); font-style: normal; }
.profile-submission-intro > p { margin: 1rem 0 1.5rem; color: var(--yt-muted); font-size: .98rem; line-height: 1.65; }
.profile-submission-rule { display: grid; gap: .35rem; padding: 1rem 1.05rem; border-left: 2px solid var(--yt-brand); background: rgba(255, 255, 255, .025); color: var(--yt-muted); font-size: .8rem; line-height: 1.5; }
.profile-submission-rule strong { color: var(--yt-text); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; }
.profile-submission-form { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; align-content: start; }
.profile-submission-form label, .profile-family legend { color: var(--yt-muted); font-size: .8rem; }
.profile-submission-form > label { display: grid; gap: .4rem; }
.profile-submission-form input:not([type="radio"]):not([type="checkbox"]), .profile-submission-form textarea { width: 100%; border: 1px solid var(--yt-line-strong); border-radius: 11px; background: rgba(4, 10, 17, .46); color: var(--yt-text); padding: .72rem .82rem; font: inherit; }
.profile-submission-form input:not([type="radio"]):not([type="checkbox"]) { min-height: 46px; }
.profile-submission-form textarea { min-height: 112px; resize: vertical; line-height: 1.45; }
.profile-submission-form input:focus-visible, .profile-submission-form textarea:focus-visible { outline: 2px solid rgba(55, 196, 214, .7); outline-offset: 2px; border-color: transparent; }
.profile-submission-form .wide { grid-column: 1 / -1; }
.profile-family { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin: 0; padding: 0; border: 0; }
.profile-family legend { margin-bottom: .45rem; }
.profile-family label { cursor: pointer; position: relative; }
.profile-family input { position: absolute; opacity: 0; pointer-events: none; }
.profile-family span { min-height: 62px; display: grid; place-content: center; gap: .18rem; padding: .65rem .75rem; border: 1px solid var(--yt-line-strong); border-radius: 12px; background: rgba(255, 255, 255, .025); text-align: center; transition: border-color .15s, background .15s, transform .15s; }
.profile-family b { color: var(--yt-text); font-size: .88rem; }
.profile-family small { color: var(--yt-faint); font-size: .68rem; }
.profile-family label:hover span { transform: translateY(-1px); border-color: rgba(55, 196, 214, .45); }
.profile-family input:checked + span { border-color: var(--yt-brand); background: rgba(55, 196, 214, .12); box-shadow: inset 0 0 0 1px rgba(55, 196, 214, .18); }
.profile-family input:focus-visible + span { outline: 2px solid var(--yt-brand); outline-offset: 2px; }
.profile-consent { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: .65rem !important; color: var(--yt-faint) !important; line-height: 1.45; }
.profile-consent input { flex: none; margin-top: .15rem; accent-color: var(--yt-brand); }
.profile-consent a { color: var(--yt-brand-soft); }
.profile-submit-row { display: flex; align-items: center; gap: 1rem; min-height: 46px; }
.profile-submit-row .primary-button { flex: none; }
.profile-submit-row .primary-button:disabled { opacity: .55; cursor: wait; }
.profile-submission-status { margin: 0; color: var(--yt-muted); font-size: .78rem; line-height: 1.4; }
.profile-submission-status.is-success { color: #8ce4bc; }
.profile-submission-status.is-error { color: #ff9ba8; }
.submission-trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Pages de contenu (méthodo, à-propos) */
.content-page section { margin-top: 2.2rem; }
.content-page h2 { font: 700 1.35rem/1.15 var(--font-grotesk); color: var(--yt-text); margin: 0 0 .8rem; }
.content-page h3 { font: 700 1.05rem var(--font-grotesk); color: var(--yt-text); margin: 1.6rem 0 .6rem; }
.content-page p { color: var(--yt-muted); line-height: 1.65; font-size: .96rem; margin: 0 0 .9rem; max-width: 72ch; }
.content-page p b, .content-page li b, .content-page strong { color: var(--yt-text); font-weight: 600; }
.content-page a { color: var(--yt-brand-soft); font-weight: 500; }
.content-page ul { margin: .4rem 0 1rem; padding-left: 1.2rem; display: grid; gap: .5rem; }
.content-page li { color: var(--yt-muted); line-height: 1.55; font-size: .94rem; max-width: 72ch; }
.content-page li::marker { color: var(--yt-brand); }

.method-callout { margin: 1.4rem 0; padding: 1rem 1.2rem; border-radius: 14px;
  background: rgba(230, 178, 60, .07); border: 1px solid rgba(230, 178, 60, .22); border-left: 3px solid var(--status-warn);
  color: #e9d7a3; font: .95rem/1.55 var(--font-grotesk); }
.method-callout a { color: var(--status-warn); font-weight: 600; }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 1.4rem 0; }
.metric-grid > div { background: var(--yt-card); border: 1px solid var(--yt-line); border-radius: 14px; padding: 1.1rem 1.2rem; }
.metric-grid b { display: block; color: var(--yt-brand); font: 700 1.5rem var(--font-grotesk); }
.metric-grid span { display: block; margin-top: .35rem; color: var(--yt-muted); font-size: .78rem; line-height: 1.4; }

.entity-profile-header { display: flex; gap: 1.15rem; align-items: center; margin-bottom: .8rem; }
.entity-profile-avatar { width: 88px; height: 88px; flex: 0 0 88px; border-radius: 50%; overflow: hidden; position: relative; display: grid; place-items: center; background: var(--yt-card-2); border: 1px solid var(--yt-line-strong); box-shadow: 0 12px 35px rgba(0, 0, 0, .24); }
.entity-profile-avatar::after { content: attr(data-ini); font: 700 1.35rem var(--font-grotesk); color: var(--yt-muted); }
.entity-profile-avatar.has-img::after { display: none; }
.entity-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.entity-profile-header .platform-kicker { margin-bottom: .35rem; }
.entity-profile-header h1 { margin: 0; }
.entity-profile-header .entity-summary { margin: .45rem 0 0; }
.entity-profile-metrics { margin: 1.15rem 0 1.4rem; }
.entity-profile-metrics b { font-variant-numeric: tabular-nums; }

/* Formulaire de correction */
.correction-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 820px; margin-top: 1.4rem; }
.correction-form label { color: var(--yt-muted); font-size: .84rem; display: grid; gap: .4rem; }
.correction-form input, .correction-form textarea, .correction-form select { width: 100%; min-height: 44px; border: 1px solid var(--yt-line-strong); border-radius: 11px; background: rgba(255, 255, 255, .03); color: var(--yt-text); padding: .6rem .8rem; font: inherit; }
.correction-form input:focus, .correction-form textarea:focus { outline: none; border-color: rgba(55, 196, 214, .6); }
.correction-form textarea { min-height: 120px; resize: vertical; }
.correction-form .wide { grid-column: 1 / -1; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1.4rem; border-radius: 11px; border: none; cursor: pointer; background: var(--yt-brand); color: #04252b; font-weight: 700; font-size: .88rem; }
.primary-button:hover { filter: brightness(1.08); }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; padding: .7rem 1.3rem; border-radius: 11px; cursor: pointer; background: transparent; color: var(--yt-text); border: 1px solid var(--yt-line-strong); font-weight: 600; font-size: .86rem; }
.secondary-button:hover { background: rgba(255, 255, 255, .06); }

/* Santé des données */
.health-score-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.8rem 0; }
.health-score-grid > section { border: 1px solid var(--yt-line-strong); border-radius: 18px; background: var(--yt-card); padding: 1.5rem; margin: 0; }
.health-score-grid > section > span { color: var(--yt-muted); text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 700; }
.health-score-grid > section > strong { display: block; margin: .7rem 0 1.2rem; font: 700 clamp(2.6rem, 6vw, 4.4rem)/.9 var(--font-grotesk); color: #fff; }
.health-score-grid small { color: var(--yt-muted); font-size: .26em; font-weight: 500; }
.health-domain-list { display: grid; gap: .5rem; }
.health-domain-list div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--yt-line); padding-top: .5rem; color: var(--yt-muted); font-size: .84rem; }
.gate-list { display: grid; gap: .5rem; margin-top: 1.1rem; list-style: none; padding: 0; }
.gate-list li { border: 1px solid var(--yt-line); border-radius: 11px; padding: .75rem .9rem; font-size: .88rem; }
.gate-pass { color: #9ee1bf; background: rgba(53, 208, 127, .1); border-color: rgba(53, 208, 127, .25) !important; }
.gate-fail { color: #efb0a9; background: rgba(232, 73, 95, .1); border-color: rgba(232, 73, 95, .28) !important; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; }
.section-heading p { color: var(--yt-faint); font-size: .8rem; }
.empty-evidence { margin-top: 1.2rem; border: 1px dashed rgba(55, 196, 214, .3); border-radius: 14px; padding: 1.3rem; color: var(--yt-muted); line-height: 1.55; font-size: .9rem; }
.empty-evidence b { color: var(--yt-text); }

/* Footer */
.platform-footer { border-top: 1px solid var(--yt-line); margin-top: 2.6rem; padding-top: 1.4rem; color: var(--yt-faint); font-size: .82rem; }
.platform-footer .platform-shell { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.platform-footer a { color: var(--yt-muted); }
.platform-footer a:hover { color: var(--yt-brand); }
.platform-footer b { color: var(--yt-text); }

@media (max-width: 900px) {
  body.platform-da .poly-main { padding: 1.2rem 1.2rem 2.6rem; }
  .platform-tools { grid-template-columns: 1fr; }
  .result-count { justify-content: flex-start; }
  .directory-row { grid-template-columns: 1fr auto; gap: .6rem; }
  .directory-row .optional { grid-column: 1 / -1; }
  .metric-grid, .health-score-grid { grid-template-columns: 1fr; }
  .correction-form { grid-template-columns: 1fr; }
  .correction-form .wide { grid-column: 1; }
  .entity-profile-avatar { width: 68px; height: 68px; flex-basis: 68px; }
  .profile-submission { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .profile-submission { padding: 1.25rem; border-radius: 18px; }
  .profile-submission-form { grid-template-columns: 1fr; }
  .profile-submission-form .wide { grid-column: 1; }
  .profile-family { grid-template-columns: 1fr; }
  .profile-family span { min-height: 52px; }
  .profile-submit-row { align-items: stretch; flex-direction: column; }
}

/* Badge de statut méthodologie (DOC-M01) */
.method-badge { display: inline-block; margin-left: .5rem; padding: .15rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
.method-badge.ok { color: #06121a; background: var(--yt-brand); }
.method-badge.warn { color: var(--status-warn); background: rgba(230, 178, 60, .12); box-shadow: inset 0 0 0 1px rgba(230, 178, 60, .35); }
