/* Page Automatisations, « Voir en action » (Loan, 23/11/2026, points 4 et 7). Démonstration animée, une par formule.
   DA de l'accueil, blanc pur, noir pur, gris neutres, bleu de l'accent. Onglets en pilule comme les exemples de l'accueil,
   panneau BLANC bordé comme les cartes de l'accueil (plus de bulles grises). Animation dans auto-demo.js. */
.ad { margin-top: 40px; }
.ad-onglets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 32px; }
.ad-onglets button { height: 42px; padding-inline: 22px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted); font: 600 15px/1 var(--font); cursor: pointer; }
.ad-onglets button[aria-selected="true"] { background: var(--fg); border-color: var(--fg); color: #fff; }
.ad-onglets button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.ad-panneau { display: grid; padding: 44px 48px; border: 1px solid var(--rg-trait, #e6e8ec); border-radius: 24px; background: #fff; }
.ad-scene { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: center; transition: opacity .35s ease; }
.ad-scene[data-ad-cache] { visibility: hidden; opacity: 0; pointer-events: none; }

/* Colonne de gauche, l'exemple et les étapes */
.ad-qui { margin: 0; color: var(--rg-gris, #5a5f69); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ad-gauche h3 { margin: 10px 0 0; font-size: 34px; line-height: 1.12; text-wrap: balance; }
.ad-texte { margin: 12px 0 0; color: var(--rg-gris, #5a5f69); font-size: 17px; line-height: 1.55; text-wrap: pretty; }
.ad-etapes { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ad-etapes li { position: relative; display: flex; align-items: center; gap: 16px; min-height: 62px; }
.ad-etapes li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 53px; height: 16px; width: 2px; border-radius: 2px; background: var(--rg-trait, #e6e8ec); }
.ad-etapes li[data-etat="fait"]:not(:last-child)::after { background: var(--accent); }
.ad-rond { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--rg-trait, #e6e8ec); border-radius: 50%; background: #fff; color: var(--rg-gris, #5a5f69); font-size: 16px; font-weight: 700; transition: background .3s, border-color .3s, color .3s; }
.ad-rond em { font-style: normal; }
.ad-rond svg { position: absolute; width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .25s; }
.ad-pas-txt { display: grid; gap: 1px; min-width: 0; }
.ad-pas-txt b { font-size: 19px; font-weight: 600; color: var(--fg); transition: color .3s; }
.ad-pas-txt small { color: var(--rg-gris, #5a5f69); font-size: 16px; line-height: 1.35; opacity: 0; transform: translateY(-3px); transition: opacity .35s, transform .35s; }
.ad-etapes li[data-etat="attente"] .ad-pas-txt b { color: #9aa0aa; }
.ad-etapes li[data-etat="cours"] .ad-rond { border-color: var(--accent); color: var(--accent); }
.ad-etapes li[data-etat="cours"] .ad-rond::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ad-onde 1s ease-out infinite; }
.ad-etapes li[data-etat="fait"] .ad-rond { border-color: var(--accent); background: var(--accent); color: transparent; }
.ad-etapes li[data-etat="fait"] .ad-rond svg { opacity: 1; transform: none; }
.ad-etapes li[data-etat="fait"] .ad-pas-txt small { opacity: 1; transform: none; }
@keyframes ad-onde { 0% { opacity: .55; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.25); } }

/* Le message qui arrive (dans le téléphone sur ordinateur, au-dessus des étapes sur téléphone) */
.ad-message { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--rg-trait, #e6e8ec); border-radius: 18px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .05); opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; }
[data-ad-scene][data-msg] .ad-message { opacity: 1; transform: none; }
.ad-msg-corps { display: grid; gap: 3px; min-width: 0; }
.ad-msg-tete { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.ad-msg-tete small { color: var(--rg-gris, #5a5f69); font-size: 13px; white-space: nowrap; }
.ad-msg-texte { color: var(--fg); font-size: 15px; line-height: 1.45; }
.ad-gauche > .ad-message { display: none; }
.ad-app { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); }
.ad-app svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ad-app-gris { background: var(--rg-doux, #f5f6f8); border: 1px solid var(--rg-trait, #e6e8ec); }
.ad-app-gris svg { stroke: var(--fg); }

/* Le téléphone du commerçant (ordinateur seulement) */
.ad-droite { display: flex; justify-content: center; }
.ad-tel { width: 320px; height: 620px; padding: 9px; border-radius: 48px; background: #0a0a0a; box-shadow: 0 24px 60px rgba(0, 0, 0, .14); }
.ad-ecran { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 50px 12px 12px; border-radius: 40px; background: #fff; }
/* La pile est posée en bas de l'écran, comme l'écran verrouillé d'un iPhone, la place libre reste sous l'heure (jamais un trou sous la dernière notification) */
.ad-ecran > .ad-notifs { margin-top: auto; }
.ad-encoche { position: absolute; top: 11px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 999px; background: #0a0a0a; }
.ad-heure { margin: 4px 0 0; text-align: center; font-family: "DM Serif Display", Georgia, serif; font-size: 50px; line-height: 1; color: var(--fg); }
.ad-jour { margin: 8px 0 16px; text-align: center; color: var(--rg-gris, #5a5f69); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ad-notifs { margin: 0; padding: 0; list-style: none; display: grid; }
.ad-notifs li { display: flex; gap: 10px; align-items: flex-start; max-height: 0; margin: 0; padding: 0 12px; overflow: hidden; border: 1px solid transparent; border-radius: 18px; background: #fff; opacity: 0; transform: translateY(-10px) scale(.97); transition: max-height .45s ease, margin .45s ease, padding .45s ease, opacity .35s ease .1s, transform .45s ease, border-color .3s; }
.ad-notifs li[data-vu] { max-height: 160px; margin-bottom: 8px; padding: 12px; border-color: var(--rg-trait, #e6e8ec); opacity: 1; transform: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .05); }
.ad-notif-corps { display: grid; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.35; }
.ad-notif-tete { display: flex; justify-content: space-between; gap: 8px; color: var(--rg-gris, #5a5f69); font-size: 12px; }
.ad-notif-corps > b { color: var(--fg); font-size: 14.5px; }
.ad-notif-corps > span:not(.ad-notif-tete):not(.ad-valider) { color: var(--rg-gris, #5a5f69); }
.ad-valider { justify-self: start; margin-top: 6px; padding: 5px 14px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; }
.ad-ecran .ad-message { max-height: 240px; padding: 12px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .05); transition: opacity .4s, transform .4s, max-height .45s ease, padding .45s ease, border-color .3s; }
/* Pile trop haute pour l'écran, la plus ancienne se replie (auto-demo.js, ranger), rien n'est jamais coupé par le bas */
.ad-notifs li[data-vu][data-ad-parti] { max-height: 0; margin: 0; padding: 0 12px; border-color: transparent; opacity: 0; transform: translateY(-6px) scale(.97); box-shadow: none; }
.ad-scene[data-ad-scene] .ad-ecran .ad-message[data-ad-parti] { max-height: 0; padding-block: 0; border-color: transparent; opacity: 0; box-shadow: none; }
.ad-ecran .ad-message .ad-app { width: 30px; height: 30px; border-radius: 9px; }
.ad-ecran .ad-msg-texte { font-size: 14px; }

.ad .rg-actions { margin-top: 32px; }

/* Tablette et téléphone, une colonne, le message au-dessus des étapes, sans le téléphone dessiné */
@media (max-width: 860px) {
  .ad-panneau { padding: 26px 20px 22px; border-radius: 20px; }
  .ad-scene { grid-template-columns: minmax(0, 1fr); gap: 0; align-items: start; }
  .ad-droite { display: none; }
  .ad-scene[data-ad-cache] { display: none; } /* une seule scène à la fois, le panneau prend sa hauteur (pas de vide sous Signal) */
  .ad-gauche > .ad-message { display: flex; margin-top: 20px; }
  .ad-gauche h3 { font-size: 26px; }
  .ad-texte { font-size: 16px; }
  .ad-etapes { margin-top: 18px; }
  .ad-pas-txt b { font-size: 17px; }
  .ad-pas-txt small { font-size: 15px; }
  .ad-etapes li { min-height: 58px; gap: 14px; }
  .ad-rond { width: 40px; height: 40px; }
  .ad-etapes li:not(:last-child)::after { left: 19px; top: 49px; height: 14px; }
  .ad-onglets { margin-bottom: 24px; }
}

/* Mouvement réduit, tout est affiché d'un coup */
@media (prefers-reduced-motion: reduce) {
  .ad-scene, .ad-rond, .ad-rond svg, .ad-pas-txt small, .ad-message, .ad-notifs li { transition: none !important; }
  .ad-etapes li .ad-rond::before { animation: none !important; }
}

/* 24/11/2026 : vidéos Blender Signal, Flux, Moteur (fond blanc, appareil de face). 16/9 sur ordinateur, 9/16 sur téléphone. */
.av-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 40px 0 0; padding: 0; list-style: none; }
.av-carte { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--rg-trait, #e6e8ec); border-radius: 20px; background: #fff; overflow: hidden; }
.av-cadre { display: block; aspect-ratio: 16 / 9; background: #fff; }
.av-cadre video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.av-texte { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px 22px; text-align: left; }
.av-texte b { font-family: var(--titre, "DM Serif Display", serif); font-weight: 400; font-size: 24px; line-height: 1.1; }
.av-texte span { color: var(--rg-gris, #5b5f66); font-size: 15.5px; line-height: 1.5; }
@media (max-width: 1000px) { .av-grille { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin-inline: auto; } }
@media (max-width: 700px) {
  .av-grille { gap: 16px; margin-top: 28px; max-width: 360px; }
  .av-cadre { aspect-ratio: 4 / 5; } /* 24/11 (relecture iPhone) : moins de blanc sous l'appareil */
  .av-cadre video { object-fit: cover; object-position: center 40%; }
}

/* 25/11/2026 : « Essayez-le vous-même ». Blanc, noir, gris et #0059f1 seulement (règle de Loan). */
.ae { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; margin-top: 40px; text-align: left; }
.ae-form, .ae-suite { padding: 28px 28px 26px; border: 1px solid var(--rg-trait, #e6e8ec); border-radius: 20px; background: #fff; }
.ae-form { display: flex; flex-direction: column; gap: 16px; align-self: start; }
.ae-sur { margin: 0; color: var(--rg-gris, #5a5f69); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ae-form label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; color: #0b0c0e; }
.ae-form input, .ae-form textarea { padding: 12px 14px; border: 1px solid #d9dce1; border-radius: 12px; font: inherit; font-size: 16px; font-weight: 400; resize: vertical; background: #fff; color: #0b0c0e; }
.ae-form input:focus, .ae-form textarea:focus { outline: none; border-color: #0059f1; box-shadow: inset 0 0 0 1px #0059f1; }
.ae-note { margin: 0; color: var(--rg-gris, #5a5f69); font-size: 13.5px; }
.ae-etapes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.ae-etapes li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid #e6e8ec; border-radius: 14px; color: #9aa0aa; transition: border-color .3s, color .3s; }
.ae-etapes li b { grid-column: 2; font-size: 15.5px; }
.ae-etapes li small { grid-column: 2; font-size: 13.5px; line-height: 1.4; }
.ae-badge { grid-row: 1 / span 2; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ae-temps { grid-column: 3; grid-row: 1 / span 2; font-style: normal; font-size: 13px; font-variant-numeric: tabular-nums; }
.ae-etapes li.fait { color: #0b0c0e; }
.ae-etapes li.fait small { color: var(--rg-gris, #5a5f69); }
.ae-etapes li.ae-auto.fait { border-color: #0059f1; }
.ae-etapes li.ae-auto.fait .ae-badge { background: #0059f1; border-color: #0059f1; color: #fff; }
.ae-etapes li.ae-vous.fait { border-color: #0b0c0e; }
.ae-etapes li.ae-vous.fait .ae-badge { background: #0b0c0e; border-color: #0b0c0e; color: #fff; }
.ae-etapes li.encours { border-color: #0059f1; color: #0b0c0e; }
.ae-resultats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ae-carte { padding: 14px 16px; border: 1px solid #e6e8ec; border-radius: 14px; }
.ae-notif, .ae-mail { margin: 8px 0 0; font-size: 14.5px; line-height: 1.5; color: #0b0c0e; }
.ae-notif b { display: block; }
.ae-bilan { margin: 14px 0 0; display: flex; flex-direction: column; gap: 4px; }
.ae-bilan b { font-size: 18px; color: #0059f1; }
.ae-bilan span { color: var(--rg-gris, #5a5f69); font-size: 14px; }
@media (max-width: 900px) { .ae { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; } .ae-resultats { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .ae-form, .ae-suite { padding: 20px 18px; } }
@media (max-width: 700px) {
  .ae-etapes li { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto; row-gap: 6px; }
  .ae-badge { grid-row: 1; grid-column: 1; justify-self: start; }
  .ae-temps { grid-row: 1; grid-column: 2; justify-self: end; }
  .ae-etapes li b, .ae-etapes li small { grid-column: 1 / -1; }
}
/* 25/11 nuit (Loan, « les boutons se déplacent quand on scrolle ») : la vidéo verticale agrandissait son cadre de 445 à 633 px
   en se chargeant sur iPhone, et tout le bas de la page sautait. La vidéo est posée DANS le cadre, qui garde sa proportion. */
.av-cadre { position: relative; overflow: hidden; }
.av-cadre video { position: absolute; inset: 0; }
