/* DESIGN SYSTEM PUBLIC — indépendant de l'administration.
   Ajouter les futurs styles publics en consommant des variables --theme-*.
   Les thèmes sont des listes fermées ; aucune valeur CSS arbitraire ne vient de SQL. */
:is(.site-public,.mini-theme) {
  --theme-font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --theme-font-body-size:16px;--theme-font-small-size:13px;--theme-line-height:1.5;
  --theme-heading-weight:800;--theme-heading-tracking:-.035em;
  --theme-content-width:1160px;--theme-section-spacing:72px;
  --theme-space-1:4px;--theme-space-2:8px;--theme-space-3:12px;
  --theme-space-4:16px;--theme-space-5:20px;--theme-space-6:24px;
  --theme-space-8:32px;--theme-space-10:40px;--theme-space-12:48px;
  --theme-radius-small:8px;--theme-radius-medium:12px;--theme-radius-large:18px;
  --theme-radius-pill:999px;--theme-button-padding-y:11px;--theme-button-padding-x:19px;
  --theme-card-padding:22px;--theme-card-gap:26px;
  --theme-motion-fast:150ms;--theme-motion-normal:250ms;
  --theme-shadow-small:0 4px 12px #00000016;
  --theme-shadow-medium:0 13px 35px #00000022;
  --theme-shadow-large:0 28px 60px #00000030;
  /* Réserves sémantiques pour la suite : alertes, tableaux, badges, overlays, modales. */
  --theme-success:#2c936a;--theme-warning:#c48735;--theme-danger:#cf5c55;
  --theme-info:#4e9acc;--theme-focus:#74d9db;
  --theme-elevation-1:var(--theme-shadow-small);
  --theme-elevation-2:var(--theme-shadow-medium);
  --theme-elevation-3:var(--theme-shadow-large);
  --theme-table-stripe:var(--theme-surface-alt);
  --theme-table-hover:var(--theme-card-hover);
  --theme-badge-bg:var(--theme-surface-alt);
  --theme-badge-text:var(--theme-text);
  --theme-modal-overlay:#000000a6;
  --theme-nav-height:84px;
  --theme-border-width:1px;
  --theme-card-radius:var(--theme-radius-large);
  --theme-input-radius:var(--theme-radius-small);
  --theme-input-padding:11px;
  --theme-button-radius:9px;
  --theme-overlay-direction:90deg;
}
:is(.site-public,.mini-theme).theme-atelier-sombre {
  --theme-bg:#151b23;--theme-surface:#252d38;--theme-surface-alt:#2d3744;
  --theme-text:#f4f6f8;--theme-muted:#bdc8d3;--theme-border:#3b4754;
  --theme-accent:#64d8cf;--theme-accent-hover:#87e8df;--theme-on-accent:#142a32;
  --theme-header:#10161e;--theme-header-text:#f4f6f8;
  --theme-card-hover:#344251;--theme-image-bg:#dde5e8;
  --theme-input-bg:#202832;--theme-input-text:#f4f6f8;--theme-input-border:#536474;
  --theme-hero-start:#102c39;--theme-hero-end:#1c5865;
  --theme-hero-text:#fff;--theme-hero-subtitle:#adf2e9;
  --theme-hero-overlay-rgb:9 25 34;
  --theme-section-alt:#1c2630;--theme-footer:#0d141b;--theme-footer-text:#e8f0f5;
}
:is(.site-public,.mini-theme).theme-studio-clair {
  --theme-bg:#f5f7f8;--theme-surface:#fff;--theme-surface-alt:#ecf2f3;
  --theme-text:#172d37;--theme-muted:#506571;--theme-border:#d5e0e3;
  --theme-accent:#266477;--theme-accent-hover:#174f61;--theme-on-accent:#fff;
  --theme-header:#fff;--theme-header-text:#172d37;
  --theme-card-hover:#eef6f8;--theme-image-bg:#e8f1f1;
  --theme-input-bg:#fff;--theme-input-text:#172d37;--theme-input-border:#bdcdd3;
  --theme-hero-start:#153c4c;--theme-hero-end:#4a9b9f;
  --theme-hero-text:#fff;--theme-hero-subtitle:#d4f9f5;
  --theme-hero-overlay-rgb:10 35 47;
  --theme-section-alt:#e6eff0;--theme-footer:#1b3a48;--theme-footer-text:#f3f8f9;
}
:is(.site-public,.mini-theme).theme-graphite {
  --theme-bg:#202124;--theme-surface:#303237;--theme-surface-alt:#383b40;
  --theme-text:#f6f5f3;--theme-muted:#cbc8c3;--theme-border:#4b4d51;
  --theme-accent:#ffae79;--theme-accent-hover:#ffca9f;--theme-on-accent:#352319;
  --theme-header:#17181b;--theme-header-text:#f6f5f3;
  --theme-card-hover:#414248;--theme-image-bg:#eee8e2;
  --theme-input-bg:#282a2e;--theme-input-text:#f6f5f3;--theme-input-border:#626266;
  --theme-hero-start:#262124;--theme-hero-end:#705444;
  --theme-hero-text:#fff;--theme-hero-subtitle:#ffd4b6;
  --theme-hero-overlay-rgb:28 22 22;
  --theme-section-alt:#292a2e;--theme-footer:#141517;--theme-footer-text:#f6f5f3;
}
:is(.site-public,.mini-theme).theme-ocean {
  --theme-bg:#102130;--theme-surface:#1d3548;--theme-surface-alt:#264259;
  --theme-text:#f0faff;--theme-muted:#bbd5e1;--theme-border:#36566b;
  --theme-accent:#7bdbf2;--theme-accent-hover:#a6eafd;--theme-on-accent:#0d3447;
  --theme-header:#0b1a27;--theme-header-text:#effaff;
  --theme-card-hover:#2c526b;--theme-image-bg:#d5eaf2;
  --theme-input-bg:#172d40;--theme-input-text:#f0faff;--theme-input-border:#58788b;
  --theme-hero-start:#0b2a45;--theme-hero-end:#246d8a;
  --theme-hero-text:#fff;--theme-hero-subtitle:#b6eeff;
  --theme-hero-overlay-rgb:7 28 46;
  --theme-section-alt:#152b40;--theme-footer:#071824;--theme-footer-text:#effaff;
}
:is(.site-public,.mini-theme).theme-sable {
  --theme-bg:#faf5ea;--theme-surface:#fffaf3;--theme-surface-alt:#f3e8d8;
  --theme-text:#3c3024;--theme-muted:#695c4a;--theme-border:#e4d7c5;
  --theme-accent:#96653e;--theme-accent-hover:#79502f;--theme-on-accent:#fff;
  --theme-header:#fffaf4;--theme-header-text:#3c3024;
  --theme-card-hover:#f2e6d5;--theme-image-bg:#eee2d1;
  --theme-input-bg:#fffdf9;--theme-input-text:#3c3024;--theme-input-border:#ccbba5;
  --theme-hero-start:#52402f;--theme-hero-end:#a47a52;
  --theme-hero-text:#fff;--theme-hero-subtitle:#ffdfb6;
  --theme-hero-overlay-rgb:42 28 17;
  --theme-section-alt:#f0e4d3;--theme-footer:#3a2b21;--theme-footer-text:#fff7ed;
}
/* Noir Or Premium : palette indépendante, sans retoucher les autres thèmes. */
:is(.site-public,.mini-theme).theme-noir-or-premium {
  --theme-bg:#08090b;--theme-surface:#151515;--theme-surface-alt:#1e1a15;
  --theme-text:#f7f3ea;--theme-muted:#c6beb1;--theme-border:#3b342a;
  --theme-accent:#e9b954;--theme-accent-hover:#ffd778;--theme-on-accent:#211605;
  --theme-header:#0b0b0d;--theme-header-text:#f7f3ea;
  --theme-card-hover:#211e19;--theme-image-bg:#242320;
  --theme-input-bg:#111214;--theme-input-text:#f7f3ea;--theme-input-border:#77634a;
  --theme-hero-start:#0a0a0c;--theme-hero-end:#2a2016;
  --theme-hero-text:#fffaf1;--theme-hero-subtitle:#f0c978;
  --theme-hero-overlay-rgb:8 8 9;
  --theme-section-alt:#101013;--theme-footer:#08080a;--theme-footer-text:#e9dfcf;
  --theme-focus:#ffd778;--theme-radius-large:20px;
  --theme-shadow-medium:0 14px 36px #00000065;
  --theme-shadow-large:0 28px 68px #00000090;
  --theme-button-radius:999px;
  --theme-btn-primary-start:#ffe09b;
  --theme-btn-primary-middle:#e9b954;
  --theme-btn-primary-end:#bc852d;
  --theme-btn-secondary-bg:#0d0e10;
  --theme-btn-secondary-text:#f4d08d;
  --theme-btn-glow:0 0 0 1px #ffdf9350,0 9px 26px #b47b263d;
  --theme-btn-glow-hover:0 0 0 1px #ffe4a387,0 0 25px #efb95455,0 14px 34px #000a;
}

/* Adaptation des anciennes variables publiques — aucune incidence sur .gestion. */
.site-public {
  --ink:var(--theme-text);--muted:var(--theme-muted);
  --surface:var(--theme-surface);--paper:var(--theme-bg);
  --line:var(--theme-border);--accent:var(--theme-accent);
  --radius:var(--theme-card-radius);
  background:var(--theme-bg);color:var(--theme-text);
  font-family:var(--theme-font-family);font-size:var(--theme-font-body-size);
  line-height:var(--theme-line-height);min-height:100vh;
  color-scheme:dark;
}
.site-public.theme-studio-clair,.site-public.theme-sable {color-scheme:light}
.site-public a:focus-visible,.site-public button:focus-visible,
.site-public input:focus-visible,.site-public select:focus-visible,
.site-public textarea:focus-visible {outline:3px solid var(--theme-focus);outline-offset:3px}
.site-public .largeur {width:min(var(--theme-content-width),calc(100% - 40px))}
.site-public .section {padding:var(--theme-section-spacing) 0}
.site-public .grille-produits {gap:var(--theme-card-gap)}
.site-public .site-header {background:var(--theme-header);color:var(--theme-header-text);border-color:var(--theme-border)}
.site-public .logo-3d {background:var(--theme-accent);color:var(--theme-on-accent)}
.site-public .hero {background:linear-gradient(120deg,var(--theme-hero-start),var(--theme-hero-end));color:var(--theme-hero-text)}
.site-public .hero h1 {font-weight:var(--theme-heading-weight);letter-spacing:var(--theme-heading-tracking)}
.site-public .hero p:not(.surtitre) {color:var(--theme-hero-text)}
.site-public .hero .surtitre {color:var(--theme-hero-subtitle)}
.site-public .hero-avec-image::before {background:linear-gradient(90deg,
    rgb(var(--theme-hero-overlay-rgb) / .94) 0%,
    rgb(var(--theme-hero-overlay-rgb) / .84) 37%,
    rgb(var(--theme-hero-overlay-rgb) / .40) 69%,
    rgb(var(--theme-hero-overlay-rgb) / .10) 100%)}
.site-public .hero-objet {background:radial-gradient(circle at 32% 20%,var(--theme-surface-alt),var(--theme-hero-end) 70%,var(--theme-hero-start));border-color:var(--theme-border)}
.site-public .hero-objet small {color:var(--theme-hero-text)}
.site-public .surtitre {color:var(--theme-accent)}
.site-public .bouton {background:var(--theme-accent);border-color:var(--theme-accent);color:var(--theme-on-accent);border-radius:var(--theme-button-radius);padding:var(--theme-button-padding-y) var(--theme-button-padding-x);transition:background var(--theme-motion-fast)}
.site-public .bouton:hover {background:var(--theme-accent-hover);border-color:var(--theme-accent-hover);color:var(--theme-on-accent)}
.site-public .bouton-clair {background:#fff;border-color:#fff;color:#163642}
.site-public .bouton-clair:hover {background:#e7f7f7;color:#163642}
.site-public .filtres a,.site-public .etiquettes span {background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-text)}
.site-public .filtres a.actif,.site-public .filtres a:hover {background:var(--theme-accent);border-color:var(--theme-accent);color:var(--theme-on-accent)}
.site-public .carte-produit {background:var(--theme-surface);border-color:var(--theme-border);border-radius:var(--theme-card-radius);box-shadow:var(--theme-shadow-medium)}
.site-public .carte-produit:hover {background:var(--theme-card-hover)}
.site-public .carte-corps {padding:var(--theme-card-padding)}
.site-public .illustration-produit,.site-public .visuel-fiche {background:var(--theme-image-bg)}
.site-public .image-defaut {background:var(--theme-image-bg);color:var(--theme-muted)}
.site-public .categorie,.site-public .carte-bas a,.site-public .info-livraison {color:var(--theme-accent)}
.site-public .message-vide {background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-muted)}
.site-public .atelier-section {background:var(--theme-section-alt)}
.site-public .atelier-interne>p {color:var(--theme-muted)}
.site-public .pied-site {background:var(--theme-footer);color:var(--theme-footer-text)}
.site-public .pied-interne p {color:var(--theme-footer-text)}
.site-public .demande-fiche {background:var(--theme-surface);border-color:var(--theme-border)}
.site-public .demande-fiche input,.site-public .demande-fiche select,
.site-public .demande-fiche textarea {background:var(--theme-input-bg);color:var(--theme-input-text);border:1px solid var(--theme-input-border);border-radius:var(--theme-input-radius);padding:var(--theme-input-padding)}
.site-public .vignette-produit {background:var(--theme-surface);border-color:var(--theme-border)}
.site-public .vignette-produit.active {border-color:var(--theme-accent)}
.site-public .lead,.site-public .titre-section>p,.site-public .fil-ariane,.site-public .demande-fiche p {color:var(--theme-muted)}
/* Finition du thème Noir Or Premium : styles limités à la vitrine publique. */
.site-public.theme-noir-or-premium .site-header {
  border-bottom:1px solid #d9a44135;
  box-shadow:0 6px 28px #00000055;
}
.site-public.theme-noir-or-premium .entete-interne nav a {
  transition:color var(--theme-motion-fast) ease;
}
.site-public.theme-noir-or-premium .entete-interne nav a:hover {
  color:var(--theme-accent-hover);
}
.site-public.theme-noir-or-premium .logo-3d {
  background:linear-gradient(135deg,#ffdd87,#b77e28);
  box-shadow:0 0 17px #d9a44125;
}
.site-public.theme-noir-or-premium .hero {
  background:radial-gradient(ellipse at 78% 43%,#463019 0%,#1b1510 40%,#08090b 95%);
}
.site-public.theme-noir-or-premium .hero-avec-image::before {
  background:linear-gradient(90deg,
    rgb(var(--theme-hero-overlay-rgb) / .96) 0%,
    rgb(var(--theme-hero-overlay-rgb) / .88) 36%,
    rgb(var(--theme-hero-overlay-rgb) / .40) 69%,
    rgb(var(--theme-hero-overlay-rgb) / .12) 100%);
}
.site-public.theme-noir-or-premium .hero .surtitre,
.site-public.theme-noir-or-premium .surtitre {color:var(--theme-accent-hover)}
/* La classe bouton-clair est le CTA du Héro ; il reprend l'or du thème. */
.site-public.theme-noir-or-premium .bouton:not(.bouton-secondaire),
.site-public.theme-noir-or-premium .bouton-clair {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:linear-gradient(120deg,var(--theme-btn-primary-start) 0%,
    var(--theme-btn-primary-middle) 52%,var(--theme-btn-primary-end) 100%);
  color:var(--theme-on-accent);
  border:1px solid #ffdf93;
  border-radius:var(--theme-button-radius);
  font-weight:750;
  letter-spacing:.01em;
  box-shadow:var(--theme-btn-glow);
  text-shadow:none;
  transition:transform var(--theme-motion-normal) ease,
    box-shadow var(--theme-motion-normal) ease,
    filter var(--theme-motion-normal) ease;
}
.site-public.theme-noir-or-premium .bouton:not(.bouton-secondaire)::before,
.site-public.theme-noir-or-premium .bouton-clair::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:linear-gradient(110deg,transparent 15%,#fff8d266 45%,transparent 72%);
  transform:translateX(-120%);
  transition:transform 520ms ease;
}
.site-public.theme-noir-or-premium .bouton:not(.bouton-secondaire):hover,
.site-public.theme-noir-or-premium .bouton-clair:hover {
  background:linear-gradient(120deg,var(--theme-btn-primary-start) 0%,
    var(--theme-btn-primary-middle) 52%,var(--theme-btn-primary-end) 100%);
  color:var(--theme-on-accent);
  border-color:#ffe6af;
  transform:translateY(-2px);
  filter:brightness(1.07);
  box-shadow:var(--theme-btn-glow-hover);
}
.site-public.theme-noir-or-premium .bouton:not(.bouton-secondaire):hover::before,
.site-public.theme-noir-or-premium .bouton-clair:hover::before {transform:translateX(120%)}
.site-public.theme-noir-or-premium .bouton-secondaire {
  background:var(--theme-btn-secondary-bg);
  color:var(--theme-btn-secondary-text);
  border:1px solid var(--theme-accent);
  border-radius:var(--theme-button-radius);
  box-shadow:inset 0 0 0 1px #f6d48b15;
  transition:transform var(--theme-motion-normal) ease,
    background var(--theme-motion-normal) ease,
    box-shadow var(--theme-motion-normal) ease;
}
.site-public.theme-noir-or-premium .bouton-secondaire:hover {
  background:#2c2216;
  color:#ffe4a8;
  border-color:#ffe4a8;
  box-shadow:0 0 18px #d9a44135;
  transform:translateY(-2px);
}
.site-public.theme-noir-or-premium .carte-produit {
  border:1px solid #58452b;
  transition:transform var(--theme-motion-normal) ease,
    border-color var(--theme-motion-normal) ease,
    box-shadow var(--theme-motion-normal) ease;
}
.site-public.theme-noir-or-premium .carte-produit:hover {
  transform:translateY(-3px);
  border-color:#ad8446;
  box-shadow:0 18px 42px #000a,0 0 16px #d9a44116;
}
.site-public.theme-noir-or-premium .filtres a {
  transition:background var(--theme-motion-fast) ease,
    border-color var(--theme-motion-fast) ease;
}
.site-public.theme-noir-or-premium .filtres a.actif,
.site-public.theme-noir-or-premium .filtres a:hover {
  background:linear-gradient(130deg,#ffdc82,#d19c43);
  color:#261905;
  border-color:#f6d488;
}
.site-public.theme-noir-or-premium .carte-bas a:hover {
  color:var(--theme-accent-hover);
}
.site-public.theme-noir-or-premium .pied-site {
  border-top:1px solid #d9a44135;
}
@media (prefers-reduced-motion:reduce) {
  .site-public.theme-noir-or-premium .bouton,
  .site-public.theme-noir-or-premium .bouton:hover,
  .site-public.theme-noir-or-premium .carte-produit:hover {
    transform:none;
  }
  .site-public.theme-noir-or-premium .bouton::before {display:none}
}

/* Miniatures dans la fiche d'administration : elles héritent de la même palette publique. */
.theme-choix {border:0;margin:0;padding:0;min-width:0}
.theme-choix legend {font-size:19px;font-weight:750;padding:0 0 8px}
.theme-grille-admin {display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:15px;margin:16px 0}
.theme-carte-admin {display:flex!important;flex-direction:column;gap:8px!important;border:2px solid var(--line);border-radius:14px;padding:11px;background:#fff;cursor:pointer;min-width:0}
.theme-carte-admin:has(input:checked){border-color:#246a7b;background:#f0f7f7;box-shadow:0 0 0 2px #246a7b24}
.theme-carte-admin:focus-within{outline:2px solid #3189a2;outline-offset:2px}
.theme-carte-admin>input {accent-color:#246a7b;align-self:flex-start;width:18px;height:18px}
.theme-carte-intitule {font-size:15px;font-weight:800}
.theme-carte-description {color:var(--muted);font-size:12px;font-weight:400}
.mini-theme {display:block;overflow:hidden;background:var(--theme-bg);color:var(--theme-text);width:100%;aspect-ratio:16/10;border:1px solid var(--theme-border);border-radius:9px}
.mini-theme-entete {display:flex;height:22%;padding:8px;gap:10px;align-items:center;background:var(--theme-header)}
.mini-theme-logo {display:block;width:26px;height:12px;border-radius:4px;background:var(--theme-accent)}
.mini-theme-menu {display:block;width:55%;height:4px;border-radius:6px;background:var(--theme-muted);opacity:.5}
.mini-theme-hero {display:flex;height:43%;background:linear-gradient(120deg,var(--theme-hero-start),var(--theme-hero-end));padding:12px 9px;flex-direction:column;gap:7px}
.mini-theme-titre {height:8px;width:70%;border-radius:4px;background:var(--theme-hero-text)}
.mini-theme-sous-titre {height:4px;width:60%;border-radius:4px;background:var(--theme-hero-text);opacity:.6}
.mini-theme-bouton {width:30%;height:9px;background:var(--theme-accent);border-radius:3px}
.mini-theme.theme-noir-or-premium .mini-theme-bouton {
  border-radius:999px;
  background:linear-gradient(100deg,#ffe09b,#e9b954,#bc852d);
  box-shadow:0 0 9px #e9b95470;
}
.mini-theme-produits {height:35%;display:flex;align-items:center;gap:7px;padding:8px}
.mini-theme-produits>span {flex:1;min-width:0;height:90%;border-radius:5px;background:var(--theme-surface);border:1px solid var(--theme-border)}
.mini-theme-produits>span::before {content:"";display:block;width:55%;height:65%;margin:auto;background:var(--theme-accent);opacity:.4;border-radius:3px}
@media(max-width:650px){
  .site-public .largeur{width:min(100% - 28px,var(--theme-content-width))}
  .site-public .section{padding:40px 0}
}
@media(max-width:650px){.theme-grille-admin{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.theme-carte-admin{padding:8px}}
@media(prefers-reduced-motion:reduce){.site-public *, .site-public *::before, .site-public *::after{transition-duration:.01ms!important;animation-duration:.01ms!important}}
