/* ==========================================================================
   Effet « Le tableau des accès » — section Équipe de l'accueil général (16/11/2026, soir)
   Va avec assets/js/effets/equipe.js (voir l'en-tête du fichier pour l'usage).
   Demande de Maxime : montrer les rôles d'administrateur, une équipe nombreuse
   et un accès facile pour tous. Ce qui est montré existe dans le logiciel :
   tableau « Membres et droits », valeurs Oui / Propre / Non par logiciel,
   téléphone réglé à part, menu de chacun réduit à ce qui lui est ouvert.
   Sommaire : 1. en-tête · 2. le tableau · 3. « Ce que voit » (ordinateur,
   téléphone) · 4. les trois étapes · 5. le scénario (classes posées par
   equipe.js) · 6. téléphone · 7. mouvement réduit.
   Jetons seulement (base.css) : aucune couleur écrite en dur, deux modes.
   Sans JavaScript : le tableau rempli, l'aperçu de l'administrateur.
   ========================================================================== */

/* ---------- 1. En-tête ---------- */
.eq-section { overflow-x: clip; }
.eq-tete { display: grid; gap: var(--espace-6); }
.eq-tete__textes { display: grid; gap: var(--espace-5); align-items: end; }
.eq-tete__titre { max-width: 15ch; font-size: clamp(2.1rem, .85rem + 3.7vw, 4.6rem); }
.eq-tete__ligne { max-width: 32ch; }
@media (min-width: 1000px) {
  .eq-tete__textes { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: clamp(24px, 3vw, 56px); }
  .eq-tete__ligne { padding-bottom: .3em; }
}

.eq {
  display: grid;
  gap: clamp(32px, 4vw, 48px) clamp(24px, 3vw, 48px);
  margin-top: clamp(36px, 4vw, 56px);
}
@media (min-width: 1100px) {
  .eq { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
}

/* ---------- 2. Le tableau « Membres et droits » ---------- */
.eq__tableau {
  min-width: 0;
  background-color: var(--fond-2);
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon-max);
  box-shadow: 0 40px 90px -50px var(--ombre-feuille);
}
.eq__barre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 8px 8px 8px 14px;
  font-family: var(--police-mono);
  font-size: var(--t-mono-petit);
  font-weight: 500;
  letter-spacing: var(--interlettrage-mono);
  text-transform: uppercase;
  color: var(--texte-2);
  border-bottom: 1px solid var(--filet);
}
.eq__barre p { max-width: none; }
.eq__barre-titre { display: inline-flex; align-items: center; gap: 8px; color: var(--texte); }
.eq__barre-titre .marque { width: 14px; height: 14px; }
.eq__compte { margin-left: auto; white-space: nowrap; }
.eq__rejouer { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.eq__rejouer svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  transition: transform .7s var(--sortie);
}
.eq__rejouer:hover svg { transform: rotate(-200deg); }
html:not(.js) .eq__rejouer { display: none; }

.eq__table {
  width: 100%;
  table-layout: fixed;
  font-size: .8125rem;
  line-height: 1.2;
}
.eq__table th,
.eq__table td { height: 36px; padding: 0 4px; text-align: center; border-top: 1px solid var(--filet); }
.eq__table thead th {
  height: 40px;
  padding-top: 2px;
  border-top: 0;
  font-family: var(--police-mono);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--texte-2);
  vertical-align: middle;
}
.eq__col-poste { width: 34%; }
.eq__col-acces { width: 15%; }
.eq__table thead .eq__col-poste { padding-left: 14px; text-align: left; }
.eq__table tbody th { padding: 0; text-align: left; font-weight: 500; }

/* Une ligne = une personne ; le bouton du poste couvre toute la ligne */
.eq__ligne { position: relative; }
.eq__poste {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 35px;
  padding: 0 6px 0 14px;
  text-align: left;
  color: var(--texte);
  -webkit-tap-highlight-color: transparent;
}
.eq__poste::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.eq__poste:focus-visible { outline: none; }
.eq__ligne:has(.eq__poste:focus-visible) { outline: 2px solid var(--accent-texte); outline-offset: -2px; }
.eq__poste-nom { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.eq__admin {
  flex: none;
  padding: 2px 4px 1px;
  font-family: var(--police-mono);
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-texte);
  border: 1px solid currentColor;
  border-radius: 2px;
}
.eq__ligne > * { transition: background-color var(--duree-courte) ease; }
@media (hover: hover) {
  .eq__ligne:hover > * { background-color: var(--fond-3); }
}
.eq__ligne.est-choisi > * { background-color: var(--fond-3); }
.eq__ligne.est-choisi > th { box-shadow: inset 3px 0 0 var(--tampon); }

/* Les valeurs : Oui (plein), Propre (moitié, bordeaux), Non (trait) — la forme suffit, sans la couleur */
.eq__v {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  border-radius: 2px;
}
.eq__v--oui { background-color: var(--texte); }
.eq__v--propre {
  box-shadow: inset 0 0 0 1.5px var(--accent-texte);
  background-image: linear-gradient(135deg, var(--accent-texte) 50%, transparent 50%);
}
.eq__v--non { width: 12px; height: 2px; background-color: var(--texte-2); opacity: .7; }

/* Connecté : l'ordinateur et le téléphone de la personne */
.eq__appareil {
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
  color: var(--texte);
}
.eq__appareil--ordi { width: 18px; height: 14px; }
.eq__appareil--tel { width: 10px; height: 15px; margin-left: 6px; }

.eq__legende {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 10px 14px 11px;
  font-size: .75rem;
  color: var(--texte-2);
  border-top: 1px solid var(--filet-fort);
}
.eq__legende p { max-width: none; display: inline-flex; align-items: center; gap: 8px; }
.eq__legende .eq__v { width: 11px; height: 11px; }
.eq__legende .eq__v--non { width: 10px; height: 2px; }
.eq__aide { margin-left: auto; }
.tactile .eq__aide-souris,
html:not(.tactile) .eq__aide-doigt { display: none; }
html:not(.js) .eq__aide { display: none; }

/* ---------- 3. « Ce que voit » : son ordinateur et son téléphone ---------- */
.eq__apercu { display: grid; gap: var(--espace-4); min-width: 0; }
.eq__apercu p { max-width: none; }
.eq__apercu-tete { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.eq__apercu-nom {
  font-family: var(--police-titre);
  font-size: var(--t-3);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.eq__apercu-role { min-height: 3em; font-size: var(--t-petit); line-height: 1.5; color: var(--texte-2); }
.eq__apercu-role b { font-weight: 600; color: var(--texte); }

.eq__appareils {
  position: relative;
  padding: 4px 21% 30px 0;
  font-size: .75rem;
  line-height: 1.25;
}
.eq__ordi {
  overflow: hidden;
  background-color: var(--fond-2);
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon-max);
  box-shadow: 0 30px 70px -40px var(--ombre-feuille);
}
.eq__ordi-barre {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  font-family: var(--police-mono);
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: var(--interlettrage-mono);
  text-transform: uppercase;
  color: var(--texte-2);
  background-color: var(--fond-3);
  border-bottom: 1px solid var(--filet);
}
.eq__ordi-barre i { width: 6px; height: 6px; border: 1px solid var(--filet-fort); border-radius: 1px; }
.eq__ordi-barre span { margin-left: 6px; }
.eq__ordi-corps { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: 184px; }
.eq__menu {
  list-style: none;
  padding: 10px 6px;
  border-right: 1px solid var(--filet);
}
.eq__menu li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 7px;
  min-height: 28px;
  padding: 5px 6px;
  border-radius: 2px;
  color: var(--texte);
}
.eq__menu li.est-premier { background-color: var(--fond-3); }
.eq__menu-ic { flex: none; width: 8px; height: 8px; border: 1px solid var(--texte-2); border-radius: 1px; }
.eq__menu li.est-premier .eq__menu-ic { background-color: var(--tampon); border-color: var(--tampon); }
.eq__sien {
  display: none;
  font-family: var(--police-mono);
  font-size: .5625rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-texte);
}
.est-propre > .eq__sien { display: inline; }
.eq__menu .est-ferme,
.eq__tel-onglets .est-ferme { display: none !important; }

.eq__page { display: grid; align-content: start; gap: 9px; padding: 12px 12px 14px; }
.eq__page-titre { margin-bottom: 4px; font-family: var(--police-titre); font-size: .9375rem; font-weight: 600; }
.eq__trait { display: block; width: var(--l, 80%); height: 6px; background-color: var(--filet-fort); border-radius: 1px; }
.eq__trait--fort { height: 8px; background-color: var(--texte-2); opacity: .55; }

.eq__tel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 25%;
  min-width: 96px;
  aspect-ratio: 9 / 18;
  display: flex;
  flex-direction: column;
  padding: 18px 7px 0;
  overflow: hidden;
  background-color: var(--fond);
  border: 5px solid var(--fond-3);
  outline: 1px solid var(--filet-fort);
  border-radius: 16px;
  box-shadow: 0 30px 60px -28px var(--ombre-feuille);
}
.eq__tel-encoche {
  position: absolute;
  top: 5px; left: 50%;
  width: 30%; height: 5px;
  background-color: var(--fond-3);
  border-radius: 1px;
  transform: translateX(-50%);
}
.eq__tel-titre { margin-bottom: 8px; font-family: var(--police-titre); font-size: .75rem; font-weight: 600; }
.eq__tel .eq__trait { height: 5px; margin-bottom: 7px; }
.eq__tel-ia {
  position: absolute;
  right: 6px;
  bottom: 34px;
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  font-family: var(--police-mono);
  font-size: .5rem;
  font-weight: 500;
  color: var(--sur-tampon);
  background-color: var(--tampon-fort);
  border-radius: 4px;
}
.eq__tel-onglets {
  display: flex;
  flex-wrap: wrap;            /* deux onglets sur un téléphone étroit : l'un sous l'autre plutôt que coupés */
  justify-content: space-around;
  gap: 2px 4px;
  margin: auto -7px 0;
  padding: 7px 4px 8px;
  font-family: var(--police-mono);
  font-size: .5rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--texte-2);
  border-top: 1px solid var(--filet);
}
.eq__tel-onglets .est-premier { color: var(--accent-texte); }
.eq__apercu-note { font-size: .8125rem; line-height: 1.5; color: var(--texte-2); }

/* Changement de personne : le menu et les onglets se reposent (deux noms d'animation pour la relancer) */
.eq--bascule-a .eq__menu li:not(.est-ferme),
.eq--bascule-a .eq__tel-onglets span:not(.est-ferme),
.eq--bascule-a .eq__page > *,
.eq--bascule-a .eq__tel-titre { animation: eq-entree-a .5s var(--sortie) both; animation-delay: calc(var(--k, 0) * 60ms); }
.eq--bascule-b .eq__menu li:not(.est-ferme),
.eq--bascule-b .eq__tel-onglets span:not(.est-ferme),
.eq--bascule-b .eq__page > *,
.eq--bascule-b .eq__tel-titre { animation: eq-entree-b .5s var(--sortie) both; animation-delay: calc(var(--k, 0) * 60ms); }
@keyframes eq-entree-a { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes eq-entree-b { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 4. Les trois étapes ---------- */
.eq-etapes {
  display: grid;
  gap: 0 clamp(24px, 3vw, 48px);
  margin-top: clamp(48px, 6vw, 88px);
  list-style: none;
  padding: 0;
  border-bottom: 1px solid var(--filet);
}
@media (min-width: 900px) { .eq-etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 0; } }
.eq-etapes li { display: grid; gap: 10px; padding: var(--espace-5) 0; border-top: 1px solid var(--filet-fort); }
.eq-etapes__num {
  font-family: var(--police-mono);
  font-size: var(--t-mono);
  font-weight: 500;
  letter-spacing: var(--interlettrage-mono);
  color: var(--accent-texte);
}
.eq-etapes__titre { font-size: var(--t-4); }
.eq-etapes p { font-size: var(--t-petit); line-height: 1.5; color: var(--texte-2); max-width: 38ch; }

/* ---------- 5. Le scénario (seulement quand le script a pris la main : .eq--pret) ----------
   Phases posées sur [data-equipe], dans l'ordre : ph-inviter (les personnes arrivent),
   ph-regler (l'administrateur remplit les cases), ph-connecter (chacun se connecte),
   ph-apercu (on regarde ce que voit chacun). Les transitions ne sont écrites que sur
   l'état « allumé » : la remise à zéro (Rejouer) est immédiate. */
.eq__ligne { --i: 0; }
.eq__table td:nth-child(2) { --c: 0; }
.eq__table td:nth-child(3) { --c: 1; }
.eq__table td:nth-child(4) { --c: 2; }
.eq__table td:nth-child(5) { --c: 3; }

.eq--pret:not(.ph-inviter) .eq__ligne > * { opacity: 0; transform: translateY(8px); }
.eq--pret.ph-inviter .eq__ligne > * {
  transition: opacity .35s var(--sortie-douce) calc(var(--i) * 70ms), transform .6s var(--sortie) calc(var(--i) * 70ms), background-color var(--duree-courte) ease;
}

.eq--pret:not(.ph-regler) .eq__table tbody .eq__v { opacity: 0; transform: scale(.2); }
.eq--pret.ph-regler .eq__table tbody .eq__v {
  transition:
    opacity .2s var(--sortie-douce) calc(var(--i) * 60ms + var(--c) * 50ms),
    transform .45s cubic-bezier(.34, 1.56, .64, 1) calc(var(--i) * 60ms + var(--c) * 50ms);
}

.eq--pret:not(.ph-connecter) .eq__table tbody .eq__appareil { opacity: .18; color: var(--texte-2); }
.eq--pret.ph-connecter .eq__table tbody .eq__appareil {
  transition: opacity .3s var(--sortie-douce) calc(var(--i) * 55ms), color .3s var(--sortie-douce) calc(var(--i) * 55ms);
}
.eq--pret.ph-connecter .eq__table tbody .eq__appareil--tel { transition-delay: calc(var(--i) * 55ms + 110ms); }

/* L'aperçu attend que tout le monde soit connecté */
.eq--pret:not(.ph-apercu) .eq__apercu { opacity: .35; }
.eq--pret.ph-apercu .eq__apercu { transition: opacity .5s var(--sortie-douce); }

/* ---------- 6. Téléphone : en-têtes de colonnes debout, aperçu serré ---------- */
@media (max-width: 639px) {
  .eq__table thead th:not(.eq__col-poste):not(.eq__col-acces) { height: 86px; padding-bottom: 8px; vertical-align: bottom; }
  .eq__table thead th:not(.eq__col-poste):not(.eq__col-acces) span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); }
  .eq__table thead .eq__col-acces { vertical-align: bottom; padding-bottom: 8px; }
  .eq__col-poste { width: 37%; }
  .eq__col-acces { width: 17%; }
  .eq__table { font-size: .78125rem; }
  .eq__poste { padding-left: 10px; gap: 6px; }
  .eq__table thead .eq__col-poste { padding-left: 10px; vertical-align: bottom; padding-bottom: 8px; }
  .eq__appareil--tel { margin-left: 3px; }
  .eq__barre { padding-left: 10px; flex-wrap: nowrap; }
  .eq__barre-titre { min-width: 0; }
  .eq__rejouer { flex: none; width: 44px; height: 44px; padding: 0; }
  .eq__rejouer-texte { display: none; }
  .eq__compte-long { display: none; }
  .eq__aide { margin-left: 0; flex-basis: 100%; }
  .eq__appareils { padding-right: 24%; }
  .eq__ordi-corps { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .eq__page { display: none; }
  .eq__menu { border-right: 0; min-height: 150px; }
}
@media (max-width: 379px) {
  .eq__admin { padding: 1px 3px 0; font-size: .5rem; letter-spacing: 0; }
}
@media (max-width: 349px) {
  .eq__admin { display: none; }
}

/* ---------- 6 bis. Téléphone (17/11/2026) : la section tient en moins d'écrans ----------
   Demande de Maxime : « on scrolle énormément ». Au téléphone seulement (rien ne change au-dessus
   de 600 px) : en-tête resserré ; lignes du tableau de 44 px (zone à toucher), 6 postes puis
   « Afficher les 14 postes » (bouton posé par equipe.js : .eq--repliable) ; « Ce que voit » plus bas ;
   les trois étapes en cartes qui défilent de côté (la suivante dépasse). */
.eq__plus { display: none; }
@media (max-width: 600px) {
  .eq-tete { gap: var(--espace-4); }
  .eq-tete__textes { gap: var(--espace-3); }
  .eq-tete__titre { font-size: var(--t-2); }   /* l'échelle des titres du téléphone (base.css) */
  .eq { margin-top: var(--espace-5); gap: var(--espace-5); }

  /* Le tableau */
  .eq__barre { padding-block: 4px; }
  .eq__table thead th { height: 34px; }
  .eq__table thead th:not(.eq__col-poste):not(.eq__col-acces) { height: 76px; }
  .eq__table tbody th,
  .eq__table tbody td { height: 44px; }
  .eq__poste { min-height: 43px; }
  .eq--repliable:not(.eq--deplie) .eq__ligne:nth-child(n+7) { display: none; }
  .eq--deplie .eq__ligne:nth-child(n+7) > * { animation: eq-entree-a .45s var(--sortie) both; animation-delay: calc((var(--i) - 6) * 40ms); }
  .eq--repliable .eq__plus {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    font-size: var(--t-petit);
    font-weight: 500;
    color: var(--texte);
    border-top: 1px solid var(--filet-fort);
    -webkit-tap-highlight-color: transparent;
  }
  .eq__plus:focus-visible { outline-offset: -3px; }
  .eq__plus svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; transition: transform .45s var(--sortie); }
  .eq--deplie .eq__plus svg { transform: rotate(180deg); }
  .eq__plus-fermer,
  .eq--deplie .eq__plus-ouvrir { display: none; }
  .eq--deplie .eq__plus-fermer { display: inline; }
  .eq__legende { gap: 4px 16px; padding: 9px 10px 10px; }

  /* « Ce que voit » : plus bas ; l'ordinateur et le téléphone côte à côte, le téléphone
     mord un peu sur l'ordinateur (comme sur l'ordinateur), sans jamais déborder sur le texte */
  .eq__apercu { gap: var(--espace-3); }
  .eq__appareils { display: grid; grid-template-columns: minmax(0, 1fr) 80px; align-items: end; padding: 0; }
  .eq__ordi { align-self: stretch; display: flex; flex-direction: column; }
  .eq__ordi-corps { flex: 1 1 auto; }
  .eq__tel { position: relative; right: auto; bottom: auto; width: auto; min-width: 0; margin: 0 0 -10px -14px; }
  .eq__menu { min-height: 0; padding: 6px; }
  .eq__menu li { min-height: 26px; padding-block: 4px; }

  /* Les trois étapes : des cartes qui défilent de côté ; la suivante dépasse pour inviter à glisser
     (la rangée elle-même : [data-defile], règle commune dans composants.css, section 14) */
  ol.eq-etapes {
    margin-top: var(--espace-6);
    border-bottom: 0;
  }
  .eq-etapes li {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 8px 12px;
    padding: 15px 15px 17px;
    background-color: var(--fond-2);
    border: 1px solid var(--filet-fort);
    border-radius: var(--rayon);   /* comme toutes les cartes qui glissent */
  }
  .eq-etapes li > p { grid-column: 1 / -1; }
}

/* ---------- 7. Mouvement réduit : l'état final, sans mouvement ---------- */
.mouvement-reduit .eq *,
.mouvement-reduit .eq *::before,
.mouvement-reduit .eq *::after { transition: none !important; animation: none !important; }
.mouvement-reduit .eq__rejouer { display: none; }
@media (prefers-reduced-motion: reduce) {
  .eq__rejouer { display: none; }
}
@media print {
  .eq__rejouer, .eq__aide { display: none; }
}
