/* Aperçu du futur site et du tableau de bord, dans le formulaire de commande.
   ------------------------------------------------------------------
   La charte reprend celle des sites livrés (exemples/assets/exemple.css) :
   titres Playfair, or, filets fins, majuscules espacées. Les couleurs
   arrivent en variables depuis apercu.js, selon le style choisi. */

.ap-bloc{ margin-top: 24px; }
.ap-bloc + .ap-bloc{ margin-top: 30px; }
.ap-cadre{
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(19,32,36,0.12);
  box-shadow: 0 24px 54px -28px rgba(19,32,36,0.4);
}
.ap-bar{ display: flex; align-items: center; gap: 6px; background: #E7EBE8; padding: 9px 14px; }
.ap-bar i{ width: 9px; height: 9px; border-radius: 50%; background: rgba(19,32,36,0.16); }
.ap-bar em{ margin-left: 12px; font-style: normal; font-size: 12px; color: var(--ink-mute); }
.ap-legende{ margin: 10px 0 0; font-size: 12.5px; color: var(--ink-mute); line-height: 1.55; }

/* ---- Le site ------------------------------------------------------------ */
.ap-site, .apd{
  --ap-brand:#16323F; --ap-dark:#0D2029; --ap-tint:#E6EDF0;
  --ap-gold:#B08D57; --ap-bg-alt:#F5F4F0;
  --ap-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}
.ap-site{ background: #fff; color: #12212B; font-size: 13px; line-height: 1.5; }
.ap-head{
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 15px 22px; border-bottom: 1px solid rgba(18,33,43,0.09); flex-wrap: wrap;
}
.ap-brand{ display: flex; align-items: center; gap: 11px; }
.ap-logo{ width: 34px; height: 34px; flex-shrink: 0; border-radius: 3px; }
.ap-brand-txt b{
  display: block; font-family: var(--ap-serif); font-size: 17px;
  font-weight: 600; letter-spacing: -.01em; line-height: 1.15;
}
.ap-brand-txt span{
  display: block; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: #76888F; margin-top: 3px;
}
.ap-nav{ display: flex; align-items: center; gap: 15px; font-size: 11.5px; color: #41545F; }
.ap-nav span{ white-space: nowrap; }
.ap-btn{
  font-style: normal; background: var(--ap-gold); color: #fff;
  padding: 8px 14px; border-radius: 2px; font-size: 11px;
  font-weight: 600; letter-spacing: .02em; white-space: nowrap;
}
.ap-hero{
  /* Même parti pris que le hero des sites livrés (exemples/assets/
     exemple.css) : fond sombre, titre serif blanc, photographie fondue à
     droite. L'aperçu était clair, et l'avocat ne retrouvait pas ce que les
     exemples lui avaient montré. */
  position: relative; overflow: hidden;
  padding: 34px 22px 36px; background: var(--ap-dark); color: #fff;
}
.ap-eyebrow{
  display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--ap-gold); margin-bottom: 12px;
}
.ap-hero-txt{ position: relative; z-index: 2; max-width: 62%; }
.ap-hero h3{
  font-family: var(--ap-serif); font-size: 28px; line-height: 1.14;
  letter-spacing: -.01em; margin: 0 0 12px; font-weight: 600; color: #fff;
}
.ap-hero p{ margin: 0 0 18px; font-size: 12.5px; color: rgba(255,255,255,.82); }
.ap-actions{ display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ap-lien{ font-style: normal; font-size: 11.5px; color: rgba(255,255,255,.85); font-weight: 600; }
.ap-photo{
  /* Comme sur les sites livrés : la photographie occupe le flanc droit et se
     fond dans le fond sombre, au lieu d'être un carré posé à côté du texte. */
  position: absolute; inset: 0 0 0 52%; z-index: 1;
  background-size: cover; background-position: center 20%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 30%, #000 70%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 30%, #000 70%);
  opacity: .8;
}
.ap-photo-vide{
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: #fff; opacity: .35; text-align: center; padding: 12px;
}
.ap-photo-vide svg{ width: 38px; height: 38px; }
.ap-photo-vide span{ font-size: 10px; line-height: 1.4; }
.ap-facts{
  display: grid; grid-template-columns: repeat(3,1fr);
  border-bottom: 1px solid rgba(18,33,43,0.09);
}
.ap-facts div{ padding: 16px 22px; text-align: center; }
.ap-facts div + div{ border-left: 1px solid rgba(18,33,43,0.08); }
.ap-facts b{
  display: block; font-family: var(--ap-serif); font-size: 21px;
  color: var(--ap-brand); line-height: 1.1; font-weight: 600;
}
.ap-facts span{ font-size: 10.5px; color: #76888F; }
.ap-doms{ padding: 22px; }
.ap-doms h4{
  font-family: var(--ap-serif); font-size: 16px; margin: 0 0 13px;
  font-weight: 600; color: var(--ap-dark);
}
.ap-doms ul{ list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.ap-doms li{
  font-size: 11.5px; padding: 7px 12px; border-radius: 2px;
  background: var(--ap-tint); color: var(--ap-dark);
}
.ap-doms .ap-vide{ opacity: .5; font-style: italic; background: none; border: 1px dashed rgba(18,33,43,0.2); }
.ap-pied{
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 22px; font-size: 10px; color: #fff;
  background: var(--ap-dark); letter-spacing: .02em;
}

/* ---- Le tableau de bord ------------------------------------------------- */
.apd{ display: grid; grid-template-columns: 168px 1fr; background: #F4F6F5; font-size: 13px; }
.apd-side{ background: var(--ap-dark); padding: 16px 12px; }
.apd-logo{
  display: flex; align-items: center; gap: 9px;
  padding: 0 4px 14px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.apd-mark{
  width: 26px; height: 26px; flex-shrink: 0;
  background: url('../img/favicon.svg') center/contain no-repeat;
}
.apd-logo b{
  font-size: 15px; font-weight: 700; letter-spacing: -.02em;
  color: #fff; white-space: nowrap;
}
.apd-nav{ display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.apd-nav span{
  padding: 8px 10px; border-radius: 6px; font-size: 11.5px;
  color: rgba(255,255,255,.62);
}
.apd-nav .on{ background: rgba(255,255,255,.10); color: #fff; font-weight: 600; }
.apd-main{ padding: 18px 20px 22px; }
.apd-top h4{
  font-family: var(--ap-serif); font-size: 19px; margin: 0;
  font-weight: 600; color: #12212B;
}
.apd-top span{ font-size: 11.5px; color: #76888F; }
.apd-stats{ display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 14px 0 8px; }
.apd-stats div{
  background: #fff; border-radius: 9px; padding: 13px 14px 12px;
  border: 1px solid rgba(18,33,43,0.06);
}
/* Le libellé passe AVANT le nombre : on lit ce qui est mesuré, puis la
   valeur. L'inverse oblige à revenir en arrière pour comprendre. */
.apd-stats i{
  display: block; font-style: normal; font-size: 10px; letter-spacing: .04em;
  text-transform: uppercase; color: #76888F; margin-bottom: 5px; line-height: 1.3;
}
.apd-stats b{
  display: block; font-family: var(--ap-serif); font-size: 27px; font-weight: 600;
  line-height: 1; color: var(--ap-dark);
}
.apd-stats b sup{ font-size: 14px; }
.apd-stats u{
  display: block; text-decoration: none; font-size: 10.5px; margin-top: 5px; color: #76888F;
}
/* Vert réservé au statut « en progrès », jamais à une série de données. */
.apd-stats u.up{ color: #1E7B4D; }
.apd-note{
  margin: 0 0 14px; font-size: 10.5px; color: #8C9BA1; font-style: italic;
}

/* ---- Courbe de fréquentation ---- */
.apd-panel-chart{ padding-bottom: 10px; }
.apd-chart{ width: 100%; height: auto; display: block; }
.apd-grid line{ stroke: rgba(18,33,43,0.07); stroke-width: 1; }
.apd-chart-lbl{
  font-family: Inter, system-ui, sans-serif; font-size: 11px; font-weight: 700;
  fill: var(--ap-dark);
}
.apd-x{
  display: flex; justify-content: space-between; margin-top: 4px;
  font-size: 9.5px; color: #8C9BA1; padding: 0 8px;
}

.apd-panel{ background: #fff; border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; }
.apd-panel h5{
  margin: 0 0 11px; font-size: 12px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ap-gold);
}
.apd-veille-item{ display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(18,33,43,0.06); }
.apd-veille-item:first-child{ border-top: 0; }
.apd-tag{
  flex-shrink: 0; font-size: 9px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 7px; border-radius: 3px; height: fit-content;
  background: var(--ap-tint); color: var(--ap-dark);
}
.apd-veille-item b{ display: block; font-size: 11.5px; line-height: 1.35; color: #12212B; }
.apd-veille-item span{ font-size: 10px; color: #76888F; }
/* Le sommaire de la décision, comme sur le vrai tableau de bord : sans lui,
   « CONFLIT DE JURIDICTIONS » classe l'arrêt mais ne dit pas ce qu'il juge. */
.apd-veille-item .apd-res{ margin: 5px 0 0; font-size: 10.5px; line-height: 1.5; color: #41545F; }
.apd-veille-item .apd-lire{ display: inline-block; margin-top: 5px; font-size: 10px; font-weight: 600; color: var(--ap-brand); }
a.apd-veille-item{ text-decoration: none; color: inherit; border-radius: 6px; }
a.apd-veille-item:hover{ background: rgba(18,33,43,0.035); }
a.apd-veille-item:hover b{ text-decoration: underline; text-underline-offset: 2px; }
.apd-attente{ margin: 0; font-size: 11.5px; color: #76888F; font-style: italic; }
.apd-art{
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-top: 1px solid rgba(18,33,43,0.06);
}
.apd-art:first-of-type{ border-top: 0; }
.apd-art b{ font-size: 11.5px; font-weight: 600; color: #12212B; }
.apd-art em{
  font-style: normal; flex-shrink: 0; font-size: 10px; font-weight: 600;
  padding: 5px 10px; border-radius: 3px; background: var(--ap-tint); color: var(--ap-dark);
}

@media (max-width: 620px){
  .ap-hero{ grid-template-columns: 1fr; }
  .ap-nav span, .ap-facts div:last-child{ display: none; }
  .ap-facts{ grid-template-columns: repeat(2,1fr); }
  .ap-photo{ max-width: 190px; }
  .apd{ grid-template-columns: 1fr; }
  .apd-side{ display: flex; align-items: center; gap: 12px; padding: 12px; }
  .apd-logo{ border: 0; padding: 0; }
  .apd-nav{ flex-direction: row; overflow: hidden; margin: 0; }
  .apd-nav span:nth-child(n+3){ display: none; }
  .apd-stats{ grid-template-columns: 1fr 1fr; }
  .apd-stats div:last-child{ display: none; }
}

/* ── Deux colonnes : les champs à gauche, le site qui se compose à droite.
   L'aperçu vivait sous le formulaire : le visiteur remplissait sans jamais
   voir l'effet de ce qu'il tapait — c'est pourtant lui, l'argument. ── */
.container-large{ max-width:1560px; }
.ob-duo{ display:grid; grid-template-columns:minmax(0,1fr) minmax(420px,560px); gap:clamp(34px,4vw,72px); align-items:start; }
.ob-live{ position:sticky; top:88px; }
.ob-live .ap-bloc{ margin:0; }
.ob-live .ap-legende{ margin-top:12px; }
.ob-live-titre{
  display:flex; align-items:center; gap:9px;
  font-size:13px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:var(--accent); margin-bottom:12px;
}
.ob-live-point{
  width:9px; height:9px; border-radius:50%; background:#3FA46A; flex-shrink:0;
  box-shadow:0 0 0 0 rgba(63,164,106,.45);
  animation:obPulse 2.2s ease-out infinite;
}
@keyframes obPulse{
  0%{ box-shadow:0 0 0 0 rgba(63,164,106,.45); }
  70%{ box-shadow:0 0 0 9px rgba(63,164,106,0); }
  100%{ box-shadow:0 0 0 0 rgba(63,164,106,0); }
}
@media (prefers-reduced-motion: reduce){ .ob-live-point{ animation:none; } }
/* Écran étroit : une colonne, et l'aperçu rejoint le fil après les champs —
   jamais de défilement latéral. */
@media (max-width:1020px){
  .ob-duo{ grid-template-columns:1fr; }
  .ob-live{ position:static; }
}
