/* ===== retention-menu.css — en-tête, rail d'onglets et recherche (B.202) =====
   Même aspect que Gestion des dossiers (Aaron, 25/11/2026) : en-tête en dégradé avec la
   recherche (Ctrl+H), une pilule bleu nuit d'icônes rondes à gauche (onglet actif en
   bleu, infobulle au survol, compteur jaune), la photo du profil en bas. */
:root { --rt-entete-fond: linear-gradient(90deg, #00A4B9 0%, #2AE8B9 100%); }

.rt-entete {
  position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 16px;
  padding: 0 24px; color: #fff; background: var(--header-bg, var(--rt-entete-fond)); box-shadow: 0 1px 2px rgba(12,58,92,.12);
}
.rt-entete-logo { display: inline-flex; align-items: center; background: #fff; border-radius: 8px; padding: 6px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.rt-entete-logo img { height: 24px; width: auto; display: block; }
.rt-entete-sep { width: 1px; height: 32px; background: rgba(255,255,255,.25); }
.rt-entete-titres { flex: 1; min-width: 0; }
.rt-entete .rt-titre { font-size: 16px; font-weight: 700; line-height: 1.2; margin: 0; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-sous-titre-entete { margin: 0; font-size: 12px; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Recherche ---------------------------------------------------------------- */
.rt-recherche { position: relative; }
.rt-recherche > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.75); pointer-events: none; }
.rt-recherche input {
  width: 380px; max-width: 42vw; padding: 9px 12px 9px 36px; font: inherit; font-size: 14px; color: #fff;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 10px;
}
.rt-recherche input::placeholder { color: rgba(255,255,255,.8); }
.rt-recherche input:focus { outline: none; background: rgba(255,255,255,.28); box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.rt-recherche-res {
  position: absolute; right: 0; top: calc(100% + 8px); width: 460px; max-width: calc(100vw - 32px); max-height: 60vh; overflow-y: auto;
  background: #fff; color: var(--clyo-dark); border: 1px solid #E1EEF7; border-radius: 12px; box-shadow: 0 20px 50px -18px rgba(11,33,64,.45); z-index: 50;
}
.rt-res-item { display: flex; gap: 10px; align-items: baseline; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid #EEF4F9; background: #fff; text-align: left; font: inherit; cursor: pointer; color: inherit; }
.rt-res-item:hover, .rt-res-item[aria-selected="true"] { background: var(--clyo-surface, #F3F8FC); }
.rt-res-nom { font-weight: 700; font-size: 14px; }
.rt-res-meta { font-size: 12px; color: var(--texte-doux); margin-left: auto; white-space: nowrap; }
.rt-res-vide { padding: 14px; font-size: 13px; color: var(--texte-doux); }

/* --- Cadre : rail + contenu ----------------------------------------------------------- */
.rt-cadre { display: flex; align-items: flex-start; }
.rt-rail { position: sticky; top: 64px; width: 88px; flex-shrink: 0; height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; z-index: 25; }
.rt-pilule {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 10px; border-radius: 999px;
  background: linear-gradient(180deg, #0f2a4f 0%, #0b2140 100%); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 50px -20px rgba(11,33,64,.65);
}
.rt-rail-nav { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rt-rail-sep { display: block; width: 26px; height: 1px; background: rgba(255,255,255,.14); }
.rt-rail-btn, .rt-pilule .rt-profil-btn {
  position: relative; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: transparent; color: #a9bddb; cursor: pointer; transition: background .15s, color .15s;
}
.rt-rail-btn svg { width: 22px; height: 22px; }
.rt-rail-btn:hover, .rt-rail-btn:focus-visible { background: rgba(255,255,255,.09); color: #eef4fd; outline: none; }
.rt-rail-btn[aria-selected="true"], .rt-rail-btn[aria-expanded="true"] { background: linear-gradient(145deg, #1a8cff, #0a5fd1); color: #fff; box-shadow: 0 8px 20px -6px rgba(26,140,255,.8); }
.rt-rail-lib { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rt-rail-cpt:not(:empty), .rt-rail-alerte {
  position: absolute; top: -2px; right: -4px; min-width: 18px; padding: 0 5px; border-radius: 999px;
  background: #f3c04f; color: #2b1d00; font-weight: 800; font-size: 11px; line-height: 18px; text-align: center;
}
.rt-rail-alerte { background: #E2445C; color: #fff; }
.rt-pilule [data-tip]::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  padding: 5px 10px; border-radius: 8px; background: #08182f; border: 1px solid rgba(255,255,255,.1);
  color: #eef4fd; font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 40;
}
.rt-pilule [data-tip]:hover::after, .rt-pilule [data-tip]:focus-visible::after { opacity: 1; }
.rt-pilule [aria-expanded="true"][data-tip]::after { display: none; }

/* Profil : photo ronde en bas du rail, menu qui sort à droite. */
.rt-pilule .rt-profil { position: relative; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.14); }
.rt-pilule .rt-initiales {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.055); color: #eef4fd; font-weight: 800; font-size: 13px;
}
.rt-pilule .rt-initiales img { width: 100%; height: 100%; object-fit: cover; }
.rt-pilule .rt-menu, .rt-etat {
  position: absolute; left: calc(100% + 14px); bottom: 0; top: auto; right: auto; width: 300px; z-index: 40;
  background: #fff; color: var(--clyo-dark); border: 1px solid #E1EEF7; border-radius: 12px; box-shadow: 0 24px 60px -18px rgba(11,33,64,.45);
}
.rt-rail-pop { position: relative; }
.rt-etat { width: 360px; padding: 12px 14px; }
.rt-etat-titre { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.rt-etat .rt-fraicheur { flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; font-size: 13px; }

/* Boutons ronds de la barre bleue (B.210) : export CSV ↑ et Actualiser ↻, infobulle au survol. */
.rt-cadre .rt-principal { flex: 1; min-width: 0; padding-top: 14px; }
.rt-entete-btn { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); }
.rt-entete-btn svg { width: 18px; height: 18px; }
.rt-entete-btn:hover, .rt-entete-btn:focus-visible { background: rgba(255,255,255,.32); outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.rt-entete-btn[disabled] { cursor: progress; }
.rt-entete-btn::after { content: attr(data-bulle); position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; white-space: nowrap;
  background: var(--clyo-dark, #0B2140); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px;
  box-shadow: 0 8px 20px -8px rgba(11,33,64,.5); opacity: 0; pointer-events: none; transition: opacity .12s; }
.rt-entete-btn:hover::after, .rt-entete-btn:focus-visible::after { opacity: 1; }
.rt-actualiser[disabled] svg { animation: rt-tourne 1s linear infinite; }
@keyframes rt-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rt-actualiser[disabled] svg { animation: none; } }

/* Téléphone : le rail passe en barre horizontale en haut du contenu. */
@media (max-width: 768px) {
  .rt-entete { padding: 0 12px; gap: 10px; }
  .rt-entete-sep, .rt-entete-titres { display: none; }
  .rt-recherche { flex: 1; }
  .rt-recherche input { width: 100%; max-width: none; }
  .rt-cadre { flex-direction: column; }
  .rt-rail { position: static; width: 100%; height: auto; padding: 8px 12px 0; }
  .rt-pilule { flex-direction: row; border-radius: 999px; padding: 6px 10px; overflow-x: auto; max-width: 100%; }
  .rt-rail-nav { flex-direction: row; }
  .rt-rail-sep { width: 1px; height: 26px; }
  .rt-pilule [data-tip]::after { display: none; }
  .rt-pilule .rt-profil { padding: 0 0 0 10px; border-top: 0; border-left: 1px solid rgba(255,255,255,.14); }
  .rt-pilule .rt-menu, .rt-etat { position: fixed; left: 12px; right: 12px; top: 120px; bottom: auto; width: auto; }
}

/* Grands filtres d'« Aujourd'hui » (B.202, puis 6 avec l'offline, 30/11/2026) : tous sur UNE ligne
   (Aaron : « une ligne pas deux, réduis la taille de chacun »), quel que soit leur nombre. */
@media (min-width: 901px) {
  .rt-grand-filtre { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
  .rt-grand-filtre__choix { padding: 7px 10px; border-radius: 8px; }
  .rt-grand-filtre__titre { font-size: 13px; line-height: 1.25; }
  .rt-grand-filtre__chiffres { font-size: 12px; }
}
