:root {
  --fond: #f6f8f9;
  --surface: #ffffff;
  --texte: #14232b;
  --doux: #55666f;
  --bord: #dde4e8;
  --marque: #0b3d4f;
  --accent: #0f8a7e;
  --securite: #b4232f;
  --securite-fond: #fdecee;
  --general: #36556b;
  --general-fond: #e8eff4;
  --echeance: #a15c00;
  --echeance-fond: #fff4e2;
  --rayon: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0e171c;
    --surface: #152229;
    --texte: #e4ecef;
    --doux: #9aaab2;
    --bord: #263840;
    --marque: #5fd4c4;
    --accent: #5fd4c4;
    --securite: #ff8a94;
    --securite-fond: #3a1a1e;
    --general: #a9c3d6;
    --general-fond: #1d2f3a;
    --echeance: #ffc266;
    --echeance-fond: #3a2a10;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; }

.evitement { position: absolute; left: -999px; }
.evitement:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.entete { background: var(--surface); border-bottom: 1px solid var(--bord); position: sticky; top: 0; z-index: 5; }
.entete-int, main, .pied { max-width: 980px; margin: 0 auto; padding: 0 1.25rem; }
.entete-int { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.marque { display: flex; align-items: center; gap: .6rem; min-width: 0; color: var(--texte); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.langues { display: flex; border: 1px solid var(--bord); border-radius: 999px; overflow: hidden; }
.langues a { padding: .3rem .85rem; text-decoration: none; color: var(--doux); font-weight: 600; font-size: .9rem; }
.langues a[aria-current="page"] { background: var(--marque); color: var(--surface); }

.intro { padding: 2.5rem 0 1rem; }
.intro h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0 0 .75rem; max-width: 24ch; }
.accroche { font-size: 1.1rem; color: var(--doux); max-width: 62ch; margin: 0 0 1rem; }
.note { font-size: .92rem; background: var(--general-fond); border-left: 3px solid var(--general); padding: .6rem .9rem; border-radius: 6px; max-width: 70ch; }

h2 { font-size: 1.3rem; margin: 0; }
.section-tete { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.bouton-secondaire { font-size: .9rem; font-weight: 600; text-decoration: none; border: 1px solid var(--bord); background: var(--surface); padding: .45rem .9rem; border-radius: 8px; }

.echeances { margin: 1.5rem 0 2.5rem; }
.liste-echeances { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem; }
.liste-echeances li { background: var(--surface); border: 1px solid var(--bord); border-top: 3px solid var(--bord); border-radius: var(--rayon); padding: .8rem .95rem; display: grid; gap: .2rem; }
.liste-echeances li.proche { border-top-color: var(--echeance); }
.liste-echeances time { font-weight: 700; }
.dans { font-size: .85rem; color: var(--echeance); font-weight: 600; }
.titre-echeance { font-size: .93rem; }

.annonces h2 { margin-bottom: .9rem; }
.filtres { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: .9rem; }
.filtres label { display: grid; gap: .25rem; font-size: .85rem; color: var(--doux); font-weight: 600; }
.filtres .case { display: flex; align-items: center; gap: .45rem; padding-bottom: .45rem; }
.champ-recherche { flex: 1 1 260px; }
input[type="search"], select {
  font: inherit; color: var(--texte); background: var(--fond); border: 1px solid var(--bord);
  border-radius: 8px; padding: .5rem .7rem; min-height: 40px; width: 100%;
}
input:focus-visible, select:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.compteur { color: var(--doux); font-size: .9rem; margin: .9rem 0 .6rem; }

.liste-annonces { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; gap: .75rem; }
.carte { background: var(--surface); border: 1px solid var(--bord); border-left: 4px solid var(--general); border-radius: var(--rayon); padding: .95rem 1.1rem; }
.carte.theme-securite { border-left-color: var(--securite); }
.carte h3 { font-size: 1.05rem; margin: .45rem 0 .25rem; }
.carte-tete { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.identifiant { font: 600 .8rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--doux); }
.pastille { font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: var(--general-fond); color: var(--general); }
.p-securite { background: var(--securite-fond); color: var(--securite); }
.p-fiche { background: var(--echeance-fond); color: var(--echeance); }
.meta, .dates { margin: .15rem 0; font-size: .88rem; color: var(--doux); }
.echeance { color: var(--echeance); }
.lien-bouton { margin-top: .4rem; background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; font-weight: 600; color: var(--accent); cursor: pointer; }
.detail { margin-top: .75rem; border-top: 1px solid var(--bord); padding-top: .6rem; }
.etiquette-original { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--doux); margin: 0 0 .4rem; }
.texte-microsoft { font-size: .93rem; overflow-wrap: anywhere; }
.texte-microsoft table { border-collapse: collapse; display: block; overflow-x: auto; }
.texte-microsoft td, .texte-microsoft th { border: 1px solid var(--bord); padding: .3rem .5rem; vertical-align: top; }
.vide, .erreur { color: var(--doux); }

.pied { border-top: 1px solid var(--bord); padding-top: 1.25rem; padding-bottom: 2rem; font-size: .88rem; color: var(--doux); }
.pied p { margin: .3rem 0; }

@media (max-width: 560px) {
  .filtres label:not(.champ-recherche):not(.case) { flex: 1 1 45%; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }

/* Produits */
.produits { display: flex; gap: .45rem; overflow-x: auto; padding: .1rem 0 .8rem; scrollbar-width: thin; }
.puce {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--texte);
  background: var(--surface); border: 1px solid var(--bord); border-radius: 999px; padding: .38rem .8rem;
}
.puce[aria-pressed="true"] { background: var(--marque); border-color: var(--marque); color: var(--surface); }
.puce .nombre { font-size: .78rem; opacity: .75; }
.barre-resultats { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.vue { display: flex; border: 1px solid var(--bord); border-radius: 8px; overflow: hidden; }
.vue button { font: inherit; font-size: .85rem; font-weight: 600; border: 0; background: var(--surface); color: var(--doux); padding: .35rem .75rem; cursor: pointer; }
.vue button[aria-pressed="true"] { background: var(--general-fond); color: var(--texte); }
#liste-annonces { margin-bottom: 3rem; display: grid; gap: .6rem; }
#liste-annonces > .liste-annonces { margin: 0; }
.groupe { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); }
.groupe > summary {
  list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: .3rem 1rem; padding: .85rem 1.1rem;
}
.groupe > summary::-webkit-details-marker { display: none; }
.groupe > summary::before { content: "▸"; color: var(--doux); margin-right: .5rem; transition: transform .15s; display: inline-block; }
.groupe[open] > summary::before { transform: rotate(90deg); }
.nom-groupe { font-weight: 700; font-size: 1.05rem; flex: 1 1 auto; }
.infos-groupe { font-size: .88rem; color: var(--doux); }
.groupe .liste-annonces { padding: 0 .8rem .8rem; margin: 0; }
.groupe .carte { padding: .75rem .95rem; }
.p-produit { background: var(--fond); color: var(--doux); border: 1px solid var(--bord); }

.slogan { font-weight: 400; font-size: .85rem; color: var(--doux); padding-left: .6rem; border-left: 1px solid var(--bord); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .slogan { display: none; } }
