/* ============================================================
 *  Visuels : illustrations SVG (inline, thémables), photos, captures, couvertures, animations
 *  Chargé après theme.css sur toutes les pages.
 * ============================================================ */

/* ── Palette des illustrations (suit le thème clair / sombre) ── */
.vis { display: block; width: 100%; height: auto; overflow: visible; }
.vis text { font-family: 'Inter', system-ui, sans-serif; }
.vis .v-card { fill: var(--surface); stroke: var(--border); stroke-width: 1.2; }
.vis .v-bar, .vis .v-m { fill: var(--surface-2); }
.vis .sh { filter: drop-shadow(0 10px 22px rgba(40,24,60,.14)); }
.vis .sh2 { filter: drop-shadow(0 3px 7px rgba(40,24,60,.10)); }
[data-theme="dark"] .vis .sh { filter: drop-shadow(0 10px 24px rgba(0,0,0,.5)); }
[data-theme="dark"] .vis .sh2 { filter: drop-shadow(0 3px 8px rgba(0,0,0,.4)); }
.vis .v-ln { fill: color-mix(in srgb, var(--text-light) 38%, var(--surface)); }
.vis .v-ln2 { fill: color-mix(in srgb, var(--text-light) 20%, var(--surface)); }
.vis .v-blob { fill: var(--primary-light); opacity: .6; }
.vis .v-p, .vis .v-ptxtf { fill: var(--primary); }
.vis .v-p2, .vis .v-fill2 { fill: var(--primary-mid); }
.vis .v-pl { fill: var(--primary-light); }
.vis .v-pl2 { fill: color-mix(in srgb, var(--primary) 30%, var(--surface)); }
.vis .v-ptxt { fill: var(--primary); }
.vis .v-ctxt { fill: var(--on-primary); }
.vis .v-ctxtf { fill: rgba(255,255,255,.6); }
.vis .v-txt { fill: var(--text-muted); }
.vis .v-t { fill: #2dd4bf; }
.vis .v-tl { fill: rgba(45,212,191,.18); }
.vis .v-ttxt { fill: #0d9488; }
.vis .v-o { fill: #f59e0b; }
.vis .v-ol { fill: rgba(245,158,11,.18); }
.vis .v-otxt { fill: #b45309; }
.vis .v-g, .vis .v-a { fill: var(--accent); }
.vis .v-gl { fill: rgba(0,160,74,.15); }
.vis .v-gtxt { fill: #047857; }
.vis .v-r { fill: #ef4444; }
.vis .v-rl { fill: rgba(239,68,68,.15); }
.vis .v-rtxt { fill: #b91c1c; }
[data-theme="dark"] .vis .v-ttxt { fill: #5eead4; }
[data-theme="dark"] .vis .v-otxt { fill: #fbbf24; }
[data-theme="dark"] .vis .v-gtxt { fill: #6ee7b7; }
[data-theme="dark"] .vis .v-rtxt { fill: #fca5a5; }
.vis .v-stroke { fill: none; stroke: var(--primary); stroke-linecap: round; stroke-linejoin: round; }
.vis .v-stroke2 { fill: none; stroke: var(--primary-mid); stroke-linecap: round; stroke-linejoin: round; }
.vis .v-white { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.vis .v-area { fill: var(--primary-light); }
.vis .v-ring { fill: none; stroke: color-mix(in srgb, var(--text-light) 24%, var(--surface)); }
.vis .v-ringp { fill: none; stroke: var(--primary); stroke-width: 3; }
.vis .v-dash { fill: none; stroke: var(--text-light); stroke-dasharray: 5 5; opacity: .7; }
.vis .v-axis { stroke: var(--border); fill: none; }
.vis .v-beam { stroke: #2dd4bf; filter: drop-shadow(0 0 6px rgba(45,212,191,.8)); }
.vis .v-hl { fill: none; stroke: var(--primary); stroke-width: 2; stroke-dasharray: 5 4; }
.vis .v-hl2 { fill: var(--primary-light); stroke: var(--primary-mid); stroke-width: 1.2; }
.vis .v-gstroke { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.vis .v-bx { fill: none; stroke: var(--primary-mid); stroke-width: 1.4; }

/* Cadre de présentation d'une illustration */
.vis-wrap { position: relative; width: 100%; max-width: 560px; margin-inline: auto; }
.vis-float { animation: vis-float 7s ease-in-out infinite; }
@keyframes vis-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ── Photos et emplacements à compléter ─────────────────── */
.photo { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius-xl); aspect-ratio: var(--ar, 16/10); background: var(--surface-2); box-shadow: var(--shadow); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.photo:hover img { transform: scale(1.03); }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 18px 14px; color: #fff; font-size: 13.5px; font-weight: 600; background: linear-gradient(transparent, rgba(8,10,20,.72)); }
.photo.ph { display: grid; place-items: center; text-align: center; padding: 22px; border: 2px dashed var(--primary-mid); background: linear-gradient(135deg, var(--primary-light), var(--surface-2)); box-shadow: none; }
.photo.ph i { font-size: 34px; color: var(--primary); margin-bottom: 10px; display: block; }
.photo.ph b { display: block; color: var(--text); font-size: 14px; }
.photo.ph code { display: inline-block; margin-top: 8px; font-size: 12px; background: var(--surface); color: var(--primary); padding: 3px 9px; border-radius: 6px; border: 1px solid var(--border); }
.photo.ph small { display: block; color: var(--text-muted); margin-top: 6px; font-size: 12px; max-width: 320px; }

/* ── Captures dans un cadre de navigateur ──────────────── */
.frame { margin: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.frame-bar i:nth-child(2) { background: #febb2c; } .frame-bar i:nth-child(3) { background: #28c840; }
.frame-url { margin-left: 10px; flex: 1; font-size: 11.5px; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.frame img { width: 100%; height: auto; display: block; }
.frame .vis { padding: 6px; }
.only-dark { display: none !important; }
[data-theme="dark"] .only-light { display: none !important; }
[data-theme="dark"] .only-dark { display: block !important; }

/* ── Sections illustrées ───────────────────────────────── */
.showcase { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; padding: 28px 0; }
.showcase.rev .showcase-text { order: 2; }
.showcase-text h3 { font-size: 1.55rem; margin-bottom: 12px; }
.showcase-text p { font-size: 16px; margin-bottom: 14px; }
.showcase-text ul { list-style: none; display: grid; gap: 9px; margin-bottom: 20px; }
.showcase-text li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-muted); }
.showcase-text li i { color: var(--accent); margin-top: 4px; font-size: 13px; }
.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: st; }
.step4 { text-align: center; position: relative; }
.step4 .vis-wrap { max-width: 260px; margin-bottom: 8px; }
.step4 .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.step4 h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step4 p { font-size: 14px; }
.vig { display: block; margin: -4px -4px 14px; border-radius: 12px; background: linear-gradient(160deg, var(--primary-light), transparent 70%); padding: 6px 10px 0; }
.vig .vis { max-height: 150px; }
.hero-visual { position: relative; }
.hero-float { position: absolute; inset: -30px -24px -40px 0; pointer-events: none; z-index: 2; }
@media (max-width: 1180px) { .hero-float { display: none; } }
.hero-float .vis { width: 100%; height: 100%; animation: vis-float 8s ease-in-out infinite; }
.mod-cover { position: relative; height: 92px; margin: -22px -22px 16px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; display: grid; place-items: center; color: #fff; font-size: 34px; background: var(--cg, linear-gradient(135deg, #875a7b, #5c3a53)); overflow: hidden; }
.mod-cover::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120px 80px at 85% 0%, rgba(255,255,255,.28), transparent 70%), radial-gradient(90px 90px at 5% 110%, rgba(255,255,255,.18), transparent 70%); }
.mod-cover i { position: relative; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.mod-cover.c0 { --cg: linear-gradient(135deg, #875a7b, #4e2f47); } .mod-cover.c1 { --cg: linear-gradient(135deg, #0d9488, #115e59); }
.mod-cover.c2 { --cg: linear-gradient(135deg, #6366f1, #3730a3); } .mod-cover.c3 { --cg: linear-gradient(135deg, #f59e0b, #b45309); }
.mod-cover.c4 { --cg: linear-gradient(135deg, #ec4899, #9d174d); } .mod-cover.c5 { --cg: linear-gradient(135deg, #0ea5e9, #075985); }
.mod-cover.c6 { --cg: linear-gradient(135deg, #22c55e, #166534); } .mod-cover.c7 { --cg: linear-gradient(135deg, #64748b, #1e293b); }
.mod-cover.big { height: 150px; margin: 0; border-radius: var(--radius-xl); font-size: 56px; }
.empty-art { max-width: 220px; margin: 0 auto 8px; }
.logo-mark { display: block; width: 100%; height: 100%; }

/* ── Apparition au défilement (désactivée si l'on réduit les animations) ── */
html.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
html.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .rv { opacity: 1; transform: none; transition: none; }
  .vis-float, .hero-float .vis { animation: none; }
  .photo img { transition: none; }
}

@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; gap: 26px; } .showcase.rev .showcase-text { order: 0; }
  .steps4 { grid-template-columns: repeat(2, 1fr); }
  .hero-float { display: none; }
}
@media (max-width: 520px) { .steps4 { grid-template-columns: 1fr; } }

/* Mises en page des pages illustrées */
.sol-card .vig { margin: -6px -6px 16px; }
.sol-card:hover .vig { background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%); }
.prod-card.big { align-items: stretch; }
.prod-card.big .prod-vig { flex: 0 0 46%; max-width: 330px; margin: 0 22px 0 0; align-self: center; }
.prod-card.big .prod-vig .vis { max-height: 190px; }
@media (max-width: 760px) { .prod-card.big { flex-direction: column; } .prod-card.big .prod-vig { flex-basis: auto; max-width: none; margin: 0 0 14px; width: 100%; } }
.auth-art { margin-top: 18px; max-width: 320px; opacity: .95; }
.auth-aside .auth-art .vis .v-card { stroke: transparent; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.split > .photo, .split > .frame, .split > .vis-wrap { align-self: center; }
.vis .v-rstroke { stroke: #ef4444; fill: none; }
.hero-art { max-width: 340px; margin: 22px auto 0; }
.hero-art.wide { max-width: 560px; }
.page-hero .hero-art .vis { filter: drop-shadow(0 16px 30px rgba(0,0,0,.28)); }

/* Couverture d'un thème du Market Space : maquette aux couleurs du thème */
.mod-cover.theme::before { display: none; }
.mod-cover.theme { display: block; overflow: hidden; border: 1px solid rgba(0,0,0,.08); }
.mod-cover.theme span { position: absolute; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.mod-cover.theme .tc-nav { left: 0; right: 0; top: 0; height: 16%; border-radius: 0; display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.mod-cover.theme .tc-nav i { width: 10px; height: 10px; border-radius: 50%; filter: none; } .mod-cover.theme .tc-nav b { height: 4px; width: 22%; background: rgba(0,0,0,.18); border-radius: 3px; }
.mod-cover.theme .tc-side { left: 0; top: 16%; bottom: 0; width: 20%; border-radius: 0; }
.mod-cover.theme .tc-card { left: 26%; top: 28%; width: 44%; height: 48%; padding: 8px; } .mod-cover.theme .tc-card i { display: block; height: 18%; width: 60%; border-radius: 3px; filter: none; }
.mod-cover.theme .tc-btn { right: 8%; bottom: 14%; width: 16%; height: 14%; }
