/* Agenda — maquette Claude Design « actualites-agenda » (27/09/2026) : bandeau « En ce moment »,
   filtres, liste en deux groupes ou calendrier à barres. Mesures desktop reprises de la maquette. */
.rq-agenda { display: flex; flex-direction: column; font-family: var(--font-body); color: var(--bleu-nuit); }
.rq-agenda__chargement, .rq-agenda__vide { margin: 0; padding: 40px 0; text-align: center; font-size: 17px; color: var(--gris-texte); }
.rq-agenda :is(a, button, input):focus-visible { outline: 3px solid var(--rouge); outline-offset: 2px; }

/* En ce moment */
.rq-agenda__encours { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.rq-agenda__encours[hidden] { display: none; }
.rq-agenda__encours-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.rq-agenda__surtitre { margin: 0; font-family: var(--font-alt); font-weight: 700; font-size: 14px; line-height: 20px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--encre); }
.rq-agenda__encours-note { margin: 0; font-size: 15px; line-height: 21px; color: var(--gris-texte); }
.rq-agenda__longs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rq-agenda__long { position: relative; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 20px; background: var(--brume); text-decoration: none; overflow: hidden; }
.rq-agenda__long-avance { position: absolute; left: 0; top: 0; height: 4px; background: var(--degrade-rouge); }
.rq-agenda__long-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rq-agenda__long-cat { font-family: var(--font-alt); font-weight: 700; font-size: 12px; letter-spacing: 1.2px; color: var(--rouge); }
.rq-agenda__long-reste { font-family: var(--font-alt); font-weight: 700; font-size: 12px; letter-spacing: 1px; color: var(--gris-texte); text-align: right; }
.rq-agenda__long-titre { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 26px; color: var(--encre); transition: color 150ms; }
.rq-agenda__long-quand { font-size: 15px; line-height: 21px; color: var(--bleu-nuit); }
.rq-agenda__long:hover .rq-agenda__long-titre { color: var(--rouge); }

/* Filtres */
.rq-agenda__filtres { display: flex; flex-direction: column; gap: 22px; }
.rq-agenda__outils { display: flex; align-items: center; justify-content: space-between; gap: 32px; } /* recherche, mois et vues : tous à 48 px de haut, centrés sur une ligne (29/09) */
.rq-agenda__recherche { flex: 1; max-width: 520px; display: flex; }
.rq-agenda__recherche input { width: 100%; height: 48px; box-sizing: border-box; padding: 0 18px; border: 2px solid var(--encre); border-radius: var(--radius-btn); font-family: var(--font-body); font-size: 17px; color: var(--bleu-nuit); background: var(--blanc); }
.rq-agenda__commandes { display: flex; align-items: center; gap: 16px; }
.rq-agenda__mois { display: flex; align-items: center; gap: 6px; }
.rq-agenda__mois button { width: 48px; height: 48px; border: 2px solid var(--encre); border-radius: var(--radius-btn); background: var(--blanc); color: var(--encre); font-size: 20px; line-height: 1; cursor: pointer; }
.rq-agenda__mois button:hover { background: var(--encre); color: var(--blanc); }
.rq-agenda__mois-titre { min-width: 190px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 28px; color: var(--encre); }
.rq-agenda__vues { display: flex; border: 2px solid var(--encre); border-radius: var(--radius-btn); overflow: hidden; }
.rq-agenda__vues button { height: 44px; padding: 0 18px; border: 0; background: var(--blanc); color: var(--encre); font-family: var(--font-alt); font-weight: 700; font-size: 16px; cursor: pointer; }
.rq-agenda__vues button[aria-pressed="true"] { background: var(--encre); color: var(--blanc); }
.rq-agenda__outils2 { display: flex; justify-content: flex-end; align-items: center; gap: 24px; }
.rq-agenda__puces { display: flex; flex-wrap: wrap; gap: 10px; }
.rq-agenda__puces button { height: 40px; padding: 0 18px; border: 2px solid var(--encre); border-radius: 999px; background: var(--blanc); color: var(--encre); font-family: var(--font-alt); font-weight: 700; font-size: 15px; cursor: pointer; }
.rq-agenda__puces button[aria-pressed="true"] { background: var(--encre); color: var(--blanc); }
.rq-agenda__legende { display: flex; gap: 18px; font-family: var(--font-alt); font-weight: 600; font-size: 13px; color: var(--gris-texte); white-space: nowrap; }
.rq-agenda__legende span { display: inline-flex; align-items: center; gap: 8px; }
.rq-agenda__leg-point { width: 10px; height: 10px; border-radius: 50%; background: var(--rouge); }
.rq-agenda__leg-barre { width: 22px; height: 10px; background: var(--encre); }

/* Liste du mois */
.rq-agenda__resultats { margin-top: 28px; display: flex; flex-direction: column; gap: 36px; }
.rq-agenda__groupe { display: flex; flex-direction: column; }
.rq-agenda__groupe-titre { display: flex; align-items: baseline; gap: 14px; margin: 0; padding-bottom: 12px; border-bottom: 2px solid var(--encre); font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 32px; color: var(--encre); }
.rq-agenda__groupe-nb { font-family: var(--font-alt); font-weight: 700; font-size: 13px; letter-spacing: 1px; color: var(--gris-texte); }
.rq-agenda__liste { list-style: none; margin: 0; padding: 0; }
.rq-agenda__evt { display: grid; grid-template-columns: 150px minmax(0, 1fr) 220px 180px auto; align-items: center; gap: 28px; padding: 18px 0; border-bottom: 1px solid var(--bordure); text-decoration: none; color: inherit; }
.rq-agenda__evt:hover .rq-agenda__titre { color: var(--rouge); }
.rq-agenda__date { width: 96px; height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--degrade-rouge-vertical); color: var(--blanc); font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 34px; }
.rq-agenda__date small { font-family: var(--font-alt); font-size: 12px; line-height: 16px; letter-spacing: 1px; }
.rq-agenda__date--double { width: auto; flex-direction: row; align-items: stretch; background: var(--encre); font-size: 28px; line-height: 28px; }
.rq-agenda__date--double > span { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rq-agenda__date--double small { font-size: 12px; } /* 12 px au moins (audit mobile du 30/09/2026) */
.rq-agenda__date--double i { width: 1px; margin: 14px 0; background: rgba(255, 255, 255, 0.35); }
.rq-agenda__texte { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rq-agenda__titre { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 28px; color: var(--encre); transition: color 150ms; overflow-wrap: anywhere; }
.rq-agenda__cat { font-family: var(--font-alt); font-weight: 700; font-size: 12px; letter-spacing: 1.2px; color: var(--rouge); }
.rq-agenda__lieu { font-size: 16px; line-height: 23px; color: var(--bleu-nuit); }
.rq-agenda__quand { display: flex; flex-direction: column; gap: 2px; }
.rq-agenda__heure { font-family: var(--font-alt); font-weight: 700; font-size: 16px; color: var(--encre); }
.rq-agenda__duree { font-size: 14px; line-height: 20px; color: var(--gris-texte); }
.rq-agenda__fleche { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--noir-doux); color: var(--blanc); }

/* Calendrier */
.rq-agenda__cal { --rq-top0: 46px; --rq-pas: 28px; }
.rq-agenda__cal-tete { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--bordure); border-top: 1px solid var(--bordure); }
.rq-agenda__cal-tete span { padding: 10px 12px; border-right: 1px solid var(--bordure); border-bottom: 2px solid var(--encre); font-family: var(--font-alt); font-weight: 700; font-size: 12px; letter-spacing: 1.2px; color: var(--encre); }
.rq-agenda__cal-semaine { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--bordure); }
.rq-agenda__cal-case { min-height: 150px; min-width: 0; overflow: hidden; box-sizing: border-box; padding: 8px 10px 10px; border-right: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); background: var(--blanc); display: flex; flex-direction: column; gap: 6px; }
.rq-agenda__cal-case.est-weekend { background: var(--brume); }
.rq-agenda__cal-case.est-hors { background: #F6F6F6; }
.rq-agenda__cal-num { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; box-sizing: border-box; padding: 0 6px; border-radius: 13px; font-family: var(--font-alt); font-weight: 700; font-size: 14px; color: var(--encre); }
.rq-agenda__cal-num.est-aujourdhui { background: var(--rouge); color: var(--blanc); }
.rq-agenda__cal-reserve { height: max(0px, calc(var(--rq-n) * var(--rq-pas) - 4px)); flex-shrink: 0; }
.rq-agenda__cal-semaine[style*="--rq-n:0"] .rq-agenda__cal-reserve { display: none; }
.rq-agenda__cal-evt { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 13px; line-height: 17px; color: var(--encre); text-decoration: none; }
.rq-agenda__cal-evt:hover { color: var(--rouge); }
.rq-agenda__cal-evt i { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--rouge); position: relative; top: -1px; }
.rq-agenda__cal-evt b { font-weight: 700; white-space: nowrap; }
.rq-agenda__cal-evt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-agenda__cal-barre { position: absolute; top: calc(var(--rq-top0) + var(--rq-i) * var(--rq-pas)); left: calc(var(--rq-c0) * 100% / 7 + 3px); width: calc(var(--rq-l) * 100% / 7 - 6px); height: 24px; box-sizing: border-box; display: flex; align-items: center; padding: 0 10px; background: var(--encre); color: var(--blanc); font-family: var(--font-alt); font-weight: 700; font-size: 12px; letter-spacing: 0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.rq-agenda__cal-barre.est-debut { border-top-left-radius: 3px; border-bottom-left-radius: 3px; }
.rq-agenda__cal-barre.est-fin { border-top-right-radius: 3px; border-bottom-right-radius: 3px; }
.rq-agenda__cal-barre:hover { background: var(--rouge); color: var(--blanc); }
/* Événements terminés (29/09/2026, demande de Dorian) : fond hachuré, couleurs éteintes et étiquette « Terminé »,
   pour que le passé se lise sans dépendre de la couleur. Gris choisis pour garder 4,5:1 sur le hachuré le plus foncé. */
.rq-agenda__evt.est-passe { margin: 0 -14px; padding-left: 14px; padding-right: 14px; background: repeating-linear-gradient(-45deg, #F4F5F7 0 7px, #E8EBEF 7px 14px); }
.rq-agenda__evt.est-passe .rq-agenda__date { background: var(--gris-neutre); }
.rq-agenda__evt.est-passe .rq-agenda__titre, .rq-agenda__evt.est-passe .rq-agenda__heure { color: #3E4A57; }
.rq-agenda__evt.est-passe .rq-agenda__cat, .rq-agenda__evt.est-passe .rq-agenda__lieu, .rq-agenda__evt.est-passe .rq-agenda__duree { color: #4B5663; }
.rq-agenda__evt.est-passe .rq-agenda__fleche { background: var(--gris-neutre); }
.rq-agenda__evt.est-passe:hover .rq-agenda__titre { color: var(--encre); text-decoration: underline; }
.rq-agenda__passe { display: inline-block; margin-left: 10px; padding: 1px 7px; border-radius: 3px; background: var(--gris-neutre); color: var(--blanc); font-size: 12px; line-height: 16px; letter-spacing: 1px; text-transform: uppercase; vertical-align: 1px; }
.rq-agenda__cal-case.est-passe { background: repeating-linear-gradient(-45deg, #FAFAFB 0 6px, #F1F3F6 6px 12px); }
.rq-agenda__cal-case.est-passe.est-weekend { background: repeating-linear-gradient(-45deg, #EEF1F5 0 6px, #E4E8EE 6px 12px); }
.rq-agenda__cal-evt.est-passe { color: #4B5663; }
.rq-agenda__cal-evt.est-passe i { background: var(--gris-neutre); }
.rq-agenda__cal-barre.est-passe { background: repeating-linear-gradient(-45deg, #5F6368 0 6px, #50545A 6px 12px); color: var(--blanc); }
.rq-agenda__cal-barre.est-passe:hover { background: var(--encre); }

/* Fenêtre de récapitulatif (calendrier) */
html.rq-modale-ouverte { overflow: hidden; }
.rq-agenda__fiche { width: min(560px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); box-sizing: border-box; margin: auto; padding: 0; border: 0; background: var(--blanc); color: var(--bleu-nuit); box-shadow: 0 30px 60px rgba(13, 26, 51, 0.35); overflow: auto; overscroll-behavior: contain; font-family: var(--font-body); }
.rq-agenda__fiche::backdrop { background: rgba(13, 26, 51, 0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.rq-agenda__fiche[open] { animation: rq-fiche-entree 220ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes rq-fiche-entree { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rq-agenda__fiche-boite { position: relative; }
.rq-agenda__fiche-fermer { position: absolute; top: 12px; right: 12px; z-index: 1; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--blanc); color: var(--encre); box-shadow: var(--ombre-carte); cursor: pointer; }
.rq-agenda__fiche-fermer:hover { color: var(--rouge); }
.rq-agenda__fiche :is(a, button):focus-visible { outline: 3px solid var(--rouge); outline-offset: 2px; }
.rq-agenda__fiche-visuel { height: 220px; background: var(--brume); }
.rq-agenda__fiche-visuel[hidden] { display: none; }
.rq-agenda__fiche-visuel img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rq-agenda__fiche-corps { display: flex; flex-direction: column; gap: 12px; padding: 26px 30px 30px; }
.rq-agenda__fiche-cat { margin: 0; font-family: var(--font-alt); font-weight: 700; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--rouge); }
.rq-agenda__fiche-cat:empty { display: none; }
.rq-agenda__fiche-titre { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 31px; color: var(--encre); overflow-wrap: anywhere; }
.est-sans-visuel .rq-agenda__fiche-corps { padding-top: 30px; }
.est-sans-visuel .rq-agenda__fiche-cat, .est-sans-visuel .rq-agenda__fiche-cat:empty + .rq-agenda__fiche-titre { padding-right: 52px; }
.rq-agenda__fiche-infos { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 0; padding: 14px 0; border-top: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }
.rq-agenda__fiche-infos div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.rq-agenda__fiche-infos dt { font-family: var(--font-alt); font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--gris-texte); }
.rq-agenda__fiche-infos dd { margin: 0; font-size: 15px; line-height: 21px; color: var(--encre); overflow-wrap: anywhere; }
.rq-agenda__fiche-extrait { margin: 0; font-size: 15px; line-height: 23px; color: var(--bleu-nuit); }
.rq-agenda__fiche-extrait[hidden] { display: none; }
.rq-agenda__fiche-voir { align-self: flex-start; margin-top: 6px; display: inline-flex; align-items: center; gap: 14px; height: 48px; box-sizing: border-box; padding: 0 8px 0 18px; border-radius: var(--radius-btn); background: var(--encre); color: var(--blanc); font-family: var(--font-display); font-weight: 700; font-size: 17px; text-decoration: none; transition: background-color 150ms; }
.rq-agenda__fiche-voir:hover { background: var(--rouge); color: var(--blanc); }
.rq-agenda__fiche-sq { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--radius-fleche); background: var(--rouge); color: var(--blanc); }
.rq-agenda__fiche-voir:hover .rq-agenda__fiche-sq { background: var(--blanc); color: var(--rouge); }
.rq-agenda__fiche-sq svg { width: 14px; height: 11px; }
@media (prefers-reduced-motion: reduce) { .rq-agenda__fiche[open] { animation: none; } }

/* Tablette : les colonnes lieu et horaire passent sous le titre. */
@media (max-width: 1455px) {
  .rq-agenda__longs { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .rq-agenda__encours-tete { flex-direction: column; gap: 6px; }
  .rq-agenda__outils, .rq-agenda__outils2 { flex-wrap: wrap; gap: 16px 24px; }
  .rq-agenda__recherche { flex: 1 1 320px; }
  .rq-agenda__evt { grid-template-columns: 130px minmax(0, 1fr) auto; row-gap: 6px; }
  .rq-agenda__evt > .rq-agenda__date { grid-row: 1 / span 3; }
  .rq-agenda__texte, .rq-agenda__lieu, .rq-agenda__quand { grid-column: 2; }
  .rq-agenda__quand { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
  .rq-agenda__fleche { grid-column: 3; grid-row: 1 / span 3; }
}

/* Téléphone : pavés réduits, flèche retirée, calendrier en pastilles. */
@media (max-width: 767px) {
  .rq-agenda__encours { margin-bottom: 36px; }
  .rq-agenda__longs { grid-template-columns: minmax(0, 1fr); }
  .rq-agenda__long-titre { font-size: 21px; line-height: 24px; }
  .rq-agenda__commandes { flex-wrap: wrap; gap: 12px; width: 100%; }
  .rq-agenda__mois { flex: 1 1 auto; }
  .rq-agenda__mois-titre { flex: 1; min-width: 0; font-size: 20px; }
  .rq-agenda__legende { flex-wrap: wrap; white-space: normal; }
  /* Rubriques sur une ligne qu’on fait défiler : sur quatre lignes, elles repoussaient les résultats d’un écran. */
  .rq-agenda__puces { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 4px; scroll-padding-left: 20px; }
  .rq-agenda__puces::-webkit-scrollbar { display: none; }
  .rq-agenda__puces button { flex-shrink: 0; height: 44px; }
  .rq-agenda__groupe-titre { flex-wrap: wrap; font-size: 24px; line-height: 28px; }
  .rq-agenda__evt { grid-template-columns: 72px minmax(0, 1fr); gap: 4px 14px; padding: 16px 0; }
  .rq-agenda__date { width: 72px; height: 72px; font-size: 28px; line-height: 28px; }
  .rq-agenda__date--double { height: auto; flex-direction: column; padding: 6px 0; font-size: 22px; line-height: 22px; }
  .rq-agenda__date--double i { width: auto; height: 1px; margin: 5px 14px; }
  .rq-agenda__titre { font-size: 20px; line-height: 24px; }
  .rq-agenda__fleche { display: none; }
  .rq-agenda__cal { --rq-top0: 32px; --rq-pas: 28px; }
  .rq-agenda__cal-tete span { padding: 6px 2px; font-size: 10px; letter-spacing: 0.5px; text-align: center; }
  .rq-agenda__cal-case { min-height: 64px; padding: 4px; gap: 3px; }
  .rq-agenda__cal-num { min-width: 22px; height: 22px; padding: 0 4px; font-size: 12px; }
  .rq-agenda__cal-evt { gap: 0; width: 100%; min-height: 24px; align-items: center; }
  .rq-agenda__cal-evt b, .rq-agenda__cal-evt span { display: none; }
  /* 24 px de haut pour le doigt (le libellé court reste lisible sur les barres de plusieurs jours). */
  .rq-agenda__cal-barre { height: 24px; padding: 0 5px; font-size: 10px; letter-spacing: 0; }
  .rq-agenda__recherche input { font-size: 16px; padding: 0 14px; }
  /* Fenêtre : panneau qui monte du bas, bouton pleine largeur. */
  .rq-agenda__fiche { width: 100%; max-height: 88vh; max-height: 88dvh; margin: auto 0 0; }
  .rq-agenda__fiche[open] { animation-name: rq-fiche-panneau; }
  @keyframes rq-fiche-panneau { from { transform: translateY(100%); } to { transform: none; } }
  .rq-agenda__fiche-visuel { height: 170px; }
  .rq-agenda__fiche-corps { padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); }
  .rq-agenda__fiche-titre { font-size: 23px; line-height: 27px; }
  .rq-agenda__fiche-infos div { grid-template-columns: 78px minmax(0, 1fr); }
  .rq-agenda__fiche-voir { align-self: stretch; justify-content: space-between; }
}
