/* =============================================================================
   qr-espace.css — DA v3.3 de QR Code by Belentia pour l'outil /app et l'espace
   connecté (24/09/2026). Fichier statique (hors Vite), chargé avec ?v=filemtime.
   §1 à §4 : copie des jetons, boutons, nav, menu Plus, burger et pied du kit des
   maquettes (_assets/base.css), SANS le reset global (l'outil /app garde le
   preflight Tailwind). Couleur de l'outil : indigo #4F46E5 (qr.css v5).
   Règles : blanc pur, un seul plein indigo par écran, aucune ombre (sauf menu
   déroulant et dialogue), filets 1 px, pas de filet latéral coloré, pas de beige.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. Jetons (variables CSS)
   -------------------------------------------------------------------------- */
.es-body, .da-scope {
  /* Couleur de l'outil — surchargée par chaque maquette. Noir = valeur neutre. */
  --accent: #000000;
  --accent-ink: #FFFFFF;                                   /* texte sur accent plein */
  --accent-hover: color-mix(in srgb, var(--accent) 92%, #000);  /* hover : accent assombri de 8 % */
  --accent-soft: color-mix(in srgb, var(--accent) 8%, #FFF);    /* teinte 8 % : puces, chips */
  --accent-ring: color-mix(in srgb, var(--accent) 35%, transparent); /* anneau de focus */

  /* Encres et surfaces */
  --ink: #111827;        /* titres */
  --text: #374151;       /* texte courant */
  --muted: #6B7280;      /* texte atténué */
  --line: #E6E8EE;       /* filets et bords de cartes */
  --line-strong: #C9CDD6;/* bord de carte au survol */
  --soft: #F7F8FA;       /* surface douce — deux bandes par page au maximum */
  --canvas: #FFFFFF;     /* fond de page */

  /* Formes */
  --radius: 14px;        /* cartes */
  --radius-sm: 10px;     /* boutons, pastilles, logo */
  --radius-pill: 999px;  /* chips */
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .06);

  /* Rythme — tout est multiple de 8 px */
  --container: 1200px;
  --gutter: 24px;        /* 16 px en mobile, cf. § 11 */
  --section-y: 96px;     /* 64 px en mobile, cf. § 11 */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;

  /* Typographie */
  --font-title: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Mouvement */
  --t: 160ms;
  --ease: cubic-bezier(.2, .6, .3, 1);
}

/* Repli si color-mix n'est pas disponible : on retombe sur des valeurs neutres
   plutôt que sur une variable vide (qui casserait les fonds). */
@supports not (color: color-mix(in srgb, #000 8%, #fff)) {
  .es-body, .da-scope {
    --accent-hover: var(--accent);
    --accent-soft: var(--soft);
    --accent-ring: var(--line-strong);
  }
}


/* Couleur de l'outil (qr.css v5). */
.es-body, .da-scope {
  --accent: #4F46E5;
  --accent-hover: #4338CA;
  --accent-6: color-mix(in srgb, #4F46E5 6%, #FFF);
  --accent-12: color-mix(in srgb, #4F46E5 12%, #FFF);
  --accent-line: color-mix(in srgb, #4F46E5 22%, #FFF);
  --tint4: color-mix(in srgb, #4F46E5 4%, #FFF);
  --text: #4B5563;
  --paper: #F7F8FA;
  --chip-bg: #F2F3F5;
  --radius: 16px;
  --ok: #16A34A;
  --warn: #F59E0B;
  --danger: #DC2626;
  --shadow: 0 1px 2px rgba(17, 24, 39, .05);   /* v5 : menu déroulant seulement */
}
@supports not (color: color-mix(in srgb, #000 8%, #fff)) {
  .es-body, .da-scope { --accent-6: #F4F4FE; --accent-12: #E8E7FC; --accent-line: #D2D0F8; --tint4: #F9F9FE; }
}

/* -----------------------------------------------------------------------------
   5. Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 48px;
  padding: 0 var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t) var(--ease),
              border-color var(--t) var(--ease),
              color var(--t) var(--ease),
              transform var(--t) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

/* Primaire — accent plein. Un seul par écran. */
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { background: var(--accent-hover); }

/* Secondaire — contour encre, fond blanc. */
.btn--secondary {
  background: var(--canvas);
  color: var(--ink);
  border-color: var(--ink);
}
.btn--secondary:hover { background: var(--ink); color: var(--canvas); }

/* Discret — pour la nav (Connexion, FR/EN). */
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--line-strong); background: var(--soft); }

.btn--block { width: 100%; }

/* -----------------------------------------------------------------------------
   6. Barre de navigation
   -------------------------------------------------------------------------- */
.nav {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 64px;
}

/* Variante : liens centrés, marque à gauche, actions à droite. */
.nav--centered .nav__links { justify-content: center; flex: 1; }

/* Marque : carré 36 px aux couleurs de l'outil + nom + « by Belentia ». */
.brand { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  flex: 0 0 36px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
}
.brand__mark svg { width: 20px; height: 20px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}
.brand__by { font-size: 11px; color: var(--muted); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: var(--space-5);
}
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;                    /* cible tactile */
  padding-inline: 4px;
  font-weight: 500;
  font-size: 16px;
  color: var(--text);
}
.nav__link { white-space: nowrap; }
.nav__link:hover { color: var(--ink); text-decoration: none; }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; }

.nav__spacer { margin-left: auto; }
.nav__actions { display: flex; align-items: center; gap: var(--space-2); }
.nav__actions .btn { min-height: 44px; padding-inline: var(--space-2); white-space: nowrap; }


/* -----------------------------------------------------------------------------
   7. Menu « Plus » — <details> natif, panneau 260 px
   (fermeture au clic extérieur et à Échap : voir le JS de chaque maquette)
   -------------------------------------------------------------------------- */
.more { position: relative; }
.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding-inline: 4px;
  font-weight: 500;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary:hover { color: var(--ink); }
.more > summary svg { transition: transform var(--t) var(--ease); }
.more[open] > summary svg { transform: rotate(180deg); }

.more__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 260px;
  padding: var(--space-1);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.more__panel a {
  display: block;
  min-height: 44px;
  padding: 11px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}
.more__panel a:hover { background: var(--soft); color: var(--ink); text-decoration: none; }


/* -----------------------------------------------------------------------------
   8. Burger mobile — panneau plein écran, sans dépendance
   -------------------------------------------------------------------------- */
.burger {
  display: none;                       /* affiché sous 900 px, cf. § 11 */
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}
.burger:hover { border-color: var(--line-strong); }

.mobile-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--canvas);
  /* le .container intérieur porte déjà la gouttière : pas de double marge,
     la marque et le bouton Fermer restent à la place de la marque et du burger */
  padding: 0 0 var(--gutter);
  overflow-y: auto;
}
.mobile-panel[data-open="true"] { display: block; }
.mobile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  margin-bottom: var(--space-3);
}
.mobile-panel__close {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}
.mobile-panel nav a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}
.mobile-panel nav a:hover { text-decoration: none; color: var(--accent); }
.mobile-panel .btn { margin-top: var(--space-4); }

/* Quand le panneau est ouvert, la page dessous ne défile plus. */
body[data-menu-open="true"] { overflow: hidden; }


/* -----------------------------------------------------------------------------
   14. Pied de page — une rangée, sobre
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-6);
  background: var(--canvas);
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}
.footer__tagline { font-size: 15px; color: var(--muted); max-width: 40ch; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin-left: auto;
}
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--text);
}
.footer__links a:hover { color: var(--ink); }
.footer__legal {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}



/* Points de rupture de la nav (copie de base.css § 16). */
@media (max-width: 1024px) {
  .nav__links { gap: var(--space-2); margin-left: var(--space-3); }
  .footer__links { margin-left: 0; flex-basis: 100%; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .nav__inner { gap: var(--space-2); }
  .nav__links { gap: 12px; margin-left: var(--space-2); }
  .nav__link { font-size: 15px; }
  .nav__actions { gap: 4px; }
}
@media (max-width: 900px) {
  .nav__links, .nav__actions { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 720px) {
  .es-body, .da-scope { --gutter: 16px; }
  .footer__row { flex-direction: column; align-items: flex-start; }
  .footer__links { margin-left: 0; }
}

/* =============================================================================
   Espace connecté — composants composés avec les jetons (base.css n'a ni
   formulaire, ni tableau, ni alerte, ni tableau de bord).
   ========================================================================== */
.es-body {
  margin: 0; background: var(--canvas); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.es-body *, .es-body *::before, .es-body *::after { box-sizing: border-box; }
.es-body h1, .es-body h2, .es-body h3, .es-body p, .es-body ul { margin: 0; }
.es-body ul { padding: 0; list-style: none; }
.es-body a { color: var(--accent); text-decoration: none; }
.es-body a:hover { text-decoration: underline; }
.es-body a.btn:hover, .es-body a.brand:hover, .es-body .es-tabs a:hover, .es-body .more__panel a:hover { text-decoration: none; }
.es-body button, .es-body input, .es-body select, .es-body textarea { font: inherit; color: inherit; }
.es-body :focus-visible { outline: 2px solid #111827; outline-offset: 2px; border-radius: 4px; }
.es-body svg { flex-shrink: 0; }
.nav { position: sticky; top: 0; }
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 880px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: 10px; background: #fff; color: #111827; font-weight: 600; border: 1px solid var(--line-strong); }
.skip-link:focus { top: 12px; }
.ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico--sm { width: 16px; height: 16px; }
.ico--accent { color: var(--accent); }

/* Boutons complémentaires */
.btn--sm { min-height: 44px; padding-inline: 16px; font-size: 15px; }
.btn--danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, #FFF); }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 6%, #FFF); border-color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--primary, .es-body a.btn--primary { color: var(--accent-ink); }
.es-body a.btn--ghost, .es-body a.btn--secondary { color: var(--ink); }

/* Barre d'onglets de l'espace (sous la nav) */
.es-tabsbar { border-bottom: 1px solid var(--line); background: var(--canvas); }
.es-tabsbar__inner { display: flex; align-items: center; gap: 8px; min-height: 56px; }
.es-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.es-tabs::-webkit-scrollbar { display: none; }
.es-tabs a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border-radius: var(--radius-sm); font-weight: 500; font-size: 15px; color: var(--text); white-space: nowrap;
}
.es-tabs a:hover { background: var(--paper); color: var(--ink); }
.es-tabs a[aria-current="page"] { color: var(--accent); background: var(--accent-6); font-weight: 600; }
.es-tabsbar__tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.es-tabsbar__tools form { margin: 0; }
.es-iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--canvas); color: var(--ink); font-weight: 500; font-size: 15px; cursor: pointer; }
.es-iconbtn:hover { border-color: var(--line-strong); background: var(--paper); }
@media (max-width: 640px) { .es-iconbtn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); } .es-iconbtn { padding: 0; } }

/* Page */
.es-main { padding-block: 40px 72px; }
.es-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.es-head h1, .es-h1 { font-family: var(--font-title); font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); overflow-wrap: anywhere; }
.es-head p, .es-lead { color: var(--muted); margin-top: 6px; }
.es-h2 { font-family: var(--font-title); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); }
.es-h3 { font-family: var(--font-title); font-weight: 600; font-size: 17px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.es-muted { color: var(--muted); font-size: 15px; }
.es-small { font-size: 14px; color: var(--muted); }
.es-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text); font-weight: 500; font-size: 15px; margin-bottom: 8px; }
.es-back:hover { color: var(--ink); }
.es-stack > * + * { margin-top: 16px; }
.es-section { margin-top: 40px; }
@media (max-width: 720px) { .es-main { padding-block: 24px 56px; } .es-head h1, .es-h1 { font-size: 26px; } .es-h2 { font-size: 20px; } }

/* Cartes : filet 1 px, aucune ombre */
.es-card { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.es-card--tint { background: var(--tint4); border-color: var(--accent-12); }
.es-card + .es-card { margin-top: 16px; }
.es-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
@media (max-width: 720px) { .es-card { padding: 18px; } }

/* Chips d'état */
.es-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--chip-bg); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.es-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.es-chip--ok::before { background: var(--ok); }
.es-chip--warn::before { background: var(--warn); }
.es-chip--accent { background: var(--accent-6); color: var(--accent); }
.es-chip--accent::before { background: var(--accent); }
.es-chip--plain::before { display: none; }

/* Alertes : teinte vive à 9 % + filet complet de la même teinte (jamais crème ni filet latéral) */
.es-alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid; border-radius: 12px; color: var(--ink); font-size: 15px; margin-bottom: 20px; }
.es-alert > svg { margin-top: 2px; }
.es-alert--ok { background: color-mix(in srgb, var(--ok) 9%, #FFF); border-color: color-mix(in srgb, var(--ok) 35%, #FFF); }
.es-alert--ok > svg { color: var(--ok); }
.es-alert--err { background: #FFFFFF; border-color: color-mix(in srgb, var(--danger) 45%, #FFF); } /* 24/09 b : fond blanc, filet rouge 1 px, comme l'alerte ambre */
.es-alert--err > svg { color: var(--danger); }
.es-alert--warn { background: #FFFFFF; border-color: color-mix(in srgb, var(--warn) 45%, #FFF); } /* 24/09 : fond blanc, jamais crème */
.es-alert--warn > svg { color: var(--warn); }
.es-alert--info { background: var(--accent-6); border-color: var(--accent-line); }
.es-alert--info > svg { color: var(--accent); }
.es-alert__title { font-family: var(--font-title); font-weight: 600; font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.es-alert p { color: var(--text); }
.es-alert .btn { margin-top: 12px; }

/* Champs */
.es-field { display: grid; gap: 6px; min-width: 0; }
.es-field + .es-field { margin-top: 14px; }
.es-field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.es-input, .es-field input[type="text"], .es-field input[type="email"], .es-field input[type="password"], .es-field input[type="url"] {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--canvas); color: var(--ink); font-size: 1rem; line-height: 1.4; transition: border-color var(--t) var(--ease);
}
.es-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.es-field-error { color: var(--danger); font-size: 14px; }
.es-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink); cursor: pointer; min-height: 44px; padding-top: 10px; }
.es-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; }

/* Indicateurs aérés */
.es-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.es-kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: var(--canvas); min-width: 0; }
.es-kpi__label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
.es-kpi__label svg { color: var(--accent); }
.es-kpi__value { font-family: var(--font-title); font-weight: 700; font-size: 32px; line-height: 1.1; color: var(--ink); margin-top: 10px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.es-kpi__value small { font-size: 16px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.es-kpi__value--text { font-size: 20px; }
.es-kpi__meter { height: 6px; border-radius: 999px; background: var(--chip-bg); margin-top: 12px; overflow: hidden; }
.es-kpi__meter span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transform-origin: left; }
@media (max-width: 640px) {
  .es-kpis { gap: 8px; }
  .es-kpi { padding: 14px 12px; border-radius: 14px; }
  .es-kpi__label { font-size: 12px; gap: 4px; }
  .es-kpi__label svg { width: 14px; height: 14px; }
  .es-kpi__value { font-size: 22px; margin-top: 6px; }
  .es-kpi__value--text { font-size: 15px; }
  .es-kpi__value small { font-size: 13px; }
}

/* Création d'un QR */
.qr-create-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr) auto; gap: 12px; align-items: end; }
.qr-create-form .es-field + .es-field { margin-top: 0; }
@media (max-width: 760px) { .qr-create-form { grid-template-columns: minmax(0,1fr); } .qr-create-form .btn { width: 100%; } }

/* Liste des QR : vignette, nom, état, lien, scans */
.qr-list { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.qr-list-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 16px 20px; min-width: 0; background: var(--canvas); transition: background-color var(--t) var(--ease); }
.qr-list-item + .qr-list-item { border-top: 1px solid var(--line); }
.qr-list-item:hover { background: var(--paper); }
.qr-thumb { width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 12px; padding: 5px; background: #fff; display: grid; place-items: center; }
.qr-thumb svg { width: 100%; height: 100%; display: block; }
.qr-list-main { min-width: 0; }
.qr-list-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qr-list-title strong { font-family: var(--font-title); font-weight: 600; font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.qr-list-destination { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-list-destination span { overflow: hidden; text-overflow: ellipsis; }
.qr-list-scans { text-align: right; min-width: 64px; }
.qr-list-scans strong { display: block; font-family: var(--font-title); font-weight: 700; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.qr-list-scans span { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .qr-list-item { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
  .qr-thumb { width: 48px; height: 48px; }
  .qr-list-item .btn { grid-column: 1 / -1; width: 100%; }
}

/* Fiche d'un QR */
.es-split { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .es-split { grid-template-columns: minmax(0, 1fr); } }
.qr-visual { text-align: center; }
.qr-visual__frame { display: inline-block; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.qr-visual__frame svg { display: block; width: 220px; height: 220px; max-width: 100%; }
.qr-short-url-row { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.qr-short-url-row code { background: var(--paper); border: 1px solid var(--line); padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; font-family: var(--font-body); }
.qr-downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }

/* Barres de répartition (animées sobrement) */
.es-meters { display: grid; gap: 10px; }
.es-meter { display: grid; grid-template-columns: 120px minmax(0, 1fr) 84px; align-items: center; gap: 12px; font-size: 14px; }
.es-meter__label { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-meter__track { height: 8px; border-radius: 999px; background: var(--chip-bg); overflow: hidden; }
.es-meter__fill { height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; }
.es-meter--muted .es-meter__fill { background: #9CA3AF; }
.es-meter--muted .es-meter__label { color: var(--muted); }
.es-meter__value { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .es-meter { grid-template-columns: 92px minmax(0, 1fr) 72px; gap: 8px; } }

/* Courbe en barres sur 30 jours */
.es-bars { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.es-bars::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; border-top: 1px dashed var(--line); }
.es-bar { flex: 1; min-width: 3px; border-radius: 4px 4px 0 0; background: var(--accent); transform-origin: bottom; }
.es-bar--zero { background: var(--line); }
.es-bars__axis { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; }
.es-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .es-grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* Animation d'entrée sur les vraies données, désactivée si mouvement réduit */
@media (prefers-reduced-motion: no-preference) {
  .es-anim .es-bar { animation: es-grow-y .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms); }
  .es-anim .es-meter__fill, .es-anim .es-kpi__meter span { animation: es-grow-x .8s var(--ease) both; }
  @keyframes es-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes es-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* Offres (abonnement) */
.es-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .es-plans { grid-template-columns: minmax(0, 1fr); } }
.es-plan { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--canvas); display: flex; flex-direction: column; min-width: 0; }
.es-plan--pop { background: var(--tint4); border-color: var(--accent-line); }
.es-plan__flag { position: absolute; top: -12px; left: 24px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.es-plan h3 { font-family: var(--font-title); font-weight: 700; font-size: 20px; color: var(--ink); }
.es-plan__sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.es-plan__price { font-family: var(--font-title); font-weight: 700; font-size: 34px; color: var(--ink); margin-top: 14px; letter-spacing: -0.02em; }
.es-plan__price small { font-family: var(--font-body); font-size: 15px; font-weight: 500; color: var(--muted); }
.es-ticks { display: grid; gap: 8px; margin-top: 16px; }
.es-ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text); }
.es-ticks li svg { color: var(--accent); margin-top: 3px; }
.es-plan form { margin-top: auto; padding-top: 18px; }
.es-consent { display: grid; gap: 4px; }
.es-consent .es-check { font-size: 14px; line-height: 1.45; color: var(--text); padding-top: 6px; }
.es-mediation { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 8px; }
.es-mediation a { overflow-wrap: anywhere; }

/* Tableaux (factures, reçus) */
.es-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.es-table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); }
.es-table td { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.es-table tr:last-child td { border-bottom: 0; }
.es-table td:last-child, .es-table th:last-child { text-align: right; }
.es-table td + td, .es-table th + th { padding-left: 12px; }

/* Segmenté Test / Live (propriétaire) */
.es-segment { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; width: min(100%, 360px); padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.es-segment button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: normal; }
.es-segment button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* État vide */
.es-empty { text-align: center; padding: 40px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.es-empty__icon { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-6); color: var(--accent); }
.es-empty__icon .ico { width: 26px; height: 26px; }
.es-empty h2, .es-empty h3 { font-family: var(--font-title); font-weight: 700; font-size: 20px; color: var(--ink); }
.es-empty p { max-width: 520px; margin: 8px auto 20px; color: var(--text); }

/* Dialogue de confirmation maison (remplace confirm()) */
.es-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); color: var(--text); box-shadow: 0 1px 2px rgba(17,24,39,.05); }
.es-dialog::backdrop { background: rgba(17, 24, 39, .32); }
.es-dialog__body { padding: 24px; }
.es-dialog__title { font-family: var(--font-title); font-weight: 700; font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.es-dialog__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 480px) { .es-dialog__actions .btn { flex: 1; } }

/* Pied de l'espace */
.es-footer { border-top: 1px solid var(--line); padding-block: 28px; }
.es-footer .footer__links a { font-size: 14px; }
.es-footer__legal { font-size: 13px; color: var(--muted); margin-top: 12px; }
.es-footer button.footer__manage { background: none; border: 0; padding: 0; min-height: 44px; font-size: 14px; color: var(--text); cursor: pointer; }

/* Compatibilité des vues propriétaire (journal, statistiques, reçus, merci) :
   les anciennes classes « ld-* » reprennent la DA v3.3. */
.ld-container { width: 100%; max-width: var(--container); margin-inline: auto; padding: 40px var(--gutter) 72px; }
.ld-feature { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: none; }
.ld-feature h3 { font-family: var(--font-title); font-weight: 600; font-size: 17px; color: var(--ink); }
.ld-feature-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-6); color: var(--accent); font-size: 26px; }
.ld-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--canvas); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.es-body a.ld-btn { color: var(--ink); }
.ld-btn:hover { border-color: var(--line-strong); background: var(--paper); text-decoration: none; }
.ld-btn-primary, .es-body a.ld-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ld-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.ld-btn-lg { min-height: 48px; padding: 0 24px; font-size: 16px; }
.ld-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--chip-bg); color: var(--ink); font-size: 13px; font-weight: 600; }
.ld-badge.ok { background: color-mix(in srgb, var(--ok) 9%, #FFF); }
.ld-badge.warn, .ld-badge.soon { background: #FFFFFF; outline: 1px solid color-mix(in srgb, var(--warn) 45%, #FFF); outline-offset: -1px; }
.ld-legal { max-width: 760px; margin-inline: auto; }
.ld-legal h1 { font-family: var(--font-title); font-weight: 700; font-size: 32px; color: var(--ink); letter-spacing: -0.02em; margin: 16px 0 8px; }
.ld-legal h2 { font-family: var(--font-title); font-weight: 700; font-size: 20px; color: var(--ink); margin: 24px 0 8px; }
.ld-legal p { margin: 0 0 12px; }
.es-body [class^="ph"], .es-body [class*=" ph-"] { line-height: 1; }

/* Priorités : le reset « .es-body a / button » ne doit pas repeindre la nav ni les boutons. */
.es-body .btn--primary, .es-body .btn--primary:hover { color: var(--accent-ink); }
.es-body .btn--ghost, .es-body .btn--secondary { color: var(--ink); }
.es-body .btn--secondary:hover { color: var(--canvas); }
.es-body .btn--danger { color: var(--danger); }
.es-body .nav__link, .es-body .more__panel a, .es-body .footer__links a, .es-body .es-tabs a, .es-body .es-back { color: var(--text); }
.es-body .nav__link:hover, .es-body .more__panel a:hover, .es-body .footer__links a:hover, .es-body .es-back:hover { color: var(--ink); text-decoration: none; }
.es-body .es-tabs a[aria-current="page"] { color: var(--accent); }
.es-body .mobile-panel nav a, .es-body .brand { color: var(--ink); }
.es-kpi__value { overflow-wrap: normal; }
@media (max-width: 640px) { .es-kpi__value--text { font-size: 13px; } }
/* La liste garde la classe historique « ld-feature » (contrat de test) : une seule carte, lignes séparées par un filet. */
.qr-list .qr-list-item.ld-feature { border: 0; border-radius: 0; padding: 16px 20px; }
.qr-list .qr-list-item.ld-feature + .qr-list-item { border-top: 1px solid var(--line); }
@media (max-width: 640px) { .qr-list .qr-list-item.ld-feature { padding: 14px; } }

/* Barre d'onglets sur mobile : la déconnexion est déjà dans le panneau du burger (≤ 900 px),
   on la retire de la barre pour laisser la place aux onglets ; fondu à droite quand ça défile. */
@media (max-width: 900px) {
  .es-tabsbar__tools form { display: none; }
  .es-tabs.is-overflowing { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 85%, transparent); }
  .es-tabs.is-overflowing.is-start { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .es-tabs.is-overflowing.is-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); mask-image: linear-gradient(90deg, transparent, #000 12%); }
}

/* =============================================================================
   Statistiques propriétaire (Audience & activité)
   ============================================================================= */
.os-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.os-periods { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.es-body .os-periods a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 9px; color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; }
.es-body .os-periods a:hover { color: var(--ink); background: var(--canvas); text-decoration: none; }
.es-body .os-periods a[aria-current="page"] { background: var(--accent); color: #fff; }
.os-kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 8px; }
.es-body .os-note { margin: 8px 0 24px; }
.es-body .os-intro { margin: 6px 0 16px; }
.os-chart__head { align-items: center; }
.os-chart__head .es-h3 svg { color: var(--accent); }
.os-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.os-switch button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.os-switch button[aria-pressed="true"] { background: var(--canvas); color: var(--accent); box-shadow: 0 0 0 1px var(--line); }
.es-body .os-chart__total { margin-bottom: 8px; }
.os-chart__total strong { font-family: var(--font-title); font-size: 22px; color: var(--ink); margin-right: 4px; font-variant-numeric: tabular-nums; }
.os-bars { height: 150px; }
.os-details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 6px; }
.os-details summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
.os-details summary::-webkit-details-marker { display: none; }
.os-details summary::before { content: ""; width: 8px; height: 8px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--ease); margin-right: 4px; }
.os-details[open] summary::before { transform: rotate(45deg); }
.os-table-wrap { overflow-x: auto; }
.os-table td, .os-table th { text-align: right; font-variant-numeric: tabular-nums; }
.os-table td:first-child, .os-table th:first-child { text-align: left; }
.os-cell-text { max-width: 260px; overflow-wrap: anywhere; }
.es-body .os-sources { list-style: none; display: grid; gap: 0; margin-top: 12px; }
.os-sources li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; color: var(--ink); font-size: 15px; }
.os-sources li + li { border-top: 1px solid var(--accent-12); }
.es-body .os-footnote { margin-top: 32px; max-width: 760px; line-height: 1.6; }
@media (max-width: 720px) {
  .os-actions, .os-periods { width: 100%; }
  .os-periods a { flex: 1; justify-content: center; }
  .os-actions > .btn { width: 100%; }
  .os-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os-switch { width: 100%; }
  .os-switch button { flex: 1; }
}

/* Journal interne (propriétaire) : gabarit de lecture, tableaux défilants, citations sans filet latéral. */
.os-log-meta { display: inline-flex; align-items: center; gap: 6px; }
.os-log { padding: clamp(20px, 4vw, 40px); }
.os-log__prose { max-width: 820px; color: var(--text); font-size: 16px; line-height: 1.7; overflow-x: auto; }
.es-body .os-log__prose > :first-child { margin-top: 0; }
.es-body .os-log__prose h2 { font-family: var(--font-title); font-weight: 700; color: var(--ink); font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; margin: 36px 0 12px; padding-top: 28px; border-top: 1px solid var(--line); }
.es-body .os-log__prose h2:first-child { padding-top: 0; border-top: 0; }
.es-body .os-log__prose h3 { font-family: var(--font-title); font-weight: 600; color: var(--ink); font-size: 17px; margin: 24px 0 8px; }
.es-body .os-log__prose p, .es-body .os-log__prose ul, .es-body .os-log__prose ol { margin: 0 0 14px; }
.es-body .os-log__prose ul, .es-body .os-log__prose ol { padding-left: 22px; list-style: disc; }
.es-body .os-log__prose li { margin-bottom: 6px; }
.es-body .os-log__prose a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.es-body .os-log__prose strong { color: var(--ink); }
.es-body .os-log__prose code { padding: 2px 6px; border-radius: 6px; background: var(--accent-6); color: var(--accent); font-size: .88em; overflow-wrap: anywhere; }
.es-body .os-log__prose blockquote { margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--accent-12); border-radius: 12px; background: var(--accent-6); color: var(--text); }
.es-body .os-log__prose table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; margin-bottom: 16px; }
.es-body .os-log__prose th, .es-body .os-log__prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.es-body .os-log__prose th { color: var(--muted); font-weight: 600; font-size: 13px; }
.es-body .os-log__prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* Page de retour de paiement */
.es-result { border-style: solid; border-color: var(--line); padding: 48px 24px; }
.es-body .es-result p { margin: 12px auto 24px; }

/* Reçu de simulation (Stripe Test, propriétaire) */
.os-receipt__list { display: grid; grid-template-columns: minmax(130px, .6fr) 1fr; margin: 8px 0 20px; }
.os-receipt__list dt, .os-receipt__list dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.os-receipt__list dt { color: var(--muted); }
.os-receipt__list dd { color: var(--ink); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.es-body .os-log__prose hr + h2 { border-top: 0; padding-top: 0; margin-top: 0; }

/* Tendance 14 jours dans la liste des QR (vraies données, animée par .es-anim) */
.qr-list--trend .qr-list-item { grid-template-columns: 56px minmax(0, 1fr) auto auto auto; }
.qr-spark { display: flex; align-items: flex-end; gap: 2px; width: 98px; height: 30px; border-bottom: 1px solid var(--line); }
.qr-spark .es-bar { flex: 1; min-width: 0; border-radius: 2px 2px 0 0; }
@media (max-width: 640px) {
  .qr-list--trend .qr-list-item { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .qr-spark { display: none; }
}

/* ---------- Cibles tactiles (contrôle du 24/09/2026) ---------- */
/* Liens du journal et des mentions en petits caractères : zone de toucher de 44 px,
   mise en page inchangée (rembourrage vertical compensé par une marge négative). */
.os-log__prose a, .es-footer__legal a, .es-mediation a { display: inline-block; padding-block: 12px; margin-block: -12px; }

/* Dernier tour (24/09/2026) : sur téléphone, les 4 onglets du propriétaire tiennent sans être coupés
   (libellés courts « Stats », « Journal », icônes masquées, le fondu reste en secours). */
.es-tab__short { display: none; }
@media (max-width: 480px) {
  .es-tab__full { display: none; }
  .es-tab__short { display: inline; }
  .es-tabs { gap: 2px; }
  .es-tabs a { padding: 0 8px; gap: 6px; font-size: 14px; }
  .es-tabs a > svg { display: none; }
}

/* ---------- Passe 9,5 (24/09/2026) ---------- */
/* /espace/abonnement à 390 : les tableaux « Reçus de simulation » et « Mes factures » débordaient de 11 px.
   Sous 480 px, chaque ligne devient une petite fiche : la date en sous-titre gris, puis l'offre et l'état,
   le bouton à droite. Filet de 1 px entre les fiches, aucun défilement horizontal. */
@media (max-width: 480px) {
  .es-table:not(.os-table) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .es-table:not(.os-table), .es-table:not(.os-table) tbody { display: block; width: 100%; }
  .es-table:not(.os-table) tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .es-table:not(.os-table) tr:last-child { border-bottom: 0; }
  .es-table:not(.os-table) td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; }
  .es-table:not(.os-table) td + td { padding-left: 0; }
  .es-table:not(.os-table) td:first-child { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
  .es-table:not(.os-table) td:nth-child(3):not(:last-child) { grid-column: 1; }
  .es-table:not(.os-table) td:nth-child(4) { grid-column: 2; grid-row: 2 / span 2; }
  .es-table:not(.os-table) td:last-child { text-align: right; }
}

/* 24/09/2026 — même en-tête que la vitrine (site.css) : marque à gauche, liens au milieu
   de la barre, actions à droite dès 901 px. Grille 1fr auto 1fr : le milieu est celui de
   la barre. Vaut pour /app (App.tsx) et l'espace connecté. Sous 901 px (burger), rien ne change. */
@media (min-width: 901px) {
  .nav .nav__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .nav .nav__inner > .brand { justify-self: start; }
  .nav .nav__links { justify-self: center; margin-left: 0; }
  .nav .nav__spacer { display: none; }
  .nav .nav__actions { justify-self: end; }
}
