/* ══════════════════════════════════════════════════════
   ÉTATS COMMUNS (src/ui/states.js, network.js, consent.js) :
   squelettes, vide, erreur, échec d'action, photos, hors ligne,
   bandeau cookies.
══════════════════════════════════════════════════════ */

/* ── Squelettes : bleu-voile, pulsation légère ── */
.sk{display:block;background:var(--voile);border-radius:6px}
@media (prefers-reduced-motion:no-preference){.sk{animation:sk-pulse 1.4s ease-in-out infinite}}
@keyframes sk-pulse{0%,100%{opacity:1}50%{opacity:.55}}
.sk-line{height:12px;margin-top:8px}
.sk-title{height:28px;width:55%;margin-top:10px;border-radius:8px}
.sk-btn{height:52px;width:100%;margin-top:18px;border-radius:999px}
.sk-card{display:flex;flex-direction:column;min-width:0}
.sk-img{aspect-ratio:3/4;border-radius:16px;margin-bottom:6px}
.sk-row{margin:0 0 40px}
.sk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;margin-top:16px}
.sk-pdp{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:56px;max-width:1320px;margin:0 auto;padding:24px 48px}
.sk-pdp-img{aspect-ratio:4/5}
.sk-profile{max-width:560px;padding:8px 0}
@media (max-width:900px){.sk-pdp{grid-template-columns:1fr;gap:24px;padding:16px}}
@media (max-width:639px){.sk-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}

/* ── Vide, erreur de zone ── */
.st-empty,.st-error{display:flex;flex-direction:column;align-items:center;gap:14px;max-width:460px;margin:32px auto;padding:8px 16px;text-align:center}
.st-text{margin:0;font-size:15px;line-height:1.55;color:var(--encre)}
.st-error .st-text{color:var(--muted)}
.st-action{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 20px;border-radius:999px;border:1px solid var(--encre);background:#fff;color:var(--encre);font-family:var(--sans);font-size:14px;font-weight:600;text-decoration:none;cursor:pointer}
.st-action:hover{background:var(--encre);color:#fff}
.st-action:focus-visible{outline:2px solid var(--bleu-fonce);outline-offset:2px}

/* ── Échec d'une action (annoncé) ── */
.st-fail{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:1310;display:none;max-width:calc(100vw - 32px);box-sizing:border-box;padding:12px 20px;border-radius:999px;background:#7a1f1f;color:#fff;font-size:14px}
.st-fail.on{display:block}
@media (max-width:768px){.st-fail{bottom:calc(84px + env(safe-area-inset-bottom))}}

/* ── Photos : fond bleu-voile, fondu à l'arrivée ── */
.pcard-photo img,.pdp-main img,.pdp-thumb img,.hm-shot img,.hm-icon img{opacity:0}
.pcard-photo img.is-loaded,.pdp-main img.is-loaded,.pdp-thumb img.is-loaded,.hm-shot img.is-loaded,.hm-icon img.is-loaded{opacity:1}
@media (prefers-reduced-motion:no-preference){.pcard-photo img,.pdp-main img,.pdp-thumb img,.hm-shot img,.hm-icon img{transition:opacity .35s ease}}
.pcard-img{background:var(--voile)}

/* ── Hors ligne ── */
.net-banner{position:fixed;top:0;left:0;right:0;z-index:1400;display:none;padding:8px 16px;background:var(--encre);color:#fff;font-size:13px;text-align:center}
.net-banner.on{display:block}
.net-banner.is-back{background:#1f5c3a}
body.is-offline [data-needs-net]{opacity:.45;cursor:not-allowed}

/* ── Bandeau cookies ── */
.ck-banner{position:fixed;left:16px;right:16px;bottom:16px;z-index:1450;max-width:720px;margin:0 auto;padding:20px 22px;box-sizing:border-box;background:#fff;border:1px solid var(--trait);border-radius:16px;box-shadow:0 8px 24px rgba(11,11,15,.08);color:var(--encre);font-family:var(--sans)}
.ck-banner:focus{outline:none}
.ck-banner:focus-visible{outline:2px solid var(--bleu-fonce);outline-offset:2px}
.ck-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.ck-title{margin:0;font-size:16px;font-weight:600}
.ck-x{flex:none;width:44px;height:44px;margin:-10px -10px 0 0;display:inline-flex;align-items:center;justify-content:center;border:0;background:none;color:var(--encre);cursor:pointer;border-radius:999px}
.ck-x:focus-visible,.ck-btn:focus-visible,.ck-switch input:focus-visible + .ck-switch-ui{outline:2px solid var(--bleu-fonce);outline-offset:2px}
.ck-text{margin:6px 0 16px;font-size:14px;line-height:1.55;color:#3b3d47}
.ck-text a{color:var(--bleu-fonce)}
.ck-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.ck-btn{min-height:44px;padding:0 14px;border-radius:999px;border:1px solid var(--encre);background:#fff;color:var(--encre);font-family:var(--sans);font-size:14px;font-weight:600;cursor:pointer}
.ck-btn:hover{background:var(--encre);color:#fff}
.ck-cats{display:flex;flex-direction:column;gap:2px;margin:4px 0 16px;padding:0;list-style:none}
.ck-cat{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:12px 0;border-top:1px solid var(--trait)}
.ck-cat-name{margin:0;font-size:14px;font-weight:600}
.ck-cat-desc{margin:2px 0 0;font-size:13px;line-height:1.5;color:var(--muted)}
.ck-always{flex:none;font-size:12px;color:var(--muted);white-space:nowrap;padding-top:2px}
.ck-switch{position:relative;flex:none;display:inline-flex;align-items:center;min-height:44px;cursor:pointer}
.ck-switch input{position:absolute;opacity:0;width:1px;height:1px}
.ck-switch-ui{position:relative;width:44px;height:26px;border-radius:999px;background:#c8cad1;transition:background .2s}
.ck-switch-ui::after{content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform .2s}
.ck-switch input:checked + .ck-switch-ui{background:var(--bleu-fonce)}
.ck-switch input:checked + .ck-switch-ui::after{transform:translateX(18px)}
@media (prefers-reduced-motion:reduce){.ck-switch-ui,.ck-switch-ui::after{transition:none}}
@media (max-width:639px){
  .ck-banner{left:8px;right:8px;bottom:calc(64px + env(safe-area-inset-bottom));padding:16px}
  .ck-actions{grid-template-columns:1fr}
}
/* Bulle du chat Cleed (module tiers) masquée tant que le bandeau est ouvert : elle couvrirait ses boutons. */
body.ck-open #app-box-cleed{display:none}
/* Pied de page : « Gérer mes cookies » (bouton à l'allure d'un lien). */
.footer-btn{padding:0;border:0;background:none;font:inherit;text-align:left;cursor:pointer}

/* Panneau « Simulation » (préversions seulement, src/ui/simulate.js). */
.sim-panel{position:fixed;top:68px;right:12px;z-index:1500;max-width:300px;background:#fff;border:1px solid var(--trait);border-radius:12px;box-shadow:0 8px 24px rgba(11,11,15,.12);font-family:var(--sans);font-size:13px;color:var(--encre)}
.sim-panel summary{min-height:36px;padding:8px 12px;cursor:pointer;font-weight:600;color:var(--bleu-fonce)}
.sim-body{max-height:60vh;overflow:auto;padding:0 12px 10px}
.sim-h{margin:10px 0 4px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.sim-panel ul{margin:0;padding:0 0 0 16px}
.sim-panel li{margin:2px 0}
.sim-panel a{color:var(--bleu-fonce)}
.sim-modes{display:flex;flex-wrap:wrap;gap:4px 12px;padding:0!important;list-style:none}
