/* =====================================================================
   Interface d'administration — habillage
   Même système que la page d'accueil Holypixx (DESIGN.md) : papier blanc,
   encre, un seul outremer pour agir, Geist, filets d'un pixel. Mise en
   page dense pour l'usage quotidien (tableau de bord, tableaux, formulaires).
   ===================================================================== */

:root {
  --accent:      #3b3bf6;
  --accent-deep: #2626d4;
  --accent-soft: #ededff;
  --paper:  #ffffff;
  --mist:   #f6f6f9;
  --mist-2: #eeeef4;
  --ink:    #0b0b10;
  --ink-2:  #2f2f3a;
  --muted:  #62626f;
  --ink-soft: #8a8a98;
  --line:   #e6e6ee;
  --line-2: #d6d6e2;
  --night:  #0a0a12;
  --night-2: #13131e;
  --night-line: #2a2a3d;
  --night-text: #ecebf5;
  --night-muted: #a3a3ba;
  /* Statuts du produit : la teinte pleine pour les pastilles, une encre
     plus sombre pour le texte (contraste AA sur fond clair), un voile. */
  --ok: #16a34a;    --ok-ink: #15803d;    --ok-bg: #eaf7ef;    --ok-line: #c3e8d0;
  --warn: #e5a50a;  --warn-ink: #8a5a00;  --warn-bg: #fdf6e3;  --warn-line: #f1dda4;
  --alert: #e5484d; --alert-ink: #c4282d; --alert-bg: #fdeeee; --alert-line: #f6caca;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ring: 0 0 0 3px rgba(59, 59, 246, .16);
  --shadow-float: 0 18px 40px -16px rgba(20, 20, 60, .35), 0 4px 10px -4px rgba(20, 20, 60, .12), 0 0 0 1px rgba(20, 20, 60, .06);
  --shadow-btn: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 1px 2px rgba(11, 11, 16, .16), 0 6px 14px -10px rgba(11, 11, 16, .45);

  /* Anciens noms, gardés pour que chaque règle suive le nouveau système. */
  --cream: var(--mist);
  --ivory: var(--mist);
  --sand: var(--mist-2);
  --rose: var(--accent);
  --rose-deep: var(--accent-deep);
  --charcoal: var(--ink-2);
  --danger: var(--alert-ink);
  --danger-bg: var(--alert-bg);
  --success: var(--ok-ink);
  --serif: var(--sans);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: .9375rem;
  font-weight: 400;
  font-feature-settings: "ss01", "cv11";
  color: var(--ink-2);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--accent-soft); color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent-deep); text-underline-offset: 2px; }
code, kbd { font-family: var(--mono); font-size: .9em; }
button, input, select, textarea { font-family: inherit; }

/* Échelle fixe et serrée (×1,2) : titre de page, titre de bloc, sous-titre. */
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 600; color: var(--ink); letter-spacing: -0.015em; line-height: 1.25; }
h2 { font-size: 1.5rem; letter-spacing: -0.025em; }
h3 { font-size: 1.06rem; margin-bottom: .9rem; }
h4 { font-size: .94rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not([type="file"]),
select, textarea {
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--accent) !important; box-shadow: var(--ring);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* Tableau de bord : menu vertical à gauche, contenu à droite. */
.ad-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}
#ad-view {
  width: 100%;
  max-width: 1120px;
  padding: 2rem 2.5rem 5rem;
  min-width: 0;
}

/* ---------- Connexion ---------- */

.ad-login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: var(--mist);
}
.ad-login-card {
  width: min(400px, 100%);
  background: var(--paper);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 40px 80px -32px rgba(20, 20, 60, .28), 0 12px 28px -12px rgba(20, 20, 60, .14), 0 0 0 1px rgba(20, 20, 60, .08);
}
.ad-login-card .ad-brand { margin-bottom: 1.5rem; }
.ad-login-card h1 { display: none; } /* le bloc de marque fait déjà office de titre */
.ad-login-card .ad-btn-primary { width: 100%; min-height: 44px; }
.ad-login-card .ad-hint { margin-top: 1.1rem; text-align: center; }
.ad-login-card .ad-hint code { font-family: var(--mono); }

/* ---------- Menu latéral ---------- */

.ad-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem .85rem 1rem;
  background: var(--mist);
  border-right: 1px solid var(--line);
}
.ad-sidebar .ad-brand { padding: .15rem .45rem; }
.ad-sidebar .ad-brand-sub {
  max-width: 172px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-tabs { display: flex; flex-direction: column; gap: 2px; }
.ad-nav-group {
  margin: 1rem .55rem .3rem;
  font-size: .76rem;
  font-weight: 500;
  color: var(--muted);
}
.ad-nav-group:first-child { margin-top: 0; }

/* Chaque entrée : icône, nom, et ce qu'on y trouve. L'entrée active se
   pose en papier sur la brume du menu, son icône passe à l'outremer. */
.ad-tab {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: .4rem .5rem;
  cursor: pointer;
  transition: background-color .15s var(--ease), box-shadow .15s var(--ease);
}
.ad-tab:hover { background: var(--mist-2); }
.ad-tab:active { background: var(--line); }
.ad-tab-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: var(--muted);
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.ad-tab-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ad-tab-label { font-size: .9rem; font-weight: 500; color: var(--ink); }
.ad-tab-hint { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-tab-active, .ad-tab-active:hover {
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(20, 20, 60, .06);
}
.ad-tab-active .ad-tab-icon { background: var(--accent-soft); color: var(--accent); }

.ad-sidebar-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: .85rem;
  border-top: 1px solid var(--line-2);
}
.ad-side-action {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  font-family: var(--sans);
  font-size: .86rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: .5rem .6rem;
  cursor: pointer;
  text-align: left;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.ad-side-action:hover { background: var(--mist-2); color: var(--ink); }
.ad-side-action-icon { display: grid; place-items: center; width: 2rem; }

/* Tablette et téléphone : le menu passe en haut, en grille de cases. */
@media (max-width: 860px) {
  .ad-shell { display: block; }
  .ad-sidebar {
    position: static;
    height: auto;
    gap: 1rem;
    padding: 1rem 1rem 1.1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .ad-sidebar .ad-brand-sub { max-width: none; }
  .ad-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
  .ad-nav-group { display: none; }
  .ad-tab { flex-direction: column; gap: .2rem; padding: .5rem .25rem; text-align: center; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
  .ad-tab:hover { background: var(--paper); box-shadow: 0 0 0 1px var(--line-2); }
  .ad-tab-active, .ad-tab-active:hover { background: var(--accent-soft); box-shadow: 0 0 0 1px rgba(59, 59, 246, .28); }
  .ad-tab-active .ad-tab-icon { background: transparent; }
  .ad-tab-active .ad-tab-label { color: var(--accent-deep); }
  .ad-tab-text { align-items: center; }
  .ad-tab-label { font-size: .78rem; }
  .ad-tab-hint { display: none; }
  .ad-sidebar-actions { flex-direction: row; justify-content: space-between; margin-top: 0; padding-top: .6rem; }
  .ad-side-action { width: auto; }
  #ad-view { padding: 1.5rem 1.25rem 5rem; }
}
@media (max-width: 420px) {
  .ad-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; }
  .ad-tab-icon { width: 1.75rem; height: 1.75rem; }
  .ad-tab-label { font-size: .7rem; }
}

.ad-btn-icon { padding: 0; width: 38px; font-size: 1rem; line-height: 1; }
.ad-brand { display: flex; align-items: center; gap: .65rem; }
.ad-brand-mark {
  flex: none;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600; font-size: .95rem;
}
.ad-brand-mark svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.ad-brand-name { font-weight: 600; font-size: 1.02rem; letter-spacing: -0.02em; color: var(--ink); line-height: 1.25; }
.ad-brand-sub { font-size: .78rem; color: var(--muted); line-height: 1.35; }

/* ---------- Boutons ---------- */

/* Un seul vocabulaire de commande : contour (par défaut), outremer pour
   l'action principale de l'écran, rouge doux pour ce qui supprime. */
.ad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 38px;
  font-family: var(--sans);
  font-size: .86rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: .45rem .9rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .1s var(--ease);
}
.ad-btn:hover { background: var(--mist); border-color: #c4c4d3; }
.ad-btn:active { transform: scale(.985); }
.ad-btn:disabled, .ad-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.ad-btn:disabled:hover { background: var(--paper); border-color: var(--line-2); }
.ad-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--shadow-btn); }
.ad-btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.ad-btn-primary:disabled:hover { background: var(--accent); border-color: var(--accent); }
.ad-btn-danger { background: var(--paper); border-color: var(--alert-line); color: var(--alert-ink); }
.ad-btn-danger:hover { background: var(--alert-bg); border-color: var(--alert); }

/* ---------- Liste des galeries ---------- */

.ad-loading, .ad-hint { color: var(--muted); font-size: .88rem; }
.ad-empty { text-align: center; padding: 4rem 1rem; }
.ad-empty h2 { margin-bottom: .6rem; }

.ad-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.ad-stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .95rem 1.1rem;
}
.ad-stat-value { font-weight: 600; font-size: 1.5rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.15; }
.ad-stat-label { font-size: .82rem; font-weight: 500; color: var(--ink-2); margin-top: .3rem; }
.ad-stat-sub { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.ad-stat-success { border-color: var(--ok-line); background: var(--ok-bg); }
.ad-stat-success .ad-stat-value { color: var(--success); }
.ad-stat-warn { border-color: var(--warn-line); background: var(--warn-bg); }
.ad-stat-warn .ad-stat-value { color: var(--warn-ink); }
.ad-stat-warn .ad-stat-sub { color: var(--warn-ink); }

.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .9rem;
}
.ad-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.2rem;
  cursor: pointer;
  transition: border-color .15s var(--ease), box-shadow .2s var(--ease);
}
.ad-card:hover { border-color: var(--line-2); box-shadow: 0 1px 2px rgba(20, 20, 60, .05), 0 10px 24px -16px rgba(20, 20, 60, .3); }
.ad-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ad-card h3 { font-size: 1.02rem; margin-bottom: .15rem; }
.ad-card-sub { font-size: .84rem; color: var(--muted); margin-bottom: .8rem; }
.ad-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; justify-content: space-between; font-size: .8rem; color: var(--muted); }

.ad-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
  padding: .15rem .6rem;
  border-radius: 999px;
  background: var(--mist-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.ad-badge-soon { background: var(--warn-bg); color: var(--warn-ink); }
.ad-badge-expired { background: var(--alert-bg); color: var(--alert-ink); }
.ad-badge-selected { background: var(--accent-soft); color: var(--accent-deep); }
.ad-badge-comment { background: var(--mist-2); color: var(--ink-2); }
.ad-badge-due { background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; }

/* ---------- Vue détail ---------- */

.ad-back {
  background: none; border: 0; color: var(--muted);
  font-family: var(--sans); font-size: .86rem; font-weight: 500; cursor: pointer;
  margin: .25rem 0 1rem; padding: .25rem 0; border-radius: 6px;
  transition: color .15s var(--ease);
}
.ad-back:hover { color: var(--ink); }

.ad-link-btn {
  background: none; border: 0; padding: 0; margin-left: .3rem;
  font-family: inherit; font-size: inherit;
  color: var(--accent-deep);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(38, 38, 212, .35);
  text-underline-offset: 2px;
  cursor: pointer;
}
.ad-link-btn:hover { color: var(--accent); text-decoration-color: currentColor; }

.ad-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.ad-detail-header > div:first-child { flex: 1 1 360px; min-width: 0; }

.ad-section-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.ad-section-header h3 { margin-bottom: 0; }

.ad-share, main section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
}
main section > p, .ad-share > p { max-width: 75ch; }

.ad-copy-row { display: flex; gap: .5rem; }
.ad-copy-row input {
  flex: 1;
  font-family: var(--mono);
  font-size: .86rem;
  padding: .5rem .7rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--mist);
  color: var(--ink);
}
.ad-copy-row .ad-btn { flex-shrink: 0; }

/* ---------- Arrière-plan de connexion ---------- */

.ad-bg-swatches { display: flex; flex-wrap: wrap; gap: .6rem; margin: .9rem 0; }
.ad-bg-swatch {
  position: relative;
  width: 4.5rem; height: 3rem;
  border-radius: 8px;
  border: 2px solid var(--line);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.ad-bg-swatch:hover { border-color: var(--line-2); }
.ad-bg-swatch-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(59, 59, 246, .2); }
.ad-bg-swatch-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: .62rem; text-align: center; padding: .15rem 0;
  background: rgba(255, 255, 255, .78); color: var(--charcoal);
}
.ad-bg-custom { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.ad-bg-color-label { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--muted); }
.ad-bg-color-label input[type="color"] { width: 2.2rem; height: 2.2rem; border: 1px solid var(--line); border-radius: 6px; padding: 2px; cursor: pointer; }
.ad-bg-preview { display: block; width: 100%; max-width: 320px; border-radius: 8px; border: 1px solid var(--line); }

.ad-music-state { font-size: .88rem; color: var(--charcoal); margin: .8rem 0; }
.ad-music-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 .9rem; padding: 3px; background: var(--mist-2); border-radius: 10px; width: fit-content; max-width: 100%; }
.ad-music-tab {
  font-family: var(--sans); font-size: .85rem; font-weight: 500; padding: .4rem .9rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease);
}
.ad-music-tab:hover { color: var(--ink); }
.ad-music-tab-active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 20, 60, .1), 0 0 0 1px rgba(20, 20, 60, .04); }
.ad-music-link { display: flex; gap: .6rem; flex-wrap: wrap; }
.ad-music-link input {
  flex: 1 1 280px; min-width: 0; font-family: var(--sans); font-size: .92rem; padding: .6rem .8rem;
  border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink);
}
.ad-music-link input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(59, 59, 246, .16); }
.ad-music-moods { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.ad-chip {
  font-family: var(--sans); font-size: .82rem; font-weight: 500; min-height: 32px; padding: .3rem .8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2);
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.ad-chip:hover { background: var(--mist); }
.ad-chip-active, .ad-chip-active:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.ad-track-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; max-height: 360px; overflow-y: auto; }
.ad-track { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.ad-track:last-child { border-bottom: 0; }
.ad-track[hidden] { display: none; }
.ad-track-current { background: var(--accent-soft); }
.ad-track-play {
  width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--line-2); background: var(--paper); color: var(--accent);
  font-size: .75rem; cursor: pointer; display: grid; place-items: center; transition: background .2s var(--ease), color .2s var(--ease);
}
.ad-track-play:hover, .ad-track-play[aria-pressed="true"] { background: var(--rose); color: #fff; }
.ad-track-info { display: grid; gap: .1rem; min-width: 0; }
.ad-track-info strong { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-track-info span { font-size: .8rem; color: var(--muted); }
.ad-track-credit { font-style: italic; }
.ad-music-upload { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 .9rem; align-items: end; margin-bottom: 1rem; }
.ad-music-upload .ad-field-wide { grid-column: 1 / -1; }
.ad-music-upload select { width: 100%; font-family: var(--sans); font-size: .92rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ad-music-upload button { justify-self: start; margin-bottom: 1rem; }
.ad-track-list + p, .ad-music > p:last-child { margin-top: .9rem; }

/* ---------- Mise en page de la galerie ---------- */

.ad-layout-options { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .9rem; }
.ad-layout-option {
  flex: 1 1 180px;
  max-width: 260px;
  text-align: left;
  font: inherit;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: .8rem .95rem;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.ad-layout-option:hover { border-color: var(--line-2); }
.ad-layout-option-active, .ad-layout-option-active:hover { border-color: var(--accent); background: #fafaff; box-shadow: 0 0 0 2px rgba(59, 59, 246, .14); cursor: default; }
.ad-layout-name { display: block; font-weight: 600; color: var(--ink); margin-bottom: .3rem; }
.ad-layout-hint { display: block; font-size: .8rem; color: var(--muted); line-height: 1.4; }

/* ---------- Forfait et suppléments ---------- */

.ad-quota .ad-field-row { align-items: end; margin-bottom: .9rem; }
#ad-quota-summary { margin-top: .3rem; }
.ad-quota-count { font-size: .88rem; color: var(--muted); }
.ad-quota-due {
  margin-top: .4rem;
  font-size: .92rem;
  color: var(--warn-ink);
  background: var(--warn-bg);
  border-radius: 8px;
  padding: .6rem .8rem;
  display: inline-block;
}
.ad-quota-paid {
  margin-top: .4rem;
  font-size: .88rem;
  color: var(--ok-ink);
  background: var(--ok-bg);
  border-radius: 8px;
  padding: .5rem .8rem;
  display: inline-block;
}
.ad-payments-heading { margin-top: 1.3rem; margin-bottom: .6rem; }

/* ---------- Facturation (Stripe Connect + coordonnées) ---------- */

.ad-stripe-badge {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  margin-bottom: .6rem;
}
.ad-stripe-badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.ad-stripe-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: .8rem; }
.ad-billing-profile { margin-top: 1.5rem; }

/* ---------- Dépôt de fichiers ---------- */

.ad-dropzone {
  text-align: center;
  border: 1px dashed var(--line-2);
  background: var(--mist);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.ad-dropzone-active { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
.ad-dropzone p { margin-bottom: .8rem; color: var(--muted); font-size: .9rem; }
.ad-dropzone p strong { color: var(--ink); }

/* ---------- Vérification d'une photo (empreinte invisible) ---------- */

.ad-detect-result { margin-top: 1.5rem; }
.ad-detect-result h3 { margin: .3rem 0 .2rem; }
.ad-detect-badge {
  display: inline-block; font-size: .78rem; font-weight: 600;
  padding: .3rem .7rem; border-radius: 999px;
  background: var(--sand); color: var(--muted);
}
.ad-detect-badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.ad-detect-match { border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.4rem; background: #fff; }

.ad-upload-queue { margin-top: 1rem; text-align: left; }
.ad-upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 80px;
  align-items: center;
  gap: .75rem;
  padding: .4rem 0;
  font-size: .82rem;
}
.ad-upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-upload-bar { height: 6px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.ad-upload-fill { height: 100%; width: 0; background: var(--rose); transition: width .2s var(--ease); }
.ad-upload-state { text-align: right; color: var(--muted); }
.ad-upload-done .ad-upload-fill { background: var(--success); }
.ad-upload-done .ad-upload-state { color: var(--success); }
.ad-upload-failed .ad-upload-fill { background: var(--danger); }
.ad-upload-failed .ad-upload-state { color: var(--danger); cursor: help; }

/* ---------- Vignettes ---------- */

.ad-photos-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ad-photos-filter {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .84rem;
  color: var(--charcoal);
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.ad-photos-filter input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--rose);
  cursor: pointer;
}

.ad-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .6rem;
}
.ad-photos-filtered .ad-photo:not(.ad-photo-selected) { display: none; }
.ad-photo { position: relative; }
.ad-photo-frame {
  position: relative;
  background: var(--sand);
  border-radius: 8px;
  display: grid;
  overflow: hidden;
}
.ad-photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.ad-photo-dims {
  position: absolute; left: .35rem; bottom: .35rem;
  font-family: var(--mono); font-size: .66rem; font-variant-numeric: tabular-nums; color: var(--ink-2);
  background: rgba(255, 255, 255, .9);
  padding: .1rem .35rem; border-radius: 4px;
}
.ad-photo-remove {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--alert-ink);
  box-shadow: 0 2px 6px -2px rgba(20, 20, 60, .3);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s var(--ease);
}
.ad-photo:hover .ad-photo-remove, .ad-photo-remove:focus-visible { opacity: 1; }

.ad-photo-selected .ad-photo-frame { outline: 2px solid var(--rose); outline-offset: -2px; }
.ad-photo-heart {
  position: absolute; top: .35rem; right: .35rem;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--alert);
  font-size: .8rem;
  line-height: 1;
}
.ad-photo-comment {
  position: absolute; top: .35rem; left: .35rem;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: #fff;
  font-size: .7rem;
  line-height: 1;
  cursor: help;
}

/* Codes couleur et repères annotés par le client */
.ad-photo-tag {
  position: absolute; top: .35rem; left: 1.75rem;
  width: 20px; height: 20px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.ad-photo-tag-green { background: var(--ok); }
.ad-photo-tag-yellow { background: var(--warn); }
.ad-photo-tag-red { background: var(--alert); }
.ad-photo-marks {
  position: absolute; right: .35rem; bottom: .35rem;
  height: 20px; padding: 0 .4rem;
  display: flex; align-items: center; gap: .15rem;
  border-radius: 999px;
  background: #fff;
  font-size: .68rem;
  line-height: 1;
}
.ad-photo-frame { cursor: zoom-in; }
.ad-tag-legend {
  display: flex; flex-wrap: wrap; gap: .4rem 1rem;
  margin: .4rem 0 .9rem;
  font-size: .84rem; color: var(--muted);
}
.ad-tag-legend span::before {
  content: ""; display: inline-block; width: 10px; height: 10px;
  border-radius: 999px; margin-right: .4rem; vertical-align: middle;
  background: var(--legend);
}
.ad-tag-legend-green { --legend: var(--ok); }
.ad-tag-legend-yellow { --legend: var(--warn); }
.ad-tag-legend-red { --legend: var(--alert); }

.ad-photo-large {
  position: relative;
  display: grid;
  width: 100%;
  max-height: 65vh;
  margin: 0 auto .9rem;
  background: var(--sand);
  border-radius: 8px;
  overflow: hidden;
}
.ad-photo-large img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.ad-photo-large-pins { position: absolute; inset: 0; pointer-events: none; }
.ad-pin {
  position: absolute;
  transform: translate(-50%, -100%) rotate(-45deg);
  width: 26px; height: 26px;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--rose-deep);
  color: #fff;
  font-size: .75rem; font-weight: 600;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6);
}
.ad-pin > span { transform: rotate(45deg); }
.ad-badge-tag-green { background: var(--ok); color: #fff; }
.ad-badge-tag-yellow { background: var(--warn); color: var(--ink); }
.ad-badge-tag-red { background: var(--alert); color: #fff; }
.ad-photo-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-bottom: .7rem; font-size: .9rem; }
.ad-photo-notes { margin: 0; padding-left: 1.3rem; }
.ad-photo-notes li { margin-bottom: .35rem; }
.ad-photo-notes em { font-style: normal; color: var(--muted); }

/* ---------- Journal ---------- */

.ad-table-wrap { overflow-x: auto; }
.ad-table { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }

.ad-owner-steps { margin: .9rem 0; padding-left: 1.3rem; }
.ad-owner-steps li { margin-bottom: .5rem; font-size: .88rem; color: var(--charcoal); }
.ad-table th { text-align: left; color: var(--muted); font-size: .8rem; font-weight: 500; padding: .45rem .6rem; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.ad-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.ad-table tbody tr { transition: background-color .15s var(--ease); }
.ad-table tbody tr:hover > td { background: #fafafc; }
.ad-table tr:last-child td { border-bottom: 0; }
.ad-log-warn td:nth-child(2) { color: var(--danger); }

.ad-danger { border-color: var(--alert-line); }

/* ---------- Modales ---------- */

.ad-modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 10, 18, .45);
  display: grid; place-items: center;
  padding: 1.25rem;
  animation: ad-fade .18s var(--ease);
}
.ad-modal {
  width: min(480px, 100%);
  background: var(--paper);
  border-radius: 16px;
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: 0 40px 80px -32px rgba(20, 20, 60, .45), 0 12px 28px -12px rgba(20, 20, 60, .2), 0 0 0 1px rgba(20, 20, 60, .08);
  animation: ad-rise .22s var(--ease);
  max-height: 90vh;
  overflow-y: auto;
}
.ad-modal-narrow { width: min(400px, 100%); }
.ad-modal-wide { width: min(960px, 100%); }
.ad-modal h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.ad-lede { color: var(--muted); font-size: .94rem; margin-bottom: 1.2rem; max-width: 70ch; }
@keyframes ad-fade { from { opacity: 0; } }
@keyframes ad-rise { from { opacity: 0; transform: translateY(6px) scale(.99); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
}

.ad-field { display: block; margin-bottom: 1rem; }
.ad-field span { display: block; font-size: .84rem; font-weight: 500; color: var(--ink-2); margin-bottom: .35rem; }
.ad-field em { font-style: normal; font-weight: 400; color: var(--muted); }
.ad-field input, .ad-field textarea, .ad-field select {
  width: 100%;
  font-family: var(--sans);
  font-size: .94rem;
  padding: .55rem .75rem;
  min-height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
::placeholder { color: #71717e; opacity: 1; }
.ad-field input:hover, .ad-field textarea:hover, .ad-field select:hover { border-color: #c4c4d3; }
.ad-field input:disabled, .ad-field textarea:disabled { background: var(--mist); color: var(--muted); }
.ad-field textarea { resize: vertical; }
.ad-field input:focus, .ad-field textarea:focus, .ad-field select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.ad-field input[aria-invalid="true"], .ad-field input:user-invalid { border-color: var(--alert); }
.ad-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }

.ad-error {
  background: var(--alert-bg); color: var(--alert-ink);
  box-shadow: inset 0 0 0 1px var(--alert-line);
  border-radius: 10px; padding: .55rem .75rem; font-size: .86rem; margin-bottom: 1rem;
}
.ad-modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .4rem; }

.ad-error-panel { background: var(--paper); border: 1px solid var(--alert-line); border-radius: var(--radius); padding: 1.5rem; margin-top: 1rem; }
.ad-error-panel h2 { font-size: 1.06rem; margin-bottom: .5rem; }
.ad-error-panel p { color: var(--danger); font-size: .88rem; }

/* ---------- Notification ---------- */

.ad-toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(0);
  background: var(--ink); color: #fff;
  padding: .75rem 1.1rem; border-radius: 12px;
  font-size: .88rem; font-weight: 500;
  max-width: min(520px, calc(100% - 32px));
  box-shadow: var(--shadow-float);
  z-index: 80;
  opacity: 0;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.ad-toast-visible { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.ad-toast-error { background: var(--alert-ink); }

@media (max-width: 560px) {
  .ad-field-row { grid-template-columns: 1fr; }
  .ad-upload-item { grid-template-columns: minmax(0, 1fr) 70px; }
  .ad-upload-bar { grid-column: span 2; }
}

/* ---------- Relances et sélection validée ---------- */

.ad-badge-validated { background: var(--ok-bg); color: var(--ok-ink); }
.ad-validated { color: var(--success); font-size: .9rem; margin-top: .3rem; }
.ad-toggle { display: inline-flex; align-items: center; gap: .6rem; font-size: .92rem; cursor: pointer; }
.ad-toggle input { width: 1.1rem; height: 1.1rem; accent-color: var(--rose); }

/* ---------- Adresse du studio (sous-domaine) ---------- */

.ad-subdomain-row { display: flex; align-items: center; gap: .4rem; }
.ad-subdomain-row input { flex: 1; min-width: 0; }
.ad-subdomain-suffix { color: var(--muted); font-size: .92rem; white-space: nowrap; }

/* ---------- Boutique de tirages ---------- */

.ad-shop-steps { list-style: none; margin: .4rem 0; padding: 0; }
.ad-shop-steps li { margin-bottom: .4rem; font-size: .9rem; }
.ad-step-ok { color: var(--success); }
.ad-step-todo { color: var(--muted); }
.ad-shop-quote-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .6rem 0 .9rem; font-size: .9rem; }
.ad-shop-products .ad-input {
  width: 100%; min-width: 6rem;
  font-family: var(--sans); font-size: .85rem;
  padding: .35rem .5rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink);
}
.ad-input-mono { font-family: var(--mono) !important; font-size: .78rem !important; }
.ad-input-price { max-width: 6rem; }
.ad-row-actions { white-space: nowrap; }
.ad-btn-small { padding: .3rem .7rem; font-size: .78rem; }
.ad-quote-cell { font-size: .82rem; min-width: 9rem; }
.ad-margin-ok { color: var(--success); }
.ad-order-error { color: var(--danger); font-size: .8rem; }
.ad-gallery-shop h4 { margin: 1.1rem 0 .5rem; font-size: .95rem; }

/* Ajout de produit en menus déroulants */
.ad-picker { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; background: var(--mist); }
.ad-picker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .2rem .9rem; }
.ad-picker select, .ad-picker input { width: 100%; }
.ad-picker select {
  font-family: var(--sans); font-size: .92rem; padding: .55rem .6rem;
  min-height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.ad-pick-cost { margin: .2rem 0 .8rem; font-size: .92rem; color: var(--charcoal); }
.ad-picker-price { display: flex; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; }
.ad-picker-price .ad-field { margin-bottom: 0; max-width: 11rem; }
.ad-pick-total { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); padding-bottom: .45rem; }
.ad-pick-total strong { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.ad-cat-row th { background: var(--mist); color: var(--ink); font-size: .82rem; font-weight: 600; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.ad-advanced { margin-top: 1.1rem; font-size: .9rem; }
.ad-advanced summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.ad-advanced summary:hover { color: var(--ink); }
.ad-advanced-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .2rem .9rem; align-items: end; margin-top: .6rem; }

/* ---------- Livraison des photos définitives ---------- */
.ad-delivery-status { font-size: .88rem; margin: .6rem 0 .9rem; }
.ad-delivery-list { list-style: none; margin: 0 0 1rem; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; max-height: 280px; overflow-y: auto; }
.ad-delivery-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .8rem; padding: .45rem .8rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
.ad-delivery-list li:last-child { border-bottom: 0; }
.ad-delivery-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-delivery-remove { border: 0; background: transparent; color: var(--danger); font-size: 1.1rem; cursor: pointer; }
.ad-check { display: flex; align-items: center; gap: .5rem; font-size: .88rem; margin: 0 0 .8rem; }

/* ---------- Conditions à l'inscription, « Mes données » ---------- */
.ad-terms { display: flex; gap: .55rem; align-items: flex-start; font-size: .85rem; color: var(--charcoal); margin: 0 0 1rem; line-height: 1.5; }
.ad-terms input { margin-top: .2rem; flex: none; }
.ad-terms a { color: var(--rose-deep); }
.ad-danger-zone { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.ad-danger-zone summary { cursor: pointer; color: var(--danger); font-size: .9rem; }
.ad-danger-zone form { margin-top: .8rem; max-width: 420px; }

/* ---------- Abonnement ---------- */
.ad-plan-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; }
.ad-plan-summary p { margin: 0; }
.ad-plan-name { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.ad-plan-usage { font-size: 1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.ad-plan-summary .ad-btn { margin-left: auto; }
.ad-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.ad-plan { display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.ad-plan h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.02em; }
.ad-plan-price { margin: 0; font-size: 1.45rem; color: var(--ink); font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ad-plan-featured { border-color: rgba(59, 59, 246, .45); box-shadow: 0 0 0 1px rgba(59, 59, 246, .45), 0 30px 60px -36px rgba(20, 20, 60, .45); }
.ad-plan-current { background: var(--mist); }
.ad-plan-features { list-style: none; margin: .4rem 0 .7rem; padding: .8rem 0 0; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-2); display: grid; gap: .35rem; }
.ad-plan .ad-btn, .ad-plan .ad-badge { margin-top: auto; align-self: flex-start; }
.ad-banner { padding: .75rem 1rem; border-radius: var(--radius); background: var(--ok-bg); color: var(--ok-ink); box-shadow: inset 0 0 0 1px var(--ok-line); margin: 0 0 1rem; }
.ad-banner-muted { background: var(--mist); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Promotion sur les tirages ---------- */
.ad-promo { margin: 1rem 0 1.4rem; padding: 1rem 1.1rem; border: 1px solid rgba(59, 59, 246, .3); border-radius: var(--radius); background: var(--accent-soft); }
.ad-promo h4 { margin: 0 0 .5rem; }
.ad-promo-on { margin: 0 0 .7rem; font-size: .95rem; }
.ad-promo-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ad-promo-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .2rem 1rem; }
.ad-promo-form .ad-field { margin-bottom: .6rem; }
.ad-promo-form select, .ad-promo-form input { font-family: var(--sans); font-size: .92rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ad-promo-form .ad-btn { margin-bottom: .6rem; }

/* ---------- Ventes ---------- */

/* Sélecteur segmenté : rail brume, option active en papier (comme le
   sélecteur mensuel / annuel de la page d'accueil, en version outil). */
.ad-seg { display: inline-flex; gap: 2px; border-radius: 10px; padding: 3px; background: var(--mist-2); }
.ad-seg-btn { border: 0; background: transparent; font: inherit; font-size: .84rem; font-weight: 500; color: var(--muted); padding: .32rem .8rem; border-radius: 8px; cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.ad-seg-btn:hover { color: var(--ink); }
.ad-seg-btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 20, 60, .1), 0 0 0 1px rgba(20, 20, 60, .04); }
.ad-seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.ad-legend { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; list-style: none; font-size: .84rem; color: var(--charcoal); margin-bottom: .6rem; }
.ad-legend li { display: inline-flex; align-items: center; gap: .45rem; }
.ad-legend i, .ad-chart-tip-row i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }

.ad-chart { position: relative; min-height: 120px; }
.ad-chart-svg { display: block; overflow: visible; }
.ad-chart-grid { stroke: var(--line); stroke-width: 1; }
.ad-chart-axis { stroke: var(--line-2); stroke-width: 1; }
.ad-chart-tick { fill: var(--muted); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.ad-chart-year { font-size: 10px; }
.ad-chart-value { fill: var(--ink); font-size: 12px; font-weight: 500; font-family: var(--sans); }
.ad-chart-hit { fill: transparent; }
.ad-chart-col { cursor: default; outline: none; }
.ad-chart-col-active .ad-chart-hit, .ad-chart-col:focus-visible .ad-chart-hit { fill: rgba(20, 20, 60, .05); }
.ad-chart-tip {
  position: absolute; z-index: 2; pointer-events: none; min-width: 190px;
  background: var(--paper); border-radius: 12px; padding: .6rem .75rem;
  box-shadow: var(--shadow-float); font-size: .82rem; color: var(--ink-2);
}
.ad-chart-tip strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: .25rem; }
.ad-chart-tip-row { display: flex; align-items: center; gap: .45rem; line-height: 1.6; }
.ad-chart-tip-row b { margin-left: auto; padding-left: 1rem; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.ad-chart-tip-total { border-top: 1px solid var(--line); margin-top: .2rem; padding-top: .2rem; }
.ad-chart-tip-muted { color: var(--muted); }

.ad-sales-table td, .ad-sales-table th[scope="row"] { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-sales-table th[scope="row"] { color: var(--charcoal); font-weight: 400; border-bottom: 1px solid var(--line); padding: .45rem .6rem; text-align: left; }
.ad-sales-table tr:last-child th { border-bottom: 0; }

.ad-sales-ranks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1.1rem; }
.ad-rank { list-style: none; counter-reset: rank; }
.ad-rank li { counter-increment: rank; display: flex; align-items: baseline; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.ad-rank li:last-child { border-bottom: 0; }
.ad-rank li::before { content: counter(rank); color: var(--muted); font-size: .78rem; min-width: 1.1rem; }
.ad-rank li > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-rank a { color: var(--ink); }
.ad-rank-meta { margin-left: auto; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Portfolio ---------- */

.ad-pf-upload { cursor: pointer; }
.ad-pf-photos { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin-top: 1rem; }
.ad-pf-photo { position: relative; background: var(--mist-2); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.ad-pf-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ad-pf-cover { position: absolute; top: 8px; left: 8px; background: var(--paper); color: var(--accent-deep); font-size: .72rem; font-weight: 500; padding: .1rem .55rem; border-radius: 999px; box-shadow: 0 2px 8px -2px rgba(20, 20, 60, .3); }
.ad-pf-actions { display: flex; gap: .3rem; padding: .45rem; background: #fff; }
.ad-pf-actions .ad-btn-danger { margin-left: auto; }
.ad-pf-actions button:disabled { opacity: .35; cursor: default; }
.ad-field .ad-pf-handle { display: flex; align-items: stretch; margin: 0; font-size: inherit; }
.ad-pf-handle .ad-pf-handle-prefix { display: flex; align-items: center; margin: 0; padding: 0 .6rem; font-size: .82rem; color: var(--muted); background: var(--sand); border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; white-space: nowrap; }
.ad-field .ad-pf-handle input { border-radius: 0 8px 8px 0; min-width: 0; }
@media (max-width: 560px) { .ad-pf-handle .ad-pf-handle-prefix { display: none; } .ad-field .ad-pf-handle input { border-radius: 8px; } }
.ad-pf-buttons { display: flex; flex-wrap: wrap; gap: .6rem; }
.ad-pf-messages { list-style: none; }
.ad-pf-message { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.ad-pf-message:last-child { border-bottom: 0; }
.ad-pf-message-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.ad-pf-message-head .ad-hint { margin-left: auto; }
.ad-pf-message-meta { font-size: .86rem; margin: .2rem 0 .5rem; color: var(--muted); }
.ad-pf-message-body { white-space: pre-wrap; margin-bottom: .6rem; color: var(--charcoal); }
.ad-banner a { color: inherit; font-weight: 500; }

/* ---------- Jauge de stockage ---------- */

.ad-storage { min-width: 220px; }
.ad-gauge { height: 8px; border-radius: 999px; background: var(--sand); overflow: hidden; margin-top: .45rem; max-width: 260px; }
.ad-gauge span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.ad-gauge-warn span { background: var(--warn); }
.ad-gauge-full span { background: var(--danger); }
.ad-gauge-note { margin-top: .35rem; max-width: 280px; }

/* ---------- Abonnement : période, essai, Fondateurs ---------- */

.ad-interval { margin: 0 0 1rem; }
.ad-plan-price s { color: var(--muted); font-weight: 400; margin-right: .2rem; }
.ad-plan-price-note { display: block; font-family: var(--sans); font-size: .8rem; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: .2rem; }
.ad-plan-trial { margin-top: .4rem; }
.ad-founders { background: var(--accent-soft); color: var(--accent-deep); box-shadow: inset 0 0 0 1px rgba(59, 59, 246, .22); }

/* ---------- Admin : comptes photographes ---------- */

.ad-acc-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin: 1.2rem 0 .8rem; }
.ad-acc-count { color: var(--muted); font-size: .76rem; margin-left: .15rem; }
.ad-acc-search {
  flex: 1 1 220px; max-width: 320px;
  font: inherit; font-size: .88rem;
  padding: .45rem .8rem;
  min-height: 36px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.ad-acc-table td { vertical-align: top; padding-top: .7rem; padding-bottom: .7rem; }
.ad-acc-table th { white-space: nowrap; }
.ad-acc-name { display: block; font-weight: 500; color: var(--ink); }
.ad-acc-sub, .ad-acc-line { display: block; }
.ad-acc-sub { font-size: .76rem; color: var(--muted); margin-top: .1rem; }
.ad-acc-line { white-space: nowrap; }
.ad-acc-line + .ad-acc-line { margin-top: .15rem; font-size: .78rem; color: var(--muted); }
.ad-acc-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ad-acc-warn { color: var(--warn-ink) !important; }
.ad-acc-plan {
  display: inline-block; font-size: .76rem; font-weight: 500;
  padding: .15rem .55rem; border-radius: 6px;
  background: var(--sand); color: var(--charcoal);
}
.ad-acc-plan-essentiel { background: var(--accent-soft); color: var(--rose-deep); }
.ad-acc-plan-pro { background: var(--ink); color: #fff; }
.ad-acc-status {
  display: inline-block; font-size: .72rem; font-weight: 500;
  padding: .12rem .5rem; border-radius: 999px; white-space: nowrap;
}
.ad-acc-status-ok { background: var(--ok-bg); color: var(--ok-ink); }
.ad-acc-status-trial { background: var(--accent-soft); color: var(--accent-deep); }
.ad-acc-status-warn { background: var(--warn-bg); color: var(--warn-ink); }
.ad-acc-status-bad { background: var(--danger-bg); color: var(--danger); }
.ad-acc-status-muted { background: var(--sand); color: var(--muted); }
.ad-acc-meter { display: block; width: 90px; height: 4px; margin-top: .35rem; border-radius: 4px; background: var(--sand); overflow: hidden; }
.ad-acc-meter span { display: block; height: 100%; background: var(--rose); border-radius: 4px; }
.ad-acc-meter .ad-acc-meter-full { background: var(--danger); }
.ad-acc-link { display: block; margin-top: .3rem; font-size: .76rem; color: var(--rose-deep); text-decoration: none; white-space: nowrap; }
.ad-acc-link:hover { text-decoration: underline; }
.ad-acc-table tr[hidden] { display: none; }
.ad-acc-toolbar .ad-seg { flex-wrap: wrap; }
.ad-acc-toolbar .ad-seg-btn { white-space: nowrap; }
@media (max-width: 560px) {
  .ad-acc-toolbar .ad-seg { border-radius: 12px; }
  .ad-acc-search { max-width: none; }
}

/* ---------- Écoles, crèches et clubs ---------- */

/* Type d'établissement : une étiquette de donnée, pas un surtitre. */
.ad-sc-kind { display: inline-block; font-size: .75rem; font-weight: 500; line-height: 1.4; padding: .1rem .55rem; border-radius: 999px; background: var(--mist-2); color: var(--ink-2); margin-bottom: .45rem; }
.ad-link-btn.ad-sc-back { display: inline-block; margin: .25rem 0 .9rem; padding: .25rem 0; color: var(--muted); text-decoration: none; }
.ad-link-btn.ad-sc-back:hover { color: var(--ink); }
.ad-sc-form { display: grid; gap: .9rem; max-width: 640px; }
.ad-sc-form .ad-seg { justify-self: start; }
.ad-sc-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.ad-sc-years { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.ad-sc-years .ad-seg { flex-wrap: wrap; }
.ad-sc-year-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.ad-sc-groups { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .45rem; }
.ad-sc-groups li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto; gap: .6rem; align-items: center;
  padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
}
.ad-sc-in { font: inherit; font-size: .92rem; border: 1px solid transparent; border-radius: 6px; padding: .3rem .45rem; background: transparent; color: var(--ink); min-width: 0; }
.ad-sc-in:hover { border-color: var(--line); }
.ad-sc-in:focus { border-color: var(--accent); outline: none; background: var(--paper); box-shadow: var(--ring); }
.ad-sc-in-muted { color: var(--muted); }
.ad-sc-count { white-space: nowrap; }
.ad-sc-del { color: var(--danger); font-size: .82rem; }
.ad-sc-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; align-items: end; max-width: 640px; }
.ad-sc-add textarea { font: inherit; }
.ad-sc-next { margin-top: 1rem; }
.ad-sc-teaser ul { margin: .6rem 0 1rem 1.1rem; display: grid; gap: .3rem; }
@media (max-width: 720px) {
  .ad-sc-year-fields { grid-template-columns: 1fr; }
  .ad-sc-groups li { grid-template-columns: minmax(0, 1fr) auto; }
  .ad-sc-groups li .ad-sc-in-muted { grid-column: 1 / -1; grid-row: 2; }
  .ad-sc-count { display: none; }
  .ad-sc-add { grid-template-columns: 1fr; }
}
.ad-sc-year-fields select { width: 100%; font-family: var(--sans); font-size: .94rem; min-height: 40px; padding: .55rem .75rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); }
.ad-sc-year-fields .ad-field, .ad-sc-add .ad-field { margin-bottom: 0; }
.ad-plans-group { grid-column: 1 / -1; margin: 1.2rem 0 0; font-size: 1.06rem; }

.ad-sc-open { white-space: nowrap; font-size: .82rem; padding: .35rem .8rem; }
.ad-sc-drop-hint { margin-top: .6rem; }
.ad-sc-progress { margin-top: 1rem; display: grid; gap: .4rem; justify-items: center; }
.ad-sc-progress-bar { width: min(420px, 100%); height: 6px; border-radius: 6px; background: var(--sand); overflow: hidden; }
.ad-sc-progress-bar span { display: block; height: 100%; width: 0; background: var(--rose); transition: width .2s var(--ease); }
.ad-sc-toolbar {
  position: sticky; top: .6rem; z-index: 5;
  display: flex; flex-wrap: wrap; gap: .7rem; align-items: center;
  padding: .6rem .9rem; margin-bottom: 1rem;
  background: var(--night); color: var(--night-text); border-radius: 14px;
  box-shadow: 0 18px 40px -16px rgba(20, 20, 60, .45), 0 0 0 1px var(--night-line);
}
.ad-sc-toolbar select { font: inherit; font-size: .88rem; padding: .35rem .6rem; border-radius: 8px; border: 0; background: #fff; color: var(--ink); }
.ad-sc-toolbar .ad-link-btn { color: #b9b9ff; text-decoration-color: rgba(185, 185, 255, .45); }
.ad-sc-toolbar .ad-btn { background: var(--night-2); border-color: var(--night-line); color: var(--night-text); }
.ad-sc-toolbar .ad-btn:hover { background: #1c1c2b; }
.ad-sc-toolbar .ad-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ad-sc-toolbar .ad-btn-primary:hover { background: var(--accent-deep); }
.ad-sc-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.ad-sc-thumb { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.ad-sc-thumb-img { display: grid; width: 100%; max-width: 100%; border-radius: 8px; overflow: hidden; background: var(--sand); }
.ad-sc-thumb-img img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.ad-sc-thumb-on .ad-sc-thumb-img { outline: 2px solid var(--accent); outline-offset: 2px; }
.ad-sc-thumb-on::after { content: "✓"; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--rose); color: #fff; font-size: .72rem; display: grid; place-items: center; }
.ad-sc-thumb:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.ad-sc-thumb-time { position: absolute; left: 4px; bottom: 4px; font-size: .62rem; padding: 0 .3rem; border-radius: 4px; background: rgba(255, 255, 255, .85); color: var(--ink); font-variant-numeric: tabular-nums; }
.ad-sc-unsorted { border-color: var(--warn-line) !important; background: #fffcf3 !important; }
.ad-sc-children { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.ad-sc-child { border: 1px solid var(--line); border-radius: 12px; padding: .7rem; background: #fff; display: grid; gap: .6rem; align-content: start; }
.ad-sc-child header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ad-sc-child header .ad-sc-in { flex: 1 1 120px; }
.ad-sc-child-num { display: grid; place-items: center; min-width: 1.8rem; height: 1.8rem; padding: 0 .3rem; border-radius: 999px; background: var(--accent-soft); color: var(--rose-deep); font-weight: 500; font-size: .82rem; }
.ad-sc-child .ad-sc-thumbs { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
@media (max-width: 720px) { .ad-sc-children { grid-template-columns: 1fr; } }
.ad-sc-child [data-child-name] { border-bottom: 1px dashed var(--line); border-radius: 6px 6px 0 0; }
.ad-sc-code { font-family: var(--mono); font-size: .78rem; letter-spacing: .02em; padding: .1rem .45rem; border-radius: 6px; background: var(--sand); color: var(--ink); }
.ad-sc-coupons .ad-sc-actions { margin: .8rem 0; }

/* Boutique d'une année scolaire : gamme, prix, commandes. */
.ad-sc-products { list-style: none; margin: .4rem 0 1.2rem; padding: 0; display: grid; gap: .45rem; }
.ad-sc-products > li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; gap: .7rem; align-items: center;
  padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.ad-sc-products > li.ad-sc-off { background: var(--ivory); }
.ad-sc-products > li.ad-sc-off > .ad-sc-prod-main { opacity: .55; }
.ad-sc-prod-main { display: grid; gap: .1rem; min-width: 0; }
.ad-sc-prod-main .ad-sc-in:first-child { font-weight: 500; }
.ad-sc-tag { font-size: .72rem; letter-spacing: .03em; color: var(--muted); background: var(--sand); border-radius: 999px; padding: .15rem .6rem; white-space: nowrap; }
.ad-sc-price { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; color: var(--muted); }
.ad-sc-price input { width: 5.2rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); border: 1px solid var(--line-2); background: var(--paper); }
.ad-sc-toggle { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--muted); white-space: nowrap; cursor: pointer; }
.ad-sc-toggle input { accent-color: var(--rose); }
.ad-sc-empty-shop { display: grid; gap: .8rem; justify-items: start; padding: 1rem 1.1rem; margin: .4rem 0 1.2rem; border: 1px dashed var(--line); border-radius: 12px; background: var(--ivory); }
.ad-sc-prod-form { display: grid; grid-template-columns: auto auto minmax(0, 1fr) minmax(0, 1.2fr) 6.5rem auto; gap: .6rem; align-items: end; }
.ad-sc-prod-form .ad-field { margin-bottom: 0; }
.ad-sc-prod-form select, .ad-sc-prod-form input { width: 100%; font-family: var(--sans); font-size: .92rem; min-height: 40px; padding: .5rem .65rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); }
.ad-sc-shipping { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .3rem; }
.ad-sc-shipping .ad-field { margin-bottom: 0; }
.ad-sc-shipping .ad-sc-price input { padding: .5rem .6rem; border-radius: 8px; font: inherit; }
.ad-sc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: .4rem 0 1.1rem; }
.ad-sc-kpis div { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; background: #fff; display: grid; gap: .1rem; }
.ad-sc-kpis strong { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.ad-sc-kpis span { font-size: .8rem; color: var(--muted); }
.ad-table .ad-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-sc-meter { display: inline-block; vertical-align: middle; width: 70px; height: 6px; border-radius: 6px; background: var(--sand); overflow: hidden; margin-right: .4rem; }
.ad-sc-meter span { display: block; height: 100%; background: var(--rose); border-radius: 6px; }
.ad-sc-subhead { margin: 1.3rem 0 .45rem; font-size: .94rem; font-weight: 600; color: var(--ink); }
.ad-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 900px) {
  .ad-sc-prod-form { grid-template-columns: 1fr 1fr; }
  .ad-sc-prod-form .ad-field:nth-child(3), .ad-sc-prod-form .ad-field:nth-child(4) { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .ad-sc-products > li { grid-template-columns: minmax(0, 1fr) auto; }
  .ad-sc-products > li > .ad-sc-prod-main { grid-column: 1 / -1; }
  .ad-sc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Envois au labo : composition labo des produits, lots, compte BePhoto. */
.ad-sc-prod-lab { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; padding: .1rem .45rem 0; font-size: .82rem; }
.ad-sc-prod-lab .ad-hint { margin: 0; font-size: .82rem; }
.ad-sc-lab-editor { flex-basis: 100%; display: grid; gap: .55rem; margin-top: .5rem; padding: .8rem .9rem; border: 1px dashed var(--line); border-radius: 10px; background: var(--ivory); }
.ad-sc-lab-row { display: grid; grid-template-columns: 4.2rem auto minmax(0, 1fr) minmax(0, 9rem) auto; gap: .5rem; align-items: center; }
.ad-sc-lab-row input, .ad-sc-lab-row select { font-family: var(--sans); font-size: .88rem; padding: .4rem .5rem; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); min-width: 0; }
.ad-sc-pendings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: .4rem 0 1rem; }
.ad-sc-pending { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ad-sc-pending > div { display: grid; gap: .1rem; }
.ad-sc-pending strong { font-weight: 500; color: var(--ink); }
.ad-sc-pending span { font-size: .84rem; color: var(--muted); }
.ad-sc-pending .ad-hint { font-size: .76rem; margin: 0; }
.ad-sc-batch-actions { white-space: nowrap; text-align: right; }
.ad-sc-mini { font-size: .8rem; padding: .3rem .7rem; }
.ad-sc-labacct { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.ad-sc-lab-form { display: grid; gap: .6rem; max-width: 420px; }
.ad-sc-lab-form .ad-field { margin-bottom: 0; }
@media (max-width: 720px) {
  .ad-sc-pendings { grid-template-columns: 1fr; }
  .ad-sc-lab-row { grid-template-columns: 3.6rem minmax(0, 1fr) auto; }
  .ad-sc-lab-row > span[aria-hidden] { display: none; }
  .ad-sc-batch-actions { white-space: normal; text-align: left; }
}

/* Menu déroulant illustré (planches du labo). */
.ad-vsel { position: relative; min-width: 0; }
.ad-vsel-btn, .ad-vsel [role="option"] { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: .6rem; align-items: center; width: 100%; text-align: left; }
.ad-vsel-btn { font: inherit; padding: .3rem .5rem .3rem .3rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; min-height: 52px; transition: border-color .15s var(--ease); }
.ad-vsel-btn:hover { border-color: #c4c4d3; }
.ad-vsel-btn:focus-visible, .ad-vsel [role="option"]:focus-visible { outline: 2px solid var(--rose); outline-offset: 1px; }
.ad-vsel img, .ad-vsel-noimg { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: var(--sand); }
.ad-vsel-noimg { display: block; }
.ad-vsel-text { display: grid; min-width: 0; }
.ad-vsel-text strong { font-weight: 500; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-vsel-text small { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-vsel-caret { color: var(--muted); font-size: .8rem; }
.ad-vsel-pop { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; min-width: 300px; max-height: 360px; overflow-y: auto; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow-float); padding: .3rem; }
.ad-vsel ul { list-style: none; margin: 0; padding: 0; outline: none; }
.ad-vsel [role="option"] { grid-template-columns: 56px minmax(0, 1fr); padding: .35rem; border-radius: 8px; cursor: pointer; }
.ad-vsel [role="option"] img, .ad-vsel [role="option"] .ad-vsel-noimg { width: 56px; height: 56px; }
.ad-vsel [role="option"]:hover, .ad-vsel [role="option"]:focus { background: var(--mist); }
.ad-vsel [role="option"][aria-selected="true"] { background: var(--accent-soft); }
.ad-vsel-group { font-size: .78rem; font-weight: 600; color: var(--ink); padding: .6rem .4rem .25rem; }
.ad-sc-prod-thumb { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: var(--sand); align-self: center; }
@media (max-width: 720px) {
  .ad-sc-lab-row [data-vsel], .ad-sc-lab-row .ad-vsel { grid-column: 2 / -1; }
  .ad-sc-lab-row select[data-f="idpaper"] { grid-column: 2; }
  .ad-vsel-pop { min-width: 0; }
}
.ad-sc-reminders { margin-top: .8rem; font-size: .88rem; color: var(--charcoal); white-space: normal; }

/* ---------- Réservations ---------- */

.ad-bk-offers { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; }
.ad-bk-offer {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto auto; gap: .7rem; align-items: center;
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
}
.ad-bk-offer-main { display: grid; gap: .1rem; min-width: 0; }
.ad-bk-offer-main strong { font-weight: 600; color: var(--ink); }
.ad-bk-offer-main .ad-hint { font-size: .84rem; }
.ad-bk-offer-off { background: var(--mist); }
.ad-bk-offer-off .ad-bk-offer-main { opacity: .6; }
.ad-bk-offer-form { margin-top: .9rem; max-width: 720px; }
.ad-bk-thumb { width: 56px; height: 42px; border-radius: 6px; object-fit: cover; background: var(--mist-2); }
.ad-bk-thumb-empty { display: block; background: repeating-linear-gradient(135deg, var(--mist) 0 6px, var(--mist-2) 6px 12px); }

/* Type de séance : prestation enregistrée ou nouvelle prestation. */
.ad-bk-starter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem .8rem; margin: .4rem 0 .6rem; padding: .9rem; border-radius: 12px; background: var(--mist); }
.ad-bk-starter .ad-field { flex: 1 1 280px; margin: 0; }
.ad-bk-starter .ad-btn { min-height: 42px; }
.ad-bk-templates ul { list-style: none; display: grid; gap: .4rem; margin: .6rem 0 0; padding: 0; }
.ad-bk-templates li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.ad-bk-templates li > img, .ad-bk-templates li > .ad-bk-thumb-empty { width: 48px; height: 36px; border-radius: 6px; object-fit: cover; }
.ad-bk-templates li > span:not(.ad-bk-thumb-empty) { display: grid; min-width: 0; }
.ad-bk-templates strong { font-weight: 600; font-size: .9rem; color: var(--ink); }
.ad-bk-templates .ad-hint { font-size: .8rem; }

/* Image d'illustration d'une formule. */
.ad-bk-image { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 1rem; align-items: center; margin-bottom: 1rem; }
.ad-bk-image-preview {
  display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px;
  background: var(--mist); box-shadow: 0 0 0 1px var(--line) inset; color: var(--muted); font-size: .82rem;
}
.ad-bk-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.ad-bk-image-busy .ad-bk-image-preview { animation: ad-bk-pulse 1.2s ease-in-out infinite; }
@keyframes ad-bk-pulse { 50% { opacity: .55; } }
.ad-bk-image-side { display: grid; gap: .3rem; justify-items: start; }
.ad-bk-image-title { font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.ad-bk-image-title em { font-style: normal; font-weight: 400; color: var(--muted); }
.ad-bk-image-side .ad-hint { font-size: .82rem; max-width: 46ch; }
.ad-bk-image-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .3rem; }
.ad-bk-image-pick { position: relative; overflow: hidden; cursor: pointer; }
.ad-bk-image-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ad-bk-image-pick:focus-within { box-shadow: var(--ring); }
.ad-bk-notes textarea { min-height: 6.5rem; }
.ad-bk-save { align-items: flex-start; gap: .65rem; margin: .2rem 0 1rem; padding: .8rem .9rem; border-radius: 10px; background: var(--accent-soft); }
.ad-bk-save input { margin-top: .2rem; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.ad-bk-save > span { display: grid; gap: .1rem; }
.ad-bk-save strong { font-weight: 600; color: var(--ink); }
.ad-bk-save .ad-hint { font-size: .82rem; }
.ad-bk-slot-form { display: grid; gap: .8rem; margin: .4rem 0 1.2rem; }
.ad-bk-slot-form .ad-seg { justify-self: start; }
.ad-bk-slot-fields { display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: flex-end; }
.ad-bk-slot-fields .ad-field { margin-bottom: 0; flex: 0 1 auto; }
.ad-bk-slot-fields .ad-field:first-child { flex: 1 1 220px; }
.ad-bk-slot-fields .ad-bk-times { flex: 1 1 220px; }
.ad-bk-slot-fields .ad-field input[type="number"] { width: 6.5rem; }
.ad-bk-days { display: grid; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.ad-bk-day h4 { font-size: .9rem; font-weight: 600; margin-bottom: .45rem; }
.ad-bk-day h4 .ad-hint { font-weight: 400; font-size: .86rem; }
.ad-bk-day h4::first-letter { text-transform: uppercase; }
.ad-bk-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.ad-bk-chip {
  display: inline-flex; align-items: center; gap: .25rem; min-height: 32px; padding: 0 .35rem 0 .75rem;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper);
  font-size: .84rem; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.ad-bk-chip button {
  display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.ad-bk-chip button:hover { background: var(--alert-bg); color: var(--alert-ink); }
.ad-bk-chip-booked { padding-right: .75rem; background: var(--accent-soft); border-color: rgba(59, 59, 246, .25); color: var(--accent-deep); }
.ad-bk-table td { vertical-align: top; }
.ad-bk-table a.ad-acc-sub { color: var(--muted); text-decoration: none; }
.ad-bk-table a.ad-acc-sub:hover { color: var(--accent-deep); text-decoration: underline; }
.ad-bk-message { display: block; max-width: 34ch; margin-top: .3rem; font-size: .8rem; color: var(--muted); }
@media (max-width: 720px) {
  .ad-bk-offer { grid-template-columns: repeat(3, auto); justify-content: start; }
  .ad-bk-offer-main { grid-column: 1 / -1; }
  .ad-bk-offer > .ad-bk-thumb { display: none; }
  .ad-bk-image { grid-template-columns: 120px minmax(0, 1fr); }
  .ad-bk-notes { grid-template-columns: minmax(0, 1fr); }
  .ad-bk-slot-fields .ad-field { flex: 1 1 140px; }
}

/* ---------- Devis et contrats ---------- */

.ad-ct-lines { display: grid; gap: .45rem; }
.ad-ct-line { display: grid; grid-template-columns: minmax(0, 1fr) 8rem auto; gap: .5rem; align-items: center; }
.ad-ct-line input {
  width: 100%; min-height: 40px; font: inherit; font-size: .94rem; color: var(--ink);
  padding: .5rem .7rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper);
}
.ad-ct-line-amount { text-align: right; font-variant-numeric: tabular-nums; }
.ad-ct-add-line { margin: .55rem 0 0; }
.ad-ct-total { margin: 0 0 1rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ad-ct-total strong { color: var(--ink); font-weight: 600; font-size: 1.1rem; margin-left: .25rem; }
#ad-ct-form textarea[name="terms"] { font-size: .9rem; line-height: 1.55; }
.ad-ct-table td { vertical-align: top; }
.ad-ct-table .ad-acc-sub { white-space: normal; }
.ad-ct-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; min-width: 12rem; white-space: normal; }
#ad-ct-terms-box { margin-top: 0; }
@media (max-width: 720px) {
  .ad-ct-line { grid-template-columns: minmax(0, 1fr) 6rem auto; }
  .ad-ct-actions { justify-content: flex-start; }
}

/* ---------- Clients : fiches et relances ---------- */
/* Pastille du menu : nombre de clients à relancer dans les trois semaines. */
.ad-tab { position: relative; }
.ad-tab-count {
  margin-left: auto;
  min-width: 1.35rem; height: 1.35rem; padding: 0 .4rem;
  display: inline-grid; place-items: center;
  font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1;
  color: var(--warn-ink); background: var(--warn-bg); box-shadow: 0 0 0 1px var(--warn-line);
  border-radius: 999px;
}
@media (max-width: 860px) {
  .ad-tab-count { position: absolute; top: .3rem; right: .3rem; margin: 0; min-width: 1.15rem; height: 1.15rem; font-size: .66rem; padding: 0 .3rem; }
}

/* Lien discret vers la fiche, depuis les galeries, réservations et contrats. */
.ad-cl-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color .15s var(--ease), color .15s var(--ease); }
.ad-cl-link:hover { color: var(--accent-deep); text-decoration-color: currentColor; }

/* Initiales : une pastille neutre, l'outremer reste réservé à l'action. */
.ad-cl-avatar {
  flex: none; display: inline-grid; place-items: center;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-2);
  background: var(--mist-2); box-shadow: inset 0 0 0 1px rgba(20, 20, 60, .06);
}
.ad-cl-avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 6px 16px -10px rgba(20, 20, 60, .35); }

/* Échéance : neutre, puis ambre dans les trois dernières semaines. */
.ad-cl-when {
  display: inline-block; white-space: nowrap;
  font-size: .74rem; font-weight: 500; font-variant-numeric: tabular-nums;
  padding: .14rem .55rem; border-radius: 999px;
  color: var(--ink-2); background: var(--mist-2);
}
.ad-cl-when-soon { color: var(--warn-ink); background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn-line); }

/* À relancer */
.ad-cl-reminds { list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.ad-cl-remind {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .85rem;
  padding: .75rem 1rem; border-top: 1px solid var(--line);
  transition: background-color .15s var(--ease);
}
.ad-cl-remind:first-child { border-top: 0; }
.ad-cl-remind:hover { background: #fafafc; }
.ad-cl-remind-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.ad-cl-remind-main strong { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-cl-remind-main .ad-hint { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-cl-reminds-note { margin-top: .6rem; font-size: .8rem; }

/* Liste : recherche (raccourci « / ») et filtres. */
.ad-cl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: .85rem; }
.ad-cl-search {
  position: relative; flex: 1 1 280px; max-width: 420px;
  display: flex; align-items: center;
}
.ad-cl-search svg { position: absolute; left: .75rem; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.ad-cl-search input {
  width: 100%; min-height: 40px; padding: 0 2.4rem 0 2.2rem;
  font: inherit; font-size: .9rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 10px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.ad-cl-search input::placeholder { color: var(--ink-soft); }
.ad-cl-search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.ad-cl-search input::-webkit-search-cancel-button { display: none; }
.ad-cl-search kbd {
  position: absolute; right: .55rem;
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
  min-width: 1.35rem; padding: .05rem .35rem; text-align: center;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--mist);
  transition: opacity .15s var(--ease);
}
.ad-cl-search input:focus ~ kbd, .ad-cl-search input:not(:placeholder-shown) ~ kbd { opacity: 0; }
.ad-cl-toolbar .ad-seg { flex-wrap: wrap; }
.ad-cl-toolbar .ad-seg-btn { white-space: nowrap; }

.ad-cl-table td { vertical-align: middle; }
.ad-cl-row { cursor: pointer; }
.ad-cl-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ad-cl-row:hover .ad-acc-name { color: var(--accent-deep); }
.ad-cl-who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.ad-cl-who .ad-acc-sub { overflow-wrap: anywhere; }
.ad-cl-date { color: var(--ink-2); margin-right: .25rem; }
.ad-cl-none { text-align: center; color: var(--muted); padding: 1.5rem .6rem !important; }

.ad-cl-empty {
  display: grid; justify-items: center; gap: .6rem; text-align: center;
  padding: 3rem 1.5rem; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--paper);
}
.ad-cl-empty .ad-cl-avatar { width: 3rem; height: 3rem; font-size: 1.1rem; color: var(--muted); }
.ad-cl-empty h3 { font-size: 1.05rem; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.ad-cl-empty p { max-width: 52ch; color: var(--muted); font-size: .9rem; }

.ad-cl-create { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1rem; align-items: end; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.ad-cl-create .ad-sc-actions { grid-column: 1 / -1; }

/* Fiche */
.ad-cl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.1rem; margin-bottom: 1.5rem; }
.ad-cl-head-main { flex: 1 1 260px; min-width: 0; }
.ad-cl-head h2 { font-size: 1.6rem; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.ad-cl-contact { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; margin-top: .2rem; font-size: .9rem; color: var(--muted); }
.ad-cl-contact > span:first-child { overflow-wrap: anywhere; }
.ad-cl-contact a { color: var(--ink-2); text-decoration: none; }
.ad-cl-contact a:hover { color: var(--accent-deep); text-decoration: underline; }
.ad-cl-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.ad-cl-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 0 2rem; align-items: start; }
.ad-cl-col { min-width: 0; }
@media (max-width: 1100px) { .ad-cl-grid { grid-template-columns: minmax(0, 1fr); } }

/* Dates à retenir */
.ad-cl-dates { list-style: none; display: grid; gap: .5rem; margin-bottom: 1rem; }
.ad-cl-dateitem {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .85rem;
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
}
.ad-cl-dateitem-main { flex: 1 1 220px; display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.ad-cl-dateitem-main strong { font-weight: 500; color: var(--ink); }
.ad-cl-dateitem-main .ad-hint { font-size: .8rem; }
.ad-cl-dateitem .ad-sc-toggle { font-size: .82rem; white-space: nowrap; }
.ad-cl-date-form { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: .6rem; align-items: end; padding: .85rem; border-radius: 10px; background: var(--mist); }
.ad-cl-date-form .ad-field { margin: 0; }
.ad-cl-date-form .ad-field > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Historique : une ligne de temps, une icône par type d'événement. */
.ad-cl-history { list-style: none; position: relative; }
.ad-cl-history::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 1px; background: var(--line); }
.ad-cl-event { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: .8rem; align-items: start; padding: .5rem 0; }
.ad-cl-event-ico {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 0 0 1px var(--line); color: var(--muted);
}
.ad-cl-event-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ad-cl-event-payment .ad-cl-event-ico { color: var(--ok-ink); background: var(--ok-bg); box-shadow: 0 0 0 1px var(--ok-line); }
.ad-cl-event-main { display: flex; flex-direction: column; min-width: 0; padding-top: .1rem; line-height: 1.4; }
.ad-cl-event-kind { font-size: .76rem; color: var(--muted); }
.ad-cl-event-title { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.ad-cl-event-title a { color: inherit; text-decoration: none; }
.ad-cl-event-title a:hover { color: var(--accent-deep); text-decoration: underline; }
.ad-cl-event-title .ad-hint { font-weight: 400; font-size: .8rem; }
.ad-cl-event-amount { padding-top: .45rem; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Notes : une feuille calme, l'état d'enregistrement en filigrane. */
.ad-cl-notes {
  width: 100%; min-height: 200px; resize: vertical;
  font: inherit; font-size: .92rem; line-height: 1.6; color: var(--ink);
  padding: .85rem 1rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.ad-cl-notes::placeholder { color: var(--ink-soft); }
.ad-cl-notes:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.ad-cl-notes + .ad-hint { margin-top: .45rem; font-size: .8rem; }
.ad-cl-saved { margin-left: auto; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ad-cl-saved-ok { color: var(--ok-ink); }
.ad-cl-saved-ok::before { content: "✓ "; }
.ad-cl-saved-error { color: var(--alert-ink); }
#ad-cl-info { display: grid; gap: .65rem; justify-items: start; }
#ad-cl-info .ad-field { width: 100%; margin: 0; }
.ad-cl-col .ad-danger-zone { margin-top: 1.25rem; }

/* Étapes, saisons, délai du rappel */
.ad-cl-avatar-season { color: var(--ink); background: var(--paper); box-shadow: 0 0 0 1px var(--line-2); }
.ad-cl-remind-season { background: linear-gradient(90deg, var(--mist) 0, var(--paper) 60%); }
.ad-cl-remind-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.ad-cl-remind-ctl { display: inline-flex; align-items: center; gap: .45rem; }
.ad-cl-remind-ctl select {
  font: inherit; font-size: .8rem; color: var(--ink-2); min-height: 32px; padding: 0 1.6rem 0 .55rem;
  border: 1px solid var(--line-2); border-radius: 8px; background-color: var(--paper);
}
.ad-cl-remind-ctl select:disabled { opacity: .5; }
.ad-cl-remind-ctl select:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.ad-cl-dateitem-next { margin-top: .2rem; font-size: .8rem; font-weight: 500; color: var(--ink-2); }
.ad-cl-dateitem > .ad-cl-avatar { width: 2rem; height: 2rem; }

.ad-cl-date-form-full { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.ad-cl-date-kind select { font-weight: 500; }
.ad-cl-date-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.ad-cl-date-fields .ad-field { margin: 0; }
.ad-cl-steps { border: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.ad-cl-steps legend { width: 100%; margin-bottom: .4rem; font-size: .84rem; font-weight: 500; color: var(--ink-2); }
.ad-cl-step { position: relative; cursor: pointer; }
.ad-cl-step input { position: absolute; opacity: 0; pointer-events: none; }
.ad-cl-step span {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: 0 .8rem;
  font-size: .84rem; font-weight: 500; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 999px;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.ad-cl-step span::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; border: 1.5px solid var(--line-2); transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.ad-cl-step:hover span { border-color: var(--ink-soft); }
.ad-cl-step input:checked + span { color: var(--ink); border-color: var(--ink); }
.ad-cl-step input:checked + span::before { background: var(--ink); border-color: var(--ink); }
.ad-cl-step input:focus-visible + span { box-shadow: var(--ring); }
.ad-cl-step-past { cursor: not-allowed; }
.ad-cl-step-past span { color: var(--ink-soft); text-decoration: line-through; background: transparent; border-style: dashed; }
.ad-cl-date-foot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem 1rem; align-items: end; }
.ad-cl-lead { margin: 0; }
.ad-cl-preview { align-self: center; margin: 0; font-size: .82rem; line-height: 1.45; color: var(--ink-2); }
.ad-cl-preview:empty { display: none; }
.ad-cl-season-form { margin-top: .75rem; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.ad-cl-seasons-intro { margin-bottom: .25rem; max-width: 70ch; }
.ad-cl-seasons .ad-cl-dateitem-main { flex-basis: 260px; }

@media (max-width: 640px) {
  .ad-cl-remind { grid-template-columns: auto minmax(0, 1fr) auto; padding: .75rem .85rem; }
  .ad-cl-remind .ad-btn { grid-column: 2 / -1; justify-self: start; }
  .ad-cl-search { max-width: none; flex-basis: 100%; }
  .ad-cl-search kbd { display: none; }
  .ad-cl-create { grid-template-columns: minmax(0, 1fr); }
  .ad-cl-date-form { grid-template-columns: minmax(0, 1fr); }
  .ad-cl-date-form .ad-btn { grid-column: 1 / -1; }
  .ad-cl-date-foot { grid-template-columns: minmax(0, 1fr); }
  .ad-cl-season-form { grid-template-columns: minmax(0, 1fr); }
  .ad-cl-seasons .ad-cl-avatar { display: none; }
  .ad-cl-remind-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .ad-cl-head-actions { width: 100%; }
  .ad-cl-head-actions .ad-btn { flex: 1 1 auto; }
  .ad-cl-remind-main strong, .ad-cl-remind-main .ad-hint { white-space: normal; }
  /* Téléphone : le nom et la prochaine date, le reste est dans la fiche. */
  .ad-cl-table th:nth-child(2), .ad-cl-table td:nth-child(2),
  .ad-cl-table th:nth-child(3), .ad-cl-table td:nth-child(3),
  .ad-cl-table th:nth-child(4), .ad-cl-table td:nth-child(4),
  .ad-cl-table .ad-cl-avatar { display: none; }
  .ad-cl-who .ad-acc-sub { overflow-wrap: normal; word-break: break-all; }
}
@media (prefers-reduced-motion: reduce) {
  .ad-cl-remind, .ad-cl-link, .ad-cl-search input, .ad-cl-notes { transition: none; }
  .ad-bk-image-busy .ad-bk-image-preview { animation: none; }
}

/* Formule : prix unique ou plusieurs tarifs selon le nombre de photos. */
.ad-bk-pricing { display: grid; gap: .85rem; margin-bottom: 1rem; }
.ad-bk-pricing .ad-seg { justify-self: start; flex-wrap: wrap; }
.ad-bk-pricing .ad-field, .ad-bk-pricing .ad-field-row { margin: 0; }
.ad-bk-tiers-box { display: grid; gap: .55rem; padding: .85rem; border-radius: 10px; background: var(--mist); }
.ad-bk-tiers { display: grid; gap: .45rem; }
.ad-bk-tier { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: .45rem; align-items: center; }
.ad-bk-tier input {
  width: 100%; min-height: 38px; padding: 0 .65rem; font: inherit; font-size: .9rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 8px;
}
.ad-bk-tier input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.ad-bk-tier-num { position: relative; display: block; }
.ad-bk-tier-num input { padding-right: 3.6rem; text-align: right; font-variant-numeric: tabular-nums; }
.ad-bk-tier-num span { position: absolute; right: .65rem; top: 50%; transform: translateY(-50%); font-size: .82rem; color: var(--muted); pointer-events: none; }
.ad-bk-tier-num input[data-tier="price"] { padding-right: 1.8rem; }
.ad-bk-tiers-box .ad-link-btn { justify-self: start; }
.ad-bk-tiers-box .ad-hint { margin: 0; font-size: .82rem; }
@media (max-width: 640px) {
  .ad-bk-tier { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .ad-bk-tier > input[data-tier="label"] { grid-column: 1 / -1; }
}

/* ---------- Style de la galerie : cartes, aperçu au survol, polices ---------- */

.ad-style-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin: .9rem 0 1.1rem; }
.ad-style-card {
  display: grid; gap: .15rem; justify-items: start; padding: .45rem .45rem .6rem; text-align: left;
  border: 2px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.ad-style-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.ad-style-card:focus-visible { outline: none; box-shadow: var(--ring); }
.ad-style-card-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 59, 246, .12); }
.ad-style-name { margin-top: .35rem; padding: 0 .2rem; font-size: .88rem; font-weight: 600; color: var(--ink); }
.ad-style-ideal { padding: 0 .2rem; font-size: .76rem; line-height: 1.35; color: var(--muted); }

/* Miniature d'un style : en-tête, titre dans sa police, six vignettes. */
.ad-style-mini {
  display: grid; grid-template-rows: auto 1fr; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 8px; background: var(--st-bg); box-shadow: 0 0 0 1px rgba(20, 20, 60, .08) inset;
}
.ad-style-mini-head { display: grid; justify-items: center; gap: 1px; padding: .5rem .4rem .35rem; background: var(--st-head); }
.ad-style-mini-eyebrow { font-family: var(--st-body); font-size: .42rem; letter-spacing: .24em; text-transform: uppercase; color: var(--st-accent); }
.ad-style-mini-title { font-family: var(--st-title); font-size: .95rem; line-height: 1.1; color: var(--st-ink); white-space: nowrap; }
.ad-style-mini[data-script] .ad-style-mini-title { font-size: 1.15rem; }
.ad-style-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 0 .4rem .4rem; align-content: start; }
.ad-style-mini-grid i { display: block; aspect-ratio: 1; border-radius: calc(var(--st-radius) / 2); background: var(--st-tile); }
.ad-style-mini-grid i:nth-child(3n + 2) { background: color-mix(in srgb, var(--st-accent) 28%, var(--st-tile)); }
.ad-style-architectural .ad-style-mini-head, .ad-style-moderne .ad-style-mini-head { justify-items: start; }
.ad-style-architectural .ad-style-mini-head { border-bottom: 1px solid var(--st-ink); margin: 0 .4rem .35rem; padding-left: 0; }
.ad-style-architectural .ad-style-mini-title { text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; }
.ad-style-architectural .ad-style-mini-grid { gap: 1px; }
.ad-style-moderne .ad-style-mini-title { font-weight: 700; letter-spacing: -.03em; }
.ad-style-editorial .ad-style-mini-title { font-size: 1.15rem; }
.ad-style-galerie .ad-style-mini-title { font-size: .72rem; letter-spacing: .06em; }
.ad-style-galerie .ad-style-mini-grid { gap: 6px; padding: 0 .7rem .5rem; }
.ad-style-doux .ad-style-mini:not([data-script]) .ad-style-mini-title, .ad-style-mini.ad-style-doux:not([data-script]) .ad-style-mini-title { font-style: italic; }

/* Fenêtre d'aperçu au survol : la galerie du client en miniature. */
.ad-style-pop {
  position: fixed; z-index: 120; width: min(380px, calc(100vw - 16px)); padding: .55rem;
  border-radius: 14px; background: var(--paper); pointer-events: none;
  box-shadow: 0 24px 60px -20px rgba(20, 20, 60, .35), 0 0 0 1px rgba(20, 20, 60, .08);
  animation: ad-style-pop-in .16s var(--ease);
}
@keyframes ad-style-pop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ad-style-pop-page { overflow: hidden; border-radius: 9px; background: var(--st-bg); color: var(--st-ink); }
.ad-style-pop-head { display: grid; justify-items: center; gap: .2rem; padding: 1.2rem 1rem .9rem; text-align: center; background: var(--st-head); }
.ad-style-pop-eyebrow { font-family: var(--st-body); font-size: .56rem; letter-spacing: .26em; text-transform: uppercase; color: var(--st-accent); }
.ad-style-pop-title { font-family: var(--st-title); font-size: 1.6rem; line-height: 1.1; color: var(--st-ink); }
.ad-style-pop-page[data-script] .ad-style-pop-title { font-size: 2.1rem; }
.ad-style-pop-sub { font-family: var(--st-body); font-size: .72rem; color: var(--st-muted); }
.ad-style-pop-intro { max-width: 30ch; margin-top: .3rem; font-family: var(--st-body); font-size: .72rem; line-height: 1.5; color: var(--st-muted); }
.ad-style-pop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: .2rem .7rem .8rem; align-items: start; }
.ad-style-pop-grid > i { display: block; aspect-ratio: 4 / 5; border-radius: calc(var(--st-radius) / 1.5); background: var(--st-tile); }
.ad-style-pop-grid > i:nth-child(3n + 2) { background: color-mix(in srgb, var(--st-accent) 28%, var(--st-tile)); }
.ad-style-pop-photo { display: block; overflow: hidden; border-radius: calc(var(--st-radius) / 1.5); background: var(--st-tile); }
.ad-style-pop-cap { margin: .5rem .2rem .1rem; font-size: .8rem; color: var(--muted); }
.ad-style-pop-cap strong { color: var(--ink); font-weight: 600; }
.ad-style-architectural .ad-style-pop-head, .ad-style-moderne .ad-style-pop-head { justify-items: start; text-align: left; }
.ad-style-architectural .ad-style-pop-head { margin: 0 .7rem .6rem; padding-left: 0; padding-right: 0; border-bottom: 1px solid var(--st-ink); }
.ad-style-architectural .ad-style-pop-title { text-transform: uppercase; letter-spacing: .14em; font-size: 1.1rem; }
.ad-style-architectural .ad-style-pop-grid { gap: 1px; }
.ad-style-moderne .ad-style-pop-title { font-weight: 700; letter-spacing: -.03em; }
.ad-style-editorial .ad-style-pop-title { font-size: 2rem; }
.ad-style-galerie .ad-style-pop-head { padding: 1.6rem 1rem 1.2rem; }
.ad-style-galerie .ad-style-pop-title { font-size: 1.05rem; letter-spacing: .06em; }
.ad-style-galerie .ad-style-pop-grid { gap: 10px; padding: .2rem 1.1rem 1.1rem; }
.ad-style-doux .ad-style-pop-page:not([data-script]) .ad-style-pop-title, .ad-style-pop-page.ad-style-doux:not([data-script]) .ad-style-pop-title { font-style: italic; }

.ad-tile-thumb { display: grid; width: 100%; height: 100%; }
.ad-tile-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Polices : deux listes et un échantillon dans les polices choisies. */
.ad-style-fonts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .2rem .9rem; align-items: end; max-width: 760px; }
.ad-style-fonts .ad-field { margin-bottom: .6rem; }
.ad-style-sample {
  grid-column: 1 / -1; display: grid; gap: .2rem; margin: 0 0 1.2rem; padding: .9rem 1rem; border-radius: 10px;
  background: var(--st-bg); box-shadow: 0 0 0 1px var(--line) inset;
}
.ad-style-sample-title { font-family: var(--st-title); font-size: 1.7rem; line-height: 1.15; color: var(--st-ink); }
.ad-style-sample[data-script] .ad-style-sample-title { font-size: 2.2rem; }
.ad-style-sample-body { font-family: var(--st-body); font-size: .95rem; line-height: 1.6; color: var(--st-muted); white-space: pre-line; }

.ad-presentation-form { max-width: 760px; }
.ad-style-header { display: grid; gap: .6rem; margin: .3rem 0 1rem; padding: .9rem; border-radius: 12px; background: var(--mist); }
.ad-style-header-title { font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.ad-style-header .ad-seg { justify-self: start; flex-wrap: wrap; }
.ad-style-header .ad-field { margin: 0; }
.ad-style-header .ad-hint { margin: 0; font-size: .82rem; }
.ad-style-cover { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: .8rem; align-items: center; }
.ad-style-cover:not(:has(.ad-style-cover-thumb)) { grid-template-columns: minmax(0, 1fr); }
.ad-style-cover-thumb { display: block; overflow: hidden; border-radius: 8px; max-height: 120px; }

/* Étoile « photo de couverture » sur chaque vignette. */
.ad-photo-cover {
  position: absolute; right: .35rem; bottom: .35rem; z-index: 1;
  width: 24px; height: 24px; display: grid; place-items: center;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--muted);
  font-size: .8rem; line-height: 1; cursor: pointer; opacity: 0;
  box-shadow: 0 2px 6px -2px rgba(20, 20, 60, .35);
  transition: opacity .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
.ad-photo:hover .ad-photo-cover, .ad-photo-cover:focus-visible { opacity: 1; }
.ad-photo-cover:hover { color: #b7791f; transform: scale(1.08); }
.ad-photo-cover-on { opacity: 1; color: #fff; background: #d69e2e; }
.ad-photo-cover-on:hover { color: #fff; }

@media (max-width: 720px) {
  .ad-style-cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .ad-style-fonts { grid-template-columns: minmax(0, 1fr); }
  .ad-photo-cover { opacity: 1; }
}
@media (hover: none) { .ad-photo-cover { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ad-style-card, .ad-photo-cover { transition: none; }
  .ad-style-pop { animation: none; }
}

/* ---------- Parrainage : carte de fidélité (onglet Abonnement) ---------- */

.ad-referral { margin: 2rem 0 1.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.ad-ref-grid { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.ad-ref-card {
  display: grid; justify-items: center; gap: .8rem; padding: 1.4rem 1.2rem; border-radius: 14px;
  background: var(--paper); box-shadow: var(--shadow-float);
}
.ad-ref-card-title { font-size: .82rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.ad-ref-stamps { display: flex; gap: .75rem; }
.ad-ref-stamp {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 2px dashed var(--line-2); background: var(--mist);
}
.ad-ref-stamp.on { border: 0; background: var(--accent); box-shadow: 0 6px 14px -8px rgba(38, 38, 212, .7); }
.ad-ref-stamp svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ad-ref-card-gift { font-size: .9rem; font-weight: 600; color: var(--ink); }
.ad-ref-side { display: grid; gap: .7rem; align-content: start; }
.ad-ref-side > p:first-child { font-weight: 600; color: var(--ink); }
.ad-ref-side textarea { width: 100%; resize: vertical; font: inherit; font-size: .9rem; }
.ad-ref-side .ad-btn { justify-self: start; }
.ad-ref-heading { margin: 1.4rem 0 .5rem; font-size: .95rem; }
.ad-ref-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ad-ref-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.ad-ref-ok { color: var(--ok-ink); font-weight: 500; }
.ad-signup-referral { margin-bottom: 1rem; }
@media (max-width: 700px) {
  .ad-ref-grid { grid-template-columns: 1fr; }
  .ad-ref-list li { flex-direction: column; gap: .2rem; }
}

/* ---------- Langue : bouton English / Français, sections pas encore traduites ---------- */

.ad-lang-switch {
  position: absolute; top: 18px; right: 18px; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--line, #e6e6ee); background: #fff; color: var(--ink, #0b0b10);
  font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer;
}
.ad-lang-switch:hover { background: var(--mist, #f6f6f9); }
.ad-lang-switch:focus-visible { outline: 2px solid var(--accent, #3b3bf6); outline-offset: 2px; }
#ad-view[data-untranslated]::before {
  content: attr(data-untranslated); display: block; margin-bottom: 18px; padding: 10px 14px; border-radius: 10px;
  background: var(--accent-soft, #ededff); color: var(--accent-deep, #2626d4); font-size: .9rem;
}

/* ---------- Galerie de démonstration : guide en tête de fiche ---------- */

.ad-badge-demo { background: var(--accent-soft); color: var(--accent-deep); }

main section.ad-demo {
  background: linear-gradient(180deg, var(--accent-soft), var(--paper) 140px);
  border-color: #d9d9fb;
  padding: 1.5rem 1.6rem 1.3rem;
}
.ad-demo-head h3 { font-size: 1.25rem; letter-spacing: -.01em; margin: .15rem 0 .4rem; }
.ad-demo-head p { color: var(--muted); max-width: 68ch; margin: 0; }
.ad-demo-kicker {
  font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-deep); margin: 0;
}
.ad-demo-progress {
  display: flex; align-items: center; gap: .55rem;
  margin: 1rem 0 0; font-size: .9rem; color: var(--ink-2);
}
.ad-demo-spinner {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #d9d9fb; border-top-color: var(--accent);
  animation: ad-demo-spin .9s linear infinite;
}
@keyframes ad-demo-spin { to { transform: rotate(360deg); } }

.ad-demo-steps {
  list-style: none; counter-reset: demo; padding: 0; margin: 1.2rem 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem;
}
.ad-demo-steps li {
  counter-increment: demo; position: relative;
  display: grid; gap: .3rem; align-content: start;
  padding: .9rem 1rem .95rem 3rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
}
.ad-demo-steps li::before {
  content: counter(demo);
  position: absolute; left: 1rem; top: .85rem;
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--accent); color: #fff;
}
.ad-demo-steps li:first-child { grid-column: 1 / -1; }
.ad-demo-steps strong { font-size: .95rem; }
.ad-demo-steps span { font-size: .88rem; color: var(--muted); line-height: 1.5; }
.ad-demo-access { display: grid; gap: .5rem; margin-top: .35rem; max-width: 620px; }
.ad-demo-access .ad-btn { text-decoration: none; }

.ad-demo-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem; }
.ad-demo-foot .ad-link-btn { color: var(--muted); }

@media (max-width: 1100px) {
  .ad-demo-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-demo-steps li:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .ad-demo-steps { grid-template-columns: 1fr; }
  .ad-demo-steps li:last-child { grid-column: auto; }
  main section.ad-demo { padding: 1.2rem 1.1rem 1.1rem; }
  .ad-demo-access .ad-copy-row { flex-wrap: wrap; }
  .ad-demo-access .ad-copy-row input { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ad-demo-spinner { animation: none; border-top-color: var(--accent); }
}

/* ---------- Planning : agenda et « À faire » ---------- */

.ad-pl-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 1rem; align-items: start; }
.ad-pl-layout > section { margin-bottom: 0; }
.ad-pl-todo { position: sticky; top: 1rem; }
.ad-pl-count {
  display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; margin-left: .35rem;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: .74rem; font-weight: 600; vertical-align: 2px;
  font-variant-numeric: tabular-nums;
}

/* À faire */
.ad-pl-tasks { list-style: none; margin: 0; padding: 0; display: grid; }
.ad-pl-task { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.ad-pl-task:first-child { border-top: 0; padding-top: .2rem; }
.ad-pl-task input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: var(--accent); cursor: pointer; }
.ad-pl-task .ad-pl-title { display: block; font-weight: 600; font-size: .93rem; cursor: pointer; }
.ad-pl-done .ad-pl-title { text-decoration: line-through; color: var(--ink-soft); font-weight: 500; }
.ad-pl-done .ad-pl-meta { color: var(--ink-soft); }
.ad-pl-clear { color: var(--muted); font-size: .9rem; margin: 0; }
.ad-pl-late { color: var(--alert-ink); font-weight: 600; }

.ad-pl-form { display: grid; gap: .7rem; padding: .9rem; margin-bottom: 1rem; background: var(--mist); border-radius: 10px; }
.ad-pl-form .ad-hint { margin: 0; }
.ad-pl-form-actions { display: flex; align-items: center; gap: 1rem; }

/* Agenda */
.ad-pl-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.ad-pl-chip {
  font: inherit; font-size: .84rem; padding: .35rem .75rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2);
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.ad-pl-chip:hover { border-color: var(--ink-soft); }
.ad-pl-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ad-pl-chip-n { opacity: .65; font-variant-numeric: tabular-nums; margin-left: .15rem; }
.ad-pl-chip:focus-visible { outline: none; box-shadow: var(--ring); }

.ad-pl-day + .ad-pl-day { margin-top: 1.1rem; }
.ad-pl-day h4 {
  display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .45rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-2);
}
.ad-pl-today h4 span:first-child { color: var(--accent-deep); }
.ad-pl-in { font-weight: 500; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ad-pl-events { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }

.ad-pl-event {
  --pl: var(--line-2);
  display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: .8rem; align-items: start;
  padding: .7rem .85rem .7rem .75rem; border: 1px solid var(--line); border-left: 3px solid var(--pl);
  border-radius: 10px; background: var(--paper);
}
.ad-pl-event[data-pl-href] { cursor: pointer; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.ad-pl-event[data-pl-href]:hover { background: var(--mist); }
.ad-pl-booking { --pl: var(--accent); }
.ad-pl-reminder { --pl: var(--warn); }
.ad-pl-season { --pl: #b07ad6; }
.ad-pl-item { --pl: var(--ink-soft); }
.ad-pl-when { font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); padding-top: .05rem; }
.ad-pl-title { margin: 0; font-size: .93rem; font-weight: 600; line-height: 1.4; }
.ad-pl-title a { color: inherit; text-decoration: none; }
.ad-pl-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ad-pl-type {
  display: inline-block; margin-right: .45rem; padding: .05rem .45rem; border-radius: 999px; vertical-align: 1px;
  font-size: .7rem; font-weight: 600; letter-spacing: .02em; background: var(--mist-2); color: var(--ink-2);
}
.ad-pl-booking .ad-pl-type { background: var(--accent-soft); color: var(--accent-deep); }
.ad-pl-reminder .ad-pl-type { background: var(--warn-bg); color: var(--warn-ink); }
.ad-pl-season .ad-pl-type { background: #f4ecfb; color: #7a3fa8; }
.ad-pl-meta { margin: .2rem 0 0; font-size: .84rem; color: var(--muted); line-height: 1.5; }
.ad-pl-ok { color: var(--ok-ink); }
.ad-pl-due { color: var(--warn-ink); font-weight: 600; }
.ad-pl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.ad-pl-task .ad-pl-actions { margin-top: .5rem; }
.ad-pl-actions .ad-btn { padding: .3rem .65rem; font-size: .8rem; text-decoration: none; }
.ad-pl-delete { font-size: .8rem; color: var(--muted); }

.ad-pl-empty { padding: 1.4rem 1.2rem; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); font-size: .9rem; }
.ad-pl-empty p { margin: 0 0 .5rem; max-width: 60ch; }
.ad-pl-empty strong { color: var(--ink); }
.ad-pl-empty-links { margin-bottom: 0 !important; }

@media (max-width: 1100px) {
  .ad-pl-layout { grid-template-columns: 1fr; }
  .ad-pl-todo { position: static; }
}
@media (max-width: 560px) {
  .ad-pl-event { grid-template-columns: 3.4rem minmax(0, 1fr); }
  .ad-pl-event .ad-pl-actions { grid-column: 2; }
  .ad-pl-form .ad-field-row { grid-template-columns: 1fr 1fr; }
}
.ad-nowrap { white-space: nowrap; }
