/* Le calendrier embarqué de l'accueil (ui/agenda-widget.js).
   Jetons de la charte uniquement (app.css) ; les surcouches du thème HUD redéfinissent ces mêmes
   jetons, le widget suit donc chaque ambiance sans règle de plus. Le texte reste `inherit`, les
   fonds neutres sont translucides : lisibles sur clair comme sur sombre.
   `!important` : le thème HUD range TOUS les boutons d'une carte dans une boîte grise par un sélecteur
   de neuf classes (`.card button:not(.btn):not(.ghost)…`, theme-hud.css). Les boutons du widget
   (titre, sources, jours) ont leur propre dessin : ces quelques propriétés le tiennent, ici seulement. */
.agenda-widget{display:flex;flex-direction:column;gap:12px;min-width:0;margin-bottom:16px}
.agenda-widget h3,.agenda-widget h4{margin:0}
.aw-tete{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 14px}
.aw-titre{font-size:1.1rem}
.aw-titre-bouton{background:transparent!important;border:0!important;padding:6px 0;color:inherit!important;font:inherit;font-size:1.1rem;font-weight:700;cursor:pointer;min-height:36px}
.aw-titre-bouton:hover{text-decoration:underline}
.aw-heure{font-size:.85rem;margin-right:auto}
.aw-outils{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 14px}
.aw-nav{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.aw-periode{min-width:9.5em;text-transform:capitalize;text-align:center}
.aw-vues{display:inline-flex;gap:0;border:1px solid var(--border,#E3E0DA);border-radius:999px;overflow:hidden}
.aw-vues .btn{border:0;border-radius:0;margin:0}
.aw-vues .btn[aria-pressed="true"]{background:var(--corail,#FF5A3C)!important;color:var(--sur-accent,#15181C)!important;font-weight:700}
.aw-sources{display:flex;flex-wrap:wrap;gap:6px}
.aw-source{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--border,#E3E0DA)!important;border-radius:999px;padding:5px 12px;background:transparent!important;color:inherit!important;font:inherit;font-size:.86rem;min-height:34px;cursor:pointer}
.aw-source:hover{background:rgba(127,127,127,.12)!important}
.aw-source-off{opacity:.55;text-decoration:line-through}
.aw-point{display:inline-block;width:9px;height:9px;border-radius:50%;flex:none;background:var(--muted,#5B6675)}
.aw-point.aw-c-lagon-d{background:var(--lagon-d,#0E8F82)}
.aw-point.aw-c-lagon{background:var(--lagon,#17C3B2)}
.aw-point.aw-c-corail{background:var(--corail,#FF5A3C)}
.aw-point.aw-c-corail-d{background:var(--corail-d,#D6431F)}
.aw-point.aw-c-ambre{background:var(--ambre,#8A5A00)}
.aw-point.aw-c-graphite{background:currentColor}
.aw-point.aw-c-gris{background:var(--muted,#5B6675)}
.aw-messages{display:flex;flex-direction:column;gap:6px}
.aw-messages:empty{display:none}
.aw-note{margin:0;padding:8px 12px;border:1px solid var(--border,#E3E0DA);border-radius:10px;font-size:.9rem}
.aw-note .btn{margin-left:6px}
/* Signaux : fond translucide + filet, texte HÉRITÉ. Un texte `--rouge`/`--ambre` posé sur un fond que les
   ambiances sombres redéfinissent devenait illisible (relevé en ambiance ardoise). */
.aw-note-alerte{background:rgba(138,90,0,.14);color:inherit;border-color:transparent;border-left:3px solid var(--ambre,#8A5A00)}
.aw-tiroir>summary{cursor:pointer;font-size:.9rem;padding:4px 0}
.aw-grille{display:flex;flex-direction:column;gap:3px;min-width:0}
.aw-rangee{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.aw-entete{font-weight:600;font-size:.78rem;text-align:center;padding:2px 0;opacity:.75;text-transform:uppercase;letter-spacing:.04em}
.aw-cellule{min-width:0}
.aw-jour{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:3px;width:100%;min-height:52px;padding:4px 2px;border:1px solid transparent!important;border-radius:10px;background:transparent!important;color:inherit!important;font:inherit;cursor:pointer}
.aw-jour:hover{background:rgba(127,127,127,.12)!important}
.aw-hors{opacity:.45}
.aw-num{display:inline-block;min-width:26px;padding:1px 6px;border-radius:999px;font-size:.9rem;text-align:center}
.aw-auj .aw-num{background:var(--corail,#FF5A3C);color:var(--sur-accent,#15181C);font-weight:700}
.aw-choisi{border-color:var(--corail,#FF5A3C)!important;box-shadow:0 0 0 1px var(--corail,#FF5A3C)}
.aw-points{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:3px;min-height:12px;font-size:.7rem;line-height:1}
.aw-plus{font-weight:600}
.aw-conflit-marque{font-weight:800;padding:0 4px;border-radius:6px;background:var(--rouge,#B3261E);color:#fff}
.aw-jour-liste{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.aw-jour-titre{font-size:.95rem;text-transform:capitalize}
.aw-vide{margin:0}
.aw-elements{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.aw-element{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--border,#E3E0DA);border-radius:12px;min-width:0}
.aw-element>.aw-point{margin-top:6px}
.aw-corps{min-width:0;flex:1}
.aw-quand{font-weight:600;font-variant-numeric:tabular-nums}
.aw-titre-element{overflow-wrap:anywhere}
.aw-meta{font-size:.85rem;overflow-wrap:anywhere}
.aw-passe{opacity:.6}
.aw-refuse .aw-titre-element{text-decoration:line-through}
.aw-conflit{margin-top:6px;padding:4px 8px;border-radius:8px;font-size:.85rem;background:rgba(179,38,30,.14);color:inherit;border-left:3px solid var(--rouge,#B3261E)}
.aw-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.aw-charge{opacity:.6;transition:opacity .15s}
.agenda-widget button:focus-visible,.agenda-widget a:focus-visible{outline:2px solid var(--lagon-d,#0E8F82);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.aw-charge{transition:none}}
@media (max-width:650px){
  .aw-titre-bouton,.aw-source,.agenda-widget .btn.sm{min-height:44px}
  .aw-jour{min-height:46px;padding:3px 0}
  .aw-num{min-width:22px;padding:1px 4px;font-size:.85rem}
  .aw-periode{min-width:0;flex:1}
  .aw-outils{gap:6px}
}
