/* Thèmes du site : une palette par saison, choisie automatiquement selon la date (voir saison.js).
   Pour prévisualiser une saison : ajouter ?saison=noel, hiver, valentin, printemps, ete ou automne à l'adresse.
   Chaque palette existe en clair et en sombre. Les contrastes de texte sont vérifiés (au moins 4,5 contre 1). */
:root {
  --display: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Noto Serif", serif;
  --corps: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Palette par défaut (automne), reprise telle quelle si saison.js ne s'exécute pas */
  --fond: #faf2e7; --fond-haut: #f0dcc0; --carte: #ffffff; --encre: #231710; --doux: #66503f; --trait: #e7d5bd;
  --accent: #b03a0a; --accent-encre: #ffffff; --tendance: #7a5200; --tendance-fond: #fbe3a8;
  --hero-1: #8a3a12; --hero-2: #4a1d08; --hero-encre: #fff3e2; --hero-bouton: #f6b73c; --hero-bouton-encre: #2a1500;
  --art-1: #d9822b; --art-2: #b8631c; --art-3: #f6e0b0; --art-deco: #f6b73c;
}

/* ---------- Noël (15 novembre au 6 janvier) ---------- */
:root[data-saison="noel"] {
  --fond: #faf5ec; --fond-haut: #f6e7d0; --carte: #ffffff; --encre: #1c1a16; --doux: #5e584c; --trait: #e3d8c4;
  --accent: #b0122b; --accent-encre: #ffffff; --tendance: #7a5200; --tendance-fond: #fbe7b0;
  --hero-1: #0f4a37; --hero-2: #09281e; --hero-encre: #fff6e5; --hero-bouton: #f4c542; --hero-bouton-encre: #2a1c00;
  --art-1: #c4162f; --art-2: #a30f26; --art-3: #f4c542; --art-deco: #ffffff;
}
/* ---------- Hiver (7 au 27 janvier) ---------- */
:root[data-saison="hiver"] {
  --fond: #f0f5fa; --fond-haut: #dde9f5; --carte: #ffffff; --encre: #12202f; --doux: #4f6075; --trait: #d3deea;
  --accent: #1d4fc4; --accent-encre: #ffffff; --tendance: #7a5200; --tendance-fond: #fbe7b0;
  --hero-1: #1f4a8a; --hero-2: #0f2748; --hero-encre: #f2f7ff; --hero-bouton: #ffffff; --hero-bouton-encre: #0f2748;
  --art-1: #7db4ff; --art-2: #4f8fe6; --art-3: #ffffff; --art-deco: #ffffff;
}
/* ---------- Saint-Valentin (28 janvier au 14 février) ---------- */
:root[data-saison="valentin"] {
  --fond: #fff3f5; --fond-haut: #ffdfe6; --carte: #ffffff; --encre: #2a1218; --doux: #6b4a54; --trait: #f0d3da;
  --accent: #b8154b; --accent-encre: #ffffff; --tendance: #7a4a00; --tendance-fond: #ffe8c2;
  --hero-1: #8a1740; --hero-2: #4a0b24; --hero-encre: #fff1f4; --hero-bouton: #ffd1dc; --hero-bouton-encre: #4a0b24;
  --art-1: #ff5c85; --art-2: #e8386a; --art-3: #fff1f4; --art-deco: #ffb3c7;
}
/* ---------- Printemps (15 février au 20 juin) ---------- */
:root[data-saison="printemps"] {
  --fond: #f5f9ee; --fond-haut: #e1f0cf; --carte: #ffffff; --encre: #152016; --doux: #52644f; --trait: #d9e5cb;
  --accent: #1f7a48; --accent-encre: #ffffff; --tendance: #7a5200; --tendance-fond: #fbeab5;
  --hero-1: #bfe3a8; --hero-2: #8fd0b0; --hero-encre: #10291a; --hero-bouton: #1f7a48; --hero-bouton-encre: #ffffff;
  --art-1: #ff8fb1; --art-2: #f2689a; --art-3: #fff8d6; --art-deco: #ffffff;
}
/* ---------- Été (21 juin au 31 août) ---------- */
:root[data-saison="ete"] {
  --fond: #fff8ea; --fond-haut: #ffe7b5; --carte: #ffffff; --encre: #22190a; --doux: #6a5a3d; --trait: #f0e0bd;
  --accent: #c2410c; --accent-encre: #ffffff; --tendance: #7a5200; --tendance-fond: #fde9ad;
  --hero-1: #087a91; --hero-2: #07566b; --hero-encre: #ffffff; --hero-bouton: #ffd23f; --hero-bouton-encre: #2a1c00;
  --art-1: #ff7a45; --art-2: #e85d2a; --art-3: #ffd23f; --art-deco: #ffd23f;
}
/* ---------- Automne (1er septembre au 14 novembre) ---------- */
:root[data-saison="automne"] {
  --fond: #faf2e7; --fond-haut: #f0dcc0; --carte: #ffffff; --encre: #231710; --doux: #66503f; --trait: #e7d5bd;
  --accent: #b03a0a; --accent-encre: #ffffff; --tendance: #7a5200; --tendance-fond: #fbe3a8;
  --hero-1: #8a3a12; --hero-2: #4a1d08; --hero-encre: #fff3e2; --hero-bouton: #f6b73c; --hero-bouton-encre: #2a1500;
  --art-1: #d9822b; --art-2: #b8631c; --art-3: #f6e0b0; --art-deco: #f6b73c;
}

/* ---------- Halloween (15 octobre au 1er novembre) ---------- */
:root[data-saison="halloween"] {
  --fond: #f8f1e8; --fond-haut: #ffd9a8; --carte: #ffffff; --encre: #1d1420; --doux: #5b4b5e; --trait: #e6d6c4;
  --accent: #a83d00; --accent-encre: #ffffff; --tendance: #7a5200; --tendance-fond: #fbe3a8;
  --hero-1: #2b1247; --hero-2: #12061f; --hero-encre: #fff3e6; --hero-bouton: #ff8a1f; --hero-bouton-encre: #1a0a00;
  --art-1: #ff7a1a; --art-2: #e05e00; --art-3: #a867ff; --art-deco: #ff9a3c;
}
/* ---------- Black Friday (sept jours avant, jusqu'au Cyber Monday) ---------- */
:root[data-saison="blackfriday"] {
  --fond: #f6f5f1; --fond-haut: #ffe66d; --carte: #ffffff; --encre: #141414; --doux: #55554f; --trait: #dddbd2;
  --accent: #b00000; --accent-encre: #ffffff; --tendance: #7a5200; --tendance-fond: #fbe7b0;
  --hero-1: #1c1c1c; --hero-2: #000000; --hero-encre: #ffffff; --hero-bouton: #ffd400; --hero-bouton-encre: #111111;
  --art-1: #ffd400; --art-2: #e6bd00; --art-3: #ff3b3b; --art-deco: #ffd400;
}

/* ---------- Versions sombres (réglage du téléphone ou de l'ordinateur) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark;
    --fond: #15100b; --fond-haut: #241a10; --carte: #1e1710; --encre: #f8eddc; --doux: #c9b49a; --trait: #3b2d20;
    --accent: #ff9a5c; --accent-encre: #3a1400; --tendance: #f3cf7a; --tendance-fond: #3a2f12;
    --hero-1: #6e2c0d; --hero-2: #2e1206; }
  :root[data-saison="noel"]:not([data-theme="light"]) {
    --fond: #0d1914; --fond-haut: #12281f; --carte: #15241c; --encre: #f5efe2; --doux: #b5b9ab; --trait: #2a3b31;
    --accent: #ff6b7e; --accent-encre: #3a0610; --hero-1: #0b3a2b; --hero-2: #06180f; }
  :root[data-saison="hiver"]:not([data-theme="light"]) {
    --fond: #0c141d; --fond-haut: #12202f; --carte: #14202c; --encre: #eef4fb; --doux: #a9b9cb; --trait: #26384a;
    --accent: #7fb0ff; --accent-encre: #04162e; --hero-1: #17376a; --hero-2: #0a1c36; }
  :root[data-saison="valentin"]:not([data-theme="light"]) {
    --fond: #1a0d12; --fond-haut: #2a1019; --carte: #26151b; --encre: #fbeef1; --doux: #cfaab4; --trait: #432831;
    --accent: #ff7a9f; --accent-encre: #3b0618; --hero-1: #6e1232; --hero-2: #330819; }
  :root[data-saison="printemps"]:not([data-theme="light"]) {
    --fond: #0e1710; --fond-haut: #15261a; --carte: #152019; --encre: #eef6e8; --doux: #adc0a6; --trait: #263a2b;
    --accent: #7fd6a0; --accent-encre: #05210f; --hero-1: #1c4a2e; --hero-2: #0d2a1a; --hero-encre: #eaf7e0;
    --hero-bouton: #bfe9a8; --hero-bouton-encre: #10291a; }
  :root[data-saison="halloween"]:not([data-theme="light"]) {
    --fond: #0f0a14; --fond-haut: #1d1030; --carte: #1a1222; --encre: #f6ede4; --doux: #bfaec4; --trait: #35264a;
    --accent: #ff9a3c; --accent-encre: #2a1000; --hero-1: #3b1a66; --hero-2: #14081f; }
  :root[data-saison="blackfriday"]:not([data-theme="light"]) {
    --fond: #0c0c0c; --fond-haut: #1c1a0c; --carte: #161616; --encre: #f5f5f5; --doux: #b5b5b5; --trait: #333333;
    --accent: #ff6b6b; --accent-encre: #2a0000; --hero-1: #1c1c1c; --hero-2: #000000; }
  :root[data-saison="ete"]:not([data-theme="light"]) {
    --fond: #151008; --fond-haut: #241b0b; --carte: #1f170b; --encre: #fbf1de; --doux: #cdb98f; --trait: #3c2f17;
    --accent: #ff9a62; --accent-encre: #3a1400; --hero-1: #08657a; --hero-2: #053c4c; }
}

body { min-height: 100vh; }

/* ---------- Cartes à faire glisser (swipe.js) ---------- */
.swipe { display: grid; gap: 14px; outline: none; }
.swipe:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 20px; }
.swipe-pile { position: relative; min-height: 300px; touch-action: pan-y; }
.swipe-carte { position: absolute; inset: 0 0 auto 0; min-height: 280px; background: var(--carte); border: 2px solid var(--trait); border-radius: 20px; padding: 20px; display: grid; align-content: start; gap: 10px; touch-action: none; cursor: grab; user-select: none; box-shadow: 0 10px 30px color-mix(in srgb, var(--encre) 14%, transparent); }
.swipe-carte:active { cursor: grabbing; }
.swipe-carte.arriere { transform: scale(.95) translateY(14px); opacity: .7; box-shadow: none; pointer-events: none; }
.swipe-carte h2 { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.15; margin: 0; }
.swipe-carte p { margin: 0; color: var(--doux); }
.swipe-carte .prix { font-weight: 700; }
.tampon { position: absolute; top: 14px; padding: 4px 12px; border: 3px solid; border-radius: 10px; font-weight: 800; letter-spacing: .06em; opacity: 0; pointer-events: none; transform: rotate(-8deg); background: var(--carte); }
.tampon.oui { left: 14px; color: #1a7f4b; border-color: #1a7f4b; }
.tampon.non { right: 14px; color: var(--accent); border-color: var(--accent); transform: rotate(8deg); }
@media (prefers-color-scheme: dark) { .tampon.oui { color: #6ee7a8; border-color: #6ee7a8; } }
.swipe-commandes { display: flex; justify-content: center; gap: 22px; margin-top: 8px; }
.swipe-bouton { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--trait); background: var(--carte); font-size: 26px; font-weight: 800; cursor: pointer; color: var(--encre); display: grid; place-items: center; }
.swipe-bouton.oui { background: #1a7f4b; border-color: #1a7f4b; color: #fff; }
.swipe-bouton.non { color: var(--accent); border-color: var(--accent); }
.swipe-bouton.coeur { color: var(--tendance); border-color: var(--tendance); background: var(--tendance-fond); }
.swipe-bouton:active { transform: scale(.94); }
.swipe-bouton:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.swipe-etat { text-align: center; color: var(--doux); font-size: 14px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .swipe-carte, .swipe-bouton { transition: none !important; } }
.haut-carte { display: grid; gap: 10px; justify-items: start; }
.haut-carte a { color: var(--accent); font-weight: 700; }
