/* ════════════════════════════════════════════════════════════════════════
   L'EMPLOI DU TEMPS (Tevini, 16 octobre 2026, repris de Reach Circles sans
   projets ni sprints)
   Les créneaux sur le planning, le geste de glisser, le volet « Nouveau
   créneau » et celui d'un rendez-vous Google modifiable.
   ⚠️ Les couleurs viennent de la charte (`charte.css`, qui lit
   `charte-mmb.css`) par ses variables ; aucune teinte recopiée ici.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Un créneau sur le planning : la couleur de son agenda, ses pastilles ── */
.ed-cr { position: absolute; z-index: 1; --t: var(--accent); padding: 4px 8px; border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column; gap: 2px; cursor: pointer; user-select: none;
  background: color-mix(in srgb, var(--t) 13%, var(--card)); border: 1px solid color-mix(in srgb, var(--t) 38%, transparent);
  border-left: 3px solid var(--t); color: var(--foreground); font-size: 12px; line-height: 1.3; }
.ed-cr:hover { filter: brightness(1.15); }
.ed-cr:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ed-cr b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-cr small { display: block; font-size: 10.5px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-cr--court { flex-direction: row; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.ed-cr--court b { flex: 0 1 auto; min-width: 0; }
.ed-cr--court small { flex: 1 1 0; min-width: 0; }
.ed-cr--google { background: color-mix(in srgb, var(--t) 9%, var(--card)); }
.ed-cr > b, .ed-cr > small { flex: none; }
.ed-liens { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; overflow: hidden; max-height: 42px; }
.ed-cr-ligne { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.ed-cr-ligne > small { flex: none; }
.ed-cr-ligne .ed-liens { flex-wrap: nowrap; margin-top: 0; min-width: 0; }
.ed-cr-ligne .ed-lp { flex: 0 1 auto; min-width: 0; }
.ed-lp { display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 6px; border-radius: 5px; font-size: 10.5px;
  white-space: nowrap; background: rgba(10,11,16,.45); border: 1px solid rgba(255,255,255,.08); color: var(--foreground);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ed-lp i { width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--accent)); flex: none; }
.ed-lp svg { flex: none; color: var(--muted-foreground); }
.ed-lp b { font-size: 8.5px; font-weight: 600; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 99px;
  background: var(--accent-wash); color: var(--accent); }
/* Les fonds Google qu'on peut modifier se glissent aussi. */
.mj-plan-fond[data-modifiable] { cursor: pointer; user-select: none; }
.ed-poignee { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); width: 26px; height: 6px; border-radius: 4px;
  cursor: ns-resize; background: transparent; }
.ed-poignee::after { content: ""; position: absolute; left: 0; right: 0; top: 1px; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,.45); opacity: 0; }
.ed-cr:hover .ed-poignee::after, .mj-plan-fond:hover .ed-poignee::after, .ed-glisse .ed-poignee::after { opacity: 1; }

/* ── Créer d'un clic : le survol d'une heure libre ─────────────────────── */
.ed-col { cursor: copy; }
.ed-col .mj-plan-bloc, .ed-col .mj-plan-fond, .ed-col .ed-cr { cursor: pointer; }
.ed-fantome { position: absolute; left: 0; width: calc(100% - 4px); z-index: 2; border-radius: 8px; border: 1.5px dashed var(--accent);
  background: var(--accent-wash); display: flex; align-items: center; gap: 7px; padding: 0 10px; color: var(--accent);
  font-size: 12px; font-weight: 600; pointer-events: auto; overflow: hidden; white-space: nowrap; }
.ed-fantome[hidden] { display: none; }
.ed-fantome small { font-weight: 400; color: var(--muted-foreground); font-size: 11px; }
.ed-fantome svg { flex: none; }
.ed-astuce { flex: none; margin: 0; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 11.5px;
  color: var(--disabled-foreground); display: flex; gap: 6px; align-items: center; }
.ed-astuce svg { flex: none; }
.ed-tel { display: none; }
.ed-sem-astuce { font-size: 12px; color: var(--muted-foreground); margin-left: 12px; display: inline-flex; gap: 6px; align-items: center; }

/* ── Glisser : l'ancienne place en pointillé, la bulle de l'heure ─────── */
.ed-orig { position: absolute; z-index: 1; border-radius: 8px;
  border: 1.5px dashed color-mix(in srgb, var(--primary) 55%, transparent);
  background: color-mix(in srgb, var(--primary) 5%, transparent); pointer-events: none; }
.ed-glisse { box-shadow: 0 18px 40px rgba(0,0,0,.6), 0 0 0 2px var(--accent); z-index: 6 !important; cursor: grabbing !important; opacity: .97; }
html.ed-glisse-en-cours, html.ed-glisse-en-cours * { cursor: grabbing !important; user-select: none; }
.ed-bulle { position: absolute; z-index: 7; padding: 5px 10px; border-radius: 8px; background: var(--accent); color: var(--foreground);
  font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.5); font-variant-numeric: tabular-nums;
  pointer-events: none; }
.ed-bulle::after { content: ""; position: absolute; left: 14px; bottom: -5px; width: 10px; height: 10px; background: var(--accent);
  transform: rotate(45deg); }

/* ── Le volet ──────────────────────────────────────────────────────────── */
dialog.rc-volet.ed-v { --volet: 540px; }
.ed-v .rc-v-corps { gap: 14px; }
.ed-v button.rc-v-x { border: 0; background: none; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.ed-v button.rc-v-x:hover { background: var(--accent-wash); }
.ed-v-ico { display: inline-flex; align-items: center; height: 28px; padding: 0 6px; border: 1px solid var(--border);
  border-radius: 8px; color: var(--accent); }
.ed-forme { display: flex; flex-direction: column; gap: 14px; }
.ed-forme[hidden] { display: none; }
.ed-sec, [data-ed-relies] { display: flex; flex-direction: column; gap: 8px; }
.ed-sec[hidden] { display: none; }
.ed-sec > h3, [data-ed-relies] > h3 { margin: 0; font-size: var(--text-2xs); letter-spacing: .14em; text-transform: uppercase;
  color: var(--disabled-foreground); font-weight: 500; display: flex; align-items: center; gap: 8px; }
[data-ed-relies] > h3 small { letter-spacing: 0; text-transform: none; font-size: 11px; color: var(--disabled-foreground); font-weight: 400; }
.ed-sortes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.ed-sorte { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 58px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--background); color: var(--muted-foreground); font: inherit; font-size: 11.5px;
  text-align: center; line-height: 1.15; cursor: pointer; padding: 0 2px; white-space: nowrap; letter-spacing: -.01em; }
.ed-sorte svg { color: var(--c, var(--muted-foreground)); }
.ed-sorte:hover { border-color: var(--border-strong); color: var(--foreground); }
.ed-sorte.on { border-color: var(--accent-ring); background: var(--accent-wash); color: var(--foreground); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.ed-titre { width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--background);
  color: var(--foreground); font: inherit; font-size: 16px; font-weight: 600; outline: 0; }
.ed-titre:focus { border-color: var(--accent-ring); }
.ed-titre::placeholder { color: var(--disabled-foreground); font-weight: 400; }
.ed-quand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-champ { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--background); font: inherit; font-size: var(--text-sm);
  color: var(--foreground); white-space: nowrap; position: relative; }
.ed-champ svg { color: var(--muted-foreground); flex: none; }
.ed-champ:hover { border-color: var(--accent-ring); }
select.ed-champ { appearance: none; cursor: pointer; }
.ed-champ--h { font-variant-numeric: tabular-nums; font-weight: 600; text-align: center; padding: 0 12px; }
/* Le jour : le calendrier de l'application (`_saisies.js`) en fait un bouton. */
.ed-date.rc-date-bouton { width: auto; min-width: 190px; cursor: pointer; }
.ed-date [data-texte] { display: inline-block; }
.ed-date [data-texte]::first-letter { text-transform: uppercase; }
input.ed-date { color-scheme: dark; }
.ed-champ--select { padding: 0 8px 0 11px; }
.ed-champ--select i { width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--disabled-foreground)); flex: none; }
.ed-champ--select select { appearance: none; border: 0; background: none; color: var(--foreground); font: inherit; font-size: var(--text-sm);
  font-weight: 500; padding: 0 2px; cursor: pointer; outline: 0; max-width: 260px; }
.ed-champ--select select option, select.ed-champ option { background: var(--card); color: var(--foreground); }
.ed-champ--select > svg:last-child { color: var(--muted-foreground); flex: none; transform: rotate(90deg); }
.ed-champ :disabled, .ed-champ:disabled, .ed-titre:disabled, .ed-notes:disabled { cursor: default; opacity: .8; }
.ed-fl { color: var(--disabled-foreground); }
.ed-durees { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-mini-puce { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--border);
  background: none; font: inherit; font-size: var(--text-xs); color: var(--muted-foreground); cursor: pointer; }
.ed-mini-puce:hover { border-color: var(--border-strong); color: var(--foreground); }
.ed-mini-puce.on { border-color: var(--accent-ring); background: var(--accent-wash); color: var(--accent); }
.ed-voisins { font-size: var(--text-xs); color: var(--muted-foreground); display: flex; flex-direction: column; gap: 3px; }
.ed-voisins:empty { display: none; }
.ed-voisins b { color: var(--foreground); font-weight: 500; }
.ed-voisins > span { display: flex; align-items: center; gap: 6px; }
.ed-voisins i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); flex: none; }

.ed-relies { border: 1px solid var(--border); border-radius: 12px; background: var(--background); padding: 10px;
  display: flex; flex-direction: column; gap: 8px; }
.ed-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-pills:empty { display: none; }
.ed-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 9px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--card); font-size: var(--text-xs); color: var(--foreground);
  max-width: 100%; white-space: nowrap; }
.ed-pill > span, .ed-pill > a { overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; }
.ed-pill > a:hover { text-decoration: underline; }
.ed-pill i.d { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.ed-pill svg { flex: none; color: var(--muted-foreground); }
.ed-pill--appel svg { color: var(--c-appel); }
.ed-pill--message svg { color: var(--c-message); }
.ed-pill--mail svg { color: var(--c-mail); }
.ed-pill--rdv svg { color: var(--c-rdv); }
.ed-pill > b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 99px; background: var(--accent-wash);
  color: var(--accent); font-size: 9px; font-weight: 600; flex: none; margin-left: -4px; }
.ed-pill .x { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 0; background: none;
  color: var(--disabled-foreground); font-size: 15px; flex: none; cursor: pointer; }
.ed-pill .x:hover { background: var(--accent-wash); color: var(--foreground); }
.ed-cherche-case { position: relative; }
.ed-cherche { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 8px;
  border: 1px dashed var(--border-strong); color: var(--disabled-foreground); font-size: var(--text-sm); }
.ed-cherche:focus-within { border-style: solid; border-color: var(--accent-ring); color: var(--foreground); background: var(--card); }
.ed-cherche input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--foreground); font: inherit; }
.ed-cherche input::placeholder { color: var(--disabled-foreground); }
.ed-cherche input::-webkit-search-cancel-button { display: none; }
.ed-res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; max-height: 340px; overflow-y: auto;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--card); box-shadow: 0 18px 40px rgba(0,0,0,.5);
  padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.ed-res[hidden] { display: none; }
.ed-res h4 { margin: 6px 8px 3px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--disabled-foreground); font-weight: 500; }
.ed-res p { margin: 6px 8px; font-size: var(--text-xs); color: var(--muted-foreground); }
.ed-res-l { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 3px 8px; border: 0; border-radius: 7px; background: none;
  font: inherit; font-size: var(--text-sm); color: var(--foreground); text-align: left; cursor: pointer; width: 100%; }
.ed-res-l.on, .ed-res-l:hover { background: var(--accent-wash); }
.ed-res-l svg { flex: none; color: var(--muted-foreground); }
.ed-res-l i.d { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.ed-res-l > b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 99px; background: var(--accent-wash);
  color: var(--accent); font-size: 9px; font-weight: 600; flex: none; }
.ed-res-l span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-res-l small { flex: none; color: var(--muted-foreground); font-size: var(--text-xs); }
.ed-res-l mark { background: none; color: var(--accent); font-weight: 600; }
.ed-res-l.on small { color: var(--accent); }
.ed-plus { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 7px;
  border: 1px dashed var(--border-strong); background: none; font: inherit; font-size: var(--text-xs); color: var(--muted-foreground);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ed-plus:hover { border-color: var(--accent-ring); color: var(--foreground); }
.ed-plus svg { flex: none; }

.ed-agenda { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-agenda small { font-size: var(--text-xs); color: var(--muted-foreground); }
.ed-plier > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-sm);
  color: var(--muted-foreground); cursor: pointer; }
.ed-plier > summary::-webkit-details-marker { display: none; }
.ed-plier > summary:hover { color: var(--foreground); }
.ed-plier[open] > summary { margin-bottom: 10px; }
.ed-plier-corps { display: flex; flex-direction: column; gap: 10px; }
.ed-case { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--muted-foreground); cursor: pointer; }
.ed-case input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.ed-case small { color: var(--disabled-foreground); }
.ed-case[hidden] { display: none; }
.ed-erreur { margin: 0; padding: 8px 10px; border-radius: 8px; font-size: var(--text-xs); color: var(--error);
  background: color-mix(in srgb, var(--error) 10%, transparent); }
.ed-erreur[hidden] { display: none; }
.ed-pied { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--card); }
.ed-pied[hidden] { display: none; }
.ed-pied .ed-dit { margin-right: auto; font-size: var(--text-xs); color: var(--muted-foreground); display: flex; align-items: center; gap: 7px; line-height: 1.35; }
.ed-pied .ed-dit svg { flex: none; color: var(--success); }
.ed-danger { color: var(--error) !important; }
.ed-danger[data-arme="1"] { background: color-mix(in srgb, var(--error) 14%, transparent); }
.ed-discret { font-size: var(--text-xs); color: var(--disabled-foreground); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.ed-discret:hover { color: var(--foreground); }
.ed-discret[hidden] { display: none; }
.ed-ok { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--success); text-align: right; }
.ed-ok--erreur { color: var(--error); }

/* Le rendez-vous Google modifiable */
.ed-ev-tete { display: flex; gap: 12px; align-items: stretch; }
.ed-ev-tete > i { width: 4px; border-radius: 4px; background: var(--c, var(--accent)); flex: none; }
.ed-ev-titre { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ed-ev-titre .ed-titre { border-color: transparent; background: none; padding: 0 8px; margin-left: -8px; font-size: 19px; height: 38px; }
.ed-ev-titre .ed-titre:hover:not(:disabled), .ed-ev-titre .ed-titre:focus { border-color: var(--border-strong); }
.ed-ev-titre small { font-size: var(--text-xs); color: var(--muted-foreground); display: flex; align-items: center; gap: 6px; }
.ed-ev-titre small svg { flex: none; }
.ed-bloc { border: 1px solid var(--border); border-radius: 12px; background: var(--background); }
.ed-ligne { display: grid; grid-template-columns: 118px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px;
  font-size: var(--text-sm); }
.ed-ligne[hidden] { display: none; }
.ed-ligne + .ed-ligne { border-top: 1px solid var(--border); }
.ed-ligne > span:first-child { display: flex; align-items: center; gap: 8px; color: var(--muted-foreground); font-size: var(--text-xs); }
.ed-ligne > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ed-ligne .ed-champ { height: 30px; }
.ed-ligne small { font-size: var(--text-xs); color: var(--muted-foreground); }
.ed-duree-dite { margin-left: 4px; }
.ed-notes { width: 100%; min-height: 84px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--background);
  color: var(--foreground); font: inherit; font-size: var(--text-sm); line-height: 1.55; resize: vertical; outline: 0; }
.ed-notes:focus { border-color: var(--accent-ring); }
.ed-invites { display: inline-flex; align-items: center; }
.ed-invites b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 99px; background: var(--muted);
  border: 2px solid var(--background); font-size: 9px; font-weight: 600; color: var(--foreground); margin-left: -6px; }
.ed-invites b:first-child { margin-left: 0; }
.ed-prevenir { padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }

.ed-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 95; padding: 10px 16px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border-strong); color: var(--foreground); font-size: var(--text-sm);
  box-shadow: 0 14px 34px rgba(0,0,0,.5); max-width: calc(100vw - 32px); }
.ed-toast[hidden] { display: none; }
.ed-toast--erreur { border-color: color-mix(in srgb, var(--error) 50%, transparent); color: var(--error); }

/* ── Au téléphone : le volet plein écran, de gros doigts (maquette 6) ──── */
@media (max-width: 767px) {
  dialog.rc-volet.ed-v { --volet: 100vw; }
  .ed-sortes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ed-sorte { height: 56px; font-size: 12.5px; }
  .ed-champ { height: 44px; font-size: 16px; }
  /* Le jour et les deux heures tiennent sur une ligne (maquette 6). */
  .ed-quand { flex-wrap: nowrap; gap: 6px; }
  .ed-quand input.ed-date, .ed-quand .ed-date { flex: 1 1 0; min-width: 0; padding: 0 8px; }
  .ed-quand .ed-champ--h { flex: none; padding: 0 8px; }
  .ed-quand .ed-fl { flex: none; }
  .ed-champ--select select { font-size: 16px; }
  .ed-pill { height: 36px; }
  .ed-cherche { height: 44px; font-size: 16px; }
  .ed-titre { font-size: 17px; height: 48px; }
  .ed-pied { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  [data-ed-pied-nouveau] .btn { min-height: 48px; flex: 1; justify-content: center; }
  [data-ed-pied-nouveau] .btn-ghost { display: none; }
  .ed-durees .ed-mini-puce { height: 36px; padding: 0 12px; font-size: 13px; }
  .ed-ligne { grid-template-columns: 1fr; gap: 6px; padding: 8px 12px; }
  .ed-ordi { display: none; }
  .ed-tel { display: inline; }
}
