/* Page de revue client (msol-revue). Les couleurs et polices viennent de la fiche du client :
   app.js les pose sur :root. Valeurs ci-dessous = repli neutre si la fiche n'en donne pas. */
:root {
  --fond: #F4F1EC;
  --carte: #FBFAF7;
  --encre: #1E2A36;
  --texte: #2B2E31;
  --accent: #8C6A47;
  --trait: #E2DBD0;
  --doux: #6A6F75;
  --police-titre: Georgia, "Times New Roman", serif;
  --police-texte: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --rayon: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 16px/1.55 var(--police-texte);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; }
a { color: var(--encre); text-underline-offset: 3px; text-decoration-thickness: 1px; }

#page { max-width: 1040px; margin: 0 auto; padding: 0 16px 72px; }
.chargement, .erreur-page { padding: 30vh 0; text-align: center; color: var(--doux); }
.erreur-page h1 { font: 400 30px/1.2 var(--police-titre); color: var(--encre); margin: 0 0 12px; }

/* ---------- En-tête ---------- */
.tete { padding: 28px 0 36px; }
.marque { display: flex; align-items: center; gap: 14px; }
.marque img { width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--trait); background: var(--carte); }
.marque b { display: block; font: 600 15px/1.2 var(--police-texte); color: var(--encre); }
.marque span { display: block; font-size: 13px; color: var(--doux); }
.tete h1 {
  font: 350 clamp(34px, 7vw, 56px)/1.04 var(--police-titre);
  letter-spacing: -.015em;
  color: var(--encre);
  margin: 40px 0 10px;
}
.periode { font: 400 19px/1.4 var(--police-titre); color: var(--accent); margin: 0; }
.consigne { max-width: 560px; margin: 18px 0 0; color: var(--texte); }
.bilan { margin-top: 26px; max-width: 560px; }
.bilan p { margin: 0 0 8px; font-size: 14px; color: var(--doux); }
.bilan p b { color: var(--encre); font-weight: 600; }
.jauge { height: 3px; background: var(--trait); border-radius: 3px; overflow: hidden; }
.jauge i { display: block; height: 100%; width: 0; background: var(--encre); transition: width .5s cubic-bezier(.2,.7,.2,1); }

/* ---------- Écran du code d'accès ---------- */
.acces { min-height: 72vh; padding: 28px 0 24px; max-width: 460px; }
.acces h1 { font: 350 clamp(34px, 8vw, 50px)/1.05 var(--police-titre); letter-spacing: -.015em; color: var(--encre); margin: 44px 0 12px; }
.formulaire-code { margin-top: 28px; display: grid; gap: 12px; }
.formulaire-code label { font: 600 11px/1 var(--police-texte); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.champ-code {
  width: 100%; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--trait); background: #fff;
  font: 500 26px/1 var(--police-texte); letter-spacing: .32em; text-transform: uppercase; color: var(--encre);
}
.champ-code::placeholder { color: var(--trait); letter-spacing: .32em; }
.champ-code:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 3px color-mix(in srgb, var(--encre) 12%, transparent); }
.formulaire-code .bouton { justify-self: start; padding: 14px 26px; }
.formulaire-code .message-erreur { margin: 0; min-height: 1.4em; }

/* ---------- Jours ---------- */
.jour { margin-top: 44px; }
.jour > h2 {
  font: 400 24px/1.2 var(--police-titre);
  color: var(--encre);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--trait);
}
.jour > h2::first-letter { text-transform: uppercase; }

/* ---------- Une publication ---------- */
.pub {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 20px 18px 0;
  margin-bottom: 18px;
}
.pub-infos { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.heure { font: 400 26px/1 var(--police-titre); color: var(--encre); }
.genre { font: 600 11px/1 var(--police-texte); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.reseaux { font-size: 13px; color: var(--doux); }
.pub h3 { font: 400 21px/1.3 var(--police-titre); color: var(--encre); margin: 10px 0 0; }
.en-ligne { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--encre); background: color-mix(in srgb, var(--encre) 8%, transparent); padding: 5px 10px; border-radius: 99px; }

/* onglets : Reel / Story / TikTok */
.onglets { display: inline-flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; gap: 4px; margin: 18px 0 0; padding: 4px; background: color-mix(in srgb, var(--encre) 6%, transparent); border-radius: 12px; }
.onglets::-webkit-scrollbar { display: none; }
.onglets button {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 13px; border-radius: 9px; white-space: nowrap; flex: 0 0 auto;
  font-size: 14px; font-weight: 500; color: var(--doux);
  transition: background .2s, color .2s;
}
.onglets button[aria-selected="true"] { background: var(--carte); color: var(--encre); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.onglets button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.vue { display: grid; gap: 22px; margin-top: 18px; padding-bottom: 22px; }
@media (min-width: 820px) {
  .vue { grid-template-columns: 300px 1fr; gap: 36px; align-items: start; }
  .pub { padding: 26px 28px 0; }
}

/* ---------- Le téléphone ---------- */
.ecran {
  position: relative; width: 100%; max-width: 300px; margin: 0 auto;
  aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; background: #0d0f12;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 22px 44px -28px rgba(10,20,30,.55);
  isolation: isolate; cursor: pointer; user-select: none; -webkit-user-select: none;
}
.ecran video, .ecran img.affiche { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ecran img.affiche { transition: opacity .25s; }
.ecran.lecture img.affiche { opacity: 0; pointer-events: none; }
.ecran .voile { position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0)); pointer-events: none; }
.ecran .lire {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; border: 0; background: rgba(0,0,0,.38); backdrop-filter: blur(2px);
  display: grid; place-items: center; transition: opacity .2s, transform .2s; pointer-events: none;
}
.ecran .lire svg { width: 24px; height: 24px; margin-left: 3px; fill: #fff; }
.ecran.lecture .lire { opacity: 0; transform: scale(.9); }
.ecran .barre { position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px; background: rgba(255,255,255,.28); border-radius: 2px; overflow: hidden; }
.ecran .barre i { display: block; height: 100%; width: 0; background: #fff; }
.ecran .son {
  position: absolute; right: 10px; top: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.35); display: grid; place-items: center; cursor: pointer;
}
.ecran .son svg { width: 16px; height: 16px; fill: #fff; }

/* habillages : ce que l'abonné voit autour de la vidéo */
.compte { display: flex; align-items: center; gap: 8px; color: #fff; font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.compte img { width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.compte small { font-weight: 400; opacity: .8; }
.bas { position: absolute; left: 12px; right: 56px; bottom: 20px; color: #fff; font: 400 12.5px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.bas p { margin: 8px 0 0; }
.bas p em { font-style: normal; opacity: .75; }
.haut { position: absolute; left: 10px; right: 52px; top: 12px; }
.segments { display: flex; gap: 3px; margin-bottom: 10px; }
.segments i { flex: 1; height: 2px; background: rgba(255,255,255,.45); border-radius: 2px; overflow: hidden; }
.segments i b { display: block; height: 100%; width: 0; background: #fff; }
.rail { position: absolute; right: 8px; bottom: 26px; display: grid; gap: 16px; justify-items: center; }
.rail svg { width: 26px; height: 26px; fill: #fff; opacity: .95; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.etiquette-ia { display: inline-block; margin-top: 8px; font-size: 11px; padding: 3px 7px; border-radius: 4px; background: rgba(255,255,255,.18); }
.absent { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: rgba(255,255,255,.7); font-size: 14px; }

/* ---------- Les pages d'un carrousel ---------- */
.galerie { width: 100%; max-width: 320px; margin: 0 auto; }
.defile {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: 14px; background: var(--carte); border: 1px solid var(--trait); cursor: pointer;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.defile::-webkit-scrollbar { display: none; }
.defile figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
.defile img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.pastilles { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.pastilles i { width: 6px; height: 6px; border-radius: 50%; background: var(--trait); transition: background .2s, transform .2s; }
.pastilles i.actif { background: var(--encre); transform: scale(1.15); }
.rang { text-align: center; margin: 6px 0 0; font-size: 13px; color: var(--doux); font-variant-numeric: tabular-nums; }

/* ---------- Le texte publié ---------- */
.texte h4 { font: 600 11px/1 var(--police-texte); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.texte .corps { white-space: pre-line; font-size: 15.5px; line-height: 1.62; color: var(--texte); margin: 0 0 22px; overflow-wrap: anywhere; }
.texte .note { font-size: 13.5px; color: var(--doux); margin: -8px 0 22px; }

/* ---------- L'avis du client ---------- */
.avis { border-top: 1px solid var(--trait); margin: 0 -18px; padding: 16px 18px 18px; }
@media (min-width: 820px) { .avis { margin: 0 -28px; padding: 18px 28px 20px; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bouton {
  appearance: none; cursor: pointer; border-radius: 11px; padding: 12px 18px;
  font-size: 15px; font-weight: 550; line-height: 1.1; border: 1px solid transparent;
  transition: background .2s, border-color .2s, color .2s, transform .1s;
}
.bouton:active { transform: translateY(1px); }
.bouton:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bouton.plein { background: var(--encre); color: var(--fond); }
.bouton.plein:hover { background: color-mix(in srgb, var(--encre) 86%, #000); }
.bouton.trait { background: transparent; border-color: color-mix(in srgb, var(--encre) 28%, transparent); color: var(--encre); }
.bouton.trait:hover { border-color: var(--encre); background: color-mix(in srgb, var(--encre) 5%, transparent); }
.bouton.discret { background: transparent; color: var(--doux); padding: 12px 6px; }
.bouton.discret:hover { color: var(--encre); }
.bouton[disabled] { opacity: .55; cursor: default; }
.zone {
  width: 100%; min-height: 104px; resize: vertical; margin: 0 0 12px;
  border: 1px solid var(--trait); border-radius: 12px; padding: 12px 14px;
  background: #fff; color: var(--texte); font: 400 15.5px/1.5 var(--police-texte);
}
.zone:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 3px color-mix(in srgb, var(--encre) 12%, transparent); }
.etat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.etat p { margin: 0; font-size: 15px; color: var(--encre); }
.etat p b { font-weight: 600; }
.etat .cite { flex-basis: 100%; margin: 6px 0 0; padding-left: 12px; border-left: 2px solid var(--accent); color: var(--texte); white-space: pre-line; }
.message-erreur { flex-basis: 100%; margin: 8px 0 0; font-size: 14px; color: #8A3B2E; }
.coche { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--encre); margin-right: 8px; vertical-align: -5px; }
.coche svg { width: 12px; height: 12px; fill: none; stroke: var(--fond); stroke-width: 2.4; }

/* ---------- Pied ---------- */
.pied { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--trait); font-size: 13px; color: var(--doux); }
.pied p { margin: 0 0 4px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
