/* V5 · PAGE EXTENSION (PC) — modèle « Réglages » à deux colonnes : la liste des connecteurs à gauche (lignes à icône
   d'application, sélection neutre r8), le détail à droite en groupes de lignes (patron partagé : css/v5/herite-patrons.css).
   Présentation seulement : js/etat-extension.js, js/extension-mcp.js et js/connexion-extension.js ne changent pas. */

html.v5 #view-extension{ box-sizing: border-box; max-width: none; margin: 0; padding: 20px 24px 60px; }
html.v5 #view-extension.active{ display: grid; grid-template-columns: 240px minmax(0, 560px); gap: 28px; justify-content: center; align-items: start; }   /* « .active » : une vue non affichée reste masquée */

/* liste des connecteurs */
html.v5 .ex-tabs{ display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; border: 0; background: none; }
html.v5 .ex-tabs button{
  display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; align-items: center; box-sizing: border-box; width: 100%; min-height: 56px; margin: 0; padding: 8px 10px;
  border: 0; border-radius: var(--v5-r-sel); background: none; box-shadow: none; text-align: left; color: var(--v5-texte); cursor: default;
}
html.v5 .ex-tabs button:hover{ background: var(--v5-survol); }
html.v5 .ex-tabs button.active{ background: var(--v5-actif-nav); }
/* icône d'application : tuile arrondie */
html.v5 .ex-ic{ grid-row: 1 / span 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--v5-surface-inset); box-shadow: inset 0 0 0 var(--v5-trait) var(--v5-separateur-fort), var(--v5-ombre-ctrl); }
html.v5 .ex-tabs strong{ font-size: var(--v5-t-13); font-weight: var(--v5-g-moyen); line-height: 16px; }
html.v5 .ex-tabs small{ font-size: var(--v5-t-11); line-height: 14px; color: var(--v5-texte-2); }
html.v5 .ex-etat{ display: inline-flex; align-items: center; gap: 5px; }
html.v5 .ex-etat::before{ content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--v5-gris); }
html.v5 .ex-etat.is-ok::before{ background: var(--v5-vert); }
html.v5 .ex-etat.is-ko::before{ background: var(--v5-rouge-plein); }   /* 02/11 : même rouge que « Hors ligne » dessous */

/* détail : plus de carte autour des groupes */
html.v5 #view-extension .ex-pane{ margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; max-width: none; }
/* 02/11 (audit) : titres de section et lignes au même bord que les cartes du haut (ils étaient 2 à 4 px plus à droite) */
html.v5 #view-extension#view-extension .ex-pane.card:not(#_):not(#_){ padding-inline: 0; }   /* la règle commune des cartes de réglages lui laissait 2 px */
html.v5 #view-extension#view-extension .ex-head:not(#_){ padding-inline: 0; }
html.v5 #view-extension .ex-pane .stp-h3:not(#_){ padding-left: 0; margin-left: 0; }
html.v5 .ex-head{ display: flex; flex-direction: column; gap: 12px; margin: 0 0 22px; padding: 0 12px; border: 0; }
html.v5 .ex-head h3{ margin: 0 0 3px; font-size: var(--v5-t-22); font-weight: var(--v5-g-gras); line-height: var(--v5-i-22); letter-spacing: -.01em; }
html.v5 .ex-head .card-sub{ font-size: var(--v5-t-12); line-height: 15px; color: var(--v5-texte-2); }
html.v5 .ex-actions{ display: flex; flex-wrap: wrap; gap: 8px; }
html.v5 .ex-statut{ display: inline-flex; align-items: center; gap: 6px; font-size: var(--v5-t-12); color: var(--v5-texte-2); white-space: nowrap; }
html.v5 .ex-statut i{ width: 8px; height: 8px; border-radius: 50%; background: var(--v5-gris); }
html.v5 .ex-statut--ok i{ background: var(--v5-vert); }
html.v5 .ex-statut--lent i, html.v5 .ex-statut--pause i{ background: var(--v5-orange); }
html.v5 .ex-statut--hors i{ background: var(--v5-rouge-plein); }

/* aide repliable : groupe arrondi, étapes numérotées dans une pastille */
html.v5 .ex-aide{ margin: 0 0 20px; padding: 0 12px; border: 0; border-radius: var(--v5-r-groupe); background: var(--v5-fond-groupe); }
html.v5 .ex-aide > summary{ display: flex; align-items: center; gap: 8px; height: 40px; list-style: none; font-size: var(--v5-t-13); font-weight: var(--v5-g-normal); color: var(--v5-texte); cursor: default; }
html.v5 .ex-aide[open] > summary{ box-shadow: inset 0 calc(-1 * var(--v5-trait-fort)) 0 var(--v5-separateur); }
html.v5 .ex-steps{ margin: 0; padding: 4px 0 12px; list-style: none; }
html.v5 .ex-steps li{ display: flex; align-items: flex-start; gap: 10px; min-height: 0; margin: 0; padding: 8px 0; border: 0; background: none; font-size: var(--v5-t-13); line-height: 1.45; color: var(--v5-texte); }
html.v5 .ex-steps li b{ display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--v5-rempli-1); color: var(--v5-texte-2); font-size: var(--v5-t-11); font-weight: var(--v5-g-fort); }
html.v5 .ex-steps code, html.v5 #view-extension code{ padding: 1px 5px; border-radius: var(--v5-r-mini); background: var(--v5-rempli-2); font-family: var(--v5-police-mono); font-size: var(--v5-t-12); }

/* ================================================================== 11/10, demande de Lucas : les connecteurs EN HAUT
   Une seule colonne centrée : la rangée des connecteurs (tuiles côte à côte, celle qui est ouverte en relief), puis le détail
   dessous. Le cadre rectangulaire qui entourait le détail disparaît (il venait de la règle « carte » de nettete.css). */
html.v5 #view-extension.active{ display: flex; flex-direction: column; align-items: stretch; gap: 22px; max-width: 640px; margin: 0 auto; padding: 24px 24px 60px; }
html.v5 .ex-tabs{ flex-direction: row; gap: 8px; }
html.v5 .ex-tabs button{ flex: 1 1 0; width: auto; min-width: 0; min-height: 60px; padding: 10px 12px; border-radius: var(--v5-r-groupe); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur); }
html.v5 .ex-tabs button[hidden]{ display: none; }
html.v5 .ex-tabs button:hover{ background: var(--v5-survol); }
html.v5 .ex-tabs button.active{ background: var(--v5-actif-nav); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur-fort); }
html.v5 .ex-tabs :is(strong, small){ min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.v5 #view-extension#view-extension .ex-pane.card{ margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
html.v5 #view-extension .ex-head{ margin: 0 0 20px; padding: 0 2px; }
html.v5 #view-extension .ex-head h3{ font-size: var(--v5-t-17); line-height: 22px; }

/* ---- refonte du détail (11/10) : l'état d'abord. En tête : le nom, la version, et un résumé en une phrase (« Tout est connecté »,
   « 1 compte hors ligne ») ; les boutons à droite. Une ligne par compte, sans phrase quand tout va bien. Le diagnostic n'apparaît
   que s'il y a quelque chose à corriger. */
html.v5 #view-extension .ex-head{ flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 16px; }
html.v5 #view-extension .ex-head > div:first-child{ min-width: 0; flex: 1 1 240px; }
html.v5 .ex-resume{ display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: var(--v5-t-13); font-weight: var(--v5-g-moyen); color: var(--v5-texte); }
html.v5 .ex-resume::before{ content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--v5-gris); }
html.v5 .ex-resume[data-etat="ok"]::before{ background: var(--v5-vert); }
html.v5 .ex-resume[data-etat="attente"]::before{ background: var(--v5-orange); }
html.v5 .ex-resume[data-etat="ko"]::before{ background: var(--v5-rouge-plein); }
html.v5 #ex-diagnostic:empty{ display: none; }
html.v5 #view-extension .code-field{ display: flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 0; border: 0; background: none; box-shadow: none; }
html.v5 #view-extension .code-field code{ flex: 1; min-width: 0; height: var(--v5-ctrl-l); padding: 0 10px; border-radius: var(--v5-r-surface); background: var(--v5-surface-inset); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-separateur); font: var(--v5-g-normal) var(--v5-t-12)/var(--v5-ctrl-l) var(--v5-police-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* étapes d’installation : plus de cadre dans le cadre (la liste portait son propre encadré à l’intérieur du groupe repliable) */
html.v5 #view-extension#view-extension .ex-steps{ margin: 0 0 0 20px; padding: 6px 2px 12px;   /* 01/11 : étapes alignées sur le texte de l'en-tête du volet (elles démarraient sous le chevron) */ border: 0; border-radius: 0; background: none; box-shadow: none; }
html.v5 #view-extension#view-extension .ex-steps li{ padding: 7px 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
html.v5 #view-extension .ex-aide[open] > summary{ margin-bottom: 4px; }

/* 31/10 (Lucas : « des trucs qui se collent ») : la colonne part du haut (le « justify-content: center » de l'ancienne grille
   la centrait en hauteur, d'où un grand vide sous le titre) ; le détail respire sous les tuiles et sous son trait */
html.v5 #view-extension.active:not(#_){ justify-content: flex-start; padding-top: 8px; gap: 28px; }
html.v5 #view-extension .ex-pane.active:not(#_){ padding-top: 20px; }
html.v5 #view-extension .ex-head:not(#_){ margin-bottom: 24px; }
html.v5 #view-extension .ex-resume:not(#_){ margin-top: 12px; }
