/* ═══════════════════════════════════════════════════════════════════════════
   /rdv/<identifiant> et /rdv/<identifiant>/<calendrier> : LA PRISE DE RENDEZ-VOUS
   Refonte du 13/11 (Antoine : « il faut que ça fasse pro »).

   Références : Cal.com (le panneau en trois colonnes au bureau : qui, le mois,
   les heures du jour ; jours libres teintés, jour choisi en plein), Calendly
   (le récapitulatif du créneau en tête du formulaire, la confirmation Quoi /
   Quand / Avec / Où, l'ajout à Google, Outlook, Apple), SavvyCal (les avatars
   des hôtes empilés), Linear (la sobriété des états vides et du squelette).
   DA de seliia.fr : Poppins, fond nacré de v4.css, verre translucide, rose
   #E8447F, encre #17171B, Seli seulement en pose 3D (img/seli/*.webp).
   Téléphone d'abord : une colonne, cibles de 44 px et plus, rien ne déborde.
   Tout est préfixé .rdv- ; les variables viennent de v4.css, avec secours.
   ═══════════════════════════════════════════════════════════════════════════ */

.rdv {
  --r-encre: #17171B; --r-encre-2: #4E4650; --r-encre-3: #857A83;
  --r-rose: var(--rose, #E8447F); --r-rose-encre: var(--rose-encre, #B5355F); --r-rose-voile: #FDEEF4; --r-rose-pale: #FBDDE8;
  --r-trait: rgba(23,23,27,.08); --r-trait-fort: rgba(23,23,27,.14);
  --r-verre: rgba(255,255,255,.74); --r-verre-bord: rgba(255,255,255,.9);
  --r-ombre: 0 1px 1px rgba(23,23,27,.03), 0 24px 60px -30px rgba(70,30,60,.32);
  position: relative; z-index: 1; padding: 96px 16px 64px;
  font-family: Poppins, system-ui, -apple-system, sans-serif; color: var(--r-encre);
}
.rdv *, .rdv *::before, .rdv *::after { box-sizing: border-box; }
.rdv-wrap { max-width: 1080px; margin: 0 auto; display: grid; gap: 16px; min-width: 0; }
.rdv h1, .rdv h2, .rdv h3 { font-family: Poppins, system-ui, sans-serif; color: var(--r-encre); margin: 0; letter-spacing: -.022em; }
.rdv p { margin: 0; }
.rdv-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rdv button, .rdv input, .rdv textarea { font-family: inherit; }
.rdv .btn { font-family: Poppins, system-ui, sans-serif; }

/* La feuille de verre commune */
.rdv-carte {
  background: var(--r-verre); border: 1px solid var(--r-verre-bord); border-radius: 28px; box-shadow: var(--r-ombre);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); min-width: 0;
}
.rdv-sur { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--r-rose-encre); }

/* ─── Le squelette ─── */
.rdv-squelette { display: grid; gap: 16px; }
.rdv-squelette[hidden] { display: none; }
.rdv-sq { border-radius: 28px; background: rgba(255,255,255,.56); border: 1px solid var(--r-verre-bord); padding: 22px; display: grid; gap: 12px; }
.rdv-sq i, .rdv-sq b { display: block; border-radius: 12px; background: linear-gradient(90deg, rgba(23,23,27,.05), rgba(23,23,27,.09), rgba(23,23,27,.05));
  background-size: 200% 100%; animation: rdv-luit 1.4s ease-in-out infinite; }
.rdv-sq-qui i { width: 52px; height: 52px; border-radius: 16px; }
.rdv-sq-qui b { height: 14px; width: 70%; } .rdv-sq-qui b:nth-of-type(2) { height: 26px; width: 90%; } .rdv-sq-qui b:nth-of-type(3) { width: 45%; }
.rdv-sq-cal b { height: 20px; width: 50%; } .rdv-sq-cal i { height: 220px; }
@keyframes rdv-luit { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ─── Absent, aucun créneau : Seli en pose, une phrase, une issue ─── */
.rdv-absent { text-align: center; padding: 28px 22px 30px; display: grid; justify-items: center; gap: 10px; max-width: 560px; width: 100%; margin: 0 auto; }
.rdv-absent[hidden] { display: none; }
.rdv-absent h1 { font-size: 22px; line-height: 1.3; font-weight: 700; } .rdv-absent h1:focus { outline: none; }
.rdv-absent p { color: var(--r-encre-2); font-size: 15px; line-height: 1.55; }
.rdv-absent-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.rdv-absent-actions .btn[hidden] { display: none; }
.rdv-seli-pose { width: 132px; height: auto; display: block; margin: 0 auto; }

/* ─── Le panneau ─── */
.rdv-panneau { display: grid; min-width: 0; overflow: hidden; }
.rdv-panneau[hidden] { display: none; }

/* Qui */
.rdv-qui { padding: 22px 20px 20px; border-bottom: 1px solid var(--r-trait); min-width: 0; display: grid; gap: 0; align-content: start; }
.rdv-avatars { display: flex; margin-bottom: 14px; }
.rdv-av { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 18px; font-weight: 600; letter-spacing: -.02em; box-shadow: 0 0 0 3px #fff, 0 8px 18px -10px rgba(70,30,60,.45); }
.rdv-av + .rdv-av { margin-left: -10px; }
.rdv-av.rdv-teinte-0 { background: linear-gradient(150deg, #FDE3EE, #F8C4DA); color: var(--r-rose-encre); }
.rdv-av.rdv-teinte-1 { background: linear-gradient(150deg, #EEE7FD, #D9CCF8); color: #5B3FA8; }
.rdv-av.rdv-teinte-2 { background: linear-gradient(150deg, #FFEADF, #FBD2BE); color: #9A4A23; }
.rdv-av.rdv-teinte-3 { background: linear-gradient(150deg, #E0F6EE, #BDEAD8); color: #1E7254; }
.rdv-av.petit { width: 28px; height: 28px; font-size: 12px; box-shadow: none; }
/* 14/11 : la photo de l'hôte (sa carte de visite), dans un cercle du dégradé de la carte. */
.rdv-av.avec-photo { width: 64px; height: 64px; padding: 3px; overflow: hidden;
  background: conic-gradient(from 210deg, #E8447F, #F58F6C, #A78BE8, #0CC0DF, #E8447F); }
.rdv-av.avec-photo img { display: block; width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid #fff; object-fit: cover; background: #FDF3F8; }
.rdv-av.avec-photo + .rdv-av { margin-left: -14px; }
.rdv-avatars[hidden] { display: none; }
/* L'image d'un calendrier : en tête, bord à bord, 16:10. */
.rdv-couverture { margin: -22px -20px 18px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 27px 27px 0 0; background: linear-gradient(120deg, #F9C7A9, #EA98BC); }
.rdv-couverture[hidden] { display: none; }
.rdv-couverture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rdv-qui h1 { font-size: 24px; line-height: 1.22; font-weight: 700; margin-top: 6px; overflow-wrap: anywhere; }
.rdv-hotes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.rdv-hotes li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; color: var(--r-encre-2); line-height: 1.35; }
.rdv-hotes b { color: var(--r-encre); font-weight: 600; }
.rdv-presentation { margin-top: 14px !important; color: var(--r-encre-2); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.rdv-infos { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.rdv-infos li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--r-encre-2); }
.rdv-infos svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--r-encre-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Le choix */
.rdv-choix { display: grid; min-width: 0; }
.rdv-choix[hidden] { display: none; }
.rdv-cal-zone { padding: 20px 16px 18px; min-width: 0; }
.rdv-cal-zone[hidden] { display: none; }
.rdv-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-bottom: 14px; }
.rdv-tete h2 { font-size: 17px; font-weight: 600; flex: 1 0 100%; }
.rdv-tete .rdv-nav { flex: 1 0 100%; justify-content: space-between; }
.rdv-tete .rdv-mois { margin-right: auto !important; font-size: 15px; }
.rdv-nav { display: flex; align-items: center; gap: 2px; }
.rdv-mois { font-size: 14px; font-weight: 600; color: var(--r-encre); margin-right: 4px !important; white-space: nowrap; }
.rdv-fleche { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--r-encre); }
.rdv-fleche:hover:not(:disabled) { background: rgba(23,23,27,.05); }
.rdv-fleche svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rdv-fleche:disabled { opacity: .28; cursor: default; }
.rdv-alerte { margin: 0 0 14px !important; padding: 12px 14px; border-radius: 14px; background: #FDECEF; color: #9C2236; font-weight: 600; font-size: 14px; line-height: 1.45; }
.rdv-alerte[hidden] { display: none; }
.rdv-cal { display: grid; gap: 6px; }
.rdv-cal-tete, .rdv-cal-rangee { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rdv-cal-tete span { text-align: center; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--r-encre-3); padding-bottom: 4px; }
.rdv-jour { position: relative; aspect-ratio: 1 / 1; min-height: 44px; border-radius: 12px; border: 0; background: var(--r-rose-voile);
  font: inherit; font-weight: 600; font-size: 15px; color: var(--r-rose-encre); cursor: pointer; padding: 0; display: grid; place-items: center;
  font-variant-numeric: tabular-nums; transition: background 160ms ease, color 160ms ease, transform 120ms ease; }
.rdv-jour:hover:not(:disabled) { background: var(--r-rose-pale); }
.rdv-jour:active:not(:disabled) { transform: scale(.96); }
.rdv-jour:disabled { background: transparent; color: rgba(23,23,27,.3); font-weight: 400; cursor: default; }
.rdv-jour[aria-pressed="true"] { background: var(--r-encre); color: #fff; }
.rdv-auj-point { position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.rdv-fuseau { margin-top: 14px !important; font-size: 13px; color: var(--r-encre-3); line-height: 1.45; }

.rdv-heures-zone { padding: 18px 16px 20px; border-top: 1px solid var(--r-trait); scroll-margin-top: 88px; min-width: 0; }
.rdv-heures-zone[hidden] { display: none; }
.rdv-heures-zone h3 { font-size: 16px; font-weight: 600; }
.rdv-heures-n { font-size: 13px; color: var(--r-encre-3); margin: 2px 0 12px !important; }
.rdv-heures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rdv-heure { min-height: 50px; border-radius: 14px; border: 1px solid var(--r-trait-fort); background: #fff; color: var(--r-encre);
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease; }
.rdv-heure::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34B585; flex: none; }
.rdv-heure:hover { border-color: var(--r-rose); box-shadow: 0 0 0 3px rgba(232,68,127,.12); }
.rdv-heure:active { transform: scale(.98); }
.rdv-aucun { padding: 24px 20px 28px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.rdv-aucun[hidden] { display: none; }
.rdv-aucun h3 { font-size: 17px; font-weight: 600; }
.rdv-aucun p { color: var(--r-encre-2); font-size: 14.5px; line-height: 1.55; max-width: 380px; }
.rdv-aucun .btn { margin-top: 6px; }

.rdv button:focus-visible, .rdv a:focus-visible, .rdv input:focus-visible, .rdv textarea:focus-visible { outline: 3px solid var(--r-rose); outline-offset: 2px; }

/* ─── Le formulaire, avec le récapitulatif du créneau ─── */
.rdv-form-zone { padding: 18px 16px 22px; scroll-margin-top: 88px; min-width: 0; }
.rdv-form-zone[hidden] { display: none; }
.rdv-recap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px; border-radius: 20px; background: #fff; border: 1px solid var(--r-trait); box-shadow: 0 10px 26px -20px rgba(70,30,60,.4); }
.rdv-recap-j { width: 58px; border-radius: 14px; overflow: hidden; text-align: center; background: #fff; border: 1px solid var(--r-trait-fort); }
.rdv-recap-j span { display: block; padding: 3px 0 2px; background: var(--r-rose); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.rdv-recap-j b { display: block; padding: 4px 0 6px; font-size: 24px; font-weight: 700; color: var(--r-encre); line-height: 1.1; font-variant-numeric: tabular-nums; }
.rdv-recap-t { min-width: 0; }
.rdv-recap-t h2 { font-size: 16px; font-weight: 600; line-height: 1.3; margin-top: 2px; }
.rdv-recap-t h2:focus { outline: none; }
.rdv-recap-t p:last-child { font-size: 14px; color: var(--r-encre-2); margin-top: 2px !important; }
.rdv-lien { background: none; border: 0; padding: 10px 4px; min-height: 44px; font: inherit; font-weight: 600; font-size: 14.5px; color: var(--r-rose-encre);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.rdv-form-titre { font-size: 16px !important; font-weight: 600; margin: 22px 0 14px !important; }
.rdv-grille { display: grid; grid-template-columns: 1fr; gap: 14px; }
.rdv-champ { min-width: 0; }
.rdv-champ[hidden] { display: none; }
.rdv-champ label { display: block; font-size: 13.5px; font-weight: 600; color: var(--r-encre); margin-bottom: 6px; }
.rdv-facultatif { font-weight: 400; color: var(--r-encre-3); }
.rdv-champ input, .rdv-champ textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--r-trait-fort); background: #fff; font-size: 16px; color: var(--r-encre); transition: border-color 160ms ease, box-shadow 160ms ease; }
.rdv-champ textarea { min-height: 116px; resize: vertical; line-height: 1.5; }
.rdv-champ input:focus, .rdv-champ textarea:focus { border-color: var(--r-rose); box-shadow: 0 0 0 4px rgba(232,68,127,.14); outline: none; }
.rdv-champ [aria-invalid="true"] { border-color: #C2334A; }
.rdv-aide { margin-top: 6px !important; font-size: 12.5px; color: var(--r-encre-3); line-height: 1.45; }
.rdv-erreur { margin-top: 6px !important; font-size: 13px; font-weight: 500; color: #C2334A; }
.rdv-erreur:empty { display: none; }
.rdv-erreur-g { margin-top: 14px !important; }
.rdv-envoi { width: 100%; margin-top: 20px; min-height: 54px; font-size: 15.5px; background: var(--r-encre); }
.rdv-note { margin-top: 12px !important; font-size: 12.5px; color: var(--r-encre-3); text-align: center; }
.rdv-note a { color: inherit; }
/* Le piège : hors de l'écran, jamais display:none (certains robots le sautent). */
.rdv-piege { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ─── La confirmation ─── */
.rdv-fini { padding: 26px 20px 22px; max-width: 620px; width: 100%; margin: 0 auto; display: grid; gap: 22px; }
.rdv-fini[hidden] { display: none; }
.rdv-fini-tete { text-align: center; display: grid; justify-items: center; gap: 8px; }
.rdv-fini-tete .rdv-seli-pose { width: 156px; margin: -10px auto -6px; }
.rdv-coche { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: #E3F6EE; color: #1E7254; font-size: 13px; font-weight: 600; }
.rdv-coche svg { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: #34B585; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rdv-fini h1 { font-size: 26px; line-height: 1.2; font-weight: 700; } .rdv-fini h1:focus { outline: none; }
.rdv-fini-tete p:last-child { color: var(--r-encre-2); font-size: 15px; line-height: 1.55; max-width: 440px; overflow-wrap: anywhere; }
.rdv-fini-recap { margin: 0; border-radius: 20px; background: #fff; border: 1px solid var(--r-trait); overflow: hidden; }
.rdv-fini-recap div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 13px 16px; border-top: 1px solid var(--r-trait); }
.rdv-fini-recap div:first-child { border-top: 0; }
.rdv-fini-recap dt { font-size: 13px; font-weight: 500; color: var(--r-encre-3); padding-top: 1px; }
.rdv-fini-recap dd { margin: 0; font-size: 14.5px; font-weight: 500; color: var(--r-encre); line-height: 1.5; overflow-wrap: anywhere; }
.rdv-fini-recap dd a { color: var(--r-rose-encre); }
.rdv-fini-recap dd small { display: block; font-size: 13px; font-weight: 400; color: var(--r-encre-3); }
.rdv-agenda { display: grid; gap: 10px; }
.rdv-agenda-l { display: grid; grid-template-columns: 1fr; gap: 8px; }
.rdv-agenda-l .btn { min-height: 48px; width: 100%; white-space: normal; background: #fff; border-color: var(--r-trait-fort); }
.rdv-agenda-l .btn[hidden] { display: none; }
.rdv-ensuite { display: grid; gap: 12px; }
.rdv-ensuite ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: rdv-e; }
.rdv-ensuite li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; counter-increment: rdv-e; font-size: 14px; line-height: 1.5; }
.rdv-ensuite li::before { content: counter(rdv-e); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--r-rose-voile); color: var(--r-rose-encre); font-weight: 700; font-size: 13px; }
.rdv-ensuite li b { font-weight: 600; color: var(--r-encre); }
.rdv-ensuite li span { color: var(--r-encre-2); }
.rdv-fini-pied { text-align: center; border-top: 1px solid var(--r-trait); padding-top: 8px; }

/* Au téléphone, à l'étape du formulaire : l'en-tête se resserre (titre et hôtes), le formulaire monte. */
@media (max-width: 979px) {
  .rdv-panneau[data-etape="form"] .rdv-presentation,
  .rdv-panneau[data-etape="form"] .rdv-infos,
  .rdv-panneau[data-etape="form"] .rdv-sur { display: none; }
  .rdv-panneau[data-etape="form"] .rdv-qui { padding-bottom: 16px; }
  .rdv-panneau[data-etape="form"] .rdv-avatars { margin-bottom: 8px; }
  .rdv-panneau[data-etape="form"] .rdv-couverture { aspect-ratio: 16 / 7; margin-bottom: 14px; }
  .rdv-panneau[data-etape="form"] .rdv-qui h1 { font-size: 20px; margin-top: 0; }
}

/* ═══ Tablette ═══ */
@media (min-width: 640px) {
  .rdv { padding: 120px 24px 80px; }
  .rdv-qui, .rdv-cal-zone, .rdv-heures-zone, .rdv-form-zone { padding-left: 28px; padding-right: 28px; }
  .rdv-heures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rdv-grille { grid-template-columns: 1fr 1fr; }
  .rdv-large { grid-column: 1 / -1; }
  .rdv-agenda-l { grid-template-columns: repeat(3, auto); justify-content: start; }
  .rdv-agenda-l .btn { white-space: nowrap; width: auto; padding: 0 18px; }
  .rdv-fini { padding: 34px 36px 28px; }
  .rdv-envoi { width: auto; padding-left: 30px; padding-right: 30px; }
}

/* ═══ Bureau : le panneau à la Cal.com ═══ */
@media (min-width: 980px) {
  .rdv { padding-top: 136px; }
  .rdv-panneau { grid-template-columns: 330px minmax(0, 1fr); }
  .rdv-tete { flex-wrap: nowrap; }
  .rdv-tete h2, .rdv-tete .rdv-nav { flex: 0 1 auto; }
  .rdv-tete h2 { white-space: nowrap; }
  .rdv-tete .rdv-mois { white-space: nowrap; font-size: 13.5px; }
  .rdv-tete .rdv-mois { margin-right: 6px !important; font-size: 14px; }
  .rdv-qui { border-bottom: 0; border-right: 1px solid var(--r-trait); padding: 32px 28px; }
  .rdv-couverture { margin: -32px -28px 22px; border-radius: 27px 0 0 0; }
  .rdv-qui h1 { font-size: 26px; }
  .rdv-infos { flex-direction: column; gap: 12px; margin-top: 22px; }
  .rdv-choix { grid-template-columns: minmax(0, 1fr); }
  .rdv-choix.avec-heures { grid-template-columns: minmax(0, 1fr) 248px; }
  .rdv-cal-zone { padding: 32px 30px; }
  .rdv-tete h2 { font-size: 18px; }
  .rdv-cal, .rdv-cal-tete, .rdv-cal-rangee { gap: 8px; }
  .rdv-jour { font-size: 16px; border-radius: 14px; aspect-ratio: auto; height: 58px; }
  /* La colonne des heures prend la hauteur du calendrier, jamais plus : elle défile à l'intérieur (13/11). */
  .rdv-heures-zone { border-top: 0; border-left: 1px solid var(--r-trait); padding: 32px 22px; height: 0; min-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  .rdv-heures { grid-template-columns: 1fr; }
  .rdv-heure { min-height: 46px; }
  .rdv-aucun { grid-column: 1 / -1; }
  .rdv-form-zone { padding: 32px 36px; max-width: 700px; }
}
@media (prefers-reduced-motion: reduce) {
  .rdv-jour, .rdv-heure, .rdv-champ input, .rdv-champ textarea { transition: none; }
  .rdv-sq i, .rdv-sq b { animation: none; }
}
