/* ==========================================================================
   Casawi — boutique
   Apparence reprise du site d'origine : bleu #1848e8, crème, noir profond,
   titres serif en capitales, cartes et boutons arrondis.
   Nouveauté : ciel étoilé en haut de page, fond blanc en dessous.
   ========================================================================== */

:root {
  --bleu: #1848e8;
  --bleu-fonce: #1239bd;
  --bleu-clair: #a9bdff;
  --bleu-nuit: #6d8cff;
  --creme: #f3f1ea;
  --creme-fonce: #e7e3d8;
  --encre: #11110f;
  --texte-doux: #6b6b66;
  --bordure: rgba(17, 17, 15, 0.12);
  --bordure-forte: rgba(17, 17, 15, 0.22);
  --blanc: #ffffff;
  --rouge: #c62828;
  --vert: #1b7f4b;
  --serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --sans: Arial, Helvetica, sans-serif;
  --rayon: 1rem;
  --rayon-carte: 1.5rem;
  --largeur: 1500px;
  --marge: 16px;
  --hauteur-entete: 64px;
  --ombre: 0 24px 60px -24px rgba(17, 17, 15, 0.35);
}

@media (min-width: 768px) {
  :root { --marge: 32px; --hauteur-entete: 76px; }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body:has(dialog[open]) { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: var(--bleu); color: var(--blanc); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }
[hidden] { display: none !important; }

.lecteur {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.evitement {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--encre); color: var(--blanc); padding: 10px 16px; border-radius: 999px;
}
.evitement:focus { top: 12px; }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 var(--marge); }

/* ---------------------------------------------------------------- Textes */

.surtitre {
  margin: 0 0 12px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--bleu-clair);
}
.surtitre--bleu { color: var(--bleu); }

.grand-titre {
  margin: 0;
  font-family: var(--serif); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.5rem, 7vw, 4.75rem); line-height: 0.95; letter-spacing: -0.06em;
}

.logo {
  font-family: var(--serif); font-weight: 900; text-transform: uppercase;
  font-size: 1.6rem; letter-spacing: -0.05em; text-decoration: none; line-height: 1;
}
.logo span { color: var(--bleu); transition: color 0.3s; }
@media (min-width: 768px) { .logo { font-size: 2rem; } }

/* ---------------------------------------------------------------- Boutons */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 12px 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; text-decoration: none; text-align: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, opacity 0.2s;
}
.bouton:active { transform: scale(0.98); }
.bouton:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.bouton--bleu { background: var(--bleu); color: var(--blanc); }
.bouton--bleu:hover:not(:disabled) { background: var(--bleu-fonce); }
.bouton--noir { background: var(--encre); color: var(--blanc); }
.bouton--noir:hover:not(:disabled) { background: #2a2a26; }
.bouton--contour { border-color: rgba(255, 255, 255, 0.35); color: var(--blanc); }
.bouton--contour:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.6); }
.bouton--contour-sombre { border-color: var(--bordure-forte); background: var(--blanc); }
.bouton--contour-sombre:hover:not(:disabled) { border-color: var(--encre); }
.bouton--large { width: 100%; }

.lien-fleche {
  display: inline-flex; gap: 6px; align-items: center;
  font-weight: 700; font-size: 0.9rem; color: var(--bleu); text-decoration: none;
}
.lien-fleche:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- Bandeau & en-tête */

.bandeau {
  position: relative; z-index: 41;
  background: var(--bleu); color: var(--blanc);
  padding: 8px var(--marge);
  text-align: center; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
}

.entete {
  position: sticky; top: 0; z-index: 40;
  color: var(--blanc);
  transition: background-color 0.35s, color 0.35s, box-shadow 0.35s;
}
.entete.est-solide {
  background: rgba(255, 255, 255, 0.94);
  color: var(--encre);
  box-shadow: 0 1px 0 var(--bordure);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.entete:not(.est-solide) .logo span { color: var(--bleu-nuit); }

.entete__ligne {
  max-width: var(--largeur); margin: 0 auto;
  height: var(--hauteur-entete);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--marge);
}

.entete__nav { display: none; gap: 32px; font-size: 0.9rem; font-weight: 700; }
.entete__nav a { text-decoration: none; opacity: 0.8; padding: 6px 0; border-bottom: 2px solid transparent; transition: opacity 0.2s, border-color 0.2s; }
.entete__nav a:hover { opacity: 1; }
.entete__nav a[aria-current="true"] { opacity: 1; border-color: currentColor; }
@media (min-width: 900px) { .entete__nav { display: flex; } }

.bouton-panier {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 4px 6px 10px;
  background: none; border: 0; font-weight: 700;
}
.bouton-panier svg { width: 22px; height: 22px; }
.bouton-panier__texte { display: none; }
@media (min-width: 640px) { .bouton-panier__texte { display: inline; } }
.bouton-panier__compteur {
  display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px;
  border-radius: 999px; background: var(--blanc); color: var(--encre); font-size: 0.75rem;
  transition: background-color 0.35s, color 0.35s, transform 0.25s;
}
.entete.est-solide .bouton-panier__compteur { background: var(--encre); color: var(--blanc); }
.bouton-panier__compteur.rebond,
.barre-mobile__nb.rebond { transform: scale(1.25); }

/* ---------------------------------------------------------------- Ciel étoilé */

.ciel {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(-1 * var(--hauteur-entete));
  padding: calc(var(--hauteur-entete) + 48px) var(--marge) 104px;
  min-height: clamp(420px, 62vh, 600px);
  display: flex; align-items: flex-end;
  color: var(--blanc);
  background:
    radial-gradient(ellipse 70% 55% at 12% 108%, rgba(24, 72, 232, 0.55), transparent 70%),
    radial-gradient(ellipse 45% 35% at 88% 12%, rgba(118, 92, 255, 0.16), transparent 70%),
    radial-gradient(ellipse 60% 40% at 70% 95%, rgba(80, 140, 255, 0.18), transparent 70%),
    linear-gradient(180deg, #010208 0%, #040817 38%, #091230 72%, #10204f 100%);
}

/* Quelques étoiles fixes en CSS : visibles immédiatement, avant l'animation. */
.ciel::before {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 140px 80px, #dfe7ff, transparent),
    radial-gradient(1.5px 1.5px at 90px 150px, #fff, transparent),
    radial-gradient(1px 1px at 210px 190px, #fff4e0, transparent),
    radial-gradient(1px 1px at 260px 50px, #fff, transparent);
  background-size: 300px 220px;
}
.ciel__etoiles { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }

.ciel__contenu { position: relative; width: 100%; max-width: var(--largeur); margin: 0 auto; }
.ciel h1 {
  margin: 0;
  font-family: var(--serif); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.3rem, 5.4vw, 4.8rem); line-height: 1; letter-spacing: -0.045em;
  text-shadow: 0 2px 30px rgba(3, 6, 17, 0.5);
}
.ciel h1 span { color: var(--bleu-clair); }
.ciel__texte { max-width: 34rem; margin: 20px 0 0; color: rgba(255, 255, 255, 0.72); font-size: 1.05rem; }
.ciel__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

@media (min-width: 768px) {
  .ciel { padding-bottom: 128px; }
}

/* ---------------------------------------------------------------- Catalogue (fond blanc) */

.catalogue {
  position: relative; z-index: 1;
  margin-top: -40px;
  padding: 48px 0 80px;
  background: var(--blanc);
  border-radius: 40px 40px 0 0;
  outline: none;
  scroll-margin-top: calc(var(--hauteur-entete) - 8px);
}
@media (min-width: 768px) { .catalogue { padding: 72px 0 112px; border-radius: 56px 56px 0 0; margin-top: -56px; } }

.catalogue__tete { display: flex; flex-direction: column; gap: 24px; margin-bottom: 28px; }
@media (min-width: 900px) { .catalogue__tete { flex-direction: row; align-items: flex-end; justify-content: space-between; } }

.recherche {
  display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 440px; padding: 0 18px; min-height: 50px;
  border: 1px solid var(--bordure-forte); border-radius: 999px; background: var(--blanc);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.recherche:focus-within { border-color: var(--encre); box-shadow: 0 0 0 4px rgba(24, 72, 232, 0.12); }
.recherche input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 12px 0; font-size: 1rem; }
.recherche svg { color: var(--texte-doux); }

/* Onglets Nouveautés / Le vestiaire / Dernières tailles */
.onglets {
  display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--bordure); margin-bottom: 24px;
}
.onglets::-webkit-scrollbar { display: none; }
.onglets button {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 0 12px; margin-bottom: -1px;
  background: none; border: 0; border-bottom: 3px solid transparent;
  font-weight: 700; font-size: 0.9rem; color: var(--texte-doux);
  transition: color 0.2s, border-color 0.2s;
}
@media (min-width: 768px) {
  .onglets { gap: 28px; }
  .onglets button { font-size: 1rem; }
}
.onglets button:hover { color: var(--encre); }
.onglets button[aria-selected="true"] { color: var(--encre); border-color: var(--bleu); }
.onglets__nb {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--creme); font-size: 0.72rem; color: var(--encre);
}
.onglets__nb:empty { display: none; }
.onglets button[aria-selected="true"] .onglets__nb { background: var(--bleu); color: var(--blanc); }

/* Rail des nouveautés */
.rail { margin-bottom: 40px; }
.rail__tete { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.rail__tete h3 { margin: 0; font-family: var(--serif); font-weight: 900; text-transform: uppercase; letter-spacing: -0.04em; font-size: 1.6rem; }
.rail__piste {
  display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
  padding-bottom: 12px; margin: 0 calc(-1 * var(--marge)); padding-left: var(--marge); padding-right: var(--marge);
  scroll-padding: 0 var(--marge);
}
.rail__piste > * { scroll-snap-align: start; }
@media (min-width: 768px) { .rail__piste { grid-auto-columns: 28%; gap: 20px; } }
@media (min-width: 1200px) { .rail__piste { grid-auto-columns: 19%; } }

/* Barre de filtres */
.barre-filtres { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
@media (min-width: 900px) { .barre-filtres { flex-direction: row; align-items: center; justify-content: space-between; } }

.pastilles {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--marge)); padding: 2px var(--marge);
}
.pastilles::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .pastilles { flex-wrap: wrap; margin: 0; padding: 2px 0; } }

.pastille {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 8px 18px;
  border: 1px solid var(--bordure-forte); border-radius: 999px; background: var(--blanc);
  font-size: 0.88rem; font-weight: 700; white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.pastille:hover { border-color: var(--encre); }
.pastille[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.pastille__nb { font-weight: 400; opacity: 0.6; }

.barre-filtres__outils { display: flex; gap: 8px; flex: none; }
.bouton-outil {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 8px 16px;
  border: 1px solid var(--bordure-forte); border-radius: 999px; background: var(--blanc);
  font-size: 0.88rem; font-weight: 700;
}
.bouton-outil:hover { border-color: var(--encre); }
.bouton-outil__nb {
  display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--bleu); color: var(--blanc); font-size: 0.7rem;
}
.bouton-outil--tri { padding: 0; flex: 1; }
.bouton-outil--tri select {
  appearance: none; -webkit-appearance: none; width: 100%;
  border: 0; background: transparent; min-height: 40px; padding: 8px 40px 8px 16px; font-weight: 700; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311110f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
@media (min-width: 900px) { .bouton-outil--tri { flex: none; } }

.filtres-actifs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.filtres-actifs:empty { display: none; }
.filtre-actif {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px 4px 14px;
  border: 0; border-radius: 999px; background: var(--creme); font-size: 0.82rem; font-weight: 700;
}
.filtre-actif svg { width: 16px; height: 16px; }
.filtre-actif:hover { background: var(--creme-fonce); }

.resultat { margin: 8px 0 20px; font-size: 0.9rem; color: var(--texte-doux); }

/* Grille d'articles */
.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
@media (min-width: 768px) { .grille { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 20px; } }
@media (min-width: 1200px) { .grille { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.carte { min-width: 0; }
.carte__image {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; isolation: isolate;
  border-radius: 1rem; background: var(--creme);
}
@media (min-width: 768px) { .carte__image { border-radius: var(--rayon-carte); } }
.photo-article {
  width: 100%; height: 100%; object-fit: cover;
  /* Cadrage choisi par le patron : point de cadrage (--x, --y) et zoom (--z). */
  object-position: var(--x, 50%) var(--y, 50%);
  transform: scale(var(--z, 1));
  transform-origin: var(--x, 50%) var(--y, 50%);
}
.photo-article.entiere { object-fit: contain; object-position: 50% 50%; transform: none; mix-blend-mode: multiply; filter: brightness(1.04); } /* fond « presque blanc » des photos (gris clair) fondu dans la carte */
.carte__image .photo-article { transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.carte__image .photo-article.entiere { padding: 9%; }
.carte__image:hover .photo-article { transform: scale(calc(var(--z, 1) * 1.035)); }
.carte__image:hover .photo-article.entiere { transform: scale(1.035); }
.carte__badges { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
@media (min-width: 768px) { .carte__badges { left: 14px; top: 14px; } }
.badge {
  display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: var(--encre);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.badge--bleu { background: var(--bleu); color: var(--blanc); }
.badge--noir { background: var(--encre); color: var(--blanc); }
.badge--categorie { display: none; }
@media (min-width: 768px) { .badge--categorie { display: inline-flex; } }
.carte__fleche {
  position: absolute; right: 14px; bottom: 14px;
  display: none; place-items: center; width: 48px; height: 48px;
  border-radius: 999px; background: var(--blanc); font-size: 1.2rem; box-shadow: var(--ombre);
  opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s;
}
@media (hover: hover) and (min-width: 768px) {
  .carte__fleche { display: grid; }
  .carte__image:hover .carte__fleche { opacity: 1; transform: none; }
}
.carte.est-epuisee .carte__image img { opacity: 0.45; }
.carte__visuel { position: relative; }

.carte__infos { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: 12px; }
.carte__texte { min-width: 0; text-decoration: none; }
.carte__marque { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--texte-doux); }
.carte__nom { margin: 2px 0 0; font-size: 0.95rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
@media (min-width: 768px) { .carte__nom { font-size: 1.05rem; } }
.carte__prix { display: block; margin-top: 4px; font-size: 0.9rem; color: var(--texte-doux); }
.carte__ajout {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px;
  border: 1px solid var(--bordure-forte); border-radius: 999px; background: var(--blanc);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.carte__ajout:hover:not(:disabled) { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.carte__ajout:disabled { opacity: 0.35; cursor: not-allowed; }
.carte__ajout--image {
  position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px;
  border: 0; box-shadow: 0 4px 14px rgba(17, 17, 15, 0.18);
}
.carte__ajout--texte { display: none; }
@media (min-width: 768px) {
  .carte__ajout { width: 44px; height: 44px; }
  .carte__ajout--image { display: none; }
  .carte__ajout--texte { display: grid; }
}

.rail .carte__nom { font-size: 0.9rem; }

.vide {
  display: grid; justify-items: center; gap: 12px;
  padding: 64px 24px; border: 1px dashed var(--bordure-forte); border-radius: 2rem;
  text-align: center;
}
.vide__icone { font-size: 2rem; line-height: 1; }
.vide p { margin: 0; max-width: 32rem; color: var(--texte-doux); }
.vide strong { font-size: 1.15rem; color: var(--encre); }
.vide--ciel {
  border: 0; color: var(--blanc); padding: 72px 24px;
  background: radial-gradient(ellipse 80% 70% at 50% 120%, rgba(24, 72, 232, 0.55), transparent 70%), linear-gradient(180deg, #040817, #0d1a45);
}
.vide--ciel p { color: rgba(255, 255, 255, 0.7); }
.vide--ciel strong { color: var(--blanc); font-family: var(--serif); font-weight: 900; text-transform: uppercase; letter-spacing: -0.04em; font-size: 1.8rem; }

.plus { display: flex; justify-content: center; margin-top: 44px; }

/* ---------------------------------------------------------------- Pied de page */

.pied { background: var(--encre); color: var(--blanc); padding: 56px 0 28px; }
.pied__grille { display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 768px) { .pied__grille { flex-direction: row; justify-content: space-between; align-items: flex-end; } }
.logo--pied { margin: 0; font-size: 2.6rem; letter-spacing: -0.06em; }
.pied__texte { max-width: 26rem; margin: 12px 0 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.6); }
.pied__texte a { color: var(--blanc); }
.pied__liens { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.9rem; }
.pied__liens a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.pied__liens a:hover { color: var(--blanc); text-decoration: underline; }
.pied__copyright { margin-top: 40px; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }

/* ---------------------------------------------------------------- Fenêtres (fiche, panier, commande, filtres) */

.fenetre {
  padding: 0; border: 0; color: var(--encre); background: var(--creme);
  max-width: 100vw; max-height: 100dvh;
}
.fenetre::backdrop { background: rgba(3, 6, 17, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.fenetre[open] { animation: apparition 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fenetre[open]::backdrop { animation: fondu 0.28s ease; }
@keyframes apparition { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes glissement { from { transform: translateX(100%); } to { transform: none; } }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }

.titre-fenetre {
  margin: 0; font-family: var(--serif); font-weight: 900; text-transform: uppercase;
  font-size: 1.9rem; line-height: 1; letter-spacing: -0.04em;
}

.fermer {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px;
  border: 0; border-radius: 999px; background: var(--blanc); color: var(--encre);
  box-shadow: 0 2px 10px rgba(17, 17, 15, 0.08);
}
.fermer:hover { background: var(--encre); color: var(--blanc); }

/* Tiroirs : panier et filtres */
.fenetre--tiroir,
.fenetre--filtres {
  margin: 0 0 0 auto; width: min(100vw, 460px); height: 100dvh; max-height: 100dvh; border-radius: 0;
}
.fenetre--tiroir[open],
.fenetre--filtres[open] { animation: glissement 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
@media (max-width: 767px) {
  .fenetre--filtres { margin: auto 0 0; width: 100vw; height: auto; max-height: 88dvh; border-radius: 28px 28px 0 0; }
  .fenetre--filtres[open] { animation: apparition 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
}
.tiroir { display: flex; flex-direction: column; height: 100%; max-height: inherit; }
.tiroir__tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px; border-bottom: 1px solid var(--bordure); }
.tiroir__sous-titre { margin: 8px 0 0; color: var(--texte-doux); font-size: 0.9rem; }
.tiroir__corps { flex: 1; overflow-y: auto; padding: 20px 24px; overscroll-behavior: contain; }
.tiroir__pied { padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--bordure); background: var(--blanc); }
.tiroir__pied--double { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* Lignes du panier */
.ligne-panier { display: flex; gap: 14px; padding: 12px; border-radius: 1.25rem; background: var(--blanc); }
.ligne-panier + .ligne-panier { margin-top: 10px; }
.ligne-panier__image { width: 76px; height: 94px; flex: none; border-radius: 0.8rem; overflow: hidden; background: var(--creme); }
.ligne-panier__image { display: block; }
.ligne-panier__image .photo-article.entiere { padding: 6px; }
.ligne-panier__infos { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ligne-panier__nom { margin: 0; font-weight: 700; line-height: 1.3; }
.ligne-panier__detail { margin: 2px 0 0; font-size: 0.85rem; color: var(--texte-doux); }
.ligne-panier__bas { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 8px; }
.quantite { display: inline-flex; align-items: center; border: 1px solid var(--bordure-forte); border-radius: 999px; }
.quantite button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: none; border-radius: 999px; }
.quantite button:hover { background: var(--creme); }
.quantite span { min-width: 22px; text-align: center; font-weight: 700; font-size: 0.9rem; }
.ligne-panier__prix { margin-left: auto; font-weight: 700; }
.retirer { display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: none; color: var(--rouge); border-radius: 999px; }
.retirer:hover { background: #fdecec; }

.total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-weight: 700; font-size: 1.1rem; }
.total__note { margin: 0 0 14px; font-size: 0.8rem; color: var(--texte-doux); }

.panier-vide { display: grid; justify-items: center; gap: 14px; padding: 48px 12px; text-align: center; color: var(--texte-doux); }
.panier-vide svg { width: 44px; height: 44px; color: var(--encre); stroke-width: 1.2; }

/* Filtres */
.groupe-filtre + .groupe-filtre { margin-top: 28px; }
.groupe-filtre h3 { margin: 0 0 12px; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; }
.groupe-filtre h4 { margin: 14px 0 8px; font-size: 0.8rem; color: var(--texte-doux); font-weight: 700; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  min-width: 46px; min-height: 42px; padding: 8px 14px;
  border: 1px solid var(--bordure-forte); border-radius: 999px; background: var(--blanc);
  font-weight: 700; font-size: 0.88rem;
}
.puce:hover:not(:disabled) { border-color: var(--encre); }
.puce[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: var(--blanc); }
.puce:disabled { color: #a4a39d; text-decoration: line-through; cursor: not-allowed; background: transparent; }
.fourchette { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.champ-prix { display: flex; align-items: center; gap: 6px; padding: 0 14px; min-height: 48px; border: 1px solid var(--bordure-forte); border-radius: 999px; background: var(--blanc); }
.champ-prix input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; font-size: 1rem; }
.champ-prix:focus-within { border-color: var(--encre); }

/* Fiche article */
.fenetre--fiche {
  width: min(100vw, 1040px); border-radius: 0; height: 100dvh; max-height: 100dvh; overflow: hidden;
}
@media (min-width: 768px) { .fenetre--fiche { height: auto; max-height: min(92dvh, 820px); border-radius: 2rem; } }
.fiche { display: grid; height: 100%; max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 768px) { .fiche { grid-template-columns: 1.05fr 1fr; overflow: hidden; } }
.fiche__fermer { position: absolute; top: 14px; right: 14px; z-index: 3; }

.galerie { position: relative; background: var(--blanc); min-width: 0; }
@media (min-width: 768px) { .galerie { display: flex; flex-direction: column; max-height: inherit; } }
.galerie__piste {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  width: 100%; height: min(46dvh, 125vw);
}
@media (min-width: 768px) { .galerie__piste { flex: 1; height: auto; min-height: 0; } }
.galerie__piste::-webkit-scrollbar { display: none; }
.galerie__vue { flex: 0 0 100%; scroll-snap-align: center; overflow: hidden; background: var(--creme); }
.galerie__vue .photo-article.entiere { padding: 8%; }
.galerie__points { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.galerie__points span { width: 7px; height: 7px; border-radius: 99px; background: rgba(17, 17, 15, 0.25); transition: width 0.25s, background-color 0.25s; }
.galerie__points span.actif { width: 20px; background: var(--encre); }
.galerie__miniatures { display: none; gap: 10px; padding: 12px; border-top: 1px solid var(--bordure); overflow-x: auto; }
@media (min-width: 768px) {
  .galerie__points { display: none; }
  .galerie__miniatures { display: flex; }
}
.galerie__miniatures button { flex: none; width: 60px; height: 74px; padding: 0; border: 2px solid transparent; border-radius: 0.75rem; overflow: hidden; background: var(--creme); }
.galerie__miniatures button.actif { border-color: var(--bleu); }
.galerie__miniatures .photo-article.entiere { padding: 3px; }

.fiche__infos { display: flex; flex-direction: column; padding: 28px 24px calc(28px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .fiche__infos { padding: 56px 44px 40px; overflow-y: auto; } }
.fiche__categorie { margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bleu); }
.fiche__marque { margin: 14px 0 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--texte-doux); }
.fiche__nom {
  margin: 4px 0 0; font-family: var(--serif); font-weight: 900; text-transform: uppercase;
  font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1; letter-spacing: -0.05em; overflow-wrap: anywhere;
}
.fiche__prix { margin: 18px 0 0; font-size: 1.4rem; font-weight: 700; }
.fiche__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.fiche__description { margin: 18px 0 0; color: #4d4d48; white-space: pre-line; }
.fiche__choix { margin-top: 26px; scroll-margin: 24px; }
.fiche__choix-titre--suite { margin-top: 20px !important; }
.fiche__stock { margin: 14px 0 0; font-size: 0.88rem; font-weight: 700; color: #b25e00; }
.teinte {
  display: inline-block; width: 14px; height: 14px; flex: none; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 15, 0.25); vertical-align: -2px;
}
.puce .teinte { margin-right: 7px; }
.puce[aria-pressed="true"] .teinte { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6); }
.carte__teintes { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; vertical-align: -1px; }
.carte__teintes .teinte { width: 10px; height: 10px; }
.carte__teintes small { font-size: 0.68rem; color: var(--texte-doux); }
.fiche__choix.a-choisir .fiche__choix-titre { color: var(--bleu); }
.fiche__choix.a-choisir .puces { animation: secousse 0.4s; }
@keyframes secousse { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.bouton.est-en-attente { background: #8f8d86; }
.fiche__choix-titre { margin: 0 0 12px; font-weight: 700; font-size: 0.95rem; }
.fiche__choix-titre small { font-weight: 400; color: var(--texte-doux); }
.fiche__actions { display: grid; gap: 10px; margin-top: 28px; }
@media (max-width: 767px) {
  /* Sur téléphone, le bouton d'ajout reste visible en bas de l'écran. */
  .fiche__actions {
    position: sticky; bottom: 0; z-index: 2; gap: 4px;
    margin: 20px -24px 0; padding: 12px 24px calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(243, 241, 234, 0.85), var(--creme) 30%);
  }
  .fiche__infos { padding-bottom: 0; }
}
.fiche__partage { background: none; border: 0; color: var(--texte-doux); font-size: 0.9rem; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; }
.fiche__partage:hover { color: var(--encre); }
.fiche__rassurance { margin: 24px 0 0; padding: 14px 16px; border-radius: 1rem; background: var(--blanc); font-size: 0.85rem; color: var(--texte-doux); }

/* Commande */
.fenetre--commande { width: min(100vw, 600px); height: 100dvh; max-height: 100dvh; border-radius: 0; }
@media (min-width: 768px) { .fenetre--commande { height: auto; max-height: 92dvh; border-radius: 2rem; } }
.commande { display: flex; flex-direction: column; height: 100%; max-height: inherit; }
.commande__corps { flex: 1; overflow-y: auto; padding: 24px; overscroll-behavior: contain; }
.recap-mini { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 20px; border-radius: 1rem; background: var(--blanc); font-size: 0.9rem; }
.recap-mini strong { font-size: 1rem; }
.formulaire { display: grid; gap: 14px; }
.formulaire__ligne { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; }
.champ { display: grid; gap: 6px; }
.champ label { font-size: 0.88rem; font-weight: 700; }
.champ label small { font-weight: 400; color: var(--texte-doux); }
.champ input,
.champ textarea {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border: 1px solid var(--bordure-forte); border-radius: 0.9rem; background: var(--blanc); font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.champ textarea { min-height: 84px; resize: vertical; }
.champ input:focus,
.champ textarea:focus { outline: 0; border-color: var(--encre); box-shadow: 0 0 0 4px rgba(24, 72, 232, 0.12); }
.champ input[aria-invalid="true"] { border-color: var(--rouge); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.info { display: flex; gap: 12px; padding: 14px 16px; border-radius: 1rem; background: #e8eeff; color: #1b2f73; font-size: 0.88rem; }
.info svg { color: var(--bleu); margin-top: 1px; }
.mention { margin: 0; font-size: 0.78rem; color: var(--texte-doux); }
.mention a { color: inherit; }
.erreur { padding: 12px 16px; border-radius: 1rem; background: #fdecec; color: #8a1c1c; font-size: 0.9rem; }

.confirmation { text-align: center; }
.confirmation__icone {
  display: grid; place-items: center; width: 76px; height: 76px; margin: 8px auto 18px;
  border-radius: 999px; background: var(--bleu); color: var(--blanc);
  box-shadow: 0 0 0 10px rgba(24, 72, 232, 0.12);
  animation: rebond 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.confirmation__icone svg { width: 38px; height: 38px; stroke-width: 2.4; }
@keyframes rebond { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.confirmation h2 { margin: 0; font-family: var(--serif); font-weight: 900; text-transform: uppercase; letter-spacing: -0.04em; font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1; }
.confirmation__message { margin: 12px auto 0; max-width: 26rem; font-size: 1.05rem; }
.numero { display: inline-grid; gap: 2px; margin: 22px 0 0; padding: 14px 26px; border-radius: 1.25rem; background: var(--blanc); }
.numero span { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--texte-doux); }
.numero strong { font-size: 1.7rem; color: var(--bleu); letter-spacing: 0.02em; }
.recap { margin-top: 24px; text-align: left; border-radius: 1.25rem; background: var(--blanc); overflow: hidden; }
.recap h3 { margin: 0; padding: 14px 18px; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; border-bottom: 1px solid var(--bordure); }
.recap__ligne { display: flex; gap: 12px; align-items: center; padding: 12px 18px; }
.recap__ligne + .recap__ligne { border-top: 1px solid var(--bordure); }
.recap__vignette { width: 44px; height: 54px; flex: none; border-radius: 0.6rem; overflow: hidden; background: var(--creme); }
.recap__vignette img { width: 100%; height: 100%; object-fit: cover; }
.recap__vignette .photo-article.entiere { padding: 3px; }
.recap__ligne div { flex: 1; min-width: 0; font-size: 0.9rem; }
.recap__ligne p { margin: 0; }
.recap__ligne small { color: var(--texte-doux); }
.recap__total { display: flex; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--bordure); font-weight: 700; }
.recap__adresse { padding: 14px 18px; font-size: 0.9rem; line-height: 1.6; }
.confirmation__note { margin: 20px 0 0; font-size: 0.85rem; color: var(--texte-doux); }

/* Notification */
.notification {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60;
  max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px;
  background: var(--encre); color: var(--blanc); font-size: 0.9rem; font-weight: 700; box-shadow: var(--ombre);
  transform: translate(-50%, 140%); opacity: 0; transition: transform 0.3s, opacity 0.3s; pointer-events: none;
}
.notification.visible { transform: translate(-50%, 0); opacity: 1; }
dialog .notification { position: fixed; }

.sans-js { margin: 0; padding: 24px; text-align: center; background: #fff3cd; }

/* ---------------------------------------------------------------- Téléphone */

.barre-mobile { display: none; }

@media (max-width: 899px) {
  body:has(.barre-mobile) { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }

  /* Barre de navigation en bas de l'écran, comme une application */
  .barre-mobile {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--bordure);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .barre-mobile a,
  .barre-mobile button {
    position: relative; display: grid; justify-items: center; align-content: center; gap: 3px;
    min-height: 54px; padding: 4px 2px; border: 0; border-radius: 14px; background: none;
    color: var(--texte-doux); font-size: 0.66rem; font-weight: 700; line-height: 1.1; text-align: center; text-decoration: none;
  }
  .barre-mobile svg { width: 23px; height: 23px; }
  .barre-mobile [aria-current="true"] { color: var(--bleu); background: #e8eeff; }
  .barre-mobile__nb {
    position: absolute; top: 3px; left: calc(50% + 6px);
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--bleu); color: var(--blanc); font-size: 0.66rem; line-height: 18px;
    transition: transform 0.25s;
  }
  .barre-mobile__nb.est-vide { display: none; }

  /* Le panier et les catégories sont dans la barre du bas */
  .entete .bouton-panier { display: none; }
  .entete__ligne { justify-content: center; }
  .onglets { display: none; }

  .notification { bottom: calc(82px + env(safe-area-inset-bottom)); }
  dialog .notification { bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media (max-width: 767px) {
  .bandeau { padding: 7px 12px; font-size: 0.6rem; letter-spacing: 0.14em; }

  .ciel { min-height: 0; padding: calc(var(--hauteur-entete) + 30px) var(--marge) 84px; }
  .ciel h1 { font-size: clamp(2.05rem, 10.5vw, 2.9rem); }
  .ciel__texte { margin-top: 14px; font-size: 0.97rem; }
  .ciel__actions { margin-top: 22px; }
  .ciel__actions .bouton { flex: 1 1 auto; padding: 12px 18px; }

  .catalogue { padding-top: 34px; }
  .catalogue__tete { gap: 16px; margin-bottom: 18px; }
  .grand-titre { font-size: clamp(2.3rem, 11vw, 3.1rem); }
  .rail { margin-bottom: 30px; }
  .rail__tete h3 { font-size: 1.35rem; }
  .resultat { margin: 6px 0 16px; }

  .carte__infos { margin-top: 10px; }
  .carte__marque { font-size: 0.62rem; letter-spacing: 0.12em; }
  .carte__nom {
    font-size: 0.9rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .carte__prix { font-size: 0.85rem; }
  .carte__badges { left: 8px; top: 8px; gap: 4px; }
  .badge { padding: 4px 8px; font-size: 0.62rem; }

  .fiche__infos { padding: 22px 20px 0; }
  .fiche__actions { margin: 20px -20px 0 !important; padding: 12px 20px calc(8px + env(safe-area-inset-bottom)) !important; }
  .fiche__nom { font-size: clamp(1.8rem, 8.5vw, 2.3rem); }
  .tiroir__tete { padding: 18px 20px; }
  .tiroir__corps { padding: 16px 20px; }
  .tiroir__pied { padding-left: 20px; padding-right: 20px; }
  .commande__corps { padding: 20px; }
  .titre-fenetre { font-size: 1.65rem; }

  .pied { padding-top: 44px; }
  .logo--pied { font-size: 2.2rem; }
  .pied__copyright { margin-top: 28px; }
}

@media (max-width: 380px) {
  .grille { gap: 22px 10px; }
  .ciel__actions .bouton { width: 100%; }
  .formulaire__ligne { grid-template-columns: 1fr; }
}

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

/* ---------------------------------------------------------------- Pages légales */

.page-legale .entete { position: sticky; }
.legal { max-width: 820px; padding-top: 48px; padding-bottom: 88px; }
.legal .grand-titre { font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: 36px; }
.legal h2 { margin: 32px 0 8px; font-size: 1.1rem; }
.legal p { margin: 0; color: #3f3f3b; }
.legal a { color: var(--bleu); }
.legal mark { background: #fff4e0; color: #6b3d00; padding: 0 4px; border-radius: 4px; }
.legal__maj { margin-top: 48px !important; font-size: 0.85rem; color: var(--texte-doux) !important; }
