/* =============================================================================
   Applipro, démo guidée du livret d'accueil (ouverte depuis la page livret par le bouton « Essayer vous-même »).
   Le visiteur découvre le vrai déroulé : un livret déjà en place, une page ajoutée,
   rédigée avec une photo et une vidéo, puis réservée à un groupe. À la fin, deux
   collaborateurs ouvrent le même livret : l'un voit la page, l'autre non.
   Écrans refaits d'après le back-office (Pages & contenus, éditeur, Groupe & droits).
   ============================================================================= */

.page-essai .top { padding-bottom: 56px; }
.gd-crumb { width: var(--wrap); margin: 34px auto 18px; justify-content: center; }
.gd h1 { font-size: clamp(30px, 3.1vw, 44px); font-weight: 600; line-height: 1.12; letter-spacing: -.03em; text-align: center; }
.gd h1 span { display: block; }

/* --- La scène : une fenêtre de back-office, puis deux téléphones à la même place --- */
.gx {
  --app: #1B3FA8;
  position: relative; overflow: hidden; margin-top: 40px; padding: 34px;
  border-radius: 30px; border: 1px solid var(--gray-100);
  background-color: #EEEFF5;
  background-image: linear-gradient(rgba(18, 22, 36, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 22, 36, .045) 1px, transparent 1px);
  background-size: 36px 36px; background-position: center;
}
.js .gx { display: grid; }
.gx-win, .gx-app { grid-area: 1 / 1; min-width: 0; transition: opacity .45s ease, visibility .45s, transform .55s var(--ease); }
.gx-app { margin-top: 24px; }
.js .gx-app { margin-top: 0; align-self: center; }
.js .gx.is-app .gx-win { opacity: 0; visibility: hidden; transform: scale(.985); }
.js .gx:not(.is-app) .gx-app { opacity: 0; visibility: hidden; transform: translateY(12px); }

.gx-win {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: #F3F4F8;
  box-shadow: 0 0 0 1px rgba(18, 22, 36, .08), 0 34px 60px -34px rgba(18, 22, 36, .45);
  font-family: 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif; color: #1C2333;
}
.gx-bar { display: flex; align-items: center; gap: 18px; padding: 10px 16px; background: #fff; border-bottom: 1px solid #E6E8EF; }
.gx-nav { display: flex; gap: 4px; min-width: 0; }
.gx-nav span { padding: 9px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600; line-height: 1; color: #9AA1B2; white-space: nowrap; transition: background .3s ease, color .3s ease; }
.gx-nav span[data-nav] { color: #3A4256; }
.gx-nav span.is-on { background: #EEF3FF; color: #1E4FD0; }
.gx-screens { display: grid; flex: 1; min-width: 0; }
.gx-screen { position: relative; }
.gx-screen { grid-area: 1 / 1; min-width: 0; padding: 20px 22px 22px; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s; }
.gx-screen.is-on { opacity: 1; visibility: visible; }
.gx .bo-title { font-size: 20px; }

/* --- Écran 1 : Pages & contenus, l'arborescence du livret --- */
.gx-cols { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 22px; align-items: start; margin-top: 14px; }
.gx-tree { display: grid; gap: 7px; }
.gx-ic { flex: none; width: 28px; height: 28px; padding: 6.5px; border-radius: 50%; background: #3B6FE0; fill: #fff; }
.gx-ic--sec { background: #1E8E4E; }
.gx-ic--doc { background: #E08A1E; }
.gx-ic--pod { background: #7A4A3A; }
.gx-sec { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 14px; border-radius: 10px; background: #14162B; color: #fff; font-size: 15px; font-weight: 700; }
.gx-sec small { margin-left: auto; font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, .6); }
.gx-pages { display: grid; gap: 7px; margin-left: 16px; padding-left: 12px; border-left: 1px solid #D5D9E4; }
.gx-pages li, .gx-pal li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px #E6E8EF, 0 2px 5px -3px rgba(18, 22, 36, .2); font-size: 14.5px; font-weight: 700; }
.gx-pen { flex: none; width: 15px; height: 15px; margin-left: auto; fill: #3B6FE0; }
.gx-pages li b { padding: 4px 8px; border-radius: 6px; background: #E8F0FF; color: #1E4FD0; font-size: 11.5px; font-weight: 700; }
.gx-pages li[data-gx-new] { display: none; }
.gx-pages li[data-gx-new].is-in { display: flex; animation: gx-in .5s var(--ease) both; }
.gx-pal { padding: 14px 12px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #E3E6EE; }
.gx-pal > p { margin: 0 4px 10px; font-size: 14px; font-weight: 700; }
.gx-pal ul { display: grid; gap: 7px; }
.gx-pal li { font-size: 13.5px; font-weight: 600; }

/* --- Écran 2 : l'éditeur de page (« Éditer la page ») --- */
.gx-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 5px 9px; border-radius: 7px; background: #fff; box-shadow: 0 0 0 1px #DADDE6; font-size: 11.5px; font-weight: 600; }
.gx-back::before { content: ''; width: 5px; height: 5px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.gx-card { margin-top: 12px; padding: 14px 18px 16px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px #E3E6EE, 0 2px 5px -3px rgba(18, 22, 36, .2); }
.gx-card-t { font-size: 15px; font-weight: 700; }
.gx-input { display: grid; margin-top: 9px; padding: 9px 12px; border: 1px solid #DCDFE8; border-radius: 7px; font-size: 14px; }
.gx-input > * { grid-area: 1 / 1; font-style: normal; font-weight: 400; }
.gx-input em { color: #B4BACB; transition: opacity .2s ease; }
.gx-input.is-set em { opacity: 0; }
.is-typing::after { content: ''; display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; background: #1C2333; vertical-align: -2px; animation: gx-caret .7s steps(1) infinite; }
@keyframes gx-caret { 50% { opacity: 0; } }
.gx-ed-body { height: 232px; margin-top: 10px; overflow: hidden; }
.gx-typed { display: none; }
.gx-typed.is-in { display: block; }
.gx-h { min-height: 30px; font-size: 24px; font-weight: 700; line-height: 1.25; color: #6B6F7B; }
.gx-typed ul { margin-top: 4px; padding-left: 18px; list-style: disc; font-size: 14px; line-height: 1.7; color: #3A4256; }
.gx-typed li:empty { display: none; }
.gx-blk { position: relative; display: none; max-width: 420px; margin-top: 10px; overflow: hidden; border-radius: 9px; }
.gx-blk.is-in { display: block; animation: gx-in .4s var(--ease) both; }
.gx-blk img { width: 100%; height: 150px; object-fit: cover; object-position: 50% 30%; }
.gx-blk figcaption { padding: 6px 2px 0; font-size: 12.5px; color: #7A8194; }
.gx-blk img, .gx-blk figcaption, .gx-blk > i { display: none; }
.gx-blk.is-done img, .gx-blk.is-done figcaption, .gx-blk.is-done > i { display: block; }
.gx-blk.is-done .gx-up { display: none; }
.gx-up { display: grid; gap: 8px; padding: 14px 16px; border: 1px dashed #B4BED3; border-radius: 9px; font-size: 13px; color: #5B6272; }
.gx-up b { font-weight: 600; color: #1C2333; }
.gx-up > i { height: 5px; overflow: hidden; border-radius: 9px; background: #E6E9F1; }
.gx-up > i u { display: block; width: 0; height: 100%; background: var(--blue-500); }
.gx-blk.is-in .gx-up > i u { animation: gx-load 1s ease-out .15s forwards; }
@keyframes gx-load { to { width: 100%; } }
.gx-blk--vid > i { position: absolute; left: 50%; top: 75px; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(255, 255, 255, .94); }
.gx-blk--vid > i::after { content: ''; position: absolute; left: 17px; top: 13px; border-left: 14px solid #1B3FA8; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.gx-plus { display: none; place-items: center; width: 30px; height: 30px; margin-top: 12px; border: 1px dashed #B4BED3; border-radius: 6px; color: #8990A2; font-size: 17px; line-height: 1; }
.gx-plus.is-in { display: grid; }
.gx-ph { margin-top: 10px; min-height: 24px; font-size: 14px; color: #1C2333; }
.gx-ph em { color: #B4BACB; }
.gx-ph.is-slash em, .gx-ph.is-off em { display: none; }
.gx-menu {
  position: absolute; left: 0; top: 0; z-index: 4; width: 330px; max-width: calc(100% - 24px); padding: 6px; border-radius: 10px; background: #fff;
  box-shadow: 0 0 0 1px #E3E6EE, 0 22px 40px -16px rgba(18, 22, 36, .45);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s;
}
.gx-menu.is-open { opacity: 1; visibility: visible; }
.gx-menu p { margin: 6px 10px 3px; font-size: 12px; color: #7A8194; }
.gx-menu li { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 11px; align-items: center; padding: 6px 9px; border-radius: 7px; }
.gx-menu li i { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: #F1F2F6; }
.gx-menu li svg { width: 16px; height: 16px; fill: #3A4256; }
.gx-menu li b { font-size: 14px; font-weight: 500; color: #1C2333; }
.gx-menu li small { font-size: 11.5px; color: #7A8194; }
.gx-ed-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.gx-state { font-size: 12.5px; color: #8990A2; }

/* --- Écran 3 : Groupe & droits, les accès au livret --- */
.gx-table { margin-top: 12px; padding: 4px 18px 8px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #E3E6EE; }
.gx-tr { display: grid; grid-template-columns: minmax(0, 1.5fr) 130px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 40px; border-top: 1px solid #EEF0F5; font-size: 13.5px; color: #2B3245; }
.gx-tr:first-child { border-top: 0; min-height: 36px; font-size: 12.5px; font-weight: 700; color: #5B6272; }
.gx-tr--sub > span:first-child { padding-left: 22px; }
.gx-tr--new > span:first-child { font-weight: 700; color: #14162B; }
.gx-tog { position: relative; display: block; width: 34px; height: 19px; border-radius: 99px; background: #DADDE6; transition: background .3s ease; }
.gx-tog::after { content: ''; position: absolute; left: 2px; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(18, 22, 36, .3); transition: transform .3s var(--ease); }
.gx-tog.is-on { background: #4B50E6; }
.gx-tog.is-on::after { transform: translateX(15px); }
.gx-grp { position: relative; display: flex; align-items: center; gap: 6px; min-height: 28px; }
.gx-grp .bo-chip { border-radius: 99px; padding: 6px 11px; }
.gx-grp [data-gx-chip], .gx-add { display: none; }
.gx-grp [data-gx-chip].is-in { display: inline-block; animation: gx-in .4s var(--ease) both; }
.gx-add.is-in { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #4B50E6; color: #fff; font-size: 16px; font-style: normal; font-weight: 500; line-height: 1; animation: gx-in .4s var(--ease) both; }
.gx-grp .bo-menu { min-width: 170px; top: auto; bottom: calc(100% + 6px); }

/* --- Écran 4 : le même livret sur deux téléphones --- */
.gx-app .prep-label { text-align: center; }
.gx-phones { display: flex; justify-content: center; align-items: start; gap: 34px; margin-top: 6px; }
.gx-phone { width: 300px; }
.gx-who { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 15.5px; font-weight: 700; }
.gx-who small { display: block; font-size: 13px; font-weight: 600; color: var(--gray-600); }
.gx-who .prep-avatar { width: 42px; height: 42px; }
.gx-who .prep-avatar img.is-full { position: static; width: 100%; height: 100%; object-fit: cover; }
.gx-scr { display: grid; padding: 4px 14px 16px; border-radius: 26px; background: #F6F7FB; box-shadow: 0 0 0 1px rgba(18, 22, 36, .07), 10px 12px 0 0 #C9DAFF, 0 34px 60px -34px rgba(18, 22, 36, .5); font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Arial, sans-serif; color: #0F1424; }
.gx-view { grid-area: 1 / 1; min-width: 0; transition: opacity .4s ease, visibility .4s, transform .5s var(--ease); }
.gx-view + .gx-view { opacity: 0; visibility: hidden; transform: translateX(16px); }
.gx-scr.is-page .gx-view:first-child { opacity: 0; visibility: hidden; transform: translateX(-16px); }
.gx-scr.is-page .gx-view + .gx-view { opacity: 1; visibility: visible; transform: none; }
.gx-scr .lvp-cover { height: 92px; }
.gx-scr .gx-view + .gx-view .lvp-cover { height: 112px; object-position: 50% 24%; }
.gx-scr .lvp-rows li b { margin-left: auto; padding: 4px 8px; border-radius: 6px; background: #E8F0FF; color: #1E4FD0; font-size: 11px; }
.gx-scr .lvp-rows li:has(b)::after { margin-left: 0; }
.gx-scr .lvp-video { height: 112px; }
.gx-aside { margin-top: 14px; font-size: 14px; line-height: 1.45; color: var(--gray-800); text-wrap: pretty; }

@keyframes gx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- Ce qu'il faut toucher : la zone reste claire, le reste s'assombrit un peu, une onde part du bord --- */
.gd-on { cursor: pointer; }
.gd-spot {
  position: absolute; left: 0; top: 0; z-index: 6; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 2.5px var(--blue-500), 0 0 0 9999px rgba(20, 22, 43, .3);
  opacity: 0; transition: opacity .3s ease;
}
.gd-spot.is-on { opacity: 1; }
.gd-spot::after { content: ''; position: absolute; inset: -3px; border-radius: 15px; border: 2.5px solid var(--blue-500); animation: gd-ring 1.5s ease-out infinite; }
.gd-spot.is-nudge { animation: gd-nudge .45s ease; }
@keyframes gd-ring { 0% { inset: -3px; opacity: .95; } 100% { inset: -16px; opacity: 0; } }
@keyframes gd-nudge { 0%, 100% { transform: none; } 30% { transform: scale(1.06); } 60% { transform: scale(.98); } }

/* --- La consigne, posée à côté de ce qu'il faut toucher --- */
.gd-tip {
  position: absolute; left: 0; top: 0; z-index: 7;
  width: max-content; max-width: min(300px, calc(100% - 24px));
  padding: 11px 15px 13px; border-radius: 15px; background: #181892; color: #fff;
  box-shadow: 0 20px 36px -16px rgba(24, 24, 146, .65);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.gd-tip.is-on { opacity: 1; }
.gd-tip::before { content: ''; position: absolute; left: var(--nx, 50%); top: -5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 3px; background: #181892; transform: rotate(45deg); }
.gd-tip.is-up::before { top: auto; bottom: -5px; }
.gd-tip-n { display: block; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .62); }
.gd-tip-text { margin-top: 2px; font-size: 15px; font-weight: 600; line-height: 1.4; text-wrap: pretty; }

/* --- Les deux cartes : avant de commencer, et à la fin --- */
.gd-veil { display: none; }
.js .gd-veil {
  position: absolute; inset: 0; z-index: 9;
  display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px;
  background: rgba(238, 239, 245, .8); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s;
}
.js .gd-veil.is-on { opacity: 1; visibility: visible; }
.gd-box { width: 100%; max-width: 450px; padding: 30px 30px 28px; border-radius: 24px; background: #fff; box-shadow: 12px 14px 0 0 #C9DAFF, 0 40px 70px -36px rgba(18, 22, 36, .5); text-align: center; }
.gd-box h3 { font-size: 25px; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
.gd-box p { margin-top: 10px; font-size: 16.5px; line-height: 1.5; color: var(--gray-800); text-wrap: pretty; }
.gd-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.gd-acts .btn { max-width: 100%; }
.gx.gd-init, .gx.gd-init * { transition: none !important; animation: none !important; }
.gd-end { display: none; }
.gd-veil.is-end .gd-start { display: none; }
.gd-veil.is-end .gd-end { display: block; }
.gd-bars i { width: 20px; }

@media (min-width: 641px) and (max-width: 940px) {
  .gx { padding: 22px; }
  .gx-cols { grid-template-columns: minmax(0, 1fr) 210px; gap: 14px; }
  .gx-nav span:not([data-nav]) { display: none; }
  .gx-phones { gap: 24px; }
  .gx-phone { width: 46%; max-width: 300px; }
}
/* Sur téléphone, la démo ne se joue pas : on montre l'écran d'ordinateur en petit, tel quel
   (le script pose le facteur de réduction --k), et l'on renvoie vers la demande de démo. */
.gx-mini { display: none; }
@media (max-width: 640px) {
  .page-essai .top { padding-bottom: 30px; }
  .gd-crumb { margin: 22px auto 14px; }
  .gd h1 span + span { display: none; }
  .gx, .js .gx { display: block; margin-top: 14px; padding: 10px; border-radius: 20px; }
  .gx-win { width: 1000px; zoom: var(--k, .33); }
  .gx-app, .gx .gd-tip, .gx .gd-spot, .gx .gd-veil, .gd-bars { display: none !important; }
  .gx-mini { display: block; margin-top: 18px; text-align: center; }
  .gx-mini p { font-size: 15.5px; line-height: 1.5; color: var(--gray-800); text-wrap: pretty; }
  .gx-mini .btn { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .gd-spot::after, .gd-spot.is-nudge { animation: none; }
}

/* >>> Réglage « ordinateur portable » (généré par outils/reglage-portable.py, ne pas modifier à la main) */
@media (min-width: 1100px) and (max-height: 900px) {
  .gd h1 { font-size: clamp(28px, 2.7vw, 37px); }
  /* Démos guidées : moins d'air au-dessus, pour que la démonstration arrive plus vite à l'écran */
  .page-essai .top { padding-bottom: 18px; }
}
/* <<< fin du réglage « ordinateur portable » */
