/* Pubs (Marketing → Affichage) : scène 1920 × 1080 / 1080 × 1920 mise à l'échelle ; 3 styles ; animations ; zones à corriger en rouge. */
.ad-box { position: relative; width: 100%; overflow: hidden; background: #0d1117; border-radius: 8px; }
.ad-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.ad { position: relative; width: 100%; height: 100%; box-sizing: border-box; padding: 70px 90px 90px; display: flex; flex-direction: column; gap: 30px; color: #16202e; background: #fff; overflow: hidden; }
.ad * { box-sizing: border-box; }
.ad-portrait { padding: 80px 70px 110px; }
.ad-z { position: relative; min-width: 0; }

/* En-tête : logo + nom du magasin */
.ad-head { display: flex; align-items: center; gap: 22px; height: 90px; flex: none; }
.ad-logo { max-height: 90px; max-width: 320px; object-fit: contain; }
.ad-shop { font-size: 40px; font-weight: 700; opacity: .85; }

/* Textes */
.ad-title { font-size: 92px; font-weight: 800; line-height: 1.05; letter-spacing: -1px; }
.ad-name { font-size: 58px; font-weight: 600; line-height: 1.15; }
.ad-sub { font-size: 44px; line-height: 1.3; opacity: .85; min-height: 10px; }
.ad-url { font-size: 44px; font-weight: 700; color: var(--a); word-break: break-all; }

/* Prix */
.ad-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 30px; }
.ad-price.center { justify-content: center; }
.ad-p-old { font-size: 56px; text-decoration: line-through; opacity: .6; }
.ad-p-new { font-size: 110px; font-weight: 800; color: var(--a); line-height: 1; }
.ad-p-new.big { font-size: 150px; }
.ad-p-pct { font-size: 52px; font-weight: 800; background: #e03131; color: #fff; padding: 6px 22px; border-radius: 999px; }
.ad-p-until { font-size: 38px; opacity: .75; flex-basis: 100%; }

/* Article seul : photo + infos */
.ad-split { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; min-height: 0; }
.ad-portrait .ad-split { grid-template-columns: 1fr; grid-template-rows: 1.1fr auto; gap: 40px; }
.ad-photo { position: relative; height: 100%; max-height: 860px; background: #fff; border-radius: 40px; box-shadow: 0 30px 60px rgba(0, 0, 0, .15); overflow: hidden; }
.ad-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 40px; }
.ad-photo .ad-nophoto { position: absolute; inset: 0; display: grid; place-items: center; }
.ad-info { display: flex; flex-direction: column; gap: 34px; min-width: 0; }
.ad-nophoto { font-size: 50px; opacity: .4; }
.ad-qr { display: grid; place-items: center; background: #fff; border-radius: 40px; padding: 50px; box-shadow: 0 30px 60px rgba(0, 0, 0, .15); }
.ad-qr svg { width: 560px; height: 560px; }

/* Mur d'articles */
.ad-wall { flex: 1; display: flex; flex-direction: column; gap: 34px; min-height: 0; }
.ad-grid { flex: 1; display: grid; gap: 30px; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; min-height: 0; }
.ad-grid.n1 { grid-template-columns: 1fr; } .ad-grid.n2, .ad-grid.n4 { grid-template-columns: repeat(2, 1fr); }
.ad-portrait .ad-grid { grid-template-columns: repeat(2, 1fr); }
.ad-card { display: flex; flex-direction: column; gap: 10px; background: #fff; color: #16202e; border-radius: 28px; padding: 22px; box-shadow: 0 16px 36px rgba(0, 0, 0, .12); min-height: 0; overflow: hidden; }
.ad-card img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.ad-card-n { font-size: 34px; font-weight: 600; line-height: 1.15; max-height: 2.3em; overflow: hidden; }
.ad-card-p { font-size: 34px; white-space: nowrap; overflow: hidden; } .ad-card-p b { color: var(--a); font-size: 46px; } .ad-card-p s { opacity: .55; } .ad-card-p em { font-style: normal; color: #e03131; font-weight: 800; }
.ad-empty { font-size: 50px; opacity: .5; }

/* Pack */
.ad-pack { display: flex; flex-direction: column; align-items: center; gap: 24px; flex: 1; justify-content: center; text-align: center; }
.ad-pack-row { display: flex; align-items: center; justify-content: center; gap: 30px; flex-wrap: wrap; }
.ad-pack-it { width: 330px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 32px; font-weight: 600; background: #fff; color: #16202e; border-radius: 28px; padding: 20px; box-shadow: 0 16px 36px rgba(0, 0, 0, .12); }
.ad-pack-it img { width: 100%; height: 260px; object-fit: contain; }
.ad-plus { font-size: 110px; font-weight: 800; color: var(--a); }

/* Offre, infos */
.ad-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 40px; }
.ad-offer { font-size: 130px; font-weight: 900; line-height: 1.05; color: var(--a); }
.ad-offer-z { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.ad-biglogo { max-height: 260px; max-width: 70%; object-fit: contain; }
.ad-lines { font-size: 52px; line-height: 1.5; }

/* Affiche importée */
.ad-affiche { padding: 0; background: #000; }
.ad-poster { position: absolute; inset: 0; } .ad-poster img { width: 100%; height: 100%; display: block; }

/* Bandeau défilant */
.ad-ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: var(--m); color: var(--mi); font-size: 38px; font-weight: 600; display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
.ad-ticker span { padding-left: 100%; animation: ad-tick 22s linear infinite; }
@keyframes ad-tick { to { transform: translateX(-100%); } }

/* Style « Vitrine » : fond clair, en-tête couleur du magasin */
.ad-s-vitrine { background: linear-gradient(160deg, #f6f8fb 0%, #e9eef5 100%); }
.ad-s-vitrine .ad-head { margin: -70px -90px 0; padding: 0 90px; height: 150px; background: var(--m); color: var(--mi); }
.ad-portrait.ad-s-vitrine .ad-head { margin: -80px -70px 0; padding: 0 70px; }
.ad-s-vitrine .ad-title { color: var(--m); }

/* Style « Impact » : fond couleur du magasin, prix dans une bulle d'accent */
.ad-s-impact { background: radial-gradient(circle at 75% 30%, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 60%), var(--m); color: var(--mi); }
.ad-s-impact .ad-title { text-transform: uppercase; font-size: 104px; }
.ad-s-impact .ad-p-new { background: var(--a); color: var(--ai); padding: 10px 40px; border-radius: 30px; }
.ad-s-impact .ad-photo { background: rgba(255, 255, 255, .95); }

/* Style « Épuré » : blanc, fine ligne d'accent */
.ad-s-epure { background: #fff; }
.ad-s-epure .ad-head { border-bottom: 6px solid var(--a); padding-bottom: 20px; height: 116px; }
.ad-s-epure .ad-photo { box-shadow: none; background: #f8f9fa; }
.ad-s-epure .ad-title { font-weight: 300; letter-spacing: 0; }

/* Animations (TV et aperçu animé) */
.ad-anim .ad-photo, .ad-anim .ad-qr, .ad-anim .ad-card, .ad-anim .ad-pack-it { animation: ad-in-photo .9s cubic-bezier(.2, .8, .2, 1) both; }
.ad-anim .ad-photo img { animation: ad-zoom 12s ease-in-out both; }
.ad-anim .ad-title { animation: ad-in-up .8s .15s cubic-bezier(.2, .8, .2, 1) both; }
.ad-anim .ad-name, .ad-anim .ad-offer, .ad-anim .ad-url { animation: ad-in-up .8s .3s cubic-bezier(.2, .8, .2, 1) both; }
.ad-anim .ad-price { animation: ad-pop .7s .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.ad-anim .ad-sub, .ad-anim .ad-lines { animation: ad-in-up .8s .7s ease both; }
.ad-anim .ad-card:nth-child(2) { animation-delay: .1s; } .ad-anim .ad-card:nth-child(3) { animation-delay: .2s; } .ad-anim .ad-card:nth-child(4) { animation-delay: .3s; }
.ad-anim .ad-card:nth-child(5) { animation-delay: .4s; } .ad-anim .ad-card:nth-child(6) { animation-delay: .5s; }
@keyframes ad-in-photo { from { opacity: 0; transform: translateX(-60px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ad-in-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes ad-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes ad-zoom { from { transform: scale(1); } to { transform: scale(1.06); } }

/* Zones à corriger (contrôle refusé) */
.ad-bad { outline: 10px solid #e03131; outline-offset: 8px; border-radius: 12px; }
.ad-bad::after { content: attr(data-n); position: absolute; top: -34px; left: -34px; width: 64px; height: 64px; border-radius: 50%; background: #e03131; color: #fff; font: 800 40px/64px sans-serif; text-align: center; z-index: 5; }

/* ---------- Pages Marketing → Affichage (bibliothèque, écrans, assistant) ---------- */
.ad-tabs { display: flex; gap: 6px; margin: 0 0 14px; border-bottom: 1px solid var(--border); }
.ad-tabs a { padding: 8px 16px; border-radius: 8px 8px 0 0; color: inherit; text-decoration: none; font-weight: 600; }
.ad-tabs a.active { background: var(--primary); color: #fff; }
.ad-empty-lib { text-align: center; padding: 30px; }
.ad-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ad-card-lib { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.ad-card-lib .ad-box { border-radius: 0; display: block; }
.ad-lib-info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.ad-lib-why { color: #c92a2a; font-size: 13px; font-weight: 600; }
.ad-lib-act { display: flex; gap: 6px; flex-wrap: wrap; } .ad-lib-act form { margin: 0; }
.ad-screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; align-items: start; }
.ad-screen .panel-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-screen-act { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.ad-link { margin: 10px 0; } .ad-link-row { display: flex; gap: 6px; } .ad-link-row input { width: 140px; font-size: 18px; letter-spacing: 2px; text-align: center; }
.ad-edit summary { cursor: pointer; margin: 6px 0; }

.ae-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.ae-steps li { padding: 8px 16px; border-radius: 999px; background: #e9ecef; color: #495057; font-weight: 600; cursor: pointer; }
.ae-steps li.on { background: var(--primary); color: #fff; } .ae-steps li.done { background: #d3f9d8; color: #1b6e3b; }
.ae-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ae-kind { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px; border: 2px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; }
.ae-kind strong { font-size: 16px; } .ae-kind span { font-size: 13px; color: #6c757d; }
.ae-kind:hover, .ae-kind.on { border-color: var(--primary); background: #f3f8ff; }
.ae-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin: 8px 0 12px; max-height: 460px; overflow: auto; }
.ae-res { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font: inherit; }
.ae-res:hover, .ae-res.on { border-color: var(--primary); background: #f3f8ff; }
.ae-res img, .ae-nop { width: 56px; height: 56px; object-fit: contain; flex: none; display: grid; place-items: center; background: #f8f9fa; border-radius: 6px; }
.ae-res-n { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; } .ae-res-n small { display: block; color: #868e96; font-weight: 400; }
.ae-res-p { text-align: right; font-size: 13px; white-space: nowrap; } .ae-res-p em { color: #e03131; font-style: normal; font-weight: 700; }
.ae-res-p i { display: block; color: #c92a2a; font-style: normal; font-size: 12px; }
.ae-auto { padding: 14px; background: #ebfbee; color: #1c5c2e; border-radius: 10px; font-weight: 600; }
.ae-final { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; align-items: start; }
.ae-left { display: flex; flex-direction: column; gap: 14px; } .ae-left .panel { margin: 0; }
.ae-sticky { position: sticky; top: 12px; }
.ae-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ae-style { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 3px solid transparent; border-radius: 10px; background: none; cursor: pointer; font: inherit; }
.ae-style.on { border-color: var(--primary); } .ae-style b { font-size: 13px; }
.ae-hooks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ae-hook { padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; cursor: pointer; font: inherit; font-size: 13px; }
.ae-hook.on, .ae-hook:hover { border-color: var(--primary); background: #f3f8ff; }
.ae-days, .ae-screens, .ae-radio { display: flex; flex-wrap: wrap; gap: 4px 12px; } .ae-days label, .ae-screens label, .ae-radio label { display: inline-flex; gap: 4px; align-items: center; font-weight: 400; }
.ae-status { padding: 10px 12px; border-radius: 10px; font-weight: 700; margin-bottom: 10px; }
.ae-status.ok { background: #ebfbee; color: #1c5c2e; } .ae-status.bad { background: #fff5f5; color: #c92a2a; }
.ae-problems { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ae-problems li { padding: 8px 10px; border: 1px solid #ffc9c9; background: #fff5f5; border-radius: 8px; cursor: pointer; font-size: 14px; }
.ae-problems li b { color: #e03131; } .ae-problems li span { display: block; color: #495057; font-size: 13px; margin-top: 2px; }
.ae-flash { outline: 3px solid #e03131; outline-offset: 3px; border-radius: 6px; transition: outline .3s; }
@media (max-width: 1000px) { .ae-final { grid-template-columns: 1fr; } .ae-sticky { position: static; } }

/* Formats à partager : post carré (Facebook / Instagram) et affiche A4 */
.ad-square { padding: 50px 60px 60px; gap: 22px; }
.ad-square .ad-split { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 24px; }
.ad-square .ad-photo { max-height: none; }
.ad-square .ad-title { font-size: 70px; } .ad-square.ad-s-impact .ad-title { font-size: 76px; }
.ad-square .ad-name { font-size: 44px; } .ad-square .ad-p-new.big { font-size: 104px; } .ad-square .ad-p-new { font-size: 84px; } .ad-square .ad-sub { font-size: 34px; }
.ad-square .ad-info { gap: 16px; } .ad-square .ad-qr svg { width: 420px; height: 420px; }
.ad-square.ad-s-vitrine .ad-head { margin: -50px -60px 0; padding: 0 60px; height: 120px; }
.ad-square .ad-offer { font-size: 100px; } .ad-square .ad-pack-it { width: 260px; } .ad-square .ad-pack-it img { height: 190px; }
.ad-a4 { padding: 80px 80px 90px; }
.ad-a4.ad-s-vitrine .ad-head { margin: -80px -80px 0; padding: 0 80px; }
.ad-a4 .ad-split { grid-template-rows: minmax(0, 1.2fr) auto; }
.ad-square .ad-split { grid-template-rows: 400px auto; gap: 18px; }
.ad-square .ad-photo img { padding: 24px; }
.ad-square .ad-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
.ad-square .ad-card { display: grid; grid-template-columns: 120px 1fr; grid-template-rows: 1fr auto; column-gap: 14px; row-gap: 4px; align-items: center; padding: 14px; }
.ad-square .ad-card img { grid-row: span 2; width: 120px; height: 120px; }
.ad-square .ad-card-n { font-size: 24px; } .ad-square .ad-card-p { font-size: 22px; white-space: nowrap; } .ad-square .ad-card-p b { font-size: 30px; }
.ad-square .ad-title { font-size: 64px; } .ad-square .ad-name { font-size: 40px; } .ad-square .ad-p-new.big { font-size: 96px; } .ad-square .ad-p-old { font-size: 44px; } .ad-square .ad-p-until { font-size: 30px; }
.ad-square .ad-card-p s { display: none; }
.ad-export, .ad-export * { box-shadow: none !important; } .ad-export .ad-card, .ad-export .ad-photo, .ad-export .ad-qr, .ad-export .ad-pack-it { border: 2px solid rgba(0, 0, 0, .08); }
/* Photo détourée : l'article posé sur la pub, avec une ombre douce (plus de cadre blanc) */
.ad-photo.cut { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
.ad-photo.cut img { filter: drop-shadow(0 28px 30px rgba(0, 0, 0, .28)); }
.ad-export .ad-photo.cut { border: 0; }
.ae-cut { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
/* Pub vidéo */
.ad-video { padding: 0; background: #000; }
.ad-poster video { width: 100%; height: 100%; display: block; }
.ae-vid { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.ae-vid-row { display: flex; gap: 6px; flex-wrap: wrap; } .ae-vid-row select { width: auto; }
.ae-vid-out video { width: 100%; max-height: 320px; background: #000; border-radius: 8px; } .ae-vid-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
/* Formulaire d'un écran : champs les uns sous les autres dans un panneau étroit, côte à côte s'il y a la place */
.ad-sc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 14px; align-items: end; }
.ad-sc-form .field { margin: 0; min-width: 0; } .ad-sc-form .span-2 { grid-column: 1 / -1; }
.ad-sc-form .form-actions { margin: 4px 0 0; }
.ad-sc-form .field label { display: block; margin-bottom: 4px; } .ad-sc-form .field input, .ad-sc-form .field select { width: 100%; }
/* Assistant : libellé au-dessus du champ, champs en pleine largeur (panneau étroit) */
.ae-left .field { min-width: 0; }
.ae-left .field > label { display: block; margin-bottom: 4px; }
.ae-left .field input:not([type="checkbox"]):not([type="radio"]), .ae-left .field select { width: 100%; }
.ae-left .ae-days { gap: 6px 14px; } .ae-left .ae-days label, .ae-left .ae-screens label, .ae-left .ae-radio label { margin: 0; }
.ae-left .ad-sc-form { margin-bottom: 10px; }
/* Comment brancher votre TV (Affichage → Écrans) */
.ad-howto { margin-bottom: 14px; } .ad-howto summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-howto-test { margin: 12px 0; padding: 10px 12px; background: #fff9db; border-radius: 8px; font-size: 14px; }
.ad-howto-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.ad-howto-cols section { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.ad-howto-cols h3 { margin: 0 0 4px; font-size: 16px; } .ad-howto-cols ol { margin: 8px 0; padding-left: 20px; line-height: 1.55; font-size: 14px; }
.ad-howto-tip { margin: 6px 0 0; font-size: 13px; color: #495057; }
/* Message de « Diffuser sur une TV » : sous le bouton de l'écran */
.ad-cast-out { margin: 8px 0; padding: 12px 14px; border-radius: 10px; border: 1px solid; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.45; }
.ad-cast-out.ko { background: #fff5f5; border-color: #ffa8a8; color: #8f1d29; } .ad-cast-out.ok { background: #ebfbee; border-color: #8ce99a; color: #1c5c2e; }
.ad-cast-out strong { font-size: 15px; } .ad-cast-out .ad-cast-help { font-weight: 600; }
.ad-howto-modes { display: grid; gap: 8px; margin-top: 6px; }
.ad-howto-mode { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; line-height: 1.45; opacity: .75; }
.ad-howto-mode.on { opacity: 1; border-color: #74c0fc; background: #f3f8ff; } .ad-howto-mode > b { display: block; margin-bottom: 2px; font-size: 14px; }
