/* Feuille de style de la page Stock publique.
 *
 * Polices, couleurs et rayons REPRIS de site-agent/public/site.css (spec § 7) : la page
 * doit appartenir visiblement au site vitrine. Le style n'est pas du contenu — l'admin
 * n'édite aucune mise en forme, tout vit ici.
 */

:root {
  --nuit: #2b3e59;          /* site.css : boutons, navigation */
  --nuit-survol: #334a6a;
  --beige: #e1e3dc;         /* site.css : barre de navigation */
  --bandeau: #d6d8cf;       /* site.css : bandeau de contact */
  --titre: #1d2023;
  --texte: #50555c;
  --fond: #fff;
  --fond-zebre: #f5f6f2;
  --fond-neutre: var(--beige);
  --trait: #d6d8cf;
  --vert: #2f5233;          /* site.css : message de confirmation */
  --vert-fond: #e3eee0;
  --ambre: #7a5a12;
  --ambre-fond: #f6ecd2;
  --bleu-fond: #e2e8f1;
  --rayon: 4px;             /* site.css : champs et messages */
  --rayon-pilule: 1000px;   /* site.css : boutons */
  --bouton-texte: #fff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --nuit: #9fb6d6;
    --nuit-survol: #b8cbe5;
    --beige: #2a2d31;
    --bandeau: #23262a;
    --titre: #eceee8;
    --texte: #b4b8bd;
    --fond: #17191c;
    --fond-zebre: #1e2124;
    --trait: #33373c;
    --vert: #a9d3a0;
    --vert-fond: #213322;
    --ambre: #e8c77a;
    --ambre-fond: #3a2f16;
    --bleu-fond: #232d3b;
    --bouton-texte: #17191c;
  }
}

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

body {
  margin: 0;
  font-family: Raleway, Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: var(--titre);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { max-width: 100%; }
a { color: var(--nuit); }
a:hover { color: var(--nuit-survol); }

/* Même boîte que site.css : 1020 px dont 20 px de rembourrage, qui deviennent la marge
   latérale sur téléphone. */
.conteneur { width: 100%; max-width: 1020px; margin: 0 auto; padding: 0 20px; }

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

/* ── En-tête ─────────────────────────────────────────────────────────────────── */
.entete { background: var(--beige); }
.entete-contenu { display: flex; align-items: center; justify-content: space-between; height: 46px; }
.marque { font-size: 20px; font-weight: 700; color: var(--titre); text-decoration: none; }
.marque span { font-weight: 300; }
.langue-lien { font-size: 14px; text-decoration: none; }

.principal { padding-top: 32px; padding-bottom: 48px; }

.tete h1 { margin: 0 0 8px; font-size: 32px; font-weight: 300; }
.accroche { margin: 0 0 16px; color: var(--texte); font-size: 17px; }
.etat-page { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 24px; font-size: 14px; color: var(--texte); }
.etat-page strong { color: var(--titre); font-variant-numeric: tabular-nums; }
.fraicheur { display: inline-flex; align-items: center; gap: 6px; }
.point { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); }

/* ── Outils : filtres, recherche, bascule de vue ─────────────────────────────── */
.outils { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 24px; }
.filtres, .vues { display: inline-flex; border: 1px solid var(--trait); border-radius: var(--rayon-pilule); overflow: hidden; }
.filtre, .vue {
  padding: 6px 14px; font-size: 14px; text-decoration: none; color: var(--texte);
}
.filtre + .filtre, .vue + .vue { border-left: 1px solid var(--trait); }
.filtre[aria-current], .vue[aria-current] { background: var(--nuit); color: var(--bouton-texte); }
.recherche { display: flex; gap: 6px; flex: 1 1 220px; min-width: 0; }
.recherche input {
  flex: 1; min-width: 0; padding: 7px 12px; font: inherit; font-size: 14px;
  color: var(--titre); background: var(--fond);
  border: 1px solid var(--trait); border-radius: var(--rayon);
}
.recherche button, .bouton {
  display: inline-block; padding: 7px 16px; font: inherit; font-size: 14px; font-weight: 700;
  color: var(--bouton-texte); background: var(--nuit); border: 1px solid var(--nuit);
  border-radius: var(--rayon-pilule); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.recherche button:hover, .bouton:hover { background: var(--nuit-survol); color: var(--bouton-texte); }
.bouton-secondaire { background: transparent; color: var(--nuit); }
.bouton-secondaire:hover { background: var(--bleu-fond); color: var(--nuit); }

.bloc-bornes h2 { font-size: 22px; font-weight: 300; margin: 0 0 16px; }
.message-vide { padding: 24px; background: var(--fond-zebre); border-radius: var(--rayon); }

/* ── Pastilles, prix, actions ────────────────────────────────────────────────── */
.pastilles { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.pastille {
  display: inline-block; padding: 1px 8px; font-size: 12px; font-weight: 700;
  border-radius: var(--rayon-pilule); white-space: nowrap;
}
.pastille-teste { color: var(--vert); background: var(--vert-fond); }
.pastille-attente { color: var(--ambre); background: var(--ambre-fond); }
.pastille-precommande { color: var(--nuit); background: var(--bleu-fond); }
.quantite { font-weight: 700; font-variant-numeric: tabular-nums; }
.arrivee, .neant { color: var(--texte); font-size: 14px; }
.prix { display: inline-flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.prix-montant { font-weight: 700; }
.prix-pre, .prix-demande { font-size: 14px; color: var(--texte); }
.actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* ── Vue Tableau ─────────────────────────────────────────────────────────────── */
.tableau { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tableau thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--beige); text-align: left; font-size: 13px; font-weight: 700;
  padding: 10px 12px; border-bottom: 1px solid var(--trait);
}
.tableau thead a { color: var(--titre); text-decoration: none; }
.tableau thead a[aria-current] { text-decoration: underline; }
.tableau td, .tableau tbody th { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--trait); }
.tableau tbody tr:nth-child(even) { background: var(--fond-zebre); }
.tableau .col-modele { font-weight: 700; }
.modele-cellule { display: flex; align-items: center; gap: 10px; }
.vignette { width: 40px; height: 40px; flex: none; object-fit: cover; border-radius: var(--rayon); background: var(--fond-neutre); }
.vignette-vide { display: inline-block; }

/* Sous 720 px, chaque ligne devient une carte : jamais de défilement horizontal. */
@media (max-width: 720px) {
  .tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tableau, .tableau tbody { display: block; }
  .tableau tr.ligne {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px;
    padding: 12px; margin-bottom: 12px; border: 1px solid var(--trait); border-radius: var(--rayon);
  }
  .tableau tbody tr:nth-child(even) { background: transparent; }
  .tableau tr.ligne > * { padding: 0; border: 0; }
  .tableau tbody .col-modele, .tableau tr.ligne .col-action { grid-column: 1 / -1; }
  .tableau td[data-titre]::before {
    content: attr(data-titre); display: block; font-size: 12px; color: var(--texte);
  }
}

/* ── Vue Catalogue ───────────────────────────────────────────────────────────── */
.catalogue {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.carte { display: flex; flex-direction: column; border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; background: var(--fond); }
.carte-lien { display: block; color: var(--titre); text-decoration: none; }
.carte-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--fond-neutre); }
/* Sans photo : un visuel neutre qui porte le nom, plutôt qu'une image cassée. */
.carte-neutre {
  display: flex; align-items: center; justify-content: center; padding: 16px;
  font-size: 26px; font-weight: 300; text-align: center; color: var(--nuit);
}
.carte-nom { display: block; padding: 12px 16px 0; font-size: 18px; font-weight: 700; }
.carte-corps { display: flex; flex-direction: column; gap: 8px; padding: 8px 16px 16px; flex: 1; }
.carte-corps > p { margin: 0; }
.carte-etats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; }
.carte-description {
  color: var(--texte); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.carte-corps .actions { margin-top: auto; }

/* ── Fiche ───────────────────────────────────────────────────────────────────── */
.fil { margin: 0 0 16px; font-size: 14px; }
.fiche { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; }
.galerie { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; }
.galerie-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon); background: var(--fond-neutre); }
.galerie-principale, .galerie > .carte-neutre { grid-column: 1 / -1; border-radius: var(--rayon); }
.fiche-infos h1 { margin: 0 0 12px; font-size: 30px; font-weight: 300; }
.fiche-infos h2 { font-size: 18px; margin: 24px 0 8px; }
.fiche-prix { font-size: 20px; margin: 12px 0; }
.fiche-description { color: var(--texte); }
.dimensions { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-variant-numeric: tabular-nums; }
.dimensions dt { color: var(--texte); }
.dimensions dd { margin: 0; }
.absent { padding: 32px 0; }
.absent h1 { font-weight: 300; }

@media (max-width: 720px) {
  .fiche { grid-template-columns: 1fr; gap: 20px; }
  .tete h1 { font-size: 26px; }
}

.pied { border-top: 1px solid var(--trait); padding: 20px 0; font-size: 13px; color: var(--texte); }
