/* === Pages Analyses (liste/comparaison + détail) === */
/* Utilitaires non globaux réutilisés ici */

@layer components {
    .l-columns {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 16px;
    }
    /* --- Barre unique : lancement + tri --- */
    .analysis-bar {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 16px;
        margin-bottom: 16px;
    }
    /* Modulation de la note globale (remplace le select de tri) : bouton « Note centrale 50/50 » ouvrant un pop-up
       avec le curseur Qualité/Opportunité. Style bouton composite : l'ensemble = outline, le ratio « 50/50 » = fill
       (seule la partie réactive au clic a un fond plein), pour signaler visuellement la zone cliquable. */
    .analysis-weight-box {
        position: relative;
        display: inline-flex;
    }
    /* Le choix de la note affichée et son minimum, en ligne dans la barre de la liste. */
    .field.analysis-note-choice,
    .field.analysis-note-filter {
        display: inline-flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin: 0;
    }
    .analysis-note-filter .field-control {
        width: 5.5em;
    }
    /* Le dernier cours et son état, chacun sur sa ligne dans la cellule. */
    .analysis-quote-last,
    .analysis-quote-state {
        display: block;
    }
    .analysis-weight-button {
        display: inline-flex;
        align-items: stretch;
        gap: 0;
    }
    .analysis-weight-label {
        display: inline-flex;
        align-items: center;
        margin-inline: 10px;
    }
    .analysis-weight-ratio-anchor {
        position: relative;
        display: inline-flex;
    }
    .analysis-weight-ratio {
        display: inline-flex;
        align-items: center;
        padding: 0 11px;
    }
    /* Le popover de la pondération (gbl_popover.css) : OPPORTUNITÉ en haut, le curseur au milieu, QUALITÉ en bas.
       Bandeau Opportunité : texte à droite, ligne à gauche ; Qualité : texte à gauche, ligne à droite. */
    .analysis-weight-popover-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 3px 14px;
    }
    .analysis-weight-popover-row.opportunity {
        flex-direction: row-reverse;
    }
    .analysis-weight-popover-line {
        flex: 1 1 auto;
        height: 2px;
    }
    /* Bande centrale : le curseur du canon (sgbl_range.css). */
    .analysis-weight-popover-middle {
        display: flex;
        align-items: center;
        padding: 20px 14px;
    }
    /* Cellule secteur cliquable : bouton sans habillage propre, hérite du style texte de la cellule (.analysis-sector). */
    .analysis-sector-button {
        margin: 0;
    }
    /* Pop-up « Secteur » : l'habillage, l'ancrage et les fermetures viennent de sgbl_popover (.popover).
       Ne reste ici que ce qui est propre au secteur — sa largeur, et ses deux blocs : les secteurs principaux
       avec leurs proportions, puis le graphique des activités concrètes (le composant de la section
       « Activité », verrouillé sur ce niveau). */
    .sector-popover {
        width: 420px;
    }
    .sector-popover-title {
        margin: 0 0 6px;
    }
    .sector-popover-sectors {
        margin: 0;
    }
    .sector-popover-row {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin-block: 2px;
    }
    .sector-popover-action {
        margin-top: 4px;
    }
    /* Bouton « Générer une analyse » verrouillé (non-Pro), suivi de la note qui le dit */
    .analysis-generate {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    /* Section de lancement intégrée (dépliable, fermée par défaut) */
    .analysis-launch-panel {
        margin-bottom: 16px;
    }
    .analysis-launch-title {
        margin: 0 0 4px;
    }
    .analysis-launch-message {
        margin: 12px 0 0;
    }
    /* Mode « Poser une question » (panneau + page détail) */
    .analysis-ask-select {
        width: 100%;
        max-width: 460px;
        margin-bottom: 10px;
    }
    /* Champ long : variante globale `.exv-field-long` ; la page n'en règle que la disposition. Il reste
       désactivé tant qu'aucune entreprise n'est sélectionnée. */
    .field-control.field-control--long {
        margin-bottom: 10px;
    }
    .analysis-ask-premium {
        display: flex;
        align-items: baseline;
        gap: 7px;
        flex-wrap: wrap;
        margin: 0 0 10px;
    }
    .analysis-ask-premium .note {
        flex-basis: 100%;
        margin: 0;
    }
    .analysis-ask-answer {
        margin-top: 14px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .analysis-ask-bubble {
        width: 100%;
    }
    .analysis-ask-detail {
        margin: 14px 0 18px;
    }
    .analysis-ask-detail #analysis-detail-ask {
        margin-top: 12px;
        max-width: 640px;
    }
    /* Recherche de ticker + suggestions (select de propositions officielles) */
    .analysis-search {
        position: relative;
        margin: 14px 0 6px;
    }
    /* Focus de ce champ : plus de marque locale — l'indicateur de focus global de
       gbl_styles.css s'applique (un `outline: none` ici le supprimerait). */
    .analysis-suggestions {
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        z-index: 10;
        max-height: 280px;
    }
    .analysis-suggestions > .divider {
        margin-block: 0;
    }
    .analysis-suggestion-name {
        flex: 1 1 auto;
    }
    .analysis-selected {
        margin: 4px 0 12px;
    }
    /* « Lancer l'analyse » / « Confirmer » + « Consulter la dernière analyse » (entreprise déjà suivie) côte à côte. */
    .analysis-launch-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: 6px;
    }
    #analysis-launch {
        margin-top: 0;
    }
    .analysis-company {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    /* La colonne « Note » : son en-tête et ses cellules centrés, alignés sur la pastille tri-notes de
       chaque ligne. */
    th.analysis-note-header,
    td.analysis-note-cell {
        text-align: center;
    }
    .analysis-note-header .analysis-sort-label {
        justify-content: center;
        width: 100%;
    }
    .analysis-rating {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        width: 132px;
        height: 24px;
        padding: 0 8px;
        box-sizing: border-box;
    }
    .analysis-rating-bound {
        z-index: 1;
    }
    .analysis-rating-marker {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 26px;
        height: 19px;
        padding: 0 7px;
    }
    /* Barre de score compacte */
    .analysis-score {
        display: inline-flex;
        align-items: center;
        gap: 7px;
    }
    .analysis-score-value {
        display: inline-flex;
        justify-content: flex-end;
        min-width: 1.8em;
    }
    /* --- Détail : en-tête --- */
    .analysis-head {
        margin-bottom: 6px;
    }
    .analysis-head-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
        flex-wrap: wrap;
    }
    .analysis-head-id {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
        flex: 1 1 260px;
    }
    .analysis-head-id .logo {
        width: 46px;
        height: 46px;
    }
    /* Le symbole et le nom, deux titres, restent sur une même ligne. */
    .analysis-head-ticker,
    .analysis-head-name {
        display: inline;
    }
    .analysis-head-tag {
        margin-top: 2px;
    }
    .analysis-head-badges {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
    /* Bloc de synthèse : DEUX CADRANS DISJOINTS (notation · valorisation) puis les 6 piliers, sur DEUX
       rangées de trois — c'est ce qui fait coïncider leur hauteur avec celle des cadrans, au lieu d'un
       ruban d'une seule ligne qui laissait la moitié de la bande vide.
       Un cadran est un SVG à viewBox : il se met à l'échelle tout seul, typographie interne comprise —
       d'où l'absence ici de toute taille de police, et de point de rupture pour son contenu. */
    .analysis-synthesis-head {
        display: flex;
        align-items: center;
        gap: 24px;
        margin: 18px 0 4px;
        flex-wrap: wrap;
    }
    /* 232 px : la MÊME largeur que `.exv-an-head-price`, deux rangées plus bas. Le cadran, la mosaïque et
       le bloc de cotation sont les trois seules colonnes de droite de l'en-tête ; une largeur commune est
       ce qui fait tomber la mosaïque exactement sur le cours qu'elle commente. Toute retouche de l'une des
       trois doit se reporter sur les deux autres — c'est un alignement, pas une coïncidence. */
    .analysis-dial {
        flex: 0 0 232px;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    .analysis-dial-graphic {
        display: block;
        width: 100%;
        height: auto;
        overflow: visible;
    }
    /* Pastille de bande : PLEINE, sur toute la largeur du cadran — c'est la conclusion de l'objet qu'elle
       surmonte, pas une légende de plus. Fond et encre viennent du JS (`UI.darkenForWhite` sur la couleur
       de la note globale, encre blanche fixe), d'où l'absence ici de toute règle par bande.
       Rayon SOBRE et non 999 px : une capsule se lit comme une étiquette qu'on épingle, alors que ce
       bandeau conclut la colonne — il en reprend donc le rayon, comme les cartes de verdict plus bas. */
    .analysis-note-band {
        align-self: stretch;
        margin-top: 5px;
        padding: 5px 10px;
    }
    .analysis-note-flags {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        margin-top: 3px;
    }
    .analysis-dial--empty {
        justify-content: center;
    }
    /* MOSAÏQUE DE VALORISATION. Les aires sont exactes (cf. `UI.zoneMosaic`) : RIEN ici ne doit les
       retoucher — ni marge entre cellules, ni bordure portée par elles, qui rogneraient ce que le pavage
       promet. Les cloisons vivent dans un calque à part, invisible au repos (les couleurs suffisent à
       séparer) et révélé à l'état inondé, où toutes les cellules deviennent d'une seule teinte.
       Le voile de la phrase est TRANSPARENT et sans prise au pointeur : il laisse voir les cloisons
       dessous, et n'intercepte pas le survol de la cellule qui l'a fait paraître. */
    .analysis-mosaic {
        position: relative;
        flex: 0 0 232px;
        max-width: 100%;
        align-self: center;
        overflow: hidden;
    }
    /* Encre BLANCHE FIXE, comme les parts chiffrées au repos : le fond est un aplat de zone (vert sombre à
       jaune vif), et une encre qui basculerait au noir selon la zone clignoterait d'une cellule à l'autre.
       Le halo (`text-shadow`, pendant HTML du `paint-order: stroke fill` du SVG) rétablit la lisibilité sur
       le jaune sans retoucher la couleur de la cellule, qui est la donnée. */
    .analysis-tile-flood {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 6px 12px;
    }
    .analysis-tile-message {
        margin: 0;
    }
    .analysis-note-line {
        margin-bottom: 10px;
    }
    .analysis-synthesis-head .analysis-gauges {
        flex: 1 1 340px;
        margin: 0;
        gap: 16px 26px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-content: center;
    }
    /* Verdicts + cotation : deux colonnes de même hauteur. À gauche les deux jugements empilés, à droite le
       cours qui les conditionne. Nom PROPRE : `.analysis-conclusion` est déjà pris par le tableau de comparaison,
       avec un `max-width: 320px` qui écrasait silencieusement cette rangée. */
    .analysis-verdict {
        display: flex;
        align-items: stretch;
        gap: 12px;
        margin-top: 16px;
        flex-wrap: wrap;
    }
    .analysis-conclusion-cards {
        flex: 1 1 420px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        align-content: stretch;
    }
    .analysis-head-price:empty {
        display: none;
    }
    .analysis-head-price {
        flex: 0 0 232px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        gap: 2px;
    }
    .analysis-price-main {
        display: flex;
        align-items: baseline;
        gap: 8px;
    }
    .analysis-price-note:empty {
        display: none;
    }
    .analysis-price-capitalization {
        margin-top: 4px;
    }
    .analysis-gauges {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 14px;
        margin: 18px 0 4px;
    }
    .analysis-gauge-bar {
        margin: 5px 0;
    }
    /* --- Détail : onglets + sections --- */
    .analysis-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin: 16px 0;
    }
    /* « Poser une question » : bouton (pas un onglet), poussé à droite de la barre, centré verticalement. */
    .analysis-tabs-spacer {
        flex: 1 1 auto;
        min-width: 12px;
    }
    .analysis-section {
        margin-bottom: 22px;
    }
    /* Paires clé/valeur génériques */
    .analysis-pairs {
        gap: 6px 22px;
    }
    .analysis-list {
        margin: 4px 0 0 18px;
    }
    /* Familles de scores (barres) */
    .analysis-family {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 8px 22px;
    }
    .analysis-family-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    /* Thèses */
    .analysis-theses {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 14px;
    }
    .analysis-thesis-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 6px;
    }
    /* Note + définitions (probabilité / solidité / confiance / attractivité) */
    .analysis-theses-note {
        margin-bottom: 16px;
    }
    .analysis-definitions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 4px 18px;
        margin-top: 8px;
    }
    /* Zones de prix */
    .analysis-zones-box {
        margin-top: 6px;
    }
    .analysis-zones {
        position: relative;
        display: flex;
        height: 22px;
        overflow: visible;
    }
    .analysis-price-marker {
        position: absolute;
        top: -4px;
        bottom: -4px;
        width: 2px;
    }
    .analysis-price-marker-label {
        position: absolute;
        top: -16px;
        left: 50%;
        transform: translateX(-50%);
    }
    .analysis-zones-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 12px;
    }
    .analysis-legend {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    .analysis-legend-line {
        display: inline-block;
        width: 0;
        height: 12px;
    }
    /* ---------- Valorisation réformée (badge méthode, incertitude, fourchette, contrôles) ---------- */
    .valuation-head {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 10px;
    }
    .valuation-fair {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
        margin-bottom: 12px;
    }
    .valuation-position {
        margin-top: 10px;
    }
    /* Incertitude — explication décomposée (résumé + facteurs nommés en barres d'intensité) */
    .valuation-uncertainty-summary {
        margin-top: 12px;
    }
    .valuation-drivers {
        margin-top: 6px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .valuation-driver {
        display: grid;
        grid-template-columns: minmax(140px, 1.2fr) 70px minmax(0, 2fr);
        align-items: center;
        gap: 10px;
    }
    /* Synthèse : barre de zones AMÉLIORÉE (domaine borné, repères de seuils + marqueurs juste valeur/prix) */
    .analysis-valuation {
        margin-top: 10px;
    }
    .analysis-zones.tall {
        height: 26px;
    }
    .analysis-span {
        position: absolute;
        top: 0;
        bottom: 0;
    }
    /* Barre de valorisation : bascule regroupé / dissocié */
    .valuation-bar {
        margin-top: 10px;
    }
    .valuation-bar-head {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 6px;
    }
    .valuation-bar[data-valuation-bar="grouped"] .valuation-split {
        display: none;
    }
    .valuation-bar[data-valuation-bar="split"] .valuation-grouped {
        display: none;
    }
    /* Vue dissociée : 4 lignes (un intervalle par niveau) + repères JV/cours traversant les 4 */
    .valuation-split-box {
        position: relative;
        padding: 4px 0;
    }
    .valuation-split-row {
        display: grid;
        grid-template-columns: 116px 1fr;
        align-items: center;
        gap: 8px;
        height: 16px;
        margin: 4px 0;
    }
    .valuation-split-label {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    .valuation-split-track {
        position: relative;
        height: 12px;
    }
    .valuation-split-span {
        position: absolute;
        top: 0;
        bottom: 0;
    }
    .valuation-overlay {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 124px;
        right: 0;
    }
    .valuation-line {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 0;
    }
    .valuation-line-label {
        position: absolute;
        top: -14px;
        left: 50%;
        transform: translateX(-50%);
    }
    .analysis-fair-marker {
        position: absolute;
        top: -3px;
        bottom: -3px;
        width: 0;
    }
    .analysis-ticks {
        position: relative;
        height: 30px;
        margin-top: 7px;
    }
    /* Valorisation : courbe du cours sur 2 ans (canvas ExvChart) + paliers en hlines */
    .analysis-price-chart {
        position: relative;
        height: 340px;
        margin-top: 8px;
    }
    .analysis-price-chart canvas {
        width: 100%;
        height: 100%;
        display: block;
    }
    /* Le chargement en texte garde la mesure de son texte, centré dans le graphique qu'il attend. */
    .analysis-chart-status {
        position: absolute;
        inset: 0;
        block-size: fit-content;
        margin: auto;
    }
    /* Conditions de réanalyse */
    .analysis-condition-type {
        margin-right: 8px;
    }
    /* ---------- Analyse technique (onglet Technique + bandeau Synthèse) ---------- */
    .technical-timeline {
        display: flex;
        gap: 4px;
        margin: 4px 0 8px;
        flex-wrap: wrap;
    }
    .technical-density {
        gap: 2px;
    }
    .technical-density > .technical-density-cell {
        width: 13px;
        height: 10px;
    }
    /* ---------- Synthèse : lecture structurée (points forts / zones d'ombre / objectifs / conclusion) ---------- */
    .narrative-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 14px;
        margin-bottom: 16px;
    }
    .narrative-card h3 {
        margin: 0 0 8px;
    }
    .narrative-conclusion > .title {
        margin-block-end: 6px;
    }
    .narrative-card .analysis-list {
        margin-left: 16px;
    }
    /* ---------- Onglet Scoring (présentation différenciée par dimension) ---------- */
    .scoring {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .scoring-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 16px;
    }
    .scoring-card-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
    }
    .scoring-card-head h3 {
        margin: 0;
    }
    .scoring-caption {
        margin: 3px 0 12px;
    }
    /* Lignes barres étiquetées */
    .scoring-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 7px 0;
    }
    .scoring-row-key {
        flex: 0 0 42%;
    }
    .scoring-row-track {
        flex: 1 1 auto;
    }
    .scoring-row-value {
        display: flex;
        flex: 0 0 auto;
        justify-content: flex-end;
        min-width: 2em;
    }
    .scoring-moat-head {
        display: flex;
        align-items: center;
        gap: 18px;
        flex-wrap: wrap;
    }
    /* Déclencheur du pop-up « avantage global » : un <button>, donc remis à zéro (un bouton hérite d'une
       fonte, d'une bordure et d'un alignement de texte propres au navigateur). */
    .scoring-moat-score {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 108px;
    }
    .scoring-moat-score .scoring-moat-label {
        margin-top: 6px;
    }
    .scoring-moat-intro {
        flex: 1 1 240px;
    }
    .scoring-moat-intro h3 {
        margin: 0 0 4px;
    }
    .scoring-sources-head {
        margin: 16px 0 8px;
    }
    /* ---------- La JAUGE de l'avantage concurrentiel (un seul SVG) ----------
       Trois faces, UN objet : le segment, le trapèze de liaison, la cellule du nom. Découpées en éléments
       distincts, chacune aurait sa propre cible de clic et l'utilisateur sélectionnerait « le pourcentage »
       ou « le nom » comme deux choses ; ici c'est un `<g>`, donc un seul geste et un contour d'un seul tracé.
       Le SVG s'étire en largeur (`preserveAspectRatio: none`) : tous les contours portent
       `vector-effect: non-scaling-stroke`, sans quoi l'étirement les épaissirait dans un seul sens. */
    .scoring-gauge-box {
        position: relative;
    }
    .scoring-gauge {
        display: block;
        width: 100%;
        height: 81px;
        overflow: visible;
    }
    /* LES TEXTES SONT EN HTML, par-dessus le SVG. `preserveAspectRatio: none` étire le dessin à la largeur
       de la carte — ce qui permet la barre pleine largeur à hauteur fixe — mais étirerait aussi les lettres,
       d'un facteur dépendant de la fenêtre. Ancrés en POURCENTAGE, ils restent solidaires du dessin sans en
       subir la déformation ; `pointer-events: none` fait que le clic les traverse et atteint le <g> du SVG,
       si bien que la cible reste UNIQUE. */
    .moat-gauge-texts {
        position: absolute;
        inset: 0;
    }
    /* Copie flottante du contour sélectionné, superposée APRÈS le texte : le svg principal est peint SOUS
       `.moat-gauge-texts` (ses fonds opaques — segment, cellule — doivent rester sous le texte), donc son propre
       `.moat-gauge-outline` disparaît partiellement là où il longe le `%`. Celle-ci restaure un tracé continu. */
    .moat-gauge-outline-top {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: visible;
    }
    .moat-gauge-title-value,
    .moat-gauge-title-name {
        position: absolute;
        display: block;
        overflow: hidden;
    }
    /* Le texte se centre dans sa bande de 30 px par le remplissage, l'interligne restant celui du rôle. */
    .moat-gauge-title-value {
        top: 0;
        height: 30px;
        padding-block: calc((30px - 1lh) / 2);
        transform: translateX(-50%);
    }
    .moat-gauge-title-name {
        top: 51px;
        height: 30px;
        padding: calc((30px - 1lh) / 2) 6px;
    }
    /* Les hachures et le contour n'existent qu'à la SÉLECTION : au repos, rien ne doit distinguer une
       source d'une autre autrement que par sa couleur et sa largeur. */
    .moat-gauge-hatch {
        display: none;
    }
    .moat-gauge-advantage[aria-expanded="true"] .moat-gauge-hatch {
        display: block;
    }
    /* Sous ce seuil, cinq cellules ne tiennent plus un nom : la jauge se replie en liste, chaque source
       devenant une ligne « pastille + nom + intensité ». La correspondance redevient chromatique, faute de
       pouvoir rester graphique. */
    .scoring-gauge-list {
        display: none;
    }
    /* Pop-up d'explication d'un type d'avantage (habillage commun : sgbl_popover). */
    .moat-popover {
        width: 360px;
    }
    .moat-popover-head {
        margin: 0 0 6px;
    }
    .moat-popover-scale {
        margin: 0;
    }
    .moat-popover-title {
        margin: 0 0 6px;
    }
    .moat-popover-value {
        margin: 0;
    }
    .moat-popover-band {
        display: flex;
        gap: 10px;
        margin-block: 2px;
    }
    .moat-popover-rank {
        flex: 0 0 3.2em;
    }
    /* ---------- Onglet Couches (refonte : accordéons ordonnés, une couche = un panneau repliable) ---------- */
    .layer-disclosure-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .layer-disclosure-title {
        flex: 1 1 auto;
        position: relative;
    }
    .layer-disclosure-body .analysis-text {
        margin: 0;
        max-width: 78ch;
    }
    .layer-disclosure-body.split {
        display: flex;
        gap: 28px;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .layer-disclosure-main {
        flex: 1 1 360px;
        min-width: 0;
    }
    .layer-disclosure-aside {
        flex: 1 1 240px;
        min-width: 0;
    }
    .layer-aside-head {
        margin-bottom: 6px;
    }
    /* Étiquette d'attribut (cycle / maturité / récurrence…) */
    .layer-tag {
        display: inline-flex;
        align-items: baseline;
        gap: 6px;
    }
    /* Listes de définition (domiciliation / régime fiscal / position stratégique) */
    .layer-definitions {
        margin-top: 10px;
    }
    /* Comparables : pairs en pastilles */
    .layer-peers {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 10px;
    }
    /* Position concurrentielle : deux sous-cartes de moat (technologique / marque) */
    .layer-moat-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 14px;
        margin-top: 10px;
    }
    .layer-moat-card h4 {
        margin: 0 0 6px;
    }
    /* ===== Thèse de suivi — points falsifiables, niveau de validation 1-5 (SYS_these-suivi) ===== */
    .analysis-points {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 14px;
    }
    .analysis-point-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 6px;
    }
    .analysis-point-head h3 {
        margin: 0;
    }
    .analysis-point-level {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    /* Échelle 1-5 : cinq crans, ceux atteints sont pleins. La couleur suit le NIVEAU, pas le cran. */
    .analysis-point-gauge {
        display: inline-flex;
        align-items: center;
        gap: 3px;
    }
    .analysis-point-gauge-value {
        margin-left: 5px;
    }
    .analysis-point-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin: 6px 0;
    }
    .analysis-point-evidence {
        margin: 6px 0 0;
    }
    .analysis-point-criteria {
        margin: 8px 0 0;
    }
    .analysis-point-record {
        margin-top: 12px;
    }
    .analysis-point-closed {
        display: grid;
        gap: 7px;
    }
    /* Chaque entrée de ressource enveloppe son contenu, comme l'exemple du canon : la ligne se dispose
       sur l'enveloppe, qui prend la largeur de l'entrée. */
    .analysis-point-line {
        display: flex;
        flex: 1 1 auto;
        align-items: baseline;
        gap: 8px;
        flex-wrap: wrap;
    }
    /* Historique : vie d'un point, une étape par analyse. */
    .analysis-point-trail {
        margin: 8px 0 0;
        display: grid;
        gap: 5px;
    }
    .analysis-point-step {
        display: flex;
        flex: 1 1 auto;
        align-items: baseline;
        gap: 8px;
        flex-wrap: wrap;
    }
    .analysis-point-event {
        flex: 1 1 100%;
    }
    .analysis-history-record {
        margin-left: 4px;
    }
    /* ===== Ancrage de la thèse de suivi (scénarios, attentes de prix) ===== */
    .analysis-point-expectation {
        margin: 6px 0 0;
    }
    /* Onglet Thèses : les points suivis pour ce scénario, et ce que leur confirmation a déplacé. */
    .analysis-thesis-tracking h4 {
        margin: 0 0 6px;
        display: flex;
        align-items: baseline;
        gap: 8px;
    }
    .analysis-thesis-points {
        display: grid;
        gap: 6px;
    }
    .analysis-thesis-point {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    .analysis-thesis-expectation {
        flex: 1 1 100%;
    }
    .analysis-history-detail-cell {
        padding: 12px 14px;
    }
    .analysis-history-detail .analysis-text {
        margin: 0 0 8px;
    }
    .analysis-history-points {
        display: grid;
        gap: 7px;
    }
    .analysis-history-line {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        gap: 9px;
        flex-wrap: wrap;
    }
    .analysis-history-event {
        flex: 1 1 100%;
    }
    .analysis-history-title {
        margin: 12px 0 6px;
    }
    @media (max-width: 800px) {
        /* Points de rupture de l'en-tête — deux seuils de la norme (800 px, 640 px), aucun propre à la page
           (norme : `_direction/FD3_applications/exavoris/design/structures-de-page.md`).
           À 800 : les DEUX OBJETS GRAPHIQUES restent côte à côte et les jauges passent dessous. C'est le seul
           ordre qui n'ouvre pas un vide à droite du cadran ; il demande un `order`, sans conséquence ici — ni
           les jauges ni la mosaïque ne contiennent d'élément focusable, la navigation au clavier ne peut donc
           pas se désaccorder de la lecture.
           À 640 : plus rien ne tient côte à côte — tout s'empile, graphiques centrés, jauges sur 2 colonnes. */
        .analysis-synthesis-head {
            justify-content: center;
        }
        .analysis-synthesis-head .analysis-gauges {
            flex: 1 1 100%;
            order: 3;
        }
        .analysis-head-price {
            flex: 1 1 100%;
            align-items: flex-start;
        }
    }
    @media (max-width: 600px) {
        .analysis-head-badges {
            flex: 1 1 100%;
            flex-direction: row;
            align-items: center;
            flex-wrap: wrap;
        }
        .analysis-dial,
        .analysis-mosaic {
            flex: 1 1 100%;
            max-width: 240px;
            margin-inline: auto;
        }
        .analysis-synthesis-head .analysis-gauges {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .valuation-driver {
            grid-template-columns: 1fr 60px;
        }
        .valuation-driver-detail {
            grid-column: 1 / -1;
        }
        .scoring-gauge {
            display: none;
        }
        .scoring-gauge-list {
            display: grid;
            grid-auto-flow: row;
        }
        .scoring-gauge-list > .divider {
            margin-block: 0;
        }
        .scoring-list-key {
            flex: 1 1 auto;
            min-width: 0;
        }
        .scoring-list-value {
            flex: 0 0 auto;
        }
    }

    /* Le ratio, plein, épouse l'arrondi de fin du bouton qui le porte. */
    .analysis-weight-ratio {
        border-start-end-radius: calc(var(--canon-radius-control) - var(--canon-line-width));
        border-end-end-radius: calc(var(--canon-radius-control) - var(--canon-line-width));
        background: var(--canon-theme-action);
    }
    .analysis-weight-button:hover .analysis-weight-ratio {
        filter: brightness(1.08);
    }
    .analysis-weight-button[aria-expanded="true"] .analysis-weight-ratio {
        filter: brightness(0.92);
    }
    .analysis-weight-popover-line {
        background: var(--canon-theme-ink);
        border-radius: var(--local-radius-line);
    }
    /* L'échelle se peint du dégradé de ses notes, que le script pose par --analysis-rating-fill ; son
       repère, de la teinte de la note globale, par --analysis-rating-marker-ink. */
    .analysis-rating {
        border-radius: var(--canon-radius-pill);
        background-image: var(--analysis-rating-fill, none);
        box-shadow: var(--local-shadow-rating);
    }
    .analysis-rating--empty {
        background: var(--canon-theme-highlight);
    }
    .analysis-rating-marker {
        background: var(--local-color-decor-marker);
        border-radius: var(--canon-radius-pill);
        box-shadow: var(--local-shadow-marker);
    }
    .analysis-rating--empty .analysis-rating-marker {
        background: var(--canon-theme-canvas);
        box-shadow: none;
    }
    /* Le bandeau prend la couleur de la note, que le script pose par --analysis-note-band-surface et
       --analysis-note-band-ink. */
    .analysis-note-band {
        border-radius: var(--canon-radius-control);
        background: var(--analysis-note-band-surface, transparent);
    }
    .analysis-dial--empty .analysis-note-band {
        background: var(--canon-theme-highlight);
    }
    .analysis-mosaic {
        border-radius: var(--canon-radius-control);
    }
    .analysis-zones {
        border-radius: var(--canon-radius-control);
        background: var(--canon-theme-highlight);
    }
    .analysis-price-marker {
        background: var(--canon-theme-ink);
    }
    .analysis-legend-line {
        border-left: 2px dashed var(--canon-theme-muted);
    }
    .analysis-zones.tall {
        border-radius: var(--canon-radius-control);
    }
    .valuation-split-track {
        background: var(--canon-theme-highlight);
        border-radius: var(--canon-radius-control);
    }
    .valuation-split-span {
        border-radius: var(--canon-radius-control);
    }
    .valuation-line.fair {
        border-left: 2px dashed var(--canon-theme-muted);
    }
    .valuation-line.price {
        border-left: 2px solid var(--canon-theme-ink);
    }
    .valuation-line.threshold {
        border-left: 1px dotted var(--canon-theme-faint);
        opacity: 0.8;
    }
    .analysis-fair-marker {
        border-left: 2px dashed var(--canon-theme-muted);
    }
    .moat-gauge-track {
        fill: var(--canon-theme-highlight);
    }
    .moat-gauge-span {
        stroke: var(--canon-theme-raised);
        stroke-width: 1;
    }
    .moat-gauge-cell {
        fill: var(--canon-theme-raised);
        stroke: var(--canon-theme-line);
        stroke-width: 1;
    }
    .moat-gauge-outline-top .moat-gauge-outline {
        fill: none;
        stroke: var(--canon-theme-ink);
        stroke-width: 1.5;
    }
    .moat-gauge-hatch-line {
        stroke: var(--canon-theme-line);
        stroke-width: 1;
    }
    .moat-gauge-outline {
        fill: none;
        stroke: none;
        stroke-width: 1.5;
    }
    .moat-gauge-advantage:hover .moat-gauge-span {
        filter: brightness(1.08);
    }
    .moat-gauge-advantage:hover .moat-gauge-cell {
        fill: var(--canon-theme-canvas);
    }
    .moat-gauge-advantage[aria-expanded="true"] .moat-gauge-outline {
        stroke: var(--canon-theme-ink);
    }
    .moat-gauge-advantage[aria-expanded="true"] .moat-gauge-trap {
        opacity: 1;
    }
    .moat-gauge-advantage:not([aria-expanded="true"]) .moat-gauge-trap {
        opacity: 0.72;
    }
    .moat-gauge-advantage[aria-expanded="true"] .moat-gauge-cell {
        fill: var(--canon-theme-canvas);
    }
    .analysis-history-detail-cell {
        background: var(--canon-theme-canvas);
    }

    .analysis-weight-ratio {
        font-size: var(--canon-size-control);
        font-weight: var(--canon-weight-title);
        color: var(--canon-theme-on-action);
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }
    /* Pastille TRI-NOTES à dégradé : qualité (gauche) · globale (centre, marqueur) · opportunité (droite) */
    .analysis-rating {
        vertical-align: middle;
    }
    .analysis-rating-bound {
        color: var(--local-color-decor-bound);
        font-size: var(--canon-size-fine);
        font-weight: var(--canon-weight-title);
        text-shadow: var(--local-shadow-bound);
        font-variant-numeric: tabular-nums;
    }
    .analysis-rating-marker {
        font-size: var(--canon-size-control);
        color: var(--analysis-rating-marker-ink, inherit);
        font-weight: var(--canon-weight-emphasis);
        font-variant-numeric: tabular-nums;
    }
    .analysis-rating--empty .analysis-rating-marker {
        color: var(--canon-theme-faint);
    }
    .analysis-note-band {
        font-size: var(--canon-size-control);
        color: var(--analysis-note-band-ink, inherit);
        font-weight: var(--canon-weight-title);
        text-align: center;
        line-height: var(--canon-leading-body);
    }
    .analysis-dial--empty .analysis-note-band {
        color: var(--canon-theme-faint);
    }
    .analysis-dial--empty {
        color: var(--canon-theme-faint);
    }
    .analysis-tile-flood {
        text-align: center;
        color: var(--local-color-decor-flood);
        text-shadow: var(--local-shadow-flood);
    }
    /* Métrique de thèse (style standard : valeur et dénominateur de même taille) */
    .analysis-price-marker-label {
        font-size: var(--canon-size-fine);
        white-space: nowrap;
    }
    .valuation-line-label {
        font-size: var(--canon-size-fine);
        white-space: nowrap;
        color: var(--canon-theme-ink);
    }
    .moat-gauge-title-value,
    .moat-gauge-title-name {
        text-align: center;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .moat-gauge-title-value {
        line-height: var(--canon-leading-title);
        font-size: var(--canon-size-note);
        font-weight: var(--canon-weight-title);
        color: var(--canon-theme-on-action);
        text-shadow: var(--local-shadow-value);
    }
    .moat-gauge-title-name {
        line-height: var(--canon-leading-title);
        font-size: var(--canon-size-note);
        color: var(--canon-theme-muted);
    }
    .moat-gauge-title-name--dominant {
        color: var(--canon-theme-ink);
        font-weight: var(--canon-weight-label);
    }
    .moat-gauge-title-rank {
        font-style: normal;
        font-size: var(--canon-size-fine);
        color: var(--canon-theme-action);
    }
    /* ===== Historique — ligne dépliable (un <details> serait illégal dans un <table>) ===== */
    .analysis-history-detail-cell {
        text-align: left;
        white-space: normal;
    }

    /* En-têtes de colonnes CLIQUABLES (tri) */
    .analysis-tile {
        cursor: pointer;
    }
    .analysis-tile-cell {
        transition: fill 0.12s ease;
    }
    .analysis-tile-shares {
        transition: opacity 0.12s ease;
    }
    .analysis-tile-flood {
        pointer-events: none;
    }
    .valuation-overlay {
        pointer-events: none;
    }
    .analysis-fair-marker {
        pointer-events: none;
    }
    .moat-gauge-span {
        transition: filter 0.12s ease;
    }
    .moat-gauge-trap {
        transition: opacity 0.12s ease;
    }
    .moat-gauge-texts {
        pointer-events: none;
    }
    .moat-gauge-outline-top {
        pointer-events: none;
    }
}
