/* ============================================================
   MONSIEUR KOUAKOU — Design system premium
   Thème sombre, accents orange, glassmorphism.
   ============================================================ */

:root {
  --bg: #06070b;
  --bg-soft: #0b0d14;
  --bg-elevated: #10131c;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f6f8;
  --text-soft: #c8ccd6;
  --muted: #9aa2b3;
  --accent: #ff7a18;
  --accent-2: #ffb347;
  --accent-soft: rgba(255, 122, 24, 0.14);
  --success: #2fbf71;
  --warning: #f2b544;
  --danger: #ef4d5c;
  --info: #4aa8ff;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.32);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Sora", "Inter", "Segoe UI", sans-serif;
  --container: 1200px;
  --transition: 180ms ease;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 82% -10%, rgba(255, 122, 24, 0.16), transparent 60%),
    radial-gradient(700px 500px at 5% 0%, rgba(74, 168, 255, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-2); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
p { margin: 0 0 1rem; color: var(--text-soft); }
small { font-size: .8rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

::selection { background: var(--accent); color: #100a04; }

.container { width: min(var(--container), calc(100% - 2.4rem)); margin-inline: auto; }
.container.narrow { max-width: 760px; }
.section { padding: 5.5rem 0; position: relative; }
.section.tight { padding: 3rem 0; }
.section-head { max-width: 720px; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 700;
  color: var(--accent-2); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.lead { font-size: 1.08rem; color: var(--text-soft); }
.muted { color: var(--muted); }
.text-accent { color: var(--accent-2); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mono { font-family: "JetBrains Mono", "Consolas", monospace; font-size: .85em; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack > * + * { margin-top: 1rem; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------------- Boutons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.3rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .92rem; cursor: pointer; line-height: 1;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #ff9a3d); color: #170c03; box-shadow: 0 14px 34px rgba(255, 122, 24, .28); }
.btn-primary:hover { color: #170c03; box-shadow: 0 18px 40px rgba(255, 122, 24, .38); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); backdrop-filter: blur(14px); }
.btn-secondary:hover { background: var(--surface-strong); color: var(--text); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-soft); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-danger { background: rgba(239, 77, 92, .14); border-color: rgba(239, 77, 92, .35); color: #ff8f98; }
.btn-danger:hover { background: rgba(239, 77, 92, .24); color: #ffb3b9; }
.btn-success { background: rgba(47, 191, 113, .14); border-color: rgba(47, 191, 113, .35); color: #6fe3a4; }
.btn-sm { padding: .5rem .85rem; font-size: .8rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: .45rem; }

/* ---- Bouton « Commander » (panier + finalisation) ---- */
.btn-checkout {
  position: relative;
  overflow: hidden;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 14px 34px rgba(255, 122, 24, .3);
  animation: checkout-breathe 2.6s ease-in-out infinite;
}
.btn-checkout::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.32) 50%, transparent 80%);
  transform: translateX(-120%);
  animation: checkout-shine 3.4s ease-in-out infinite;
  pointer-events: none;
}
.btn-checkout > * { position: relative; z-index: 1; }
.btn-checkout__arrow { font-size: 1.05rem; transition: transform var(--transition); }
.btn-checkout:hover .btn-checkout__arrow { transform: translateX(4px); }
.btn-checkout__spinner {
  display: none;
  width: 1rem; height: 1rem; border-radius: 50%;
  border: 2px solid rgba(23, 12, 3, .25);
  border-top-color: #170c03;
  animation: checkout-spin .7s linear infinite;
}
.btn-checkout.is-submitting { animation: none; }
.btn-checkout.is-submitting::before { display: none; }
.btn-checkout.is-submitting .btn-checkout__spinner { display: inline-block; }
@keyframes checkout-breathe {
  0%, 100% { box-shadow: 0 14px 34px rgba(255,122,24,.28), 0 0 0 0 rgba(255,122,24,.35); }
  50% { box-shadow: 0 16px 38px rgba(255,122,24,.4), 0 0 0 7px rgba(255,122,24,0); }
}
@keyframes checkout-shine {
  0%, 55% { transform: translateX(-120%); }
  80%, 100% { transform: translateX(120%); }
}
@keyframes checkout-spin { to { transform: rotate(360deg); } }

/* ---------------- Cartes / verre ---------------- */
.card {
  background: linear-gradient(160deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; border: 1px solid rgba(255,255,255,.04);
}
.card-hover { transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.card-hover:hover { transform: translateY(-4px); border-color: rgba(255, 122, 24, .35); box-shadow: 0 26px 60px rgba(0,0,0,.45); }
.card-flat { background: rgba(255,255,255,.03); box-shadow: none; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.card-head h2, .card-head h3 { margin-bottom: .15rem; }
.card-title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.card-body > *:last-child { margin-bottom: 0; }
.glass { background: rgba(12, 14, 22, .62); border: 1px solid var(--border); backdrop-filter: blur(22px); border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ---------------- Navigation publique ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 7, 11, .72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px) saturate(1.2);
  transition: border-color var(--transition), background var(--transition), transform .28s ease;
  will-change: transform;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(6, 7, 11, .9); }
/* En-tête escamotable : il libère l'écran quand on descend, revient dès qu'on remonte */
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.menu-open,
.site-header:focus-within { transform: none; }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 74px;
}
.brand { display: inline-flex; align-items: center; gap: .75rem; font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #ff9a3d); color: #140a02;
  font-weight: 900; font-size: .95rem; box-shadow: 0 8px 22px rgba(255,122,24,.32);
  flex: 0 0 auto;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: .98rem; letter-spacing: .02em; }
.brand-text span { font-size: .64rem; text-transform: uppercase; letter-spacing: .22em; color: var(--muted); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-links a {
  padding: .55rem .8rem; border-radius: 999px; font-size: .88rem; color: var(--text-soft);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: .55rem; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: .55rem .7rem; cursor: pointer; }
.cart-link { position: relative; }
.cart-count {
  position: absolute; top: -6px; right: -8px; background: var(--accent); color: #170c03;
  border-radius: 999px; font-size: .64rem; font-weight: 800; padding: .1rem .38rem; min-width: 18px; text-align: center;
}
.mobile-menu { display: none; border-top: 1px solid var(--border); padding: 1rem 0 1.4rem; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: .65rem .4rem; border-bottom: 1px solid var(--border); color: var(--text-soft); }

/* ---------------- Hero ---------------- */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; padding: 6rem 0 5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: 1.25rem; }
.hero .lead { max-width: 560px; font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .62rem;
  border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-success { background: rgba(47,191,113,.12); color: #6fe3a4; border-color: rgba(47,191,113,.3); }
.badge-warning { background: rgba(242,181,68,.12); color: #ffd27f; border-color: rgba(242,181,68,.3); }
.badge-danger { background: rgba(239,77,92,.12); color: #ff9aa3; border-color: rgba(239,77,92,.3); }
.badge-info { background: rgba(74,168,255,.12); color: #8ecbff; border-color: rgba(74,168,255,.3); }
.badge-neutral { background: rgba(255,255,255,.06); color: var(--text-soft); border-color: var(--border); }
.badge-accent { background: var(--accent-soft); color: var(--accent-2); border-color: rgba(255,122,24,.32); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .85rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .82rem; color: var(--text-soft); transition: all var(--transition); }
.chip:hover, .chip.is-active { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }

/* ---------------- Formulaires ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.field { display: flex; flex-direction: column; gap: .38rem; }
.field.col-3 { grid-column: span 3; } .field.col-4 { grid-column: span 4; }
.field.col-6 { grid-column: span 6; } .field.col-8 { grid-column: span 8; }
.field.col-12, .field.col-full { grid-column: span 12; }
.field label, .form-label { font-size: .82rem; font-weight: 600; color: var(--text-soft); }
.field .hint { font-size: .75rem; color: var(--muted); }

/* Téléversement d'un visuel (produits) */
.image-field {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start;
  padding: .9rem; border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: rgba(255,255,255,.02);
}
.image-field-preview {
  position: relative; flex: 0 0 230px; width: 230px; max-width: 100%; aspect-ratio: 16/10;
  display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255,122,24,.16), rgba(74,168,255,.08));
}
.image-field-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-field-empty { font-size: .78rem; color: var(--muted); }
.image-field-body { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.image-field-body input[type="file"] { width: 100%; font-size: .82rem; color: var(--text-soft); }
.image-field-body input[type="file"]::file-selector-button {
  margin-right: .7rem; padding: .5rem .85rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface-strong); color: var(--text);
  font: inherit; font-weight: 600; transition: background var(--transition), border-color var(--transition);
}
.image-field-body input[type="file"]::file-selector-button:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }
.image-alt-input { font-size: .85rem; }
.checkbox-sm { font-size: .8rem; }
.resource-visual { margin-bottom: 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated); }
.resource-visual img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.input, .select, .textarea, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"], input[type="url"], select, textarea {
  width: 100%; padding: .72rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,.035); color: var(--text);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,24,.16); background: rgba(255,255,255,.055); }
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6d7484; }
.is-invalid { border-color: var(--danger) !important; }
.field-error { color: #ff9aa3; font-size: .76rem; }

/* ---- Éditeur enrichi Quill (description produit) ---- */
.richtext-source {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; resize: none;
}
.richtext-source.richtext-fallback {
  position: static; width: 100%; height: auto; min-height: 200px; margin: 0;
  clip: auto; white-space: normal;
}
.rich-editor {
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  background: rgba(255,255,255,.035);
}
.rich-editor .ql-toolbar.ql-snow {
  border: 0; border-bottom: 1px solid var(--border); padding: .55rem .6rem;
  background: rgba(255,255,255,.03); font-family: inherit;
}
.rich-editor .ql-container.ql-snow {
  border: 0; min-height: 240px; font-family: inherit; font-size: .92rem; color: var(--text);
}
.rich-editor .ql-editor { min-height: 240px; line-height: 1.65; }
.rich-editor .ql-editor.ql-blank::before { color: #6d7484; font-style: normal; }
.rich-editor .ql-snow .ql-stroke { stroke: var(--text-soft); }
.rich-editor .ql-snow .ql-fill { fill: var(--text-soft); }
.rich-editor .ql-snow .ql-picker { color: var(--text-soft); }
.rich-editor .ql-snow .ql-picker-options { background: #171b24; border-color: var(--border-strong); }
.rich-editor .ql-snow .ql-picker-item:hover { color: var(--accent-2); }
.rich-editor .ql-snow .ql-tooltip {
  background: #171b24; border-color: var(--border-strong); color: var(--text);
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.rich-editor .ql-snow .ql-tooltip input[type=text] {
  background: rgba(255,255,255,.06); color: var(--text); border-color: var(--border);
}
.rich-editor .ql-editor a { color: var(--accent-2); }
.rich-editor .ql-editor img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.checkbox, .radio { display: inline-flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--text-soft); cursor: pointer; }
.checkbox input, .radio input { width: 17px; height: 17px; accent-color: var(--accent); }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }
.form-section { margin-top: 2rem; }
.form-section h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 1rem; }
.input-group { display: flex; gap: .5rem; }
.input-group .input { flex: 1; }

/* ---------------- Alertes / flash ---------------- */
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); margin-bottom: 1rem; font-size: .9rem; }
.alert-success { border-color: rgba(47,191,113,.32); background: rgba(47,191,113,.08); color: #a9f0c8; }
.alert-danger { border-color: rgba(239,77,92,.32); background: rgba(239,77,92,.08); color: #ffb8be; }
.alert-warning { border-color: rgba(242,181,68,.32); background: rgba(242,181,68,.08); color: #ffdf9e; }
.alert-info { border-color: rgba(74,168,255,.32); background: rgba(74,168,255,.08); color: #b9dcff; }
.flash-stack { position: fixed; top: calc(var(--header-h) + 12px); right: 1.4rem; z-index: 90; display: flex; flex-direction: column; gap: .6rem; max-width: 380px; }
.flash-stack .alert { margin: 0; box-shadow: var(--shadow); backdrop-filter: blur(18px); animation: slideIn .25s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------------- Tableaux ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,.018); }
table.table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 640px; }
.table th { text-align: left; padding: .85rem 1rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border-bottom: 1px solid var(--border); background: rgba(255,255,255,.025); white-space: nowrap; }
.table td { padding: .85rem 1rem; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: rgba(255,255,255,.03); }
.table .cell-strong { font-weight: 600; color: var(--text); }
.table .cell-muted { color: var(--muted); }
.table .actions { display: flex; gap: .4rem; justify-content: flex-end; }
.table .table-thumb { display: block; width: 64px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated); }
.table-empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.table-toolbar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.table-toolbar .search { flex: 1 1 260px; max-width: 420px; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--text); }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem; margin-top: 1.6rem; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--border); color: var(--text-soft); font-size: .82rem; padding: 0 .6rem;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent-2); }
.pagination .is-active { background: var(--accent); border-color: var(--accent); color: #170c03; font-weight: 800; }
.pagination .disabled { opacity: .35; pointer-events: none; }

/* ---------------- Stats ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat { padding: 1.25rem 1.35rem; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.02)); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: linear-gradient(var(--accent), transparent); opacity: .8; }
.stat-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .4rem; }
.stat-value { font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; }
.stat-meta { font-size: .76rem; color: var(--muted); margin-top: .3rem; }
.stat.accent { background: linear-gradient(150deg, rgba(255,122,24,.18), rgba(255,122,24,.04)); border-color: rgba(255,122,24,.3); }

/* ---------------- Grille produits ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.product-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.product-media { aspect-ratio: 16/10; background: linear-gradient(135deg, rgba(255,122,24,.18), rgba(74,168,255,.08)); display: grid; place-items: center; position: relative; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-media .placeholder { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: rgba(255,255,255,.35); }
.product-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.product-body .price { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--accent-2); margin-top: auto; }
.product-body .product-actions { display: flex; gap: .5rem; margin-top: 1rem; }
.product-tag { position: absolute; top: .8rem; left: .8rem; }

/* ---------------- Détail produit / contenu riche ---------------- */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2.4rem; align-items: start; }
.prose { color: var(--text-soft); }
.prose h2, .prose h3 { color: var(--text); margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1.5rem 0; padding: .5rem 0 .5rem 1.2rem; color: var(--text); font-style: italic; }
.prose code { background: rgba(255,255,255,.07); padding: .1rem .35rem; border-radius: 5px; font-size: .88em; }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose img { display: block; max-width: 100%; height: auto; margin: 1.2rem 0; border-radius: var(--radius-sm); }
.prose p + p { margin-top: .9rem; }
.media-frame { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg-elevated); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.product-hero-media, .service-hero-media { aspect-ratio: 16/10; display: grid; place-items: center; background: linear-gradient(135deg, rgba(255,122,24,.16), rgba(74,168,255,.08)); }
.product-hero-media img, .service-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.media-initials { font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; color: rgba(255,255,255,.3); letter-spacing: .04em; }
.related-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.related-media { display: block; aspect-ratio: 16/9; overflow: hidden; background: linear-gradient(135deg, rgba(255,122,24,.16), rgba(74,168,255,.08)); }
.related-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.related-card:hover .related-media img { transform: scale(1.05); }
.related-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .1rem; }

/* ---------------- Timeline ---------------- */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 1.4rem; }
.timeline-item::before { content: ""; position: absolute; left: -1.5rem; top: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline-item.is-done::before { background: var(--accent); }
.timeline-item .time { font-size: .74rem; color: var(--muted); }
.timeline-item strong { display: block; font-size: .9rem; }

/* ---------------- Étapes / process ---------------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; counter-reset: step; }
.step { padding: 1.3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); position: relative; }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--accent); opacity: .7; display: block; margin-bottom: .5rem; }
.step h3 { font-size: 1rem; }
.step p { font-size: .86rem; margin: 0; }

/* ---------------- Témoignages / projets ---------------- */
.quote-card { padding: 1.6rem; }
.quote-card blockquote { margin: 0 0 1.2rem; font-size: 1rem; color: var(--text); }
.quote-author { display: flex; align-items: center; gap: .7rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-weight: 800; font-size: .8rem; border: 1px solid rgba(255,122,24,.3); flex: 0 0 auto; }
.avatar.lg { width: 56px; height: 56px; font-size: 1rem; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.project-card { padding: 0; overflow: hidden; }
.project-card .project-media { aspect-ratio: 4/3; background: linear-gradient(135deg, rgba(255,122,24,.2), rgba(74,168,255,.1)); display: grid; place-items: center; }
.project-card .project-body { padding: 1.2rem 1.3rem 1.35rem; }
.project-card h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.project-card .meta { font-size: .78rem; color: var(--muted); }

/* ---------------- Panier / checkout ---------------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr); gap: 1.6rem; align-items: start; }
.cart-line { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.cart-line:last-child { border-bottom: 0; }
.cart-thumb { width: 74px; height: 62px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,122,24,.2), rgba(74,168,255,.1)); display: grid; place-items: center; font-weight: 800; color: rgba(255,255,255,.4); }
.qty { display: inline-flex; align-items: center; gap: .3rem; }
.qty input { width: 62px; text-align: center; padding: .4rem; }
.summary-line { display: flex; justify-content: space-between; padding: .45rem 0; font-size: .9rem; color: var(--text-soft); }
.summary-line.total { border-top: 1px solid var(--border); margin-top: .6rem; padding-top: .9rem; color: var(--text); font-weight: 700; font-size: 1.05rem; }

/* ---------------- Layout admin ---------------- */
.admin-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(15,18,28,.96), rgba(8,10,16,.98));
  border-right: 1px solid var(--border); padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: 1.2rem;
  scrollbar-width: thin;
}
.admin-brand { padding: .2rem .4rem .9rem; border-bottom: 1px solid var(--border); }
.admin-nav { display: flex; flex-direction: column; gap: .1rem; }
.admin-nav .nav-section { font-size: .64rem; text-transform: uppercase; letter-spacing: .16em; color: #6c7486; padding: 1rem .65rem .35rem; font-weight: 700; }
.admin-nav a { display: flex; align-items: center; gap: .65rem; padding: .58rem .65rem; border-radius: 9px; color: var(--text-soft); font-size: .86rem; transition: all var(--transition); }
.admin-nav a:hover { background: var(--surface); color: var(--text); }
.admin-nav a.is-active { background: linear-gradient(90deg, rgba(255,122,24,.18), rgba(255,122,24,.04)); color: var(--accent-2); border: 1px solid rgba(255,122,24,.22); }
.admin-nav .icon { width: 17px; height: 17px; opacity: .8; flex: 0 0 auto; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1.6rem; background: rgba(6,7,11,.8); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
  transition: transform .28s ease;
  will-change: transform;
}
/* Barre du back-office escamotable : elle libère l'écran au défilement */
.admin-topbar.is-hidden { transform: translateY(-100%); }
.admin-topbar.menu-open,
.admin-topbar:focus-within { transform: none; }
/* Voile du menu latéral : toujours hors flux, sinon il occupe une
   colonne de la grille .admin-shell et casse la mise en page desktop. */
.admin-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 70; display: none; }
.admin-backdrop.open { display: block; }
.admin-content { padding: 1.8rem 1.6rem 3rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0; }
.page-head p { margin: .3rem 0 0; font-size: .88rem; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .78rem; color: var(--muted); margin-bottom: .6rem; }
.breadcrumb a:hover { color: var(--accent-2); }
.admin-search { position: relative; max-width: 380px; flex: 1; }
.admin-search input { padding-left: 2.3rem; }
.admin-search::before { content: "⌕"; position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; position: relative; color: var(--text-soft); }
.icon-btn:hover { border-color: var(--accent); color: var(--accent-2); }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.user-menu { display: flex; align-items: center; gap: .55rem; padding: .3rem .55rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.user-menu .meta { line-height: 1.15; }
.user-menu .meta strong { display: block; font-size: .8rem; }
.user-menu .meta span { font-size: .68rem; color: var(--muted); }
.sidebar-toggle { display: none; }

/* ---------------- Layout client ---------------- */
.client-shell { min-height: 100vh; display: flex; flex-direction: column; }
.client-main { flex: 1; padding: 2rem 0 4rem; }
.portal-tabs { display: flex; flex-wrap: wrap; gap: .35rem; border-bottom: 1px solid var(--border); margin-bottom: 1.8rem; }
.portal-tabs a { padding: .7rem .9rem; font-size: .86rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.portal-tabs a:hover { color: var(--text); }
.portal-tabs a.is-active { color: var(--accent-2); border-bottom-color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: 1.4rem; align-items: start; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1.4rem; }
.detail-list dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.detail-list dd { margin: .15rem 0 0; font-size: .92rem; }

/* ---------------- Auth ---------------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-aside { position: relative; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: radial-gradient(700px 500px at 30% 10%, rgba(255,122,24,.22), transparent 60%), radial-gradient(500px 400px at 80% 90%, rgba(74,168,255,.12), transparent 60%), var(--bg-soft); border-right: 1px solid var(--border); }
.auth-aside h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); max-width: 420px; }
.auth-aside .points { display: grid; gap: .8rem; }
.auth-aside .point { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; color: var(--text-soft); }
.auth-aside .point::before { content: "✓"; color: var(--accent); font-weight: 800; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.4rem; }
.auth-card { width: min(430px, 100%); }
.auth-card h1 { font-size: 1.7rem; }
.auth-foot { margin-top: 1.4rem; font-size: .86rem; color: var(--muted); text-align: center; }
.auth-foot a { color: var(--accent-2); }

/* ---------------- Chat / support ---------------- */
.chat { display: flex; flex-direction: column; gap: .8rem; max-height: 520px; overflow-y: auto; padding: .4rem .2rem; }
.chat-msg { max-width: 78%; padding: .75rem .95rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: .88rem; }
.chat-msg .meta { font-size: .68rem; color: var(--muted); margin-bottom: .25rem; }
.chat-msg.is-own { align-self: flex-end; background: rgba(255,122,24,.12); border-color: rgba(255,122,24,.28); }
.chat-msg.is-system { align-self: center; background: transparent; border-style: dashed; color: var(--muted); font-size: .78rem; max-width: 92%; text-align: center; }
.chat-form { display: grid; gap: .6rem; margin-top: 1rem; }

/* ---------------- Divers ---------------- */
.empty-state { text-align: center; padding: 3rem 1.2rem; color: var(--muted); }
.empty-state .glyph { font-size: 2.4rem; color: var(--accent); opacity: .6; margin-bottom: .8rem; }
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.cta-band { position: relative; border-radius: var(--radius-lg); padding: 3rem; background: radial-gradient(800px 300px at 10% 10%, rgba(255,122,24,.25), transparent 60%), linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border: 1px solid var(--border); overflow: hidden; }
.cta-band h2 { max-width: 640px; }
.cta-band .btn-group { margin-top: 1rem; }
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; background: rgba(4,5,8,.6); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr 1fr; gap: 2rem; }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: .9rem; }
.footer-grid a { display: block; font-size: .86rem; color: var(--text-soft); padding: .18rem 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted); }
.key-value { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: .88rem; }
.key-value:last-child { border-bottom: 0; }
.key-value span { color: var(--muted); }
.key-value strong { text-align: right; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.scroll-x { overflow-x: auto; }
.mt-auto { margin-top: auto; }
.relative { position: relative; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 24px); }
.badge-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: .88rem; }
.list-clean li:last-child { border-bottom: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1.2rem; }
.tabs button, .tabs a { padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); font-size: .82rem; cursor: pointer; }
.tabs button.is-active, .tabs a.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.progress { height: 7px; background: rgba(255,255,255,.07); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.kpi-spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: .5rem; }
.kpi-spark span { flex: 1; background: linear-gradient(180deg, var(--accent), rgba(255,122,24,.15)); border-radius: 3px 3px 0 0; min-height: 4px; opacity: .8; }
.map-note { display: flex; align-items: center; gap: .6rem; font-size: .84rem; color: var(--muted); }
.dot-sep::before { content: "·"; margin: 0 .45rem; color: var(--muted); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .grid-4, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid, .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; left: 0; top: 0; z-index: 80; width: 270px; transform: translateX(-102%); transition: transform .22s ease; }
  .admin-sidebar.open { transform: none; }
  .sidebar-toggle { display: inline-flex; }
}
@media (max-width: 860px) {
  .grid-3, .grid-2, .two-col, .three-col, .detail-grid, .cart-layout, .split, .detail-list { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .desktop-only { display: none; }
  .section { padding: 3.6rem 0; }
  .hero { min-height: auto; }
  .hero-inner { padding: 4rem 0 3rem; }
  .cta-band { padding: 2rem; }
  .site-footer { padding-top: 2.2rem; }
}
@media (max-width: 620px) {
  body { font-size: 15px; }
  .grid-4, .stat-grid, .product-grid, .project-grid, .steps { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.col-3, .field.col-4, .field.col-6, .field.col-8, .field.col-12, .field.col-full { grid-column: span 1; }
  .hero-actions .btn { width: 100%; }
  .flash-stack { left: 1rem; right: 1rem; max-width: none; }
  .page-head { flex-direction: column; }
  .admin-content { padding: 1.2rem 1rem 3rem; }
  .admin-topbar { padding: .7rem 1rem; }
  .table-toolbar { flex-direction: column; align-items: stretch; }
  .footer-grid { grid-template-columns: 1fr; }
  .detail-list { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 60px minmax(0, 1fr); }
  .cart-line .line-total { grid-column: 2; }
}

/* Pipeline commercial (Kanban) */
.pipeline-board {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x proximity;
}
.pipeline-col {
  flex: 0 0 300px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: .9rem;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-snap-align: start;
}
.pipeline-col-head { display: flex; align-items: center; gap: .5rem; }
.pipeline-col-head strong { flex: 1; font-size: .92rem; }
.pipeline-dot { width: .6rem; height: .6rem; border-radius: 50%; flex: none; }
.pipeline-value { margin: -.15rem 0 .2rem; font-size: .76rem; color: var(--muted); }
.pipeline-cards { display: flex; flex-direction: column; gap: .7rem; min-height: 40px; }
.pipeline-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 5px);
  background: rgba(255,255,255,.035);
}
.pipeline-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.pipeline-card-top a { color: var(--text); font-weight: 600; font-size: .9rem; }
.pipeline-card-top a:hover { color: var(--accent-2); }
.pipeline-company { margin: 0; font-size: .78rem; color: var(--muted); }
.pipeline-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .78rem; color: var(--text-soft); }
.pipeline-next { margin: 0; font-size: .72rem; color: var(--muted); }
.pipeline-form { display: flex; flex-direction: column; gap: .35rem; }
.pipeline-form select,
.pipeline-form input { font-size: .78rem; padding: .4rem .5rem; }
.pipeline-form .btn { align-self: flex-start; }
.pipeline-convert summary { cursor: pointer; font-size: .76rem; color: var(--accent-2); }
.pipeline-convert form { display: flex; flex-direction: column; gap: .45rem; margin-top: .4rem; }
.pipeline-empty { margin: 0; padding: .8rem .2rem; text-align: center; font-size: .76rem; color: var(--muted); }

@media (max-width: 720px) {
  .pipeline-col { flex-basis: 84vw; max-width: 84vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .admin-sidebar, .admin-topbar, .btn, .flash-stack { display: none !important; }
  body { background: #fff; color: #111; }
  .card { box-shadow: none; border-color: #ddd; background: #fff; }
}

/* ============================================================
   PASSE RESPONSIVE & ACCESSIBILITÉ — 2026
   Objectif : aucun débordement horizontal, contenu lisible et
   actions atteignables du 320 px au grand écran.
   ============================================================ */

:root {
  color-scheme: dark;
  --header-h: 74px;
  --gutter: clamp(1rem, 4vw, 1.5rem);
  --font-body: clamp(15px, 0.18vw + 14.6px, 16.5px);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-size: var(--font-body);
  overflow-x: clip;
}

img, picture, video { max-width: 100%; height: auto; }
canvas { max-width: 100%; }

/* Cibles cliquables et focus visibles */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 1rem;
  z-index: 200;
  padding: .7rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #170c03;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: top .18s ease;
}
.skip-link:focus { top: 1rem; color: #170c03; }

.container {
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
}

h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.page-head h1, .card h2, .card h3, .stat-value, .key-value strong { overflow-wrap: anywhere; }

@media (hover: none) {
  .btn:hover, .card-hover:hover { transform: none; }
}

/* ---------------- Micro-interactions discrètes -------------------------- */
/* Mêmes principes que le site public : opacity/transform, courtes durées,
   désactivées si le visiteur refuse les animations. Aucune structure modifiée. */
@media (prefers-reduced-motion: no-preference) {
  .js-motion .btn:active { opacity: .86; }
  .js-motion .portal-tabs a { transition: transform .14s ease, color var(--transition); }
  .js-motion .icon-btn { transition: transform .14s ease, border-color var(--transition), color var(--transition); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .js-motion .admin-nav a:hover,
  .js-motion .portal-tabs a:hover { transform: translateX(2px); }
  .js-motion .icon-btn:hover { transform: translateY(-1px); }
}

/* Barres d'outils / filtres : toujours empilables */
.table-toolbar { gap: .7rem; }
.table-toolbar > div { min-width: 0; }
.filter-bar,
.table-toolbar > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  max-width: 100%;
}
.filter-bar .input,
.filter-bar select,
.table-toolbar select,
.table-toolbar input[type="search"] {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 100% !important;
}

/* Tableaux : défilement contenu, indice visuel */
.table-wrap {
  position: relative;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }

/* Cartes / grilles : jamais de débordement */
.detail-grid > *,
.cart-layout > *,
.split > *,
.grid > *,
.stat-grid > *,
.product-grid > *,
.project-grid > *,
.hero-grid > *,
.form-grid > * { min-width: 0; }

.grid-2, .grid-3, .grid-4,
.product-grid, .project-grid, .stat-grid, .steps,
.two-col, .three-col, .footer-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.grid-4, .stat-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* Boutons : ne jamais déborder, accepter le retour à la ligne */
.btn { max-width: 100%; white-space: normal; text-align: center; }
.btn-group { flex-wrap: wrap; }
.card-head, .page-head { min-width: 0; }
.card-head > * { min-width: 0; }

/* Menu public mobile */
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav { min-height: var(--header-h); gap: .65rem; }
  .brand { min-width: 0; }
  .brand-text { min-width: 0; }
  .brand-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
  .brand-text span { display: none; }
  .nav-actions { gap: .35rem; flex: 0 0 auto; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; min-height: 42px; min-width: 42px; }
  .mobile-menu {
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mobile-menu.open { display: flex; flex-direction: column; }
  .mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: .65rem .5rem;
  }
  /* Espace client : le nom complet reste dans le menu, l'en-tête reste compact */
  .client-shell .nav-actions .user-menu .meta { display: none; }
}

/* Écrans peu hauts (zoom navigateur, petites fenêtres) :
   les barres redeviennent statiques pour ne plus rogner le contenu. */
@media (max-height: 520px) {
  .site-header,
  .admin-topbar { position: static; }
  .site-header.is-hidden,
  .admin-topbar.is-hidden { transform: none; }
}

/* Desktop / plein écran : les barres des dashboards défilent avec la page.
   Elles ne restent plus collées en haut de l'écran. */
@media (min-width: 901px) {
  .client-shell .site-header { position: static; }
  .client-shell .site-header.is-hidden { transform: none; }
}

@media (min-width: 1101px) {
  .admin-topbar { position: static; }
  .admin-topbar.is-hidden { transform: none; }
  /* 4 indicateurs par ligne maximum : évite une carte isolée en fin de rangée
     sur les très grands écrans. */
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 460px) {
  .brand-mark { width: 34px; height: 34px; font-size: .82rem; border-radius: 10px; }
  .brand-text strong { max-width: 38vw; font-size: .86rem; }
  .nav-actions .btn-sm { padding: .45rem .62rem; font-size: .74rem; }
  .cart-link { padding: .45rem .55rem; }
  .client-shell .nav-actions { gap: .25rem; }
  .client-shell .user-menu { padding: .25rem .3rem; }
  .client-shell .brand-text strong { max-width: 34vw; }
}

/* Onglets du portail client : défilement horizontal sur petit écran */
@media (max-width: 960px) {
  .portal-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-snap-type: x proximity;
  }
  .portal-tabs::-webkit-scrollbar { display: none; }
  .portal-tabs a {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Back-office */
@media (max-width: 1100px) {
  .admin-sidebar { width: min(300px, 88vw); }
  .admin-nav a { min-height: 42px; }
}

@media (max-width: 760px) {
  .admin-topbar { flex-wrap: wrap; padding: .7rem var(--gutter); }
  .admin-topbar > .flex { flex: 1 1 100%; }
  .admin-search { max-width: none; }
  .topbar-actions { flex: 1 1 auto; justify-content: flex-end; }
  .admin-content { padding: 1.3rem var(--gutter) 3rem; }
  .admin-topbar .user-menu .meta { display: none; }
}

/* Formulaires : une colonne sur mobile, champs confortables */
@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
  .field.col-3, .field.col-4, .field.col-6, .field.col-8,
  .field.col-12, .field.col-full { grid-column: 1 / -1; }
  .input-group { flex-direction: column; }
  .input-group .btn { width: 100%; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .btn { width: 100%; }
  .form-actions .btn-group { width: 100%; }
  .card { padding: 1.15rem; }
  .card-head { flex-wrap: wrap; }
  .flash-stack { top: calc(var(--header-h) + 8px); left: var(--gutter); right: var(--gutter); max-width: none; }
}

/* Confort tactile : champs à 16px pour éviter le zoom iOS */
@media (max-width: 860px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  select,
  textarea { font-size: 16px; }
  .btn, .nav-toggle, .icon-btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .icon-btn { min-width: 42px; }
}

/* Cartes statistiques : 2 colonnes même sur téléphone */
@media (max-width: 620px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .stat { padding: 1rem; }
  .stat-value { font-size: clamp(1.2rem, 5vw, 1.5rem); }
  .stat-label { font-size: .68rem; letter-spacing: .06em; }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* Tableaux du portail client transformés en fiches lisibles */
@media (max-width: 640px) {
  .client-main .table { min-width: 0; display: block; }
  .client-main .table thead { display: none; }
  .client-main .table tbody { display: block; }
  .client-main .table tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.03);
    margin-bottom: .8rem;
    padding: .35rem 0;
    overflow: hidden;
  }
  .client-main .table tr:last-child { margin-bottom: 0; }
  .client-main .table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: .45rem .9rem;
    border-bottom: 1px solid rgba(255,255,255,.045);
    text-align: right;
  }
  .client-main .table td:last-child { border-bottom: 0; }
  .client-main .table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 55%;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
  }
  .client-main .table td:not([data-label])::before,
  .client-main .table td[data-label=""]::before { display: none; }
  .client-main .table td[colspan] { display: block; text-align: left; }
  .client-main .table td.cell-strong { font-weight: 600; }
  .client-main .table .actions { justify-content: flex-end; }
  .client-main .table td .btn { min-height: 38px; }
  .client-main .table-wrap { overflow: visible; border: 0; background: transparent; }
}

/* Le bandeau latéral ne reste collé que sur grand écran */
@media (max-width: 1024px) {
  .sticky-side { position: static; top: auto; }
}

/* Espace client : respiration et lisibilité */
.client-main .page-head { margin-bottom: 1.25rem; }
.client-main .detail-list dd { overflow-wrap: anywhere; }
.client-main .list-clean li { overflow-wrap: anywhere; }
.client-main .key-value { flex-wrap: wrap; }
.client-main .key-value strong { text-align: right; }

/* Grilles de KPI et actions du portail */
.portal-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,122,24,.28);
  background:
    radial-gradient(560px 240px at 12% -20%, rgba(255,122,24,.22), transparent 65%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  overflow: hidden;
}
.portal-hero h1 { margin-bottom: .35rem; }
.portal-hero p { margin: 0; max-width: 62ch; }
.portal-hero .portal-date {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  color: var(--muted);
  text-transform: capitalize;
}
.portal-hero .btn-group { flex: 0 0 auto; }

.section-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  margin: 2rem 0 .9rem;
}
.section-label h2 { font-size: clamp(1.1rem, 2.4vw, 1.35rem); margin: 0; }
.section-label p { margin: 0; font-size: .84rem; color: var(--muted); }

.action-list { display: grid; gap: .7rem; }
.action-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03);
  transition: border-color var(--transition), background var(--transition);
}
.action-item:hover { border-color: rgba(255,122,24,.32); background: rgba(255,255,255,.05); }
.action-item.is-urgent { border-color: rgba(242,181,68,.35); background: rgba(242,181,68,.06); }
.action-item .action-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 1.05rem;
}
.action-item .action-body { min-width: 0; flex: 1; }
.action-item .action-body strong { display: block; font-size: .9rem; }
.action-item .action-body span { display: block; font-size: .78rem; color: var(--muted); }
.action-item .action-cta { flex: 0 0 auto; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: .75rem;
}
.quick-action {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03);
  transition: border-color var(--transition), transform var(--transition);
}
.quick-action:hover { border-color: rgba(255,122,24,.35); transform: translateY(-2px); }
.quick-action .glyph { font-size: 1.15rem; color: var(--accent-2); line-height: 1.2; }
.quick-action strong { display: block; font-size: .88rem; }
.quick-action span { display: block; font-size: .76rem; color: var(--muted); }

.help-panel {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  background: rgba(255,255,255,.02);
  font-size: .84rem;
}
.help-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-soft);
  min-height: 32px;
  display: flex;
  align-items: center;
}
.help-panel summary::marker { color: var(--accent); }
.help-panel[open] summary { margin-bottom: .6rem; }

.status-legend { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.status-legend li { display: flex; align-items: flex-start; gap: .55rem; font-size: .82rem; color: var(--muted); line-height: 1.45; }

/* États vides : action toujours accessible */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.empty-state .btn-group { justify-content: center; flex-wrap: wrap; }
.empty-state h2 { margin: 0; }
.empty-state p { margin: 0; max-width: 46ch; }

/* Petits écrans : derniers garde-fous */
@media (max-width: 520px) {
  .section { padding: 2.8rem 0; }
  .section.tight { padding: 2rem 0; }
  .hero-inner { padding: 3rem 0 2.4rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .page-head { align-items: stretch; }
  .page-head .btn-group { width: 100%; }
  .page-head .btn-group .btn { flex: 1 1 auto; }
  .portal-hero .btn-group { width: 100%; }
  .portal-hero .btn-group .btn { flex: 1 1 auto; }
  .action-item { flex-wrap: wrap; }
  .action-item .action-cta { width: 100%; }
  .action-item .action-cta .btn { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .table-toolbar { flex-direction: column; align-items: stretch; }
  .table-toolbar .btn { width: 100%; }
  .tabs, .badge-list { row-gap: .4rem; }
  .summary-line { gap: .8rem; }
  .summary-line > * { overflow-wrap: anywhere; }
}

@media (max-width: 380px) {
  :root { --gutter: .85rem; }
  .brand-text strong { max-width: 32vw; }
  .portal-hero { padding: 1.1rem; border-radius: var(--radius); }
  .btn { font-size: .86rem; }
}

/* Écrans très larges : limiter la longueur des lignes */
@media (min-width: 1600px) {
  :root { --container: 1320px; }
  .section-head, .hero .lead { max-width: 780px; }
}

/* Impression : repasser sur un rendu clair et sans navigation */
@media print {
  .site-header, .site-footer, .admin-sidebar, .admin-topbar,
  .btn, .flash-stack, .portal-tabs, .skip-link { display: none !important; }
  body { background: #fff; color: #111; overflow: visible; }
  .card, .glass, .table-wrap {
    box-shadow: none !important;
    border-color: #ddd !important;
    background: #fff !important;
    color: #111 !important;
  }
  .table { min-width: 0; }
  a { color: #111; text-decoration: underline; }
}

/* ============================================================
   IDENTITÉ VISUELLE, BANDEAU DÉFILANT & ANIMATIONS PREMIUM
   ============================================================ */

/* ---- Logo téléversé (repli : pastille « MK ») ---- */
.brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: contain;
  padding: 3px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  transition: transform .4s cubic-bezier(.2, .7, .2, 1), border-color .3s ease, box-shadow .3s ease;
}
.brand:hover .brand-logo {
  transform: rotate(-4deg) scale(1.04);
  border-color: rgba(255, 122, 24, .5);
  box-shadow: 0 10px 26px rgba(255, 122, 24, .22);
}
.admin-brand .brand-logo,
.auth-aside .brand-logo { width: 46px; height: 46px; }

/* ---- Bandeau défilant ---- */
.ticker {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background:
    linear-gradient(90deg, rgba(255, 122, 24, .16), rgba(74, 168, 255, .08) 55%, rgba(255, 122, 24, .12));
}
.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 2;
  pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(90deg, rgba(6, 7, 11, .92), transparent); }
.ticker::after { right: 0; background: linear-gradient(270deg, rgba(6, 7, 11, .92), transparent); }
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll var(--ticker-duration, 38s) linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track,
.ticker.is-paused .ticker-track { animation-play-state: paused; }
.ticker-group {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  list-style: none;
  margin: 0;
  padding: .5rem 1.3rem;
}
.ticker-group li {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}
.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 24, .16);
  animation: ticker-dot 2.4s ease-in-out infinite;
}
.ticker-toggle {
  position: absolute;
  right: .55rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(6, 7, 11, .75);
  color: var(--text-soft);
  font-size: .55rem;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.ticker-toggle:hover { color: var(--accent-2); border-color: var(--accent); background: var(--accent-soft); }
@keyframes ticker-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@keyframes ticker-dot {
  0%, 100% { opacity: .45; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---- Soulignement animé de la navigation ---- */
.nav-links a { position: relative; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: .8rem;
  right: .8rem;
  bottom: .22rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .38s cubic-bezier(.2, .7, .2, 1);
}
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }

/* ---- Reflet sur les boutons principaux ---- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-18deg);
  transition: left .65s ease;
  pointer-events: none;
}
.btn-primary:hover::after { left: 150%; }

/* ---- Retour en haut ---- */
.back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(12, 14, 22, .82);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  box-shadow: var(--shadow-soft);
  transition: opacity .3s ease, transform .3s ease, background .3s ease, border-color .3s ease, color .3s ease;
}
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }

/* ---- Adaptations ---- */
@media (max-width: 640px) {
  .brand-logo { width: 38px; height: 38px; border-radius: 10px; }
  .ticker-group { gap: 1.8rem; padding: .45rem 1rem; }
  .ticker-group li { font-size: .64rem; letter-spacing: .1em; }
  .ticker::before, .ticker::after { width: 36px; }
  .ticker-toggle { width: 20px; height: 20px; font-size: .5rem; right: .35rem; }
  .back-to-top { right: .8rem; bottom: .8rem; width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none !important; }
  .ticker { overflow-x: auto; }
  .ticker-toggle { display: none; }
  .back-to-top { display: none !important; }
  .btn-primary::after { display: none; }
}

/* ---- Photos personnelles (accueil & contact) ---- */
.portrait-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  isolation: isolate;
}
.portrait-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 32%;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1), filter .5s ease;
}
.portrait-card-wide img { aspect-ratio: 16 / 10; object-position: center 40%; }
.portrait-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 7, 11, .18) 0%, transparent 38%, rgba(6, 7, 11, .78) 100%);
}
.portrait-card:hover img { transform: scale(1.035); }
.portrait-card figcaption {
  position: absolute;
  z-index: 2;
  left: 1.15rem;
  right: 1.15rem;
  bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.portrait-card figcaption strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.25;
}
.portrait-card figcaption > span:last-child {
  color: var(--text-soft);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.portrait-card figcaption .badge { align-self: flex-start; }
.portrait-card-field { box-shadow: 0 26px 70px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 122, 24, .16); }

@media (max-width: 640px) {
  .portrait-card { border-radius: 18px; }
  .portrait-card figcaption { left: .95rem; right: .95rem; bottom: .9rem; }
  .portrait-card figcaption strong { font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  .portrait-card img { transition: none; }
  .portrait-card:hover img { transform: none; }
}

@media print {
  .ticker, .back-to-top { display: none !important; }
}
