/* Groupe D : espace client (connexion, ouverture, « Vos licences ») et page introuvable.
   S'ajoute à /vitrine.css sans le modifier ; chargée seulement sur ces pages ; classes neuves en d-. */

/* ---------- bandeau : lien de la page en cours ---------- */
.bandeau__liens a[aria-current] { box-shadow: inset 0 -2px 0 var(--yellow); }

/* ---------- seuil : connexion, ouverture, lien expiré ---------- */
.d-seuil { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: 0 64px; align-items: center; max-width: 1040px; margin: 24px auto 0; }
.d-seuil__signe { text-align: center; }
.d-seuil__etoile { width: 250px; height: 250px; margin: 0 auto 26px; }
.d-seuil__corps { border-left: 1px solid var(--line); padding: 8px 0 8px 56px; min-width: 0; }
.d-seuil__corps h1 { font-size: 40px; line-height: 1.15; margin: 8px 0 12px; }
.d-seuil__corps > form, .d-seuil__corps > .d-envoye { margin-top: 26px; }
.d-seuil__corps .bandeau-alerte { margin-top: 24px; }
.d-seuil__corps > .bandeau-alerte ~ form { margin-top: 20px; }
.d-seuil__corps form .btn { margin-top: 16px; min-width: 220px; }
.d-seuil__corps > .btn { margin-top: 26px; min-width: 220px; }
.d-seuil__corps .seul__pied { max-width: 56ch; }
.d-ouvrir form .btn { margin-top: 0; }

/* le trajet du lien : adresse → e-mail → espace ; une petite étoile marque où l'on en est */
.d-trajet { --pas: 1; position: relative; margin: 34px 0 0; padding: 22px 0 0; }
.d-trajet ol { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; }
.d-trajet::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-strong); }
.d-trajet::after { content: ""; position: absolute; left: 0; top: -1px; height: 3px; width: calc((var(--pas) - 1) * 33.333% + 6px); background: var(--yellow); border-radius: 2px; transition: width .5s ease; }
.d-trajet li { position: relative; padding-right: 14px; min-width: 0; }
.d-trajet li::before { content: ""; position: absolute; left: 0; top: -26px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.d-trajet li.d-fait::before { background: var(--yellow); box-shadow: none; }
.d-trajet__num { display: block; font: 500 12px/1.5 var(--mono); color: var(--muted); }
.d-trajet strong { display: block; font-size: 14px; font-weight: 600; margin-top: 2px; }
.d-trajet small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.d-trajet li[aria-current] .d-trajet__num { color: var(--yellow-ink); }
.d-trajet li:not([aria-current]):not(.d-fait) strong { color: var(--ink-2); font-weight: 500; }
.d-trajet__astre { position: absolute; top: -12px; left: calc((var(--pas) - 1) * 33.333% - 8px); width: 24px; height: 24px; overflow: visible; filter: var(--star-filter); transition: left .5s cubic-bezier(.3, 1.4, .5, 1); }
.d-trajet__astre path { fill: var(--star); }

/* lien expiré : le lien a fini ses 90 jours, la licence continue */
.d-durees { margin: 30px 0 0; display: grid; gap: 16px; }
.d-duree { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 14px; }
.d-duree__nom { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.d-duree__trait { position: relative; height: 22px; }
.d-duree__trait::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; border-radius: 2px; }
.d-duree--lien .d-duree__trait::before { right: 26%; background: var(--line-strong); }
.d-duree--lien .d-duree__trait::after { content: ""; position: absolute; right: 26%; top: 5px; width: 2px; height: 12px; background: var(--muted); }
.d-duree--lien small { position: absolute; right: 26%; top: -14px; transform: translateX(50%); font: 400 11.5px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.d-duree--licence .d-duree__trait::before { background: var(--yellow); right: 0; }
.d-duree--licence .d-duree__trait::after { content: ""; position: absolute; right: -2px; top: 6px; width: 10px; height: 10px; border-top: 2px solid var(--yellow); border-right: 2px solid var(--yellow); transform: rotate(45deg); }
.d-duree--licence small { position: absolute; left: 0; top: -14px; font: 400 11.5px/1 var(--mono); color: var(--yellow-ink); white-space: nowrap; }

/* ---------- espace client ---------- */
.d-phead h1 { max-width: 22ch; }
.d-phead .lead .sortie { margin-left: 4px; }
.d-retour { display: inline-block; margin-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

/* le trousseau : les licences, tenues par l'étoile */
.d-trousseau { position: relative; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px 56px; margin-top: 40px; padding: 36px 40px 36px 36px; border-radius: 16px; background: var(--night); color: var(--night-ink); box-shadow: var(--shadow); overflow: hidden;
  --t-line: rgba(250, 249, 245, .13); --t-muted: var(--night-muted); }
.d-trousseau::after { content: ""; position: absolute; left: -90px; bottom: -150px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, var(--night-halo) 0, rgba(232, 193, 88, 0) 64%); pointer-events: none; }
.d-trousseau__tete { position: relative; z-index: 1; }
.d-trousseau__tete h2 { font-size: 22px; line-height: 1.25; }
.d-trousseau__tete .rub__aide { color: var(--t-muted); }
.d-trousseau__etoile { width: 210px; height: 210px; margin: 26px 0 0 -14px; --objet: #faf9f5; --surface: #1d1c1a; }
@media (min-width: 861px) { .d-trousseau--vide .d-trousseau__etoile { width: 120px; height: 120px; margin: 18px 0 0 -6px; } }
.d-trousseau .eyebrow { color: var(--t-muted); }
.d-trousseau a { text-decoration-color: rgba(250, 249, 245, .35); }
.d-trousseau a:hover { text-decoration-color: currentColor; }
.d-trousseau .btn { background: transparent; color: var(--night-ink); border-color: rgba(250, 249, 245, .32); }
.d-trousseau .btn:hover { border-color: var(--night-ink); }
.d-trousseau .btn-lien { color: var(--night-ink); text-decoration-color: rgba(250, 249, 245, .35); }
.d-trousseau .pastille--ok { background: rgba(159, 207, 134, .16); color: #b5dea0; }
.d-trousseau .pastille--ko { background: rgba(255, 144, 120, .16); color: #ffab98; }
.d-trousseau :focus-visible { outline-color: var(--yellow); }
.d-vide { position: relative; z-index: 1; align-self: center; font: italic 400 19px/1.5 var(--serif); color: var(--night-ink); max-width: 36ch; }
.d-vide + .d-vide__lien { margin-top: 14px; }

.d-cles { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; min-width: 0; }
.d-cle { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px 36px; padding: 26px 0; border-top: 1px solid var(--t-line); }
.d-cle:first-child { border-top: 0; padding-top: 2px; }
.d-cle:last-child { padding-bottom: 4px; }
.d-cle time { display: block; font: 400 12px/1.7 var(--mono); color: var(--t-muted); }
.d-cle__site { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.d-cle__site .pastille { margin-left: 8px; vertical-align: 2px; }
.d-cle__meta { color: var(--t-muted); font-size: 13.5px; margin-top: 3px; }
.d-cle__cle { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 16px; }
.d-cle__cle code { font: 500 clamp(16px, 1.9vw, 21px)/1.35 var(--mono); letter-spacing: .02em; user-select: all; overflow-wrap: anywhere; color: var(--night-ink); }
.d-cle__cle .btn-lien { font-size: 13px; }
.d-cle__trait { height: 3px; width: min(100%, 380px); background: var(--yellow); border-radius: 2px; margin: 12px 0 12px; transform-origin: left; }
.d-cle--ko .d-cle__trait { background: rgba(250, 249, 245, .22); }
.d-cle--ko .d-cle__cle code { color: var(--t-muted); text-decoration: line-through; text-decoration-color: rgba(250, 249, 245, .35); }
.d-cle__etat { font-size: 14px; }
.d-cle__etat--active::before { content: "✓ "; color: var(--yellow); }
.d-cle__etat--attente { color: var(--t-muted); }

/* le thème de la licence */
.d-theme { min-width: 0; }
.d-theme img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: 10px; border: 1px solid var(--t-line, var(--line)); background: var(--surface-2); }
.d-theme .eyebrow { margin-top: 12px; }
.d-theme__nom { font: 700 19px/1.3 var(--serif); margin-top: 2px; }
.d-theme .styles { margin-top: 8px; }
.d-theme__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.d-theme__actions .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.d-theme__liens { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; font-weight: 600; }
.d-theme__note { margin-top: 12px; font-size: 13px; color: var(--t-muted, var(--muted)); }

/* style choisi : il garde sa couleur et son nom en clair, les autres se taisent */
.d-style { opacity: .5; }
.d-style small { color: inherit; }
.d-style--choisi { opacity: 1; }
.d-style--choisi small { font-weight: 600; color: inherit; text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.d-trousseau .style i { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
/* licence sans thème réservé : la clé seule */
.d-cle--seule { grid-template-columns: minmax(0, 1fr); }
/* « Copier la clé » n'existe qu'avec JS */
[data-copier][hidden] { display: none; }
.d-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* réservations : la vignette rappelle le thème */
.d-resa { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.d-resa img { width: 88px; flex: none; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); }
.d-resa > div { min-width: 0; }
.d-resa .eyebrow { margin-bottom: 2px; }
.d-resa--expiree img { filter: grayscale(1); opacity: .6; }
.d-resas .registre__meta strong { font-weight: 600; color: var(--ink-2); }
.d-resas .lien-action { white-space: nowrap; }
.d-resas .styles { margin-top: 6px; }
.d-autre { display: inline-block; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.d-autre a { font-weight: 600; color: var(--ink-2); }

/* entrée retenue */
@media (prefers-reduced-motion: no-preference) {
  .d-entre { animation: d-entre .5s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .d-cle__trait { animation: d-trait .7s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i, 0) * 90ms + .25s); }
}
@keyframes d-entre { from { opacity: 0; transform: translateY(8px); } }
@keyframes d-trait { from { transform: scaleX(0); } }

/* ---------- sombre ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .d-trousseau { border: 1px solid var(--line); }
}
:root[data-theme="dark"] .d-trousseau { border: 1px solid var(--line); }

/* ---------- largeurs ---------- */
@media (max-width: 1080px) {
  .d-cle { grid-template-columns: minmax(0, 1fr); }
  .d-theme { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .d-theme img { grid-row: span 4; }
  .d-theme .eyebrow { margin-top: 0; }
}
@media (max-width: 860px) {
  .d-seuil { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .d-seuil__signe { display: flex; align-items: center; gap: 14px; text-align: left; margin-bottom: 18px; }
  .d-seuil__etoile { width: 96px; height: 96px; margin: 0; }
  .d-seuil__corps { border-left: 0; padding: 0; }
  .d-trousseau { grid-template-columns: minmax(0, 1fr); padding: 28px 24px; }
  .d-trousseau__tete { padding-right: 120px; min-height: 96px; }
  .d-trousseau__etoile { position: absolute; right: -14px; top: -10px; width: 112px; height: 112px; margin: 0; }
}
@media (max-width: 560px) {
  .bandeau { gap: 12px; }
  .bandeau__liens { gap: 14px; }
  .bandeau__liens a { font-size: 13.5px; }
  .marque__nom { font-size: 16px; }
  .d-seuil__corps h1 { font-size: 30px; }
  .d-seuil__corps form .btn, .d-seuil__corps > .btn { width: 100%; }
  .d-trajet { padding: 0 0 0 30px; margin-top: 30px; }
  .d-trajet ol { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .d-trajet::before { left: 4px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .d-trajet::after { left: 3px; top: 6px; width: 3px; height: calc((var(--pas) - 1) * 33.333% + 4px); transition-property: height; }
  .d-trajet li::before { left: -30px; top: 5px; }
  .d-trajet__astre { left: -8px; top: calc((var(--pas) - 1) * 33.333% - 4px); transition-property: top; }
  .d-duree { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .d-trousseau { padding: 24px 18px; margin-inline: -4px; }
  .d-trousseau__tete { padding-right: 96px; }
  .d-trousseau__etoile { width: 96px; height: 96px; right: -8px; }
  .d-theme { grid-template-columns: minmax(0, 1fr); }
  .d-theme img { grid-row: auto; max-width: 260px; }
  .d-theme .eyebrow { margin-top: 12px; }
  .d-resa img { width: 64px; }
  .d-cle__cle code { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .d-trajet::after, .d-trajet__astre { transition: none; }
}
