/* ==========================================================================
   CGT-VIVEST — 45-coque.css — la COQUE CONNECTÉE (refonte-cgt, lot 02)
   --------------------------------------------------------------------------
   Présente sur TOUS les écrans connectés. Balisage :
   SM_Frontend::render_authenticated_view() ; comportement : cgt-coque.js.

   1. Mise en page (layout, zone de contenu, encoches iOS)
   2. Bandeau d'affiche (bureau : navigation ; mobile : logo + titre d'écran)
   3. Boutons et pastilles du bandeau
   4. Compte : avatar + menu (profil, factures, paramètres, thème, sortie)
   5. Sélecteur de thème Clair / Sombre / Auto
   6. Onglets du bas (mobile) — Accueil central en bouton « tampon »
   7. Menu latéral (mobile + tablette)
   8. Panneau des notifications
   9. Pied de page (bureau)
   10. Bandeaux système : bascule d'utilisateur, hors ligne, actions en attente,
       installation de l'application, chargement de page
   11. Mouvement (View Transitions des repères, panneaux)

   Points de rupture (ceux du JS) : mobile ≤ 768 · tablette 769-1024 · bureau ≥ 1025.
   Règles maison : angles droits (sauf avatars et pastilles), pas de
   color-mix(), pas de backdrop-filter, uniquement transform/opacity en
   mouvement, clair ET sombre par les jetons (00-tokens.css).
   Poids : la peau passe par « .cgt-coque … » (2 classes) ou « :not(#cgt) »
   quand une règle plus lourde existe déjà (30-composants.css).
   ========================================================================== */


/* ==========================================================================
   1. MISE EN PAGE
   ========================================================================== */
/* Bas RÉEL du bandeau (tranche comprise), encoche iOS et bande hors ligne
   comprises : tout élément FIXE qui doit se poser sous le bandeau s'y cale
   (en-tête de la messagerie mobile dans public.css, pile de toasts…).
   Revue 2 : l'en-tête de la liste des conversations restait à 60 px et passait
   SOUS le bandeau avec l'encoche (champ de recherche invisible et intouchable). */
:root{ --cgt-bandeau-bas:74px; }                                   /* bureau : 70 + tranche 4 */
body.sm-offline-mode{ --cgt-bandeau-bas:114px; }                   /* + bande hors ligne (40) */
@media (min-width: 769px) and (max-width: 1024px){
  :root{ --cgt-bandeau-bas:calc(68px + env(safe-area-inset-top, 0px)); }
  body.sm-offline-mode{ --cgt-bandeau-bas:calc(108px + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 768px){
  :root{ --cgt-bandeau-bas:calc(60px + env(safe-area-inset-top, 0px)); }     /* 56 + tranche 3 (+1) */
  body.sm-offline-mode{ --cgt-bandeau-bas:calc(100px + env(safe-area-inset-top, 0px)); }
  /* Conversation ouverte : l'ancienne vue (.sm-imessage-app, 56 px + encoche)
     et la vue plein écran (.sm-chat-mobile-view, public.css : top 0, en-tête
     qui gère l'encoche). Hors ligne, la bande (40 px + encoche) passait
     par-dessus l'en-tête de la conversation : on la décale d'autant. */
  body.sm-offline-mode .sm-imessage-app{
    top:calc(96px + env(safe-area-inset-top, 0px));
    height:calc(100vh - 96px - env(safe-area-inset-top, 0px));
    height:calc(100dvh - 96px - env(safe-area-inset-top, 0px));
  }
  body.sm-offline-mode .sm-chat-mobile-view{
    top:calc(40px + env(safe-area-inset-top, 0px));
    height:auto;
  }
  body.sm-offline-mode .sm-chat-mobile-view .sm-chat-mobile-header{ padding-top:12px; }
}
.cgt-coque.sm-app-layout{
  display:flex;
  flex-direction:column;
  min-height:100vh;
  margin:0;
  padding:0;
  background:var(--fond);
  position:relative;
}
.cgt-coque .sm-main-content{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  width:100%;
  margin:0;
  background:var(--fond);
}
/* La table (« fond ») à TOUTES les largeurs (charte-01) : le gabarit peint la zone de contenu en
   --gray-50 (= --neutre-50 : #F8F9FA en clair, #212529 en sombre) ; cette règle n'était posée qu'à
   partir de 769 px, si bien que sur téléphone la table était trop claire, et en sombre PLUS CLAIRE
   que les cartes (#1C1F23) posées dessus. Poids 0,2,0 > .sm-content-area (0,1,0) du gabarit. */
.cgt-coque .sm-content-area{ background:var(--fond); }
@media (min-width: 1025px){
  .cgt-coque .sm-content-area{
    padding:28px 32px 40px;
  }
  body.sm-dashboard-page .cgt-coque .sm-content-area{ padding-bottom:16px; }
}
/* Tablette : bandeau collant, pas d'onglets en bas */
@media (min-width: 769px) and (max-width: 1024px){
  .cgt-coque .sm-content-area{ padding:20px 20px 40px; }
  /* Revue 2 : le gabarit réserve 70 + 40 px (bandeau + pied du bureau), or le
     pied est masqué sur tablette → bande morte de 46 px en bas. La zone de
     contenu descend jusqu'au bas de l'écran (bandeau de 64 px + encoche). */
  .cgt-coque .sm-content-area{
    max-height:calc(100vh - 64px - env(safe-area-inset-top, 0px));
    max-height:calc(100dvh - 64px - env(safe-area-inset-top, 0px));
    padding-bottom:calc(40px + env(safe-area-inset-bottom, 0px));
  }
  body.sm-offline-mode .cgt-coque .sm-content-area{
    max-height:calc(100vh - 104px - env(safe-area-inset-top, 0px));
    max-height:calc(100dvh - 104px - env(safe-area-inset-top, 0px));
  }
}
/* Mobile : le bandeau et les onglets sont fixes ; la zone de contenu défile
   (décalages dans le gabarit : 60 px + encoche, 76 px + barre d'accueil).
   « Bonjour … » est dans le bandeau : la carte d'accueil du tableau de bord
   (47-tableau.css) en garde le titre pour les lecteurs d'écran seulement. */


/* ==========================================================================
   2. BANDEAU D'AFFICHE
   ========================================================================== */
.cgt-coque .sm-topbar.cgt-bandeau{
  position:sticky;
  top:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  width:100%;
  height:70px;
  min-height:70px;
  margin:0;
  padding:0 24px;
  box-sizing:border-box;
  background:var(--bandeau-fond);
  color:var(--bandeau-texte);
  border:0;
  /* Tranche 2,5D sous le bandeau + ombre douce ; en sombre, filet rouge */
  box-shadow:inset 0 -3px 0 0 var(--bandeau-regle), 0 4px 0 0 var(--bandeau-tranche), var(--bandeau-ombre);
  font-family:var(--police-texte);
  overflow:visible;
}
@media (min-width: 1400px){ .cgt-coque .sm-topbar.cgt-bandeau{ padding:0 32px; } }

.cgt-bandeau .sm-topbar-left{
  display:flex;
  align-items:center;
  flex:none;
  min-width:0;
  height:100%;
}

/* --- Marque : logo officiel en autocollant + « VIVEST » --- */
.cgt-bandeau .cgt-coque-marque{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  height:100%;
  color:var(--bandeau-texte);
  text-decoration:none;
}
.cgt-bandeau .cgt-coque-marque:focus-visible{ outline:2px solid var(--bandeau-texte); outline-offset:-4px; }
.cgt-bandeau .cgt-coque-logo{
  flex:none;
  display:block;
  padding:3px;
  background:var(--cgt-blanc);             /* charte : sur fond rouge, pastille blanche */
  box-shadow:3px 3px 0 0 var(--affiche-encre);
  line-height:0;
  /* Charte §7.2 règle 2 : ni rotation, ni relief, ni animation du logo —
     « le monde bouge autour, le logo ne bouge pas ». Au survol, c'est le mot
     « VIVEST » qui réagit (souligné jaune, ci-dessous), jamais le logo. */
}
.cgt-bandeau .cgt-coque-logo img{
  display:block;
  height:44px;                             /* ≥ 40 px (taille minimale proposée) */
  width:auto;
  aspect-ratio:769 / 861;
}
.cgt-bandeau .cgt-coque-mots{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  min-width:0;
}
.cgt-bandeau .cgt-coque-nom{
  position:relative;
  display:block;
  font-weight:var(--fw-900);
  font-size:24px;
  line-height:.9;
  letter-spacing:-.01em;
  color:var(--bandeau-texte);
  white-space:nowrap;
}
/* Survol de la marque : un trait jaune se trace sous « VIVEST » (transform seul) */
.cgt-bandeau .cgt-coque-nom::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-3px;
  height:3px;
  background:var(--repere-jaune);        /* jaune lisible sur l'aplat rouge (3,17:1) — 00-tokens */
  transform:scaleX(0);
  transform-origin:0 50%;
  transition:transform var(--duree-3) var(--courbe-sortie);
}
@media (hover: hover){
  .cgt-bandeau .cgt-coque-marque:hover .cgt-coque-nom::after{ transform:scaleX(1); }
}
.cgt-bandeau .cgt-coque-marque:focus-visible .cgt-coque-nom::after{ transform:scaleX(1); }
.cgt-bandeau .cgt-coque-sous{
  display:block;
  font-size:var(--fs-11);
  font-weight:var(--fw-800);
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--bandeau-texte);
  white-space:nowrap;
}
.cgt-bandeau .cgt-coque-titre{ display:none; }

/* --- Navigation principale (bureau) --- */
.cgt-bandeau .sm-topbar-nav{
  flex:1 1 auto;
  display:flex;
  justify-content:center;
  align-self:stretch;
  min-width:0;
  overflow:visible;
}
.cgt-bandeau .sm-topbar-nav-list{
  display:flex;
  align-items:stretch;
  height:100%;
  margin:0;
  padding:0;
  gap:0;
  list-style:none;
  flex-wrap:nowrap;
}
.cgt-bandeau .sm-topbar-nav-list > li{ position:relative; display:flex; margin:0; }
.cgt-bandeau .sm-topbar-nav-link{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  height:100%;
  padding:0 14px;
  margin:0;
  background:transparent;
  color:var(--bandeau-texte);
  font-size:var(--fs-15);
  font-weight:var(--fw-600);
  line-height:1;
  text-decoration:none;
  white-space:nowrap;
  border-radius:0;
  transition:background-color var(--duree-2) var(--courbe-simple);
}
.cgt-bandeau .sm-topbar-nav-link i{ display:none; font-size:17px; width:auto; }
@media (hover: hover){
  .cgt-bandeau .sm-topbar-nav-link:hover{ background:var(--bandeau-survol); color:var(--bandeau-texte); }
}
.cgt-bandeau .sm-topbar-nav-link:active{ background:var(--bandeau-appui); }
.cgt-bandeau .sm-topbar-nav-link:focus-visible{ outline:2px solid var(--bandeau-texte); outline-offset:-6px; }
.cgt-bandeau .sm-topbar-nav-link.active{
  background:transparent;
  color:var(--bandeau-texte);
  font-weight:var(--fw-800);
}
/* Repère de la rubrique active : barre jaune (accent de la charte), qui glisse
   d'une rubrique à l'autre pendant la View Transition (section 11). */
.cgt-bandeau .cgt-nav-marque{
  position:absolute;
  left:14px;
  right:14px;
  bottom:0;
  height:5px;
  background:var(--repere-jaune);        /* #FAB005 sur le bandeau rouge : 2,42:1 → 3,17:1 */
  opacity:0;
  scale:.3 1;
  transition:opacity var(--duree-2) var(--courbe-simple), scale var(--duree-3) var(--courbe-ressort);
  pointer-events:none;
}
.cgt-bandeau .sm-topbar-nav-link.active .cgt-nav-marque{ opacity:1; scale:1 1; }
.cgt-bandeau .sm-topbar-divider{
  align-self:center;
  width:1px;
  height:28px;
  margin:0 8px;
  background:var(--bandeau-bord);
}
/* 1025-1199 px : pictogrammes seuls (le libellé reste lu par les lecteurs d'écran) */
@media (min-width: 1025px) and (max-width: 1199px){
  .cgt-bandeau .sm-topbar-nav-link{ padding:0 13px; }
  .cgt-bandeau .sm-topbar-nav-link i{ display:inline-block; }
  .cgt-bandeau .sm-topbar-nav-link .cgt-nav-libelle{
    position:absolute; width:1px; height:1px; margin:-1px; padding:0;
    overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
  }
  .cgt-bandeau .cgt-nav-marque{ left:8px; right:8px; }
  .cgt-bandeau .cgt-coque-nom{ font-size:21px; }
}
@media (min-width: 1200px) and (max-width: 1339px){
  .cgt-bandeau .sm-topbar-nav-link{ padding:0 11px; font-size:var(--fs-14); }
  .cgt-bandeau .cgt-nav-marque{ left:11px; right:11px; }
}

.cgt-bandeau .sm-topbar-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex:none;
}


/* ==========================================================================
   3. BOUTONS ET PASTILLES DU BANDEAU (icône seule + aria-label)
   ========================================================================== */
.cgt-bandeau .cgt-coque-bouton{
  --b-decal:2px;
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:none;
  width:42px;
  height:42px;
  min-width:42px;
  margin:0;
  padding:0;
  background:transparent;
  color:var(--bandeau-texte);
  border:2px solid var(--bandeau-bord);
  border-radius:0;
  box-shadow:var(--b-decal) var(--b-decal) 0 0 var(--bandeau-tranche);
  font-size:17px;
  line-height:1;
  text-decoration:none;
  cursor:pointer;
  translate:0 0;
  transition:background-color var(--duree-2) var(--courbe-simple), color var(--duree-2) var(--courbe-simple), translate var(--duree-3) var(--courbe-ressort);
}
@media (hover: hover){
  .cgt-bandeau .cgt-coque-bouton:hover{
    background:var(--bandeau-bouton-actif);
    color:var(--bandeau-bouton-actif-texte);
    border-color:var(--bandeau-bouton-actif);
  }
}
.cgt-bandeau .cgt-coque-bouton:focus-visible{ outline:2px solid var(--repere-jaune); outline-offset:2px; }
/* Appui « tampon » : le bouton descend dans sa tranche, sans délai */
.cgt-bandeau .cgt-coque-bouton:active{
  translate:var(--b-decal) var(--b-decal);
  box-shadow:0 0 0 0 var(--bandeau-tranche);
  transition-duration:0ms;
}
/* Rubrique ouverte (messages, paramètres) ou panneau ouvert */
.cgt-bandeau .cgt-coque-bouton.cgt-actif,
.cgt-bandeau .cgt-coque-bouton[aria-expanded="true"]{
  background:var(--bandeau-bouton-actif);
  color:var(--bandeau-bouton-actif-texte);
  border-color:var(--bandeau-bouton-actif);
}
.cgt-bandeau .cgt-coque-bouton i{ pointer-events:none; }

/* ==========================================================================
   3 bis. APP NATIVE : ZONES TACTILES D'AU MOINS 48 DP (app-native/PATCH-PLUGIN.md, 21)
   Revue plateforme-18 : dans l'app (html.sm-coquille), les boutons de la coque
   faisaient 40 à 42 px (bandeau, fermetures, icônes de la conversation) et les
   liens « Tout gérer / Tout voir », « Tout lire », les mentions du menu, 27 à 28 px
   de haut, Clair / Sombre / Auto et « Se déconnecter » 44 à 46 ; Android demande 48 dp. Le DESSIN ne change pas : un ::after
   transparent, centré sur le bouton, déborde jusqu'à 48 × 48 (un toucher sur lui
   vaut toucher sur le bouton). Écarts mesurés avec les voisins (bandeau : 10 px ;
   « Tout lire » / « Tout supprimer » : 14 px ; mentions : 19 px) : aucune zone ne
   chevauche sa voisine. position:relative à spécificité NULLE (:where) : un bouton
   déjà positionné (fermeture absolue d'une fiche, par exemple) le reste ; seule la
   fermeture du menu latéral, posée « static » exprès, est reprise nommément.
   Interrupteurs (.cgt-interrupteur, 54 × 30 : « Retour haptique », préférences de
   notification) : zone portée à 54 × 48, seuls dans leur rangée. Retour des pages
   pleines du profil (.cgt-pleine-retour, 44 × 44, seul à gauche du titre) : 48.
   JAMAIS sur un bouton à info-bulle ([data-cgt-infobulle]) : son ::after EST
   l'info-bulle (30-composants.css, § 16, pointer-events:none) ; le remplacer
   effaçait le texte (« Modifier », « Générer ») et laissait au survol et au focus
   la tranche rouge de la bulle, en « L », sur l'icône. Ces boutons (32 px dans
   les tableaux, 8 px d'écart) ne peuvent de toute façon pas atteindre 48 sans
   chevaucher leurs voisins.
   ========================================================================== */
:where(html.sm-coquille) :where(
  .cgt-bandeau .cgt-coque-bouton, .sm-slide-menu-close, .sm-panel-close, .sm-modal-close,
  .sm-bottom-sheet-close, .sm-fullpage-back, .sm-admin-fullpage-close, .sm-legal-fermer, .cgt-acces-fermer,
  .cgt-msg-icone, .sm-chat-mobile-send-btn, .cgt-tdb-voir, .cgt-lien-action, .cgt-menu-mentions button,
  .cgt-theme-option, .sm-slide-menu-logout-btn, .cgt-interrupteur, .cgt-pleine-retour
){ position:relative; }
/* Fermeture du menu latéral : posée « static » exprès par la coque (sans décalage) */
html.sm-coquille .cgt-coque .sm-slide-menu-close{ position:relative; inset:auto; }
html.sm-coquille :is(
  .cgt-bandeau .cgt-coque-bouton, .sm-slide-menu-close, .sm-panel-close, .sm-modal-close,
  .sm-bottom-sheet-close, .sm-fullpage-back, .sm-admin-fullpage-close, .sm-legal-fermer, .cgt-acces-fermer,
  .cgt-msg-icone, .sm-chat-mobile-send-btn, .cgt-tdb-voir, .cgt-lien-action, .cgt-menu-mentions button,
  .cgt-theme-option, .sm-slide-menu-logout-btn, .cgt-interrupteur, .cgt-pleine-retour
):not([data-cgt-infobulle])::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:max(100%, 48px);
  height:max(100%, 48px);
  translate:-50% -50%;
  background:transparent;
}
/* Appui « tampon » : le bouton descend dans sa tranche (translate de 2 à 4 px, --b-decal) et son
   ::after avec lui. Mesuré sur le Xiaomi (2e recette, 29/09 au soir) : un toucher 2 à 3 px à
   gauche ou au-dessus du bouton du menu partait sur le bandeau, car au moment du clic la zone
   s'était décalée de 3 px. Pendant l'appui, la zone s'élargit de 4 px de chaque côté : elle
   couvre encore le point touché. */
html.sm-coquille :is(
  .cgt-bandeau .cgt-coque-bouton, .sm-slide-menu-close, .sm-panel-close, .sm-modal-close,
  .sm-bottom-sheet-close, .sm-fullpage-back, .sm-admin-fullpage-close, .sm-legal-fermer, .cgt-acces-fermer,
  .cgt-msg-icone, .sm-chat-mobile-send-btn, .cgt-tdb-voir, .cgt-lien-action, .cgt-menu-mentions button,
  .cgt-theme-option, .sm-slide-menu-logout-btn, .cgt-interrupteur, .cgt-pleine-retour
):not([data-cgt-infobulle]):active::after{
  width:calc(max(100%, 48px) + 8px);
  height:calc(max(100%, 48px) + 8px);
}

/* Pastilles de compteur sur le bandeau : jaune de la charte, texte noir (8,28) */
.cgt-coque .cgt-pastille:not(#cgt){
  position:absolute;
  top:-9px;
  right:-9px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:21px;
  height:21px;
  padding:0 5px;
  box-sizing:border-box;
  background:var(--cgt-jaune);
  color:var(--sur-jaune);
  border:0;
  border-radius:var(--rayon-pilule);
  box-shadow:0 0 0 2px var(--bandeau-fond), 2px 2px 0 2px var(--bandeau-tranche);
  font-family:var(--police-texte);
  font-size:var(--fs-11);
  font-weight:var(--fw-900);
  font-variant-numeric:tabular-nums;
  line-height:1;
  letter-spacing:0;
  pointer-events:none;
}


/* ==========================================================================
   4. COMPTE : AVATAR + MENU
   ========================================================================== */
/* Avatar (photo ou initiales) : rond (seule exception aux angles droits) */
.cgt-coque .sm-topbar-user-photo{
  position:relative;
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  width:32px;
  height:32px;
  border-radius:var(--rayon-rond);
  background:var(--cgt-jaune);
  color:var(--sur-jaune);
  box-shadow:0 0 0 2px var(--cgt-blanc);
  border:0;
}
.cgt-coque .sm-topbar-user-photo img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:var(--rayon-rond);
}
.cgt-coque .sm-topbar-user-photo .sm-user-initials{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  color:var(--sur-jaune);
  font-family:var(--police-texte);
  font-size:13px;
  font-weight:var(--fw-900);
  letter-spacing:.02em;
}

.cgt-bandeau .sm-user-area{
  position:relative;
  display:flex;
  align-items:stretch;
  height:42px;
}
.cgt-bandeau .sm-user-display{
  display:flex;
  align-items:center;
  gap:9px;
  height:42px;
  margin:0;
  padding:0 12px 0 4px;
  box-sizing:border-box;
  background:transparent;
  color:var(--bandeau-texte);
  border:2px solid var(--bandeau-bord);
  border-right:0;
  border-radius:0;
  box-shadow:0 2px 0 0 var(--bandeau-tranche);
  text-decoration:none;
  cursor:pointer;
  transition:background-color var(--duree-2) var(--courbe-simple);
}
.cgt-bandeau .sm-user-firstname{
  display:inline;
  font-size:var(--fs-15);
  font-weight:var(--fw-700);
  color:inherit;
  white-space:nowrap;
  max-width:140px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cgt-bandeau .cgt-compte-bascule{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:42px;
  margin:0;
  padding:0;
  background:transparent;
  color:var(--bandeau-texte);
  border:2px solid var(--bandeau-bord);
  border-radius:0;
  box-shadow:2px 2px 0 0 var(--bandeau-tranche);
  font-size:12px;
  cursor:pointer;
}
.cgt-bandeau .cgt-compte-bascule i{ transition:rotate var(--duree-3) var(--courbe-ressort); }
.cgt-bandeau .sm-user-area.cgt-ouvert .cgt-compte-bascule i{ rotate:180deg; }
@media (hover: hover){
  .cgt-bandeau .sm-user-display:hover,
  .cgt-bandeau .cgt-compte-bascule:hover{ background:var(--bandeau-survol); }
}
.cgt-bandeau .sm-user-display:focus-visible,
.cgt-bandeau .cgt-compte-bascule:focus-visible{ outline:2px solid var(--repere-jaune); outline-offset:2px; }
.cgt-bandeau .sm-user-display.cgt-actif{ background:var(--bandeau-appui); }
@media (min-width: 1025px) and (max-width: 1339px){
  .cgt-bandeau .sm-user-firstname{ display:none; }
  .cgt-bandeau .sm-user-display{ padding:0 4px; }
}

/* --- Menu du compte (papier opaque, tranche, bandeau rouge en haut) --- */
.cgt-coque .cgt-menu-compte:not(#cgt){
  position:absolute;
  top:calc(100% + 16px);
  right:0;
  left:auto;
  z-index:10002;
  width:300px;
  min-width:0;
  margin:0;
  padding:0 0 6px;
  background:var(--papier) !important;
  border:1px solid var(--texte) !important;
  border-top:5px solid var(--cgt-rouge) !important;
  border-radius:0 !important;
  box-shadow:var(--relief-2) !important;
  color:var(--texte);
  overflow:visible;
  opacity:0;
  visibility:hidden;
  transform:none;
  translate:0 -6px;
  transition:opacity var(--duree-2) var(--courbe-simple), translate var(--duree-3) var(--courbe-sortie), visibility 0s linear var(--duree-3);
}
/* Pont invisible entre l'avatar et le menu (le survol ne se perd pas) */
.cgt-coque .cgt-menu-compte::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:-22px;
  height:22px;
}
.cgt-bandeau .sm-user-area.cgt-ouvert .cgt-menu-compte:not(#cgt),
.cgt-bandeau .cgt-menu-compte:focus-within:not(#cgt){
  opacity:1;
  visibility:visible;
  translate:0 0;
  transition:opacity var(--duree-2) var(--courbe-simple), translate var(--duree-3) var(--courbe-sortie), visibility 0s;
}
@media (hover: hover) and (min-width: 1025px){
  .cgt-bandeau .sm-user-area:hover .cgt-menu-compte:not(#cgt){
    opacity:1;
    visibility:visible;
    translate:0 0;
    transition:opacity var(--duree-2) var(--courbe-simple), translate var(--duree-3) var(--courbe-sortie), visibility 0s;
  }
}
.cgt-coque .cgt-compte-entete{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 16px 14px;
  border-bottom:1px solid var(--filet);
  margin-bottom:6px;
}
.cgt-coque .cgt-compte-entete .sm-topbar-user-photo{
  width:44px;
  height:44px;
  box-shadow:2px 2px 0 0 var(--tranche);
}
.cgt-coque .cgt-compte-entete .sm-user-initials{ font-size:16px; }
.cgt-coque .cgt-compte-identite{ display:flex; flex-direction:column; align-items:flex-start; gap:5px; min-width:0; }
.cgt-coque .cgt-compte-identite strong{
  font-size:var(--fs-16);
  font-weight:var(--fw-800);
  line-height:1.2;
  color:var(--texte);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:200px;
}
.cgt-coque .cgt-menu-compte .sm-user-dropdown-item:not(#cgt){
  display:flex;
  align-items:center;
  width:100%;
  min-height:44px;
  margin:0;
  padding:0 16px 0 13px;
  box-sizing:border-box;
  background:transparent;
  border:0;
  border-left:3px solid transparent;
  font-size:var(--fs-15);
  font-weight:var(--fw-600);
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}
.cgt-coque .cgt-menu-compte .sm-user-dropdown-item[aria-current="page"]:not(#cgt){
  border-left-color:var(--cgt-rouge);
  background:var(--primaire-teinte) !important;
}
.cgt-coque .cgt-menu-compte .sm-user-dropdown-item:focus-visible{ outline:2px solid var(--focus); outline-offset:-2px; }
.cgt-coque .cgt-menu-compte .sm-logout-item:not(#cgt){
  margin-top:6px;
  border-top:1px solid var(--filet);
  color:var(--lien) !important;
  font-weight:var(--fw-700);
}
.cgt-coque .cgt-compte-apparence{
  margin:6px 0 4px;
  padding:12px 16px 14px;
  border-top:1px solid var(--filet);
}
.cgt-coque .cgt-compte-apparence .cgt-libelle{ display:block; margin-bottom:10px; }

/* Étiquettes de rôle (menu du compte, menu latéral) : autocollants de rubrique */
.cgt-coque .cgt-role,
.cgt-coque .sm-slide-menu-role-badge{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:0;
  font-family:var(--police-texte);
  font-size:var(--fs-11);
  font-weight:var(--fw-800);
  letter-spacing:var(--ls-majuscules);
  line-height:1.2;
  text-transform:uppercase;
  background:var(--t-agenda-plein);
  color:var(--cgt-blanc);
  box-shadow:2px 2px 0 0 var(--tranche);
}
.cgt-coque :is(.cgt-role-staff, .cgt-role-delegate, .sm-role-staff, .sm-role-delegate){ background:var(--t-document); color:var(--cgt-blanc); }
.cgt-coque :is(.cgt-role-secretary, .cgt-role-admin, .sm-role-secretary, .sm-role-admin){ background:var(--cgt-jaune); color:var(--sur-jaune); }


/* ==========================================================================
   5. SÉLECTEUR DE THÈME — Clair / Sombre / Auto
   L'option choisie est « tamponnée » : enfoncée dans sa tranche, rouge.
   ========================================================================== */
.cgt-theme-choix{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
  margin:0;
  padding:0 3px 3px 0;
}
.cgt-theme-choix .cgt-theme-option{
  --b-decal:3px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  margin:0;
  padding:6px 8px;
  box-sizing:border-box;
  background:var(--papier);
  color:var(--texte);
  border:2px solid var(--bord-bouton-2);
  border-radius:0;
  box-shadow:var(--b-decal) var(--b-decal) 0 0 var(--tranche-bouton);
  font-family:var(--police-texte);
  font-size:var(--fs-14);
  font-weight:var(--fw-700);
  line-height:1.1;
  text-align:center;
  cursor:pointer;
  translate:0 0;
  transition:background-color var(--duree-2) var(--courbe-simple), color var(--duree-2) var(--courbe-simple), translate var(--duree-3) var(--courbe-ressort);
}
@media (hover: hover){
  .cgt-theme-choix .cgt-theme-option:hover{ background:var(--papier-2); }
}
.cgt-theme-choix .cgt-theme-option:focus-visible{ outline:2px solid var(--focus); outline-offset:3px; }
.cgt-theme-choix .cgt-theme-option:active{
  translate:var(--b-decal) var(--b-decal);
  box-shadow:0 0 0 0 var(--tranche-bouton);
  transition-duration:0ms;
}
/* Revue 2 : l'option choisie ne se DÉCALE plus (dans une rangée de 3, les
   4 px vers le bas-droite ressemblaient à un défaut d'alignement) : elle reste
   alignée, rouge, SANS tranche et avec un creux intérieur — « tamponnée à
   plat ». Seul l'appui (:active) enfonce encore le bouton, le temps du geste. */
.cgt-theme-choix .cgt-theme-option[aria-checked="true"]{
  background:var(--action);
  color:var(--action-texte);
  border-color:var(--action-bas);
  box-shadow:inset 2px 2px 0 0 var(--tranche-rouge);
}


/* Dans le profil : assets/css/cgt/48-profil.css (lot 05). */


/* ==========================================================================
   6. ONGLETS DU BAS (mobile ≤ 768 px)
   ========================================================================== */
.cgt-coque .sm-mobile-bottom-nav{ display:none; }
@media (max-width: 768px){
  .cgt-coque .sm-mobile-bottom-nav.cgt-barre-onglets{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:9990;
    display:grid;
    grid-template-columns:repeat(5, minmax(0, 1fr));
    align-items:stretch;
    height:calc(64px + env(safe-area-inset-bottom, 0px));
    margin:0;
    padding:0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
    box-sizing:border-box;
    background:var(--papier);
    border:0;
    border-top:1px solid var(--filet-fort);
    box-shadow:var(--onglets-ombre);
    font-family:var(--police-texte);
  }
  /* 3.0.0-beta.61 : un résilié n'a que Factures · Accueil · Déconnexion (Accueil reste au centre) */
  .cgt-coque .sm-mobile-bottom-nav.cgt-barre-onglets--resilie{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .cgt-barre-onglets .sm-bottom-nav-item{
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    min-width:0;
    height:64px;
    margin:0;
    padding:6px 2px 4px;
    box-sizing:border-box;
    background:transparent;
    color:var(--texte-3);
    border:0;
    border-radius:0;
    font:inherit;
    text-decoration:none;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
    transition:color var(--duree-2) var(--courbe-simple);
  }
  .cgt-barre-onglets .sm-bottom-nav-item i{
    font-size:21px;
    line-height:1;
    transition:translate var(--duree-3) var(--courbe-ressort);
  }
  .cgt-barre-onglets .sm-bottom-nav-item .cgt-onglet-libelle{
    font-size:var(--fs-11);
    font-weight:var(--fw-700);
    line-height:1.1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:100%;
  }
  .cgt-barre-onglets .sm-bottom-nav-item:focus-visible{ outline:2px solid var(--focus); outline-offset:-4px; }
  .cgt-barre-onglets .sm-bottom-nav-item:active i{ translate:0 2px; transition-duration:0ms; }
  .cgt-barre-onglets .sm-bottom-nav-item.active,
  .cgt-barre-onglets .sm-bottom-nav-item[aria-expanded="true"]{ color:var(--lien); }
  .cgt-barre-onglets .sm-bottom-nav-item.active .cgt-onglet-libelle{ font-weight:var(--fw-800); }
  /* Repère rouge de l'onglet actif (glisse pendant la View Transition) */
  .cgt-barre-onglets .cgt-onglet-marque{
    position:absolute;
    top:-1px;
    left:22%;
    right:22%;
    height:4px;
    background:var(--cgt-rouge);
    opacity:0;
    scale:.3 1;
    transition:opacity var(--duree-2) var(--courbe-simple), scale var(--duree-3) var(--courbe-ressort);
  }
  .cgt-barre-onglets .sm-bottom-nav-item.active .cgt-onglet-marque,
  .cgt-barre-onglets .sm-bottom-nav-item[aria-expanded="true"] .cgt-onglet-marque{ opacity:1; scale:1 1; }

  /* Accueil central : bouton « tampon » 2,5D, surélevé, AVEC son libellé comme
     les 4 autres onglets (revue 1). Actif : libellé rouge comme les autres ; le
     repère rouge du haut serait caché par le bouton surélevé, c'est donc le filet
     jaune sous le bouton qui le remplace (choix assumé). */
  .cgt-barre-onglets .sm-bottom-nav-item.home{ padding:0 0 13px; justify-content:flex-start; gap:4px; }   /* 13 px : libellé aligné sur ceux des 4 autres onglets */
  .cgt-barre-onglets .sm-bottom-nav-item.home .cgt-onglet-libelle{ margin-top:auto; }
  .cgt-barre-onglets .sm-bottom-nav-home-btn{
    --b-decal:4px;
    display:flex;
    align-items:center;
    justify-content:center;
    width:52px;
    height:52px;
    margin-top:-18px;
    background:var(--action);
    color:var(--action-texte);
    border:2px solid var(--action-bas);
    border-radius:0;
    box-shadow:var(--b-decal) var(--b-decal) 0 0 var(--tranche-rouge), 6px 10px 18px 0 rgba(201,42,42,.30);
    translate:0 0;
    transition:translate var(--duree-3) var(--courbe-ressort);
  }
  .cgt-barre-onglets .sm-bottom-nav-home-btn i{ font-size:22px; color:var(--action-texte); }
  .cgt-barre-onglets .sm-bottom-nav-item.home:active .sm-bottom-nav-home-btn{
    translate:var(--b-decal) var(--b-decal);
    box-shadow:0 0 0 0 var(--tranche-rouge), 1px 2px 4px 0 rgba(201,42,42,.22);
    transition-duration:0ms;
  }
  .cgt-barre-onglets .sm-bottom-nav-item.home:active i{ translate:none; }
  /* Sur l'accueil : un filet jaune souligne le bouton (repère « vous êtes ici ») */
  .cgt-barre-onglets .sm-bottom-nav-item.home.active .sm-bottom-nav-home-btn{
    box-shadow:inset 0 -4px 0 0 var(--cgt-jaune), var(--b-decal) var(--b-decal) 0 0 var(--tranche-rouge), 6px 10px 18px 0 rgba(201,42,42,.30);
  }

  /* Pastilles des onglets : rouge, texte blanc, anneau papier */
  .cgt-barre-onglets .sm-bottom-nav-badge:not(#cgt){
    position:absolute;
    top:5px;
    left:50%;
    right:auto;
    margin-left:5px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:19px;
    height:19px;
    padding:0 5px;
    box-sizing:border-box;
    background:var(--action);
    color:var(--action-texte);
    border:0;
    border-radius:var(--rayon-pilule);
    box-shadow:0 0 0 2px var(--papier);
    font-size:var(--fs-11);
    font-weight:var(--fw-900);
    line-height:1;
    pointer-events:none;
  }
}


/* ==========================================================================
   7. MENU LATÉRAL (mobile + tablette)
   ========================================================================== */
.cgt-coque .sm-mobile-slide-overlay{
  position:fixed;
  inset:0;
  z-index:10000;
  background:var(--voile-modale);
  opacity:0;
  visibility:hidden;
  transition:opacity var(--duree-3) var(--courbe-simple), visibility 0s linear var(--duree-3);
}
.cgt-coque .sm-mobile-slide-overlay.open{
  opacity:1;
  visibility:visible;
  transition:opacity var(--duree-3) var(--courbe-simple), visibility 0s;
}
.cgt-coque .sm-mobile-slide-menu{
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  left:auto;
  z-index:10001;
  display:flex;
  flex-direction:column;
  width:min(340px, 88vw);
  height:100%;
  margin:0;
  background:var(--papier);
  color:var(--texte);
  border:0;
  border-left:1px solid var(--texte);
  border-radius:0;
  box-shadow:-14px 0 40px rgba(0,0,0,.28);
  overflow:hidden;
  font-family:var(--police-texte);
  transform:translateX(100%);
  visibility:hidden;
  transition:transform var(--duree-4) var(--courbe-sortie), visibility 0s linear var(--duree-4);
}
.cgt-coque .sm-mobile-slide-menu.open{
  transform:translateX(0);
  visibility:visible;
  transition:transform var(--duree-4) var(--courbe-sortie), visibility 0s;
}
@media (min-width: 1025px){
  .cgt-coque .sm-mobile-slide-menu,
  .cgt-coque .sm-mobile-slide-overlay{ display:none; }
}

/* En-tête : bande d'encre (section sombre de cgt.fr) */
.cgt-coque .sm-slide-menu-header{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:calc(18px + env(safe-area-inset-top, 0px)) 16px 18px 18px;
  background:var(--bande);
  color:var(--bande-texte);
  border-radius:0;
}
.cgt-coque .cgt-menu-identite{ display:flex; align-items:center; gap:14px; min-width:0; }
.cgt-coque .cgt-menu-identite .sm-topbar-user-photo{
  width:52px;
  height:52px;
  box-shadow:0 0 0 3px var(--bande), 0 0 0 5px var(--cgt-jaune);
}
.cgt-coque .cgt-menu-identite .sm-user-initials{ font-size:18px; }
.cgt-coque .cgt-menu-identite-mots{ display:flex; flex-direction:column; align-items:flex-start; gap:7px; min-width:0; }
.cgt-coque .sm-slide-menu-header h3{
  margin:0;
  font-family:var(--police-texte);
  font-size:var(--fs-18);
  font-weight:var(--fw-800);
  line-height:1.2;
  color:var(--bande-texte);
  overflow-wrap:anywhere;
}
.cgt-coque .sm-slide-menu-header .sm-slide-menu-role-badge{ box-shadow:2px 2px 0 0 var(--bande-tranche); }
.cgt-coque .sm-slide-menu-close{
  position:static;
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  margin:0;
  padding:0;
  background:transparent;
  color:var(--bande-texte);
  border:2px solid rgba(255,255,255,.55);
  border-radius:0;
  box-shadow:2px 2px 0 0 var(--bande-tranche);
  font-size:18px;
  cursor:pointer;
}
.cgt-coque .sm-slide-menu-close:active{ translate:2px 2px; box-shadow:none; }
.cgt-coque .sm-slide-menu-close:focus-visible{ outline:2px solid var(--cgt-jaune); outline-offset:2px; }
.cgt-coque .cgt-menu-arc{ flex:none; height:6px; max-width:none; }

.cgt-coque .sm-slide-menu-content{
  flex:1 1 auto;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  padding:6px 12px 18px;
}
.cgt-coque .sm-slide-menu-section{ margin:0; padding:0; }
.cgt-coque .sm-slide-menu-section-title{
  margin:0;
  padding:14px 8px 4px;
  font-size:var(--fs-12);
  font-weight:var(--fw-700);
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
  color:var(--texte-3);
}
.cgt-coque .sm-slide-menu-item{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:48px;
  margin:0;
  padding:5px 8px 5px 6px;
  box-sizing:border-box;
  background:transparent;
  color:var(--texte);
  border-left:4px solid transparent;
  border-radius:0;
  font-size:var(--fs-16);
  font-weight:var(--fw-600);
  text-decoration:none;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:background-color var(--duree-2) var(--courbe-simple);
}
.cgt-coque .sm-slide-menu-item span{ font-size:inherit; }
@media (hover: hover){ .cgt-coque .sm-slide-menu-item:hover{ background:var(--papier-2); } }
.cgt-coque .sm-slide-menu-item:active{ background:var(--papier-3); }
.cgt-coque .sm-slide-menu-item:focus-visible{ outline:2px solid var(--focus); outline-offset:-2px; }
.cgt-coque .sm-slide-menu-item[aria-current="page"]{
  border-left-color:var(--cgt-rouge);
  background:var(--primaire-teinte);
  font-weight:var(--fw-800);
}
/* Pictogramme de rubrique : carré aux couleurs thématiques de cgt.fr */
.cgt-coque .cgt-menu-picto{
  --picto-fond:var(--picto-neutre-fond);
  --picto-texte:var(--picto-neutre-texte);
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  background:var(--picto-fond);
  color:var(--picto-texte);
  box-shadow:2px 2px 0 0 var(--tranche);
  font-size:16px;
}
.cgt-coque .cgt-menu-picto i{ width:auto; color:inherit; font-size:inherit; }
.cgt-coque [data-rubrique="accueil"] .cgt-menu-picto{ --picto-fond:var(--cgt-rouge-600); --picto-texte:#FFFFFF; }
.cgt-coque [data-rubrique="actualite"] .cgt-menu-picto{ --picto-fond:var(--t-actualite); --picto-texte:var(--t-actualite-sur); }
.cgt-coque [data-rubrique="agenda"] .cgt-menu-picto{ --picto-fond:var(--t-agenda); --picto-texte:var(--t-agenda-sur); }
.cgt-coque [data-rubrique="document"] .cgt-menu-picto{ --picto-fond:var(--t-document); --picto-texte:var(--t-document-sur); }
.cgt-coque [data-rubrique="communique"] .cgt-menu-picto{ --picto-fond:var(--t-communique); --picto-texte:var(--t-communique-sur); }
.cgt-coque [data-rubrique="dossier"] .cgt-menu-picto{ --picto-fond:var(--t-dossier); --picto-texte:var(--t-dossier-sur); }
.cgt-coque [data-rubrique="petition"] .cgt-menu-picto{ --picto-fond:var(--t-petition); --picto-texte:var(--t-petition-sur); }
.cgt-coque [data-rubrique="encre"] .cgt-menu-picto{ --picto-fond:var(--picto-encre-fond); --picto-texte:var(--picto-encre-texte); }
/* Entrées réservées à la tablette (sur mobile, elles sont dans les onglets) */
.cgt-coque .cgt-si-tablette{ display:none; }
@media (min-width: 769px) and (max-width: 1024px){
  .cgt-coque .sm-slide-menu-section.cgt-si-tablette{ display:block; }
  .cgt-coque .sm-slide-menu-item.cgt-si-tablette{ display:flex; }
}
.cgt-coque .cgt-menu-apparence .cgt-theme-choix{ margin:4px 4px 0 4px; }

/* Pied du menu : sortie + mentions */
.cgt-coque .sm-slide-menu-footer{
  flex:none;
  padding:14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background:var(--papier-2);
  border-top:1px solid var(--filet);
}
.cgt-coque .sm-slide-menu-logout-btn{
  --b-decal:3px;
  display:flex;
  align-items:center;
  justify-content:center;
  width:calc(100% - var(--b-decal));
  height:46px;
  margin:0 0 12px;
  padding:0 16px;
  background:var(--papier);
  color:var(--lien);
  border:2px solid var(--erreur-plein);
  border-radius:0;
  box-shadow:var(--b-decal) var(--b-decal) 0 0 var(--tranche-rouge);
  font-family:var(--police-texte);
  font-size:var(--fs-16);
  font-weight:var(--fw-800);
  cursor:pointer;
  translate:0 0;
  transition:translate var(--duree-3) var(--courbe-ressort), background-color var(--duree-2) var(--courbe-simple);
}
.cgt-coque .sm-slide-menu-logout-btn:active{
  translate:var(--b-decal) var(--b-decal);
  box-shadow:0 0 0 0 var(--tranche-rouge);
  transition-duration:0ms;
}
.cgt-coque .sm-slide-menu-logout-btn:focus-visible{ outline:2px solid var(--focus); outline-offset:3px; }
.cgt-coque .cgt-menu-mentions{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 4px;
  font-size:var(--fs-13);
  color:var(--texte-3);
}
.cgt-coque .cgt-menu-mentions button,
.cgt-coque .cgt-lien-pied{
  margin:0;
  padding:4px 0;
  background:none;
  border:0;
  color:var(--texte-3);
  font:inherit;
  font-weight:var(--fw-600);
  text-decoration:underline;
  text-decoration-color:var(--filet-fort);
  text-underline-offset:3px;
  cursor:pointer;
}
@media (hover: hover){
  .cgt-coque .cgt-menu-mentions button:hover,
  .cgt-coque .cgt-lien-pied:hover{ color:var(--lien); text-decoration-color:currentColor; }
}
.cgt-coque .cgt-menu-credit{ margin:0; font-size:var(--fs-12); color:var(--texte-indice); }


/* ==========================================================================
   Bandeau : variantes tablette (769-1024) et mobile (≤ 768)
   ========================================================================== */
/* Visibilité des boutons du bandeau selon la largeur */
.cgt-bandeau .sm-mobile-menu-btn{ display:none; }
@media (max-width: 1024px){
  .cgt-bandeau .sm-topbar-nav{ display:none; }
  .cgt-bandeau .cgt-si-bureau{ display:none; }
  .cgt-bandeau .sm-mobile-menu-btn{ display:inline-flex; }
  .cgt-bandeau .cgt-coque-sous{ display:none; }
  .cgt-bandeau .cgt-coque-titre{
    display:block;
    max-width:52vw;
    font-size:var(--fs-12);
    font-weight:var(--fw-800);
    letter-spacing:var(--ls-majuscules);
    text-transform:uppercase;
    line-height:1.2;
    color:var(--bandeau-texte);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}
@media (min-width: 769px) and (max-width: 1024px){
  .cgt-coque .sm-topbar.cgt-bandeau{
    height:calc(64px + env(safe-area-inset-top, 0px));
    min-height:calc(64px + env(safe-area-inset-top, 0px));
    padding:env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  }
}
@media (max-width: 768px){
  .cgt-coque .sm-topbar.cgt-bandeau{
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:calc(56px + env(safe-area-inset-top, 0px));
    min-height:calc(56px + env(safe-area-inset-top, 0px));
    padding:env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
    gap:10px;
    box-shadow:inset 0 -3px 0 0 var(--bandeau-regle), 0 3px 0 0 var(--bandeau-tranche), var(--bandeau-ombre);
  }
  .cgt-bandeau .cgt-si-large{ display:none; }
  .cgt-bandeau .cgt-coque-marque{ gap:10px; }
  .cgt-bandeau .cgt-coque-logo{ padding:2px; box-shadow:2px 2px 0 0 var(--affiche-encre); }
  .cgt-bandeau .cgt-coque-logo img{ height:44px; }   /* charte §7.2 règle 4 : ≥ 40 px (cgt.fr : 48 en mobile) */
  .cgt-bandeau .cgt-coque-nom{ font-size:20px; }
  .cgt-bandeau .cgt-coque-titre{ max-width:calc(100vw - 150px); }
  .cgt-bandeau .cgt-coque-bouton{ width:42px; height:42px; }
}


/* ==========================================================================
   8. PANNEAU DES NOTIFICATIONS
   ========================================================================== */
.cgt-coque ~ .sm-notifications-panel,
body.sm-connecte .sm-notifications-panel{
  position:fixed;
  top:74px;
  right:0;
  left:auto;
  z-index:99999;
  display:flex;
  flex-direction:column;
  width:400px;
  max-width:100vw;
  height:calc(100vh - 74px);
  height:calc(100dvh - 74px);
  margin:0;
  padding:0;
  background:var(--papier);
  color:var(--texte);
  border:0;
  border-left:1px solid var(--texte);
  border-radius:0;
  box-shadow:-12px 0 36px rgba(0,0,0,.24);
  overflow-y:auto;
  overscroll-behavior:contain;
  font-family:var(--police-texte);
  transform:translateX(100%);
  visibility:hidden;
  transition:transform var(--duree-4) var(--courbe-sortie), visibility 0s linear var(--duree-4);
}
body.sm-connecte .sm-notifications-panel.show{
  transform:translateX(0);
  visibility:visible;
  transition:transform var(--duree-4) var(--courbe-sortie), visibility 0s;
}
body.sm-connecte .sm-notifications-panel .sm-panel-header{
  position:sticky;
  top:0;
  z-index:5;   /* Passe C (tour 2, ADH-01) : chaque ligne (.sm-notification-swipe-item) est en z-index 2 :
                  à égalité, la liste défilée passait DEVANT le titre et la croix */
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0;
  padding:14px 16px 14px 20px;
  background:var(--bande);
  color:var(--bande-texte);
  border:0;
  box-shadow:inset 0 -4px 0 0 var(--cgt-rouge);
}
body.sm-connecte .sm-notifications-panel .sm-panel-header h3{
  margin:0;
  font-family:var(--police-texte);
  font-size:var(--fs-24);
  font-weight:var(--fw-400);
  line-height:1.15;
  letter-spacing:var(--ls-accent);
  color:var(--bande-texte);
}
body.sm-connecte .sm-notifications-panel .sm-panel-header .cgt-accent{ color:var(--cgt-rouge-500); }
body.sm-connecte .sm-notifications-panel .sm-panel-close:not(#cgt){
  background:transparent !important;
  color:var(--bande-texte) !important;
  border-color:rgba(255,255,255,.55) !important;
  box-shadow:2px 2px 0 0 var(--bande-tranche) !important;
}
@media (hover: hover){
  body.sm-connecte .sm-notifications-panel .sm-panel-close:not(#cgt):hover{
    background:var(--action) !important;
    border-color:var(--action) !important;
    color:var(--action-texte) !important;
  }
}
body.sm-connecte .sm-notifications-panel .sm-panel-content{ flex:1 0 auto; padding:0; }

/* Barre d'actions : compte + « Tout lire » / « Tout supprimer » (texte, sans icône) */
.cgt-notifs-barre{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 16px 10px 20px;
  background:var(--papier-2);
  border-bottom:1px solid var(--filet);
}
.cgt-notifs-compte{ font-size:var(--fs-13); color:var(--texte-3); }
.cgt-notifs-compte strong{ color:var(--texte); font-weight:var(--fw-800); }
.cgt-notifs-actions{ display:flex; align-items:center; gap:14px; }
.cgt-lien-action{
  margin:0;
  padding:6px 0;
  background:none;
  border:0;
  color:var(--texte);
  font-family:var(--police-texte);
  font-size:var(--fs-13);
  font-weight:var(--fw-700);
  text-decoration:underline;
  text-decoration-color:var(--cgt-jaune);
  text-decoration-thickness:3px;
  text-underline-offset:4px;
  white-space:nowrap;
  cursor:pointer;
}
.cgt-lien-action.cgt-lien-danger{ color:var(--lien); text-decoration-color:currentColor; text-decoration-thickness:1px; }
.cgt-lien-action:focus-visible{ outline:2px solid var(--focus); outline-offset:2px; }
.cgt-notifs-astuce{
  margin:0;
  padding:8px 16px;
  background:var(--papier-2);
  border-bottom:1px solid var(--filet);
  font-size:var(--fs-12);
  color:var(--texte-indice);
  text-align:center;
}

/* Une notification */
body.sm-connecte :is(.sm-notification-item, .sm-notification-swipe-item){
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:14px;
  margin:0;
  padding:14px 48px 14px 16px;
  box-sizing:border-box;
  background:var(--papier);
  color:var(--texte);
  border:0;
  border-left:4px solid transparent;
  border-bottom:1px solid var(--filet);
  border-radius:0;
  cursor:pointer;
  transition:background-color var(--duree-2) var(--courbe-simple);
}
body.sm-connecte .sm-notification-swipe-item{ padding-right:16px; }
body.sm-connecte .sm-notification-swipe-container{ border-bottom:0; background:var(--erreur-plein); }
@media (hover: hover){
  body.sm-connecte .sm-notification-item:hover{ background:var(--papier-2); }
}
body.sm-connecte :is(.sm-notification-item, .sm-notification-swipe-item).sm-unread{
  background:var(--primaire-teinte);
  border-left-color:var(--cgt-rouge);
}
body.sm-connecte .sm-notification-item:focus-visible{ outline:2px solid var(--focus); outline-offset:-2px; }
body.sm-connecte .sm-notification-icon{
  --picto-fond:var(--picto-neutre-fond);
  --picto-texte:var(--picto-neutre-texte);
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  margin:0;
  background:var(--picto-fond);
  color:var(--picto-texte);
  border-radius:0;
  box-shadow:2px 2px 0 0 var(--tranche);
  font-size:17px;
}
body.sm-connecte .sm-notification-swipe-item .sm-notification-icon{ width:40px; height:40px; background:var(--picto-fond); color:var(--picto-texte); }
/* Couleur du pictogramme = rubrique de cgt.fr, selon le type (poids > la règle
   par défaut « body.sm-connecte .sm-notification-icon ») */
body.sm-connecte :is([data-type="new_news"], [data-type="news"]) .sm-notification-icon{ --picto-fond:var(--t-actualite); --picto-texte:var(--t-actualite-sur); }
body.sm-connecte :is([data-type="new_message"], [data-type="message"]) .sm-notification-icon{ --picto-fond:var(--t-communique); --picto-texte:var(--t-communique-sur); }
body.sm-connecte :is([data-type="new_training"], [data-type^="training"], [data-type="new_meeting"], [data-type="meeting"], [data-type="new_assembly"], [data-type^="assembly"]) .sm-notification-icon{ --picto-fond:var(--t-agenda); --picto-texte:var(--t-agenda-sur); }
body.sm-connecte :is([data-type="new_newsletter"], [data-type="newsletter"], [data-type="new_cse_report"], [data-type="training_documents"]) .sm-notification-icon{ --picto-fond:var(--t-document); --picto-texte:var(--t-document-sur); }
body.sm-connecte :is([data-type="new_ticket"], [data-type^="ticket"], [data-type="payment"]) .sm-notification-icon{ --picto-fond:var(--t-dossier); --picto-texte:var(--t-dossier-sur); }
body.sm-connecte :is([data-type="new_member"], [data-type="member"], [data-type="membership"]) .sm-notification-icon{ --picto-fond:var(--t-petition); --picto-texte:var(--t-petition-sur); }
/* 3.0.0-beta.74 : j'aime (DS et secrétaire) — même rose que son icône de push */
body.sm-connecte [data-type="jaime"] .sm-notification-icon{ --picto-fond:var(--t-petition); --picto-texte:var(--t-petition-sur); }
/* Factures et reçus : rubrique « document » (violet) — revue 1 : « Factures générées » restait gris */
body.sm-connecte :is([data-type="invoice"], [data-type="invoices"], [data-type="annual_receipt"]) .sm-notification-icon{ --picto-fond:var(--t-document); --picto-texte:var(--t-document-sur); }
body.sm-connecte [data-type="cancellation"] .sm-notification-icon{ --picto-fond:var(--t-dossier-plein); --picto-texte:#FFFFFF; }
body.sm-connecte [data-type="validation"] .sm-notification-icon{ --picto-fond:var(--cgt-cyan-plein); --picto-texte:#FFFFFF; }
body.sm-connecte .sm-notification-content{ flex:1 1 auto; min-width:0; }
body.sm-connecte .sm-notification-content strong{
  display:block;
  margin:0 0 3px;
  font-size:var(--fs-15);
  font-weight:var(--fw-700);
  line-height:1.3;
  color:var(--texte);
}
body.sm-connecte .sm-unread .sm-notification-content strong{ font-weight:var(--fw-800); }
body.sm-connecte .sm-notification-content p{
  margin:0;
  font-size:var(--fs-14);
  line-height:1.45;
  color:var(--texte-2);
  white-space:normal;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
body.sm-connecte .sm-notification-time{
  display:block;
  margin-top:5px;
  font-size:var(--fs-12);
  font-weight:var(--fw-600);
  color:var(--texte-indice);
}
/* Alertes de gestion (épinglées en tête) */
body.sm-connecte .sm-notification-item.cgt-notif-admin{
  background:var(--papier-2);
  border-left-color:var(--notif-ton, var(--cgt-rouge));
  padding-right:40px;
}
.cgt-notif-admin[data-ton="erreur"]{ --notif-ton:var(--erreur-plein); }
.cgt-notif-admin[data-ton="alerte"]{ --notif-ton:var(--cgt-jaune); }
.cgt-notif-admin[data-ton="info"]{ --notif-ton:var(--cgt-bleu-plein); }
.cgt-notif-admin[data-ton="dossier"]{ --notif-ton:var(--t-dossier-plein); }
body.sm-connecte .cgt-notif-admin .sm-notification-icon{ --picto-fond:var(--notif-ton, var(--cgt-rouge)); --picto-texte:#FFFFFF; }
body.sm-connecte .cgt-notif-admin[data-ton="alerte"] .sm-notification-icon{ --picto-texte:var(--sur-jaune); }
body.sm-connecte .cgt-notif-admin .cgt-notif-action{
  display:inline-block;
  margin-top:7px;
  padding:2px 7px;
  background:var(--cgt-jaune);
  color:var(--sur-jaune);
  box-shadow:2px 2px 0 0 var(--tranche);
  font-size:var(--fs-11);
  font-weight:var(--fw-800);
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
}
body.sm-connecte .cgt-notif-admin .cgt-notif-chevron{
  position:absolute;
  right:16px;
  top:50%;
  translate:0 -50%;
  color:var(--texte-3);
  font-size:13px;
}
/* Supprimer (bureau) : icône seule, révélée au survol et au clavier */
body.sm-connecte .sm-notification-delete{
  position:absolute;
  right:8px;
  top:50%;
  transform:none;
  translate:0 -50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  margin:0;
  padding:0;
  background:transparent;
  color:var(--texte-3);
  border:1px solid transparent;
  border-radius:0;
  opacity:0;
  cursor:pointer;
  transition:opacity var(--duree-2) var(--courbe-simple);
}
/* Règles séparées : un :focus-visible inconnu (iOS < 15.4) annulerait toute la liste */
body.sm-connecte .sm-notification-item:hover .sm-notification-delete{ opacity:1; }
body.sm-connecte .sm-notification-delete:focus{ opacity:1; }
@media (hover: none){ body.sm-connecte .sm-notification-delete{ opacity:.7; } }
body.sm-connecte .sm-notification-delete:hover{ background:var(--papier-3); color:var(--lien); border-color:var(--filet-fort); }
body.sm-connecte .sm-notification-delete:focus-visible{ outline:2px solid var(--focus); outline-offset:-2px; }
/* Glisser pour supprimer (mobile) : le rouge apparaît sous la notification */
body.sm-connecte .sm-notification-swipe-action{
  width:76px;
  background:var(--erreur-plein);
  color:#FFFFFF;
  font-size:19px;
}
/* État vide */
.cgt-notifs-vide.sm-empty-state{ padding:56px 24px; }

/* Mobile : plein écran, sous le bandeau d'encre */
@media (max-width: 768px){
  body.sm-connecte .sm-notifications-panel{
    top:0;
    width:100%;
    height:100vh;
    height:100dvh;
    border-left:0;
    box-shadow:none;
  }
  body.sm-connecte .sm-notifications-panel .sm-panel-header{
    padding-top:calc(14px + env(safe-area-inset-top, 0px));
    padding-left:max(18px, env(safe-area-inset-left, 0px));
    padding-right:max(14px, env(safe-area-inset-right, 0px));
  }
  body.sm-connecte .sm-notifications-panel .sm-panel-content{ padding-bottom:env(safe-area-inset-bottom, 0px); }
}
/* Tablette : sous le bandeau de 64 px */
@media (min-width: 769px) and (max-width: 1024px){
  body.sm-connecte .sm-notifications-panel{
    top:calc(68px + env(safe-area-inset-top, 0px));
    /* Contrôle final : repli en vh avant dvh (iPadOS 15 ignore dvh et gardait la hauteur du bureau) */
    height:calc(100vh - 68px - env(safe-area-inset-top, 0px));
    height:calc(100dvh - 68px - env(safe-area-inset-top, 0px));
  }
}


/* ==========================================================================
   9. PIED DE PAGE (bureau)
   ========================================================================== */
.cgt-coque .sm-main-footer{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:99;
  display:block;
  height:32px;
  margin:0;
  padding:0 32px;
  box-sizing:border-box;
  background:var(--papier);
  color:var(--texte-3);
  border:0;
  border-top:1px solid var(--filet);
  font-family:var(--police-texte);
  font-size:var(--fs-12);
}
.cgt-coque .cgt-pied-arc{
  position:absolute;
  left:0;
  top:-4px;
  width:100%;
  max-width:none;
  height:3px;
}
.cgt-coque .sm-footer-content{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  height:100%;
  max-width:none;
  margin:0;
}
.cgt-coque .sm-footer-left,
.cgt-coque .sm-footer-center{ display:flex; align-items:center; gap:8px; text-align:left; }
.cgt-coque .sm-footer-left strong{ color:var(--texte-2); font-weight:var(--fw-800); }
.cgt-coque .sm-footer-left a{ color:var(--texte-2); font-weight:var(--fw-700); text-decoration:none; }
@media (hover: hover){ .cgt-coque .sm-footer-left a:hover{ color:var(--lien); text-decoration:underline; } }
.cgt-coque .sm-footer-sep{ color:var(--texte-indice); }
.cgt-coque .cgt-lien-pied{ font-size:var(--fs-12); padding:2px 0; }
@media (max-width: 1024px){
  .cgt-coque .sm-main-footer{ display:none; }
}


/* ==========================================================================
   10. BANDEAUX SYSTÈME
   ========================================================================== */
/* Chargement de la première page : barre rouge 100×4 qui balaie */
.cgt-coque .cgt-attente-page{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  padding:72px 20px;
  text-align:center;
}
.cgt-coque .cgt-attente-barre{
  position:relative;
  display:block;
  width:var(--barre-titre-l);
  height:var(--barre-titre-h);
  overflow:hidden;
  background:var(--primaire-teinte-2);
}
.cgt-coque .cgt-attente-barre::after{
  content:"";
  position:absolute;
  inset:0;
  background:var(--cgt-rouge);
  animation:cgt-balayage 1.1s var(--courbe-std) infinite;
}
.cgt-coque .cgt-attente-page p{ margin:0; font-size:var(--fs-14); font-weight:var(--fw-600); color:var(--texte-3); }

/* Bascule d'utilisateur, hors ligne : bande fixe en haut */
.cgt-bandeau-systeme{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  min-height:40px;
  min-height:calc(40px + env(safe-area-inset-top, 0px));   /* bas de la bande = 40 + encoche (repère des décalages) */
  margin:0;
  padding:calc(6px + env(safe-area-inset-top, 0px)) 16px 6px;
  box-sizing:border-box;
  background:var(--cgt-jaune);
  color:var(--sur-jaune);
  border-bottom:3px solid var(--cgt-noir);
  font-family:var(--police-texte);
  font-size:var(--fs-14);
  font-weight:var(--fw-700);
  line-height:1.3;
  text-align:center;
}
/* « body > [id^="sm-"] » (public.css, 0,1,1) imposait la taille de base (16 px)
   à la bande : jamais réduite en mobile, d'où la coupure du message (revue 2). */
.cgt-bandeau-systeme:not(#cgt){ font-size:var(--fs-14); }
.cgt-bandeau-systeme .cgt-bandeau-systeme-tag{
  flex:none;
  padding:2px 7px;
  background:var(--cgt-noir);
  color:var(--cgt-jaune);
  font-size:var(--fs-11);
  font-weight:var(--fw-900);
  letter-spacing:var(--ls-majuscules);
  text-transform:uppercase;
}
.cgt-bandeau-systeme .cgt-bandeau-systeme-bouton{
  --b-decal:2px;
  flex:none;
  min-height:32px;
  margin:0;
  padding:4px 12px;
  background:var(--cgt-blanc);
  color:var(--cgt-noir);
  border:2px solid var(--cgt-noir);
  border-radius:0;
  box-shadow:var(--b-decal) var(--b-decal) 0 0 var(--cgt-noir);
  font:inherit;
  font-size:var(--fs-13);
  font-weight:var(--fw-800);
  cursor:pointer;
}
.cgt-bandeau-systeme .cgt-bandeau-systeme-bouton:active{ translate:2px 2px; box-shadow:none; }
/* Téléphone : une seule ligne (le bandeau de la coque est décalé de 40 px).
   Revue 2 : le message long était coupé dès 390 px (« …peuvent ne … ») ; la
   bande porte un texte COURT en mobile (le title n'existe pas au toucher). */
.cgt-bandeau-systeme .cgt-texte-court{ display:none; }
@media (max-width: 768px){
  .cgt-bandeau-systeme{ justify-content:flex-start; gap:10px; text-align:left; }
  .cgt-bandeau-systeme:not(#cgt){ font-size:var(--fs-13); }
  .cgt-bandeau-systeme > span:not(.cgt-bandeau-systeme-tag){ flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .cgt-bandeau-systeme .cgt-texte-long{ display:none; }
  .cgt-bandeau-systeme .cgt-texte-court{ display:block; }
}
@media (max-width: 374px){   /* 320 px : le texte court tient en entier */
  .cgt-bandeau-systeme{ gap:8px; padding-left:12px; padding-right:12px; }
  .cgt-bandeau-systeme:not(#cgt){ font-size:var(--fs-12); }
  .cgt-bandeau-systeme .cgt-bandeau-systeme-tag{ padding:2px 5px; }
}
.cgt-bandeau-systeme.cgt-hors-ligne{
  background:var(--cgt-noir);
  color:#FFFFFF;
  border-bottom-color:var(--cgt-jaune);
}
.cgt-bandeau-systeme.cgt-hors-ligne .cgt-bandeau-systeme-tag{ background:var(--cgt-jaune); color:var(--sur-jaune); }
body.sm-offline-mode .cgt-coque .sm-topbar{ margin-top:40px; }
@media (max-width: 768px){
  body.sm-offline-mode .cgt-coque .sm-content-area{ padding-top:calc(100px + env(safe-area-inset-top, 0px)) !important; }
}
@media (min-width: 769px){
  body.sm-offline-mode .cgt-coque .sm-main-content{ padding-top:40px; }
  body.sm-offline-mode .cgt-coque .sm-topbar{ margin-top:0; top:40px; }
}

/* Actions hors ligne en attente : autocollant jaune au-dessus des onglets */
.cgt-actions-attente{
  --b-decal:3px;
  position:fixed;
  right:16px;
  bottom:calc(84px + env(safe-area-inset-bottom, 0px));
  z-index:9995;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  margin:0;
  padding:8px 14px;
  background:var(--cgt-jaune);
  color:var(--sur-jaune);
  border:2px solid var(--cgt-noir);
  border-radius:0;
  box-shadow:var(--b-decal) var(--b-decal) 0 0 var(--cgt-noir), 6px 10px 20px rgba(0,0,0,.25);
  font-family:var(--police-texte);
  font-size:var(--fs-14);
  font-weight:var(--fw-800);
  cursor:pointer;
}
.cgt-actions-attente:active{ translate:var(--b-decal) var(--b-decal); box-shadow:none; }
@media (min-width: 769px){ .cgt-actions-attente{ bottom:52px; right:24px; } }

/* Fenêtre « Actions en attente » (SM.showPendingActionsModal) : gabarit de la charte */
.cgt-attente-modale .cgt-attente-info{ margin:0 0 var(--esp-4, 16px); align-items:flex-start; }
.cgt-attente-modale .cgt-attente-info p{ margin:0; font-size:var(--fs-14); line-height:1.5; }
.cgt-attente-liste{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--esp-2, 8px); }
.cgt-attente-item{
  display:flex; align-items:center; justify-content:space-between; gap:var(--esp-3, 12px);
  padding:var(--esp-3, 12px) var(--esp-4, 16px);
  background:var(--papier-2); border:1px solid var(--filet); border-radius:var(--rayon);
}
.cgt-attente-texte{ min-width:0; }
.cgt-attente-libelle{ display:block; color:var(--texte); font-weight:var(--fw-800); }
.cgt-attente-description{ margin:4px 0 0; color:var(--texte-2); font-size:var(--fs-14); }
.cgt-attente-date{ margin:4px 0 0; color:var(--texte-3); font-size:var(--fs-12); font-variant-numeric:tabular-nums; }
.cgt-attente-annuler{ flex-shrink:0; }
.cgt-attente-vide{ margin:0; padding:var(--esp-4, 16px) 0; text-align:center; color:var(--texte-3); }

/* Tirer pour actualiser (mobile) : autocollant carré qui descend sous le bandeau */
.cgt-ptr{
  position:fixed;
  left:50%;
  z-index:10000;
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  margin-left:-22px;
  background:var(--papier);
  color:var(--lien);
  border:2px solid var(--bord-bouton-2);
  box-shadow:3px 3px 0 0 var(--tranche-bouton);
  font-size:18px;
  transition:top .2s ease, opacity .2s;
  pointer-events:none;
}
.cgt-ptr i{ transition:transform .2s; }

/* Installer l'application (connecté) : carte au-dessus des onglets, sans
   recouvrir le bandeau ; jamais dans l'application native (coquille). */
@media (max-width: 768px){
  body.sm-connecte .sm-pwa-banner{
    top:auto;
    left:10px;
    right:10px;
    /* Revue 2 : au-dessus du bouton Accueil SURÉLEVÉ (onglets 64 + dépassement
       18 + marge 10) — il paraissait coupé sous la bannière. */
    bottom:calc(92px + env(safe-area-inset-bottom, 0px));
    padding:12px 12px 12px 14px;
    border-bottom:0;
    border-top:4px solid var(--cgt-rouge);
    box-shadow:4px 4px 0 0 var(--tranche-bouton), 0 14px 30px rgba(0,0,0,.35);
    translate:0 calc(100% + 110px);
  }
  body.sm-connecte .sm-pwa-banner.sm-pwa-banner-visible{ translate:0 0; }
  body.sm-connecte.sm-pwa-banner-shown .sm-topbar{ margin-top:0; }
}
html.sm-coquille .sm-pwa-banner{ display:none !important; }


/* ==========================================================================
   11. MOUVEMENT
   Pendant une View Transition de route (html.cgt-vt, cgt-motion.js), les
   repères actifs sont nommés : le navigateur les fait GLISSER de l'ancienne
   rubrique à la nouvelle ; le titre d'écran du bandeau se fond.
   Le reste de la coque ne bouge pas (racine sans animation, 90-motion.css).
   ========================================================================== */
/* Les barres sont nommées elles aussi, et posées AU-DESSUS du contenu : un
   élément nommé échappe au découpage de son parent qui défile, sans quoi la
   page (#sm-page-content, nommée cgt-contenu) passerait par-dessus le
   bandeau et les onglets pendant la transition. Elles ne bougent pas. */
html.cgt-vt .cgt-coque .sm-topbar.cgt-bandeau{ view-transition-name:cgt-bandeau; }
html.cgt-vt .cgt-coque .sm-mobile-bottom-nav{ view-transition-name:cgt-barre-onglets; }
html.cgt-vt .cgt-coque .sm-main-footer{ view-transition-name:cgt-pied; }
::view-transition-group(cgt-bandeau),
::view-transition-group(cgt-barre-onglets),
::view-transition-group(cgt-pied){ z-index:10; animation:none; }
::view-transition-old(cgt-bandeau), ::view-transition-new(cgt-bandeau),
::view-transition-old(cgt-barre-onglets), ::view-transition-new(cgt-barre-onglets),
::view-transition-old(cgt-pied), ::view-transition-new(cgt-pied){ animation:none; mix-blend-mode:normal; }
::view-transition-old(cgt-bandeau), ::view-transition-old(cgt-barre-onglets), ::view-transition-old(cgt-pied){ display:none; }
::view-transition-group(cgt-nav-actif),
::view-transition-group(cgt-onglet-actif),
::view-transition-group(cgt-titre-ecran){ z-index:20; }
/* Pendant la transition, l'ancien repère s'efface d'un coup (seul le repère
   nommé glisse) */
html.cgt-vt .cgt-nav-marque, html.cgt-vt .cgt-onglet-marque{ transition:none; }
html.cgt-vt .cgt-bandeau .sm-topbar-nav-link.active .cgt-nav-marque{ view-transition-name:cgt-nav-actif; }
html.cgt-vt .cgt-barre-onglets .sm-bottom-nav-item.active .cgt-onglet-marque{ view-transition-name:cgt-onglet-actif; }
html.cgt-vt .cgt-bandeau #cgt-titre-ecran{ view-transition-name:cgt-titre-ecran; }
::view-transition-group(cgt-nav-actif),
::view-transition-group(cgt-onglet-actif){
  animation-duration:340ms;
  animation-timing-function:cubic-bezier(.2,.8,.2,1);
}
/* Titre du bandeau : l'ancien SORT d'abord (90 ms), le nouveau n'entre qu'ensuite
   — jamais « BONJOUR JEAN » par-dessus « MESSAGES » (revue 1). */
::view-transition-old(cgt-titre-ecran){ animation:cgt-vt-titre-sortie 90ms cubic-bezier(.4,0,1,1) both; }
::view-transition-new(cgt-titre-ecran){ animation:cgt-vt-titre-entree 220ms cubic-bezier(.2,.8,.2,1) 90ms both; }
::view-transition-group(cgt-titre-ecran){ animation-duration:310ms; }
@keyframes cgt-vt-titre-sortie{ to{ opacity:0; } }
@keyframes cgt-vt-titre-entree{ from{ opacity:0; transform:translateY(6px); } }
/* Changement de thème : fondu de toute la page (opacité seule) */
html.cgt-vt-theme::view-transition-old(root){ animation:cgt-disparition 260ms var(--courbe-simple) both; }
html.cgt-vt-theme::view-transition-new(root){ animation:cgt-apparition 260ms var(--courbe-simple) both; }

@media (prefers-reduced-motion: reduce){
  .cgt-coque .sm-mobile-slide-menu,
  .cgt-coque .sm-mobile-slide-overlay,
  body.sm-connecte .sm-notifications-panel,
  .cgt-coque .cgt-menu-compte{ transition:none !important; }
  .cgt-coque .cgt-attente-barre::after{ animation:none; transform:scaleX(.6); }
  .cgt-bandeau .cgt-coque-logo{ transition:none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*){ animation:none !important; }
}

/* Impression : la coque disparaît */
@media print{
  .cgt-coque .sm-topbar, .cgt-coque .sm-mobile-bottom-nav, .cgt-coque .sm-main-footer,
  .cgt-coque .sm-mobile-slide-menu, .cgt-coque .sm-mobile-slide-overlay,
  body.sm-connecte .sm-notifications-panel{ display:none !important; }
}


/* ==========================================================================
   LIEN D'ÉVITEMENT de la coque (revue 1) — même style que sur la vitrine
   (40-public.css), mais FIXE et au-dessus du bandeau.
   ========================================================================== */
.cgt-coque > .cgt-evitement-coque{
  position:fixed;
  left:16px;
  top:-80px;
  z-index:100001;                          /* au-dessus du bandeau (9999) et des menus (10002) */
  padding:10px 16px;
  background:var(--cgt-jaune);
  color:var(--sur-jaune);
  font-family:var(--police-texte);
  font-weight:var(--fw-800);
  text-decoration:none;
  box-shadow:3px 3px 0 0 var(--affiche-encre);
}
.cgt-coque > .cgt-evitement-coque:focus{
  top:calc(12px + env(safe-area-inset-top, 0px));
  outline:2px solid var(--affiche-encre);
  outline-offset:2px;
}
/* La zone de contenu reçoit le focus (tabindex=-1) : pas de cadre sur toute la page */
#sm-page-content:focus{ outline:none; }

/* App native, clavier ouvert (classe posée par cgt-coque.js sur les évènements
   du greffon Keyboard) : la barre d'onglets s'efface, comme dans une app
   iOS/Android. Sinon elle remonte au-dessus du clavier et mange 64 points
   sur les ~480 qui restent. (app-native/PATCH-PLUGIN.md, correctif 03)
   - la place qui lui était réservée (fullscreen-app.php : padding-bottom
     calc(76px + zone sûre) !important) est rendue au contenu ;
   - le bouton « nouveau message » descend au bas de la zone visible. */
html.sm-clavier-ouvert .cgt-barre-onglets{ display:none !important; }
html.sm-clavier-ouvert .sm-content-area,
html.sm-clavier-ouvert body.sm-dashboard-page .sm-content-area{ padding-bottom:12px !important; }
html.sm-clavier-ouvert .sm-msg-mobile-fab{ bottom:16px; }

/* Passe C (ADH-T1-06, ADM-T1-04) : page 404 (SM.load404) — titre d'écran, puis état vide */
/* Passe C (tour 2, ADM-14) : pas de marge haute en plus de celle de la zone de contenu
   (le titre descendait de 20 px par rapport aux autres écrans) ; 4 px en bureau = même
   ligne de titre que les autres écrans (102 px) */
.cgt-404{ display:flex; flex-direction:column; gap:var(--esp-6, 32px); padding:0 0 var(--esp-7, 48px); }
@media (min-width: 769px){ .cgt-404{ padding-top:4px; } }
.cgt-404-entete{ margin:0; }
.cgt-404-entete .cgt-titre-ecran{ margin:0; }
.cgt-404-vide{ max-width:560px; margin:0 auto; padding:var(--esp-6, 32px) var(--esp-4, 16px); }
.cgt-404-vide h3{ margin:0 0 8px; font-size:var(--fs-20, 1.25rem); }
.cgt-404-vide p{ margin:0; font-size:var(--fs-15); line-height:var(--lh-para, 1.6); }


/* Passe C (ADM-T1-10) : bande « Session empruntée » en mobile — le message était coupé à
   « Vou… » (34 px de large). Texte court entier, bouton « Revenir » ; l'étiquette cède sa
   place (le texte dit déjà la situation). */
@media (max-width: 768px){
  #sm-switch-banner.cgt-bascule .cgt-bandeau-systeme-tag{ display:none; }
  #sm-switch-banner.cgt-bascule .cgt-bandeau-systeme-bouton .cgt-texte-court{ display:inline; }
}

/* Passe C (tour 2, ADH-01) : les lignes du panneau gardent leurs z-index entre elles
   (glissement de suppression) sans sortir de leur conteneur. */
body.sm-connecte .sm-notifications-panel .sm-notification-swipe-container{ isolation:isolate; }
