/* RÉPONSES PRÉPARÉES ET ENVOIS PROGRAMMÉS (2/12/2026, cran B) · studio-reponses.js. La réponse préparée en carte de verre posée sur le
   champ, la feuille « Plus tard » en liste d'heures alignées, « Programmés » en tête de la liste, la bulle programmée dans le fil.
   Geist sur l'échelle 12, 13, 15, 17, 28 ; graisses 400 texte, 500 boutons, 600 noms ; chiffres tabulaires pour les heures.
   Noir neutre, blancs froids ; aucune teinte chaude, ni vert, ni bleu, aucun contour, aucune ombre de texte. Au doigt : zones de
   toucher de 44 points au moins, texte jamais sous 12 px. Préfixe .rp- seulement (l'habillage du fil est dans studio-conversation.css). */
.rp-carte,.rp-vide,.rp-repris,.rp-liste,.rp-feuille,.rp-plan{
  --rp-f:"Geist",-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Arial,sans-serif;
  --rp-t2:rgba(245,245,247,.68);--rp-t3:rgba(245,245,247,.56);--rp-plein:rgba(245,245,247,.08);
  --rp-verre:rgba(22,22,25,.66);--rp-flou:blur(24px) saturate(160%);
  --rp-arete:inset 0 1px 0 rgba(255,255,255,.14),inset 0 0 0 1px rgba(255,255,255,.05)}
.rp-carte,.rp-vide,.rp-repris{margin:8px 20px 0;color:#f5f5f7;font-family:var(--rp-f)}
.rp-carte *,.rp-vide *,.rp-repris *,.rp-liste *,.rp-feuille *,.rp-plan *{text-shadow:none!important}
.rp-carte :is(button,p,small,span,b,kbd),.rp-vide :is(button,p,span),.rp-repris :is(b,small),.rp-liste :is(button,h2,b,span,small,time,i),.rp-feuille :is(button,h2,p,span,em,label,input){font-family:var(--rp-f)}

/* ── la carte de verre ── */
.rp-carte{display:flex;flex-direction:column;gap:12px;padding:16px 14px 14px;border:0;border-radius:24px;background:var(--rp-verre);-webkit-backdrop-filter:var(--rp-flou);backdrop-filter:var(--rp-flou);box-shadow:var(--rp-arete)}
.rp-carte header{display:flex;align-items:center;gap:8px;padding:0 2px}
.rp-k{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;line-height:1.2;letter-spacing:0;color:#f5f5f7}
.rp-carte header small{margin-left:auto;font-size:12px;font-weight:400;color:var(--rp-t3)}
.rp-k svg,.rp-note svg,.rp-b svg,.rp-plan-k svg,.rp-liste-t svg,.rp-horloge svg,.rp-x svg,.rp-coche svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.rp-texte{margin:0;padding:0 2px;font-size:15px;font-weight:400;line-height:1.5;letter-spacing:-.003em;white-space:pre-wrap;color:#f5f5f7;max-height:9em;overflow:auto;text-wrap:pretty}
.rp-note{margin:0;padding:0 2px;display:flex;align-items:flex-start;gap:8px;font-size:13px;font-weight:400;line-height:1.45;color:var(--rp-t2)}
.rp-note svg{width:15px;height:15px;margin-top:1px;color:var(--rp-t2)}
.rp-gestes{display:flex;align-items:center;gap:6px}
.rp-b{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 16px;border:0;border-radius:999px;background:var(--rp-plein);color:#f5f5f7;font-size:15px;font-weight:500;letter-spacing:-.005em;white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .15s,opacity .15s,transform .12s}
.rp-gestes .rp-b{height:46px}
@media (hover:hover) and (pointer:fine){.rp-b:hover{background:rgba(245,245,247,.13)}.rp-b-p:hover{background:#fff}}
.rp-b:active{transform:scale(.97)}
.rp-b:disabled{opacity:.5;cursor:default;transform:none}
.rp-b-p{background:#f5f5f7;color:#0a0a0b;font-weight:600}
.rp-kbd{display:inline-flex;align-items:center;height:22px;margin-left:4px;padding:0 6px;border-radius:6px;background:rgba(10,10,11,.08);color:rgba(10,10,11,.66);font:500 12px/1 var(--rp-f);letter-spacing:.04em}
.rp-x{display:grid;place-items:center;width:44px;height:44px;flex:none;padding:0;border:0;border-radius:50%;background:var(--rp-plein);color:var(--rp-t2);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .15s,color .15s}
.rp-gestes .rp-ecarte{width:46px;height:46px;margin-left:auto}
@media (hover:hover) and (pointer:fine){.rp-x:hover{background:rgba(245,245,247,.13);color:#f5f5f7}}
.rp-b:focus-visible,.rp-x:focus-visible,.rp-horloge:focus-visible,.rp-annuler:focus-visible,.rp-liste-o:focus-visible,.rp-choix button:focus-visible,.rp-date input:focus-visible{outline:2px solid #f5f5f7;outline-offset:2px}
/* la carte se pose : elle monte, s'éclaircit et se met au point (une seule fois par réponse) */
.rp-entre{animation:rpEntre .42s cubic-bezier(0.23,1,0.32,1) both}
@keyframes rpEntre{from{opacity:0;transform:translateY(10px) scale(.98);filter:blur(4px)}to{opacity:1;transform:none;filter:none}}

/* ── sans réponse préparée : la note, puis « Préparer une réponse » en pastille de verre ── */
.rp-vide{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.rp-vide .rp-note{padding:0 4px}
.rp-prep{height:46px;padding:0 18px 0 16px;gap:8px;background:var(--rp-verre);-webkit-backdrop-filter:var(--rp-flou);backdrop-filter:var(--rp-flou);box-shadow:var(--rp-arete)}
.rp-repris{display:flex;align-items:center;gap:12px;padding:8px 8px 8px 18px;border:0;border-radius:24px;background:var(--rp-verre);-webkit-backdrop-filter:var(--rp-flou);backdrop-filter:var(--rp-flou);box-shadow:var(--rp-arete)}
.rp-repris span{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.rp-repris b{font-size:13px;font-weight:600}
.rp-repris small{font-size:13px;color:var(--rp-t2)}

/* ── l'horloge du champ, à gauche de la flèche d'envoi ── */
.rp-horloge{display:grid;place-items:center;width:44px;height:44px;flex:none;padding:0;border:0;border-radius:50%;background:transparent;color:rgba(245,245,247,.68);cursor:pointer}
@media (hover:hover) and (pointer:fine){.rp-horloge:hover{background:var(--rp-plein,rgba(245,245,247,.08));color:#f5f5f7}}
.rp-horloge svg{width:20px;height:20px}

/* ── dans le fil : l'envoi programmé, une bulle de verre, l'heure en tête ── */
.stu-m-b.rp-plan{align-items:flex-end}
body.stu-on #view .stu-m .stu-m-b.rp-plan .stu-m-bul,.stu-m-b.rp-plan .stu-m-bul{background:rgba(245,245,247,.09)!important;color:#f5f5f7!important;border:0!important;box-shadow:inset 0 0 0 1px rgba(245,245,247,.1)!important;border-radius:20px 20px 6px 20px}
.rp-plan-k{display:flex;align-items:center;gap:6px;margin-bottom:4px;font-size:13px;font-weight:500;color:var(--rp-t2);font-variant-numeric:tabular-nums}
.rp-plan p{margin:0;white-space:pre-wrap}
.rp-annuler{min-height:44px;padding:0 16px;border:0;border-radius:999px;background:rgba(245,245,247,.07);color:#f5f5f7;font-size:14px;font-weight:500;white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .15s}
@media (hover:hover) and (pointer:fine){.rp-annuler:hover{background:rgba(245,245,247,.13)}}
.rp-annuler-fil{margin:6px -4px 0 0}

/* ── « Programmés », en tête de la liste ── */
.rp-liste{margin:4px 2px 10px;padding:6px 0;border:0;border-radius:22px;background:rgba(245,245,247,.045);color:#f5f5f7}
.rp-liste-t{display:flex;align-items:center;gap:8px;height:40px;margin:0;padding:0 16px;font-size:15px;font-weight:600;line-height:1.2;letter-spacing:0;color:#f5f5f7}
.rp-liste-t b{font-weight:600}
.rp-liste-t i{font-style:normal;font-size:13px;font-weight:500;color:var(--rp-t3);font-variant-numeric:tabular-nums}
.rp-liste ul{list-style:none;margin:0;padding:0}
.rp-liste li{display:flex;align-items:center;gap:6px;padding:2px 6px 2px 4px}
.rp-liste-o{flex:1;min-width:0;min-height:52px;display:flex;align-items:center;gap:12px;padding:6px 6px 6px 12px;border:0;border-radius:14px;background:transparent;color:#f5f5f7;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
@media (hover:hover) and (pointer:fine){.rp-liste-o:hover{background:rgba(245,245,247,.05)}}
.rp-liste-o time{flex:none;width:52px;font-size:15px;font-weight:500;line-height:1.2;font-variant-numeric:tabular-nums}
.rp-liste-o time small{display:block;font-size:12px;font-weight:400;color:var(--rp-t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-liste-q{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.rp-liste-q b{font-size:15px;font-weight:500;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-liste-q span{font-size:13px;font-weight:400;line-height:1.35;color:var(--rp-t2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ── la feuille « Envoyer plus tard » : au centre sur ordinateur, en bas au téléphone ── */
.rp-voile{position:fixed;inset:0;z-index:9000;background:rgba(0,0,0,.55);animation:rpVoile .2s ease-out both}
@keyframes rpVoile{from{opacity:0}}
.rp-feuille{position:fixed;z-index:9001;left:50%;top:50%;transform:translate(-50%,-50%);width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;display:flex;flex-direction:column;gap:14px;padding:20px 20px 22px;border:0;border-radius:28px;
  background:rgba(24,24,27,.92);-webkit-backdrop-filter:blur(30px) saturate(160%);backdrop-filter:blur(30px) saturate(160%);box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 30px 60px rgba(0,0,0,.6);color:#f5f5f7;font-family:var(--rp-f);box-sizing:border-box;-webkit-font-smoothing:antialiased}
.rp-poignee{display:none}
.rp-feuille header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.rp-feuille h2{margin:0;font-size:17px;font-weight:600;line-height:1.2;letter-spacing:-.012em}
.rp-apercu{margin:-4px 0 0;font-size:15px;font-weight:400;line-height:1.45;color:var(--rp-t2);white-space:pre-wrap;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.rp-choix{display:flex;flex-direction:column;border-radius:18px;background:rgba(245,245,247,.05);overflow:hidden}
.rp-choix button{display:flex;align-items:center;gap:10px;min-height:54px;padding:0 16px;border:0;border-radius:0;background:transparent;color:#f5f5f7;font-size:15px;font-weight:500;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
.rp-choix button+button{box-shadow:inset 0 1px 0 rgba(245,245,247,.07)}
.rp-choix button span{flex:1;min-width:0}
.rp-choix em{font-style:normal;font-size:15px;font-weight:400;color:var(--rp-t2);font-variant-numeric:tabular-nums}
.rp-coche{width:22px;display:grid;place-items:center;font-style:normal;color:#f5f5f7}
.rp-choix button[data-q]:not([data-q="autre"]):not(.on) .rp-coche{visibility:hidden}
.rp-choix button[data-q="autre"] .rp-coche{color:var(--rp-t2)}
.rp-choix button.on{background:rgba(245,245,247,.07)}
@media (hover:hover) and (pointer:fine){.rp-choix button:not(.on):hover{background:rgba(245,245,247,.04)}}
.rp-date{display:flex;flex-direction:column;gap:6px;padding:4px 16px 14px;font-size:13px;color:var(--rp-t2)}
.rp-date[hidden]{display:none}
.rp-date input{min-height:44px;padding:0 12px;border:0;border-radius:12px;background:rgba(245,245,247,.08);color:#f5f5f7;font-size:15px;font-variant-numeric:tabular-nums;color-scheme:dark}
.rp-ok{align-self:stretch;min-height:54px;font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.rp-pied{margin:-2px 0 0;text-align:center;font-size:13px;line-height:1.45;color:var(--rp-t2)}

@media (max-width:860px){
  .rp-carte,.rp-vide,.rp-repris{margin:8px 12px 0}
  .rp-carte header small{display:block}
  .rp-texte{max-height:7.5em}
  .rp-gestes .rp-b{padding:0 14px}
  .rp-gestes .rp-b-p{flex:1}
  .rp-gestes .rp-ecarte{margin-left:0}
  .rp-liste{margin:0 0 12px}
  .rp-feuille{top:auto;bottom:8px;left:8px;right:8px;transform:none;width:auto;max-height:calc(100dvh - 24px);border-radius:34px;padding:10px 16px calc(22px + env(safe-area-inset-bottom));animation:rpMonte .38s cubic-bezier(0.32,0.72,0,1) both}
  .rp-poignee{display:block;align-self:center;width:36px;height:5px;border-radius:3px;background:rgba(245,245,247,.3)}
  .rp-feuille h2{font-size:17px}
  .rp-feuille .rp-x{width:44px;height:44px}
}
@keyframes rpMonte{from{transform:translateY(100%)}}
@media (prefers-reduced-motion:reduce){.rp-b,.rp-x,.rp-annuler{transition:none}.rp-entre,.rp-voile,.rp-feuille{animation:none}}
@media (prefers-reduced-transparency:reduce){.rp-carte,.rp-prep,.rp-repris,.rp-feuille{background:#161619;-webkit-backdrop-filter:none;backdrop-filter:none}}
