/* QG+ — Agenda (08/10/2026) : Google Agenda + Google Tasks. Fichier séparé (qg-agenda.js).
   Clair : sobre, façon Calendrier d'Apple. Sombre : Nexus (le mode Bleu le recolore tout seul via qg-nuit.js).
   Retour arrière : retirer qg-agenda.css/.js et le bouton « Agenda » d'index.html. */
#hermes-signature#hermes-signature {
  --ag-fond: #ffffff; --ag-fond-plein: #ffffff; --ag-fond-grille: #ffffff; --ag-carte: #ffffff; --ag-carte2: #ffffff;
  --ag-carte-l: rgba(118, 118, 128, .07); --ag-texte: #1c1c1e; --ag-titre: #0b0d0e; --ag-doux: rgba(60, 60, 67, .62);
  --ag-tres-doux: rgba(60, 60, 67, .42); --ag-sep: rgba(60, 60, 67, .12); --ag-sep2: rgba(60, 60, 67, .075);
  --ag-accent: #00a88e; --ag-accent-texte: #00876f; --ag-sur-accent: #ffffff; --ag-accent-fond: rgba(0, 201, 173, .12);
  --ag-puce: rgba(118, 118, 128, .10); --ag-puce-fort: rgba(120, 120, 128, .26); --ag-puce-bord: transparent; --ag-puce-txt: #1c1c1e;
  --ag-seg-on: #ffffff; --ag-seg-ombre: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04);
  --ag-champ: rgba(118, 118, 128, .08); --ag-ombre: 0 18px 50px rgba(0, 0, 0, .18); --ag-voile: rgba(20, 20, 24, .32);
  --ag-rouge: #d70015; --ag-maintenant: #ff3b30; --ag-ambre-fond: rgba(255, 159, 10, .14);
  --ag-auj-fond: rgba(0, 168, 142, .035); --ag-we: rgba(118, 118, 128, .035); --ag-hors: rgba(118, 118, 128, .045);
  --ag-tache: #1a73e8; --ag-tache-fond: rgba(26, 115, 232, .10); --ag-ev-txt: #1c1c1e; --ag-ev-doux: rgba(28, 28, 30, .62);
  --ag-sans: "Hellix", -apple-system, BlinkMacSystemFont, system-ui, sans-serif; --ag-mono: ui-monospace, "SF Mono", Menlo, monospace;
}
#hermes-signature#hermes-signature:not([data-theme="light"]) {
  --ag-fond: #010506; --ag-fond-plein: #010807; --ag-fond-grille: rgba(1, 6, 6, .88); --ag-carte: #03100e; --ag-carte2: rgba(77, 255, 216, .16);
  --ag-carte-l: rgba(77, 255, 216, .045); --ag-texte: #eafff9; --ag-titre: #f0fffb; --ag-doux: #8cb9ac;
  --ag-tres-doux: #5f8a7f; --ag-sep: rgba(77, 255, 216, .12); --ag-sep2: rgba(77, 255, 216, .06);
  --ag-accent: #4dffd8; --ag-accent-texte: #4dffd8; --ag-sur-accent: #02221c; --ag-accent-fond: rgba(77, 255, 216, .12);
  --ag-puce: rgba(255, 255, 255, .04); --ag-puce-fort: rgba(255, 255, 255, .16); --ag-puce-bord: rgba(77, 255, 216, .14); --ag-puce-txt: #cfeee5;
  --ag-seg-on: rgba(77, 255, 216, .16); --ag-seg-ombre: inset 0 0 0 1px rgba(77, 255, 216, .42);
  --ag-champ: rgba(4, 22, 20, .9); --ag-ombre: 0 14px 40px rgba(0, 0, 0, .55); --ag-voile: rgba(0, 3, 3, .66);
  --ag-rouge: #ff6b6b; --ag-maintenant: #ff5a5f; --ag-ambre-fond: rgba(255, 201, 119, .10);
  --ag-auj-fond: rgba(77, 255, 216, .035); --ag-we: rgba(255, 255, 255, .014); --ag-hors: rgba(0, 0, 0, .28);
  --ag-tache: #7ab8ff; --ag-tache-fond: rgba(122, 184, 255, .12); --ag-ev-txt: #f2fffb; --ag-ev-doux: rgba(234, 255, 249, .7);
  --ag-mono: var(--nx-mono, "JetBrains Mono", ui-monospace, monospace);
}

/* Page : hauteur exacte de l'écran (qg-agenda.js), seule la grille défile. */
#hermes-signature#hermes-signature .hs-page.qg-ag-page { padding: 0 !important; height: var(--ag-h, calc(100dvh - 120px)); min-height: 0; overflow: hidden; max-width: none; }
#hermes-signature .ag { height: 100%; display: flex; flex-direction: column; font-family: var(--ag-sans); color: var(--ag-texte); }
#hermes-signature .ag button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
#hermes-signature .ag-tete { flex: none; display: flex; align-items: center; gap: 10px; padding: 16px 16px 4px; }
#hermes-signature .ag-tete h1 { flex: 1; margin: 0; font: 700 30px/1.1 var(--ag-sans); letter-spacing: -.01em; color: var(--ag-titre); }
#hermes-signature:not([data-theme="light"]) .ag-tete h1 { font-family: var(--nx-display, var(--ag-sans)); letter-spacing: .04em; font-size: 26px; text-transform: uppercase; }
#hermes-signature .ag-icone { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; border: 1px solid var(--ag-puce-bord); background: var(--ag-puce); color: var(--ag-texte); padding: 0; }
#hermes-signature .ag-icone svg { width: 20px; height: 20px; }
#hermes-signature .ag-nouveau { height: 42px; padding: 0 16px 0 13px; display: inline-flex; align-items: center; gap: 7px; border-radius: 21px; cursor: pointer; border: 1px solid var(--ag-accent); background: var(--ag-accent); color: var(--ag-sur-accent); font-weight: 700 !important; font-size: 15px !important; }
#hermes-signature:not([data-theme="light"]) .ag-nouveau { background: rgba(77, 255, 216, .14); color: #9fffe9; border-color: rgba(77, 255, 216, .55); }
#hermes-signature .ag-nouveau svg { width: 18px; height: 18px; stroke-width: 2.4; }
#hermes-signature .ag-barre { flex: none; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding: 8px 16px 8px; }
#hermes-signature .ag-nav { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
#hermes-signature .ag-puce { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--ag-puce-bord); background: var(--ag-puce); color: var(--ag-puce-txt); font-size: 14px !important; font-weight: 600 !important; cursor: pointer; white-space: nowrap; }
#hermes-signature .ag-puce.ag-inutile { opacity: .6; }
#hermes-signature .ag-rond { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--ag-puce-bord); background: var(--ag-puce); color: var(--ag-texte); display: grid; place-items: center; cursor: pointer; padding: 0; }
#hermes-signature .ag-rond svg { width: 18px; height: 18px; }
#hermes-signature .ag-periode { margin: 0 0 0 6px; min-width: 0; font: 700 19px/1.2 var(--ag-sans); color: var(--ag-titre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hermes-signature:not([data-theme="light"]) .ag-periode { font: 600 14.5px/1.2 var(--ag-mono); letter-spacing: .06em; text-transform: uppercase; }
#hermes-signature .ag-vues { flex: none; display: flex; padding: 3px; border-radius: 12px; background: var(--ag-puce); border: 1px solid var(--ag-puce-bord); }
#hermes-signature .ag-vues button { height: 30px; padding: 0 12px; border-radius: 9px; border: 0; background: none; color: var(--ag-doux); font-size: 13.5px !important; font-weight: 600 !important; cursor: pointer; white-space: nowrap; }
#hermes-signature .ag-vues button[aria-selected="true"] { background: var(--ag-seg-on); color: var(--ag-texte); box-shadow: var(--ag-seg-ombre); }
#hermes-signature .ag-vues .ag-c { display: none; }
#hermes-signature .ag-sources { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
#hermes-signature .ag-sources::-webkit-scrollbar { display: none; }
#hermes-signature .ag-src { flex: none; height: 30px; padding: 0 12px 0 9px; display: inline-flex; align-items: center; gap: 7px; border-radius: 15px; border: 1px solid var(--ag-puce-bord); background: var(--ag-puce); color: var(--ag-puce-txt); font-size: 13px !important; font-weight: 500 !important; cursor: pointer; white-space: nowrap; transition: opacity .2s; }
#hermes-signature .ag-src i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
#hermes-signature .ag-src[aria-pressed="false"] { opacity: .5; }
#hermes-signature .ag-src[aria-pressed="false"] i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
#hermes-signature .ag-corps { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; border-top: 1px solid var(--ag-sep); background: var(--ag-fond-grille); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#hermes-signature .ag-charge { position: sticky; top: 0; z-index: 8; height: 2px; margin-bottom: -2px; overflow: hidden; }
#hermes-signature .ag-charge i { display: block; width: 30%; height: 100%; background: var(--ag-accent); animation: ag-charge 1s ease-in-out infinite; }
@keyframes ag-charge { from { transform: translateX(-110%); } to { transform: translateX(380%); } }
#hermes-signature .ag-avis { margin: 8px 16px; padding: 8px 12px; border-radius: 10px; background: var(--ag-ambre-fond); font-size: 13.5px; }
#hermes-signature .ag-vide { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 64px 20px; text-align: center; color: var(--ag-doux); font-size: 14.5px; }
#hermes-signature .ag-vide strong { color: var(--ag-texte); font-size: 17px; }

/* Grille horaire (Jour, 3 jours, Semaine) */
#hermes-signature .ag-grille { --g: 56px; }
#hermes-signature .ag-collant { position: sticky; top: 0; z-index: 5; background: var(--ag-fond-plein); box-shadow: 0 1px 0 var(--ag-sep); }
#hermes-signature .ag-entete, #hermes-signature .ag-journee, #hermes-signature .ag-heures { display: grid; grid-template-columns: var(--g) repeat(var(--n), minmax(0, 1fr)); }
#hermes-signature .ag-jtete { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; border: 0; background: none; cursor: pointer; color: var(--ag-doux); min-width: 0; }
#hermes-signature .ag-jtete small { font: 600 11px/1 var(--ag-sans); letter-spacing: .04em; text-transform: uppercase; }
#hermes-signature:not([data-theme="light"]) .ag-jtete small { font-family: var(--ag-mono); font-size: 10px; letter-spacing: .1em; }
#hermes-signature .ag-jtete b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; font-weight: 600; color: var(--ag-texte); }
#hermes-signature .ag-jtete.passe b { color: var(--ag-doux); }
#hermes-signature .ag-jtete.est-auj small { color: var(--ag-accent-texte); }
#hermes-signature .ag-jtete.est-auj b { background: var(--ag-accent); color: var(--ag-sur-accent); }
#hermes-signature:not([data-theme="light"]) .ag-jtete.est-auj b { box-shadow: 0 0 16px rgba(77, 255, 216, .45); }
#hermes-signature .ag-coin { min-width: 0; }
#hermes-signature .ag-coin-j { display: flex; align-items: flex-start; justify-content: flex-end; padding: 7px 8px 0 0; }
#hermes-signature .ag-coin-j small { font-size: 10px; color: var(--ag-tres-doux); }
#hermes-signature .ag-jcase { display: flex; flex-direction: column; gap: 3px; padding: 4px 3px 5px; min-height: 30px; min-width: 0; border-left: 1px solid var(--ag-sep2); }
#hermes-signature .ag-jcase.est-auj { background: var(--ag-auj-fond); }
#hermes-signature .ag-chip { display: block; width: 100%; height: 22px; padding: 0 7px; border: 0; border-left: 3px solid var(--c); border-radius: 6px; background: var(--cf); color: var(--ag-ev-txt); font: 600 12px/22px var(--ag-sans); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
#hermes-signature:not([data-theme="light"]) .ag-chip { background: var(--cf2); }
#hermes-signature .ag-chip.ag-suite { border-top-left-radius: 0; border-bottom-left-radius: 0; opacity: .85; }
#hermes-signature .ag-tache { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 6px 0 3px; border-radius: 6px; background: var(--ag-tache-fond); min-width: 0; }
#hermes-signature .ag-coche { flex: none; width: 16px; height: 16px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1.6px solid var(--ag-tache); background: none; color: transparent; cursor: pointer; transition: background .15s, color .15s; }
#hermes-signature .ag-coche svg { width: 11px; height: 11px; stroke-width: 3.2; }
#hermes-signature .ag-coche:hover { color: var(--ag-tache); }
#hermes-signature .ag-coche[aria-pressed="true"] { background: var(--ag-tache); color: #ffffff; }
#hermes-signature:not([data-theme="light"]) .ag-coche[aria-pressed="true"] { color: #031427; }
#hermes-signature .ag-tache-t { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--ag-ev-txt); font: 600 12px/22px var(--ag-sans); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
#hermes-signature .ag-tache.faite .ag-tache-t { text-decoration: line-through; color: var(--ag-doux); font-weight: 500; }
#hermes-signature .ag-plus { height: 20px; padding: 0 6px; border: 0; background: none; color: var(--ag-doux); font-size: 12px !important; font-weight: 600 !important; text-align: left; cursor: pointer; }
#hermes-signature .ag-heures { position: relative; height: calc(24 * var(--h)); }
#hermes-signature .ag-grad { position: relative; }
#hermes-signature .ag-grad span { position: absolute; right: 8px; transform: translateY(-50%); font: 500 10.5px/1 var(--ag-mono); color: var(--ag-tres-doux); font-variant-numeric: tabular-nums; }
#hermes-signature .ag-col { position: relative; min-width: 0; border-left: 1px solid var(--ag-sep2); cursor: pointer;
  background-image: repeating-linear-gradient(to bottom, var(--ag-sep2) 0, var(--ag-sep2) 1px, transparent 1px, transparent var(--h)); }
#hermes-signature .ag-col.we { background-color: var(--ag-we); }
#hermes-signature .ag-col.est-auj { background-color: var(--ag-auj-fond); }
#hermes-signature .ag-ev { position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 3px 6px; overflow: hidden;
  border: 0; border-left: 3px solid var(--c); border-radius: 6px; background: var(--cf); box-shadow: 0 0 0 1px var(--ag-fond-plein);
  color: var(--ag-ev-txt); text-align: left; font: 500 12px/1.25 var(--ag-sans); cursor: pointer; transition: filter .15s; }
#hermes-signature:not([data-theme="light"]) .ag-ev { background: var(--cf2); }
#hermes-signature .ag-ev:hover { filter: brightness(.97) saturate(1.1); z-index: 2; }
#hermes-signature .ag-ev b { max-width: 100%; font-weight: 650; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#hermes-signature .ag-ev span { color: var(--ag-ev-doux); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#hermes-signature .ag-ev small { color: var(--ag-ev-doux); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#hermes-signature .ag-ev.court { flex-direction: row; align-items: center; gap: 5px; padding-top: 0; padding-bottom: 0; }
#hermes-signature .ag-ev.court b { -webkit-line-clamp: 1; white-space: nowrap; flex: 0 1 auto; }
#hermes-signature .ag-ev.passe { opacity: .6; }
#hermes-signature .ag-ev.a-repondre { background: var(--ag-fond-plein); box-shadow: inset 0 0 0 1px var(--cb); }
#hermes-signature .ag-ev.refuse b { text-decoration: line-through; }
#hermes-signature .ag-maintenant { position: absolute; z-index: 3; left: -1px; right: 0; height: 2px; margin-top: -1px; background: var(--ag-maintenant); pointer-events: none; }
#hermes-signature .ag-maintenant::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ag-maintenant); }

/* Mois */
#hermes-signature .ag-mois { display: flex; flex-direction: column; min-height: 100%; }
#hermes-signature .ag-mtete { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--ag-fond-plein); box-shadow: 0 1px 0 var(--ag-sep); }
#hermes-signature .ag-mtete span { padding: 9px 8px 7px; font: 600 11px/1 var(--ag-sans); text-transform: uppercase; letter-spacing: .04em; color: var(--ag-doux); }
#hermes-signature:not([data-theme="light"]) .ag-mtete span { font-family: var(--ag-mono); font-size: 10px; letter-spacing: .1em; }
#hermes-signature .ag-mgrille { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(var(--sem), minmax(112px, 1fr)); }
#hermes-signature .ag-case { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 4px 4px 6px; overflow: hidden; border-left: 1px solid var(--ag-sep2); border-bottom: 1px solid var(--ag-sep2); cursor: pointer; }
#hermes-signature .ag-case:nth-child(7n + 1) { border-left: 0; }
#hermes-signature .ag-case.hors { background: var(--ag-hors); }
#hermes-signature .ag-case.hors .ag-num { color: var(--ag-tres-doux); }
#hermes-signature .ag-num { align-self: flex-start; min-width: 24px; height: 24px; padding: 0 6px; display: grid; place-items: center; border-radius: 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
#hermes-signature .ag-case.est-auj .ag-num { background: var(--ag-accent); color: var(--ag-sur-accent); }
#hermes-signature .ag-mev { display: flex; align-items: center; gap: 5px; min-width: 0; width: 100%; height: 20px; padding: 0 4px; border: 0; border-radius: 4px; background: none; color: var(--ag-texte); font: 500 12px/20px var(--ag-sans); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
#hermes-signature .ag-mev:hover { background: var(--ag-puce); }
#hermes-signature .ag-mev i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
#hermes-signature .ag-mev em { flex: none; font-style: normal; color: var(--ag-doux); font-size: 11px; font-variant-numeric: tabular-nums; }
#hermes-signature .ag-case .ag-chip, #hermes-signature .ag-case .ag-tache { height: 20px; line-height: 20px; flex: none; }
#hermes-signature .ag-mplus { padding-left: 4px; font-size: 11.5px; color: var(--ag-doux); }
#hermes-signature .ag-points { display: flex; justify-content: center; gap: 3px; margin-top: 3px; }
#hermes-signature .ag-points i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
#hermes-signature .ag-points i.t { border-radius: 2px; }

/* Planning */
#hermes-signature .ag-planning { padding: 4px 16px 28px; max-width: 900px; }
#hermes-signature .ag-pjour { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ag-sep2); }
#hermes-signature .ag-pdate { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0 0; border: 0; background: none; color: var(--ag-texte); cursor: pointer; align-self: start; }
#hermes-signature .ag-pdate b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 21px; font-weight: 600; }
#hermes-signature .ag-pdate span { font-size: 11px; color: var(--ag-doux); text-transform: uppercase; letter-spacing: .04em; }
#hermes-signature .ag-pjour.est-auj .ag-pdate b { background: var(--ag-accent); color: var(--ag-sur-accent); }
#hermes-signature .ag-pliste { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#hermes-signature .ag-pev { display: grid; grid-template-columns: 5px 50px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 50px; padding: 6px 12px 6px 6px; border: 0; border-radius: 12px; background: var(--ag-carte-l); color: var(--ag-texte); text-align: left; cursor: pointer; }
#hermes-signature .ag-pev i { align-self: stretch; border-radius: 3px; background: var(--c); }
#hermes-signature .ag-pev.passe { opacity: .6; }
#hermes-signature .ag-ph { font: 600 13px/1.3 var(--ag-sans); font-variant-numeric: tabular-nums; }
#hermes-signature .ag-ph small { color: var(--ag-doux); font-weight: 500; }
#hermes-signature .ag-pt { min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
#hermes-signature .ag-pt small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: var(--ag-doux); }
#hermes-signature .ag-pta .ag-tache { height: 46px; gap: 10px; padding: 0 12px; border-radius: 12px; }
#hermes-signature .ag-pta .ag-coche { width: 20px; height: 20px; }
#hermes-signature .ag-pta .ag-coche svg { width: 13px; height: 13px; }
#hermes-signature .ag-pta .ag-tache-t { font-size: 15px; }
#hermes-signature .ag-rien { margin: 12px 2px; color: var(--ag-doux); font-size: 14.5px; }
#hermes-signature .ag-suite-pl { display: block; margin: 20px auto 0; }

/* Feuilles : détail, création, modification */
#hermes-signature .ag-couche { position: fixed; inset: 0; z-index: 96; font-family: var(--ag-sans); color: var(--ag-texte); }
#hermes-signature .ag-voile { position: absolute; inset: 0; background: var(--ag-voile); opacity: 0; transition: opacity .22s ease; }
#hermes-signature .ag-feuille { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - 44px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; background: var(--ag-carte); box-shadow: var(--ag-ombre);
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
#hermes-signature:not([data-theme="light"]) .ag-feuille { border: 1px solid rgba(77, 255, 216, .16); color-scheme: dark; }
#hermes-signature .ag-couche.ouverte .ag-voile { opacity: 1; }
#hermes-signature .ag-couche.ouverte .ag-feuille { transform: none; }
#hermes-signature .ag-poignee { width: 38px; height: 5px; margin: 2px auto 12px; border-radius: 3px; background: var(--ag-sep); }
#hermes-signature .ag-ftete { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
#hermes-signature .ag-ftete h3 { flex: 1; min-width: 0; margin: 0; font-size: 20px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; color: var(--ag-titre); }
#hermes-signature .ag-ftache.faite h3 { text-decoration: line-through; color: var(--ag-doux); }
#hermes-signature .ag-ftache .ag-tache { background: none; padding: 0; height: auto; }
#hermes-signature .ag-ftache .ag-coche { width: 22px; height: 22px; }
#hermes-signature .ag-ftache .ag-coche svg { width: 14px; height: 14px; }
#hermes-signature .ag-ftache .ag-cache { display: none; }
#hermes-signature .ag-pastille { flex: none; width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
#hermes-signature .ag-fermer { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ag-puce); color: var(--ag-doux); cursor: pointer; }
#hermes-signature .ag-fermer svg { width: 18px; height: 18px; }
#hermes-signature .ag-ligne { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 9px 0; font-size: 15px; line-height: 1.4; }
#hermes-signature .ag-ligne > svg { width: 20px; height: 20px; margin-top: 1px; color: var(--ag-doux); }
#hermes-signature .ag-ligne a { color: var(--ag-accent-texte); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
#hermes-signature .ag-desc { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
#hermes-signature .ag-desc a { font-weight: 500; }
#hermes-signature .ag-rec { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 13px; color: var(--ag-doux); }
#hermes-signature .ag-rec svg, #hermes-signature .ag-note svg { width: 14px; height: 14px; flex: none; }
#hermes-signature .ag-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
#hermes-signature .ag-actions button, #hermes-signature .ag-actions a { flex: 1 1 auto; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px;
  border: 0; border-radius: 12px; background: var(--ag-puce); color: var(--ag-texte); font-size: 14.5px !important; font-weight: 600 !important; text-decoration: none; cursor: pointer; white-space: nowrap; }
#hermes-signature .ag-actions svg { width: 18px; height: 18px; }
#hermes-signature .ag-actions .ag-rouge { color: var(--ag-rouge); }
#hermes-signature .ag-actions .ag-rouge.confirmer { background: var(--ag-rouge); color: #ffffff; }
#hermes-signature .ag-note { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 13px; color: var(--ag-doux); }
#hermes-signature .ag-fbarre h3 { text-align: center; font-size: 17px; }
#hermes-signature .ag-lien { padding: 6px 2px; border: 0; background: none; color: var(--ag-accent-texte); font-size: 15.5px !important; font-weight: 500 !important; cursor: pointer; white-space: nowrap; }
#hermes-signature .ag-ok { height: 36px; padding: 0 16px; border: 0; border-radius: 18px; background: var(--ag-accent); color: var(--ag-sur-accent); font-size: 15px !important; font-weight: 700 !important; cursor: pointer; white-space: nowrap; }
#hermes-signature .ag-ok:disabled { opacity: .6; cursor: default; }
#hermes-signature .ag-type { display: grid; grid-template-columns: 1fr 1fr; margin: 4px 0 10px; padding: 3px; border-radius: 11px; background: var(--ag-puce); }
#hermes-signature .ag-type button { height: 34px; border: 0; border-radius: 9px; background: none; color: var(--ag-doux); font-size: 14.5px !important; font-weight: 600 !important; cursor: pointer; }
#hermes-signature .ag-type button[aria-selected="true"] { background: var(--ag-seg-on); color: var(--ag-texte); box-shadow: var(--ag-seg-ombre); }
#hermes-signature .ag-titre { display: block; width: 100%; box-sizing: border-box; height: 52px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--ag-sep); background: none; color: var(--ag-texte); font: 600 21px/1 var(--ag-sans); outline: none; }
#hermes-signature .ag-titre::placeholder { color: var(--ag-tres-doux); }
#hermes-signature .ag-bascule { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 50px; border-bottom: 1px solid var(--ag-sep); font-size: 15.5px; cursor: pointer; }
#hermes-signature .ag-bascule input { position: absolute; opacity: 0; pointer-events: none; }
#hermes-signature .ag-bascule i { position: relative; width: 48px; height: 29px; border-radius: 15px; background: var(--ag-puce-fort); transition: background .2s; }
#hermes-signature .ag-bascule i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
#hermes-signature .ag-bascule input:checked + i { background: var(--ag-accent); }
#hermes-signature .ag-bascule input:checked + i::after { transform: translateX(19px); }
#hermes-signature .ag-bascule input:focus-visible + i { outline: 2px solid var(--ag-accent); outline-offset: 2px; }
#hermes-signature .ag-quand { display: grid; grid-template-columns: 46px minmax(0, 1fr) 112px; align-items: center; gap: 8px 10px; padding: 10px 0; border-bottom: 1px solid var(--ag-sep); }
#hermes-signature .ag-quand.journee { grid-template-columns: 46px minmax(0, 1fr); }
#hermes-signature .ag-quand.journee input[type="time"] { display: none; }
#hermes-signature .ag-quand label { font-size: 15px; color: var(--ag-doux); }
#hermes-signature .ag-quand input, #hermes-signature .ag-champ input, #hermes-signature .ag-champ select, #hermes-signature .ag-champ textarea {
  width: 100%; min-width: 0; height: 42px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--ag-sep); border-radius: 10px; background: var(--ag-champ); color: var(--ag-texte); font: 16px/1.2 var(--ag-sans); outline: none; }
#hermes-signature .ag-quand input:focus, #hermes-signature .ag-champ input:focus, #hermes-signature .ag-champ select:focus, #hermes-signature .ag-champ textarea:focus { border-color: var(--ag-accent); }
#hermes-signature .ag-champ { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--ag-sep); }
#hermes-signature .ag-champ > svg { flex: none; width: 20px; height: 20px; color: var(--ag-doux); }
#hermes-signature .ag-champ textarea { height: auto; min-height: 76px; padding: 9px 10px; resize: vertical; line-height: 1.4; }
#hermes-signature .ag-erreur { margin: 10px 0 0; color: var(--ag-rouge); font-size: 14px; }
#hermes-signature .ag-bandeau { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); z-index: 120; transform: translateX(-50%); max-width: calc(100vw - 32px);
  padding: 11px 16px; border-radius: 14px; background: #1c1c1e; color: #ffffff; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); font: 500 14.5px/1.3 var(--ag-sans); }
#hermes-signature:not([data-theme="light"]) .ag-bandeau { background: #062a24; border: 1px solid rgba(77, 255, 216, .4); color: #dffff6; }
#hermes-signature .ag-bandeau.erreur { background: #8a0011; border: 0; color: #ffffff; }

/* Ordinateur : feuilles au centre, sans poignée */
@media (min-width: 761px) {
  #hermes-signature .ag-feuille { left: 50%; right: auto; top: 50%; bottom: auto; width: 460px; max-height: calc(100% - 80px); padding-bottom: 18px; border-radius: 20px;
    transform: translate(-50%, -47%) scale(.98); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
  #hermes-signature .ag-couche.ouverte .ag-feuille { transform: translate(-50%, -50%); opacity: 1; }
  #hermes-signature .ag-poignee { display: none; }
  #hermes-signature .ag-bandeau { bottom: 28px; }
}
/* Téléphone */
@media (max-width: 760px) {
  #hermes-signature .ag-tete { padding: 12px 14px 2px; }
  #hermes-signature .ag-tete h1 { font-size: 27px; }
  #hermes-signature:not([data-theme="light"]) .ag-tete h1 { font-size: 22px; }
  #hermes-signature .ag-icone, #hermes-signature .ag-nouveau { height: 38px; }
  #hermes-signature .ag-icone { width: 38px; }
  #hermes-signature .ag-barre { padding: 6px 14px 8px; gap: 8px; }
  #hermes-signature .ag-periode { font-size: 16px; }
  #hermes-signature:not([data-theme="light"]) .ag-periode { font-size: 12.5px; }
  #hermes-signature .ag-vues { width: 100%; box-sizing: border-box; }
  #hermes-signature .ag-vues button { flex: 1; padding: 0 4px; }
  #hermes-signature .ag-vues .ag-l { display: none; }
  #hermes-signature .ag-vues .ag-c { display: inline; }
  #hermes-signature .ag-sources { padding: 0 14px 8px; }
  #hermes-signature .ag-grille { --g: 40px; }
  #hermes-signature .ag-jtete b { width: 30px; height: 30px; font-size: 17px; }
  #hermes-signature .ag-ev { padding: 2px 4px; font-size: 11px; border-left-width: 2.5px; border-radius: 5px; }
  #hermes-signature .ag-ev span, #hermes-signature .ag-ev small { font-size: 10px; }
  #hermes-signature .ag-chip, #hermes-signature .ag-tache-t { font-size: 11px; }
  #hermes-signature .ag-chip { padding: 0 5px; border-left-width: 2.5px; }
  #hermes-signature .ag-grad span { right: 5px; font-size: 9.5px; }
  #hermes-signature .ag-coin-j { padding-right: 4px; }
  #hermes-signature .ag-coin-j small { font-size: 9px; }
  #hermes-signature .ag-mgrille { grid-template-rows: repeat(var(--sem), minmax(62px, 1fr)); }
  #hermes-signature .ag-case { padding: 3px 2px; align-items: center; }
  #hermes-signature .ag-num { align-self: center; font-size: 12.5px; }
  #hermes-signature .ag-planning { padding: 2px 12px 28px; }
  #hermes-signature .ag-pjour { grid-template-columns: 50px minmax(0, 1fr); gap: 8px; }
}
/* Barre du bas du téléphone : un 6e onglet (Agenda) */
#hermes-signature .qg-mobile-nav:has(> [data-page="agenda"]),
#hermes-signature[data-theme][data-palette] .qg-mobile-nav:has(> [data-page="agenda"]) { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
@media (prefers-reduced-motion: reduce) {
  #hermes-signature .ag-feuille, #hermes-signature .ag-voile { transition: none; }
  #hermes-signature .ag-charge i { animation-duration: 2.4s; }
}

/* 12/10/2026 (demande du Général : « c'est trop collé en haut de la tuile, laisse de l'espace ») :
   en défilant une longue description, le texte montait jusqu'au bord de la fiche. L'en-tête (titre + fermer) reste
   maintenant en haut, avec de l'air et un léger fondu : le texte passe dessous au lieu de toucher le bord. */
#hermes-signature .ag-feuille { padding-top: 0; }
#hermes-signature .ag-feuille > .ag-poignee { margin-top: 10px; }
#hermes-signature .ag-feuille > .ag-ftete {
  position: sticky; top: 0; z-index: 3; margin: 0 -18px 14px; padding: 18px 18px 12px; background: var(--ag-carte);
  border-top-left-radius: inherit; border-top-right-radius: inherit;
}
@media (max-width: 760px) { #hermes-signature .ag-feuille > .ag-poignee { margin-bottom: 2px; } #hermes-signature .ag-feuille > .ag-poignee + .ag-ftete { padding-top: 14px; } }
#hermes-signature .ag-feuille > .ag-ftete::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22px; pointer-events: none;
  background: linear-gradient(var(--ag-carte), transparent);
}

/* 19/10/2026 (demande du Général : « un bouton fusionner… moitié moitié… les deux comptes visibles dans la tuile…
   les tuiles semaine sont rognées à la deuxième ligne… plus visible les textes en mode sombre ») :
   - « Fusionner » : un même rendez-vous de plusieurs agendas = une seule tuile, couleurs moitié-moitié, comptes visibles ;
   - tuiles de la grille : hauteurs de ligne fixes, qg-agenda.js ne montre que les lignes entières qui tiennent ;
   - mode sombre : textes et libellés plus clairs. Retour arrière : supprimer ce bloc (voir RETOUR-ARRIERE.txt). */

/* Bouton « Fusionner » (premier de la barre des agendas) */
#hermes-signature .ag-fus { flex: none; height: 30px; padding: 0 10px 0 9px; display: inline-flex; align-items: center; gap: 6px; border-radius: 15px;
  border: 1px solid var(--ag-puce-bord); background: var(--ag-puce); color: var(--ag-puce-txt); font-size: 13px !important; font-weight: 600 !important;
  cursor: pointer; white-space: nowrap; transition: background-color .28s ease, color .28s ease, border-color .28s ease; }
#hermes-signature .ag-fus svg { width: 17px; height: 17px; stroke-width: 2; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
#hermes-signature .ag-fus[aria-pressed="true"] { background: var(--ag-accent-fond); color: var(--ag-accent-texte); border-color: var(--ag-accent); }
#hermes-signature .ag-fus[aria-pressed="true"] svg { transform: scaleX(.74); }          /* les deux ronds se rejoignent */
#hermes-signature .ag-fus-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; box-sizing: border-box; padding: 0 5px; border-radius: 9px;
  background: var(--ag-puce-fort); color: var(--ag-texte); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; animation: ag-entre .35s cubic-bezier(.2, .8, .2, 1); }
#hermes-signature .ag-fus[aria-pressed="true"] .ag-fus-n { background: var(--ag-accent); color: var(--ag-sur-accent); }
#hermes-signature .ag-fus-n:empty { display: none; }
#hermes-signature .ag-fus.ag-entre { animation: ag-entre .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes ag-entre { from { opacity: 0; transform: translateX(-8px) scale(.94); } }
/* bascule : les rendez-vous se recomposent en fondu */
#hermes-signature .ag-corps.ag-fondu :is(.ag-ev, .ag-mev, .ag-chip, .ag-pev, .ag-points i) { animation: ag-fondu .42s cubic-bezier(.2, .8, .2, 1); }
@keyframes ag-fondu { from { opacity: 0; transform: scale(.94); } }

/* Rendez-vous fusionnés : moitié-moitié (une bande par agenda), comptes visibles */
#hermes-signature .ag-ev.ag-duo, #hermes-signature .ag-chip.ag-duo { background: var(--gf); border-right: 3px solid var(--c2); }
#hermes-signature:not([data-theme="light"]) .ag-ev.ag-duo, #hermes-signature:not([data-theme="light"]) .ag-chip.ag-duo { background: var(--gf2); }
#hermes-signature .ag-ev.ag-duo.a-repondre { background: var(--ag-fond-plein); }
#hermes-signature .ag-mev.ag-duo i { width: 9px; height: 9px; background: var(--g); }
#hermes-signature .ag-points i.duo { width: 7px; height: 7px; background: var(--g); }
#hermes-signature .ag-pev.ag-duo i { background: var(--gv); }
#hermes-signature .ag-ftete.ag-duo .ag-pastille { border-radius: 50%; background: var(--g); }
#hermes-signature .ag-cpt { display: flex; gap: 6px; min-width: 0; max-width: 100%; }
#hermes-signature .ag-cpt em { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-style: normal; }
#hermes-signature .ag-cpt em::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--c); vertical-align: 1px; }
#hermes-signature .ag-pt .ag-cpt { margin-top: 4px; font-size: 12.5px; font-weight: 500; color: var(--ag-doux); }
#hermes-signature .ag-pt .ag-cpt em::before { width: 7px; height: 7px; }
#hermes-signature .ag-fus-t { display: block; margin-bottom: 7px; color: var(--ag-doux); font-size: 13.5px; }
#hermes-signature .ag-cals { display: flex; flex-wrap: wrap; gap: 6px; }
#hermes-signature .ag-cal { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 11px; border-radius: 16px; border: 1px solid var(--ag-puce-bord);
  background: var(--ag-puce); color: var(--ag-texte); font-size: 14px !important; font-weight: 600 !important; cursor: pointer; transition: background-color .2s ease; }
#hermes-signature .ag-cal:hover { background: var(--ag-puce-fort); }
#hermes-signature .ag-cal i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }

/* Tuiles de la grille : hauteurs de ligne fixes (titre 14, heure 13, comptes 12 ; téléphone 13 / 12 / 11,5) */
#hermes-signature .ag-ev { gap: 0; padding: 2px 6px; font: 500 12px/14px var(--ag-sans); }
#hermes-signature .ag-ev > * { flex: none; max-width: 100%; }
#hermes-signature .ag-ev b { line-height: 14px; -webkit-line-clamp: 2; }
#hermes-signature .ag-ev span { font-size: 11px; line-height: 13px; overflow: hidden; text-overflow: ellipsis; }
#hermes-signature .ag-ev small { font-size: 11px; line-height: 13px; }
#hermes-signature .ag-ev .ag-cpt { font-size: 10.5px; line-height: 12px; font-weight: 600; color: var(--ag-ev-doux); }
#hermes-signature .ag-ev.court { padding-top: 0; padding-bottom: 0; }
#hermes-signature .ag-ev.court b { display: block; flex: 0 1 auto; min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
#hermes-signature .ag-ev.court span { flex: none; overflow: visible; }
@media (max-width: 760px) {
  #hermes-signature .ag-ev { padding: 2px 4px; font-size: 11px; line-height: 13px; }
  #hermes-signature .ag-ev b { line-height: 13px; }
  #hermes-signature .ag-ev span, #hermes-signature .ag-ev small { font-size: 10px; line-height: 12px; }
  #hermes-signature .ag-ev .ag-cpt { font-size: 9.5px; line-height: 11.5px; gap: 4px; }
  #hermes-signature .ag-ev .ag-cpt em::before { width: 5px; height: 5px; margin-right: 3px; }
  #hermes-signature .ag-ev.ag-duo, #hermes-signature .ag-chip.ag-duo { border-right-width: 2.5px; }
}

/* Mode sombre : textes plus lisibles */
#hermes-signature#hermes-signature:not([data-theme="light"]) {
  --ag-doux: #a9d6c9; --ag-tres-doux: #82ada1; --ag-puce-txt: #e4fbf4; --ag-ev-txt: #ffffff; --ag-ev-doux: rgba(240, 255, 250, .88);
}
#hermes-signature:not([data-theme="light"]) .ag-ev { font-weight: 550; }
#hermes-signature:not([data-theme="light"]) .ag-ev b, #hermes-signature:not([data-theme="light"]) .ag-chip, #hermes-signature:not([data-theme="light"]) .ag-tache-t { text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
#hermes-signature:not([data-theme="light"]) :is(.ag-ev, .ag-pev).passe { opacity: .78; }
#hermes-signature:not([data-theme="light"]) .ag-mev { color: #f4fffb; font-weight: 550; }
#hermes-signature:not([data-theme="light"]) .ag-mev em { color: #b5dfd3; }
#hermes-signature:not([data-theme="light"]) .ag-src { font-weight: 550 !important; }
#hermes-signature:not([data-theme="light"]) .ag-src[aria-pressed="false"] { opacity: .62; }
@media (prefers-reduced-motion: reduce) {
  #hermes-signature .ag-fus, #hermes-signature .ag-fus svg { transition: none; }
  #hermes-signature .ag-fus.ag-entre, #hermes-signature .ag-fus-n, #hermes-signature .ag-corps.ag-fondu :is(.ag-ev, .ag-mev, .ag-chip, .ag-pev, .ag-points i) { animation: none; }
}

/* 19/10/2026 (demande du Général : « il y a un loupé sur le bouton Enregistrer ») : dans les feuilles d'édition
   (Nouveau / Modifier de l'agenda, tâche de la To-do), la barre « Annuler · titre · Enregistrer » touchait le bord haut
   de la feuille (le haut de la feuille n'a plus de marge depuis l'en-tête collant du 12/10). Même traitement que
   l'en-tête des fiches : de l'air au-dessus, la barre reste en haut au défilement, léger fondu dessous. */
#hermes-signature .ag-feuille > .ag-form > .ag-fbarre:first-child {
  position: sticky; top: 0; z-index: 3; margin: 0 -18px 12px; padding: 16px 18px 12px; background: var(--ag-carte);
  border-top-left-radius: inherit; border-top-right-radius: inherit;
}
#hermes-signature .ag-feuille > .ag-form > .ag-fbarre:first-child::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 18px; pointer-events: none;
  background: linear-gradient(var(--ag-carte), transparent);
}
@media (max-width: 760px) { #hermes-signature .ag-feuille > .ag-poignee + .ag-form > .ag-fbarre:first-child { padding-top: 8px; } }
