/* WesternGo — système visuel « Affiche de rodéo » (validé dans la maquette).
   Polices : <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&family=Rye&display=swap"> */
:root {
  --denim: #17324D;
  --denim-2: #24496E;
  --sable: #F3E5CC;
  --sable-2: #EAD6B4;
  --papier: #FFF8EC;
  --encre: #231B14;
  --gris: #4F4236;
  --gris-2: #6B5B4B;
  --bandana: #C7362B;
  --bandana-ombre: #7E1F18;
  --brique: #A12A21;
  --moutarde: #E8A93A;
  --moutarde-ombre: #A9741B;
  --cactus: #2F7D4F;
  --cactus-clair: #E3F2E8;
  --ciel: #6FB7E0;
  --prune: #7A4FA0;
  --rose-pale: #FBE3DC;
  --creme-ocre: #FBEED3;
  --display: Rye, Georgia, serif;
  --texte: Archivo, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-carte: 22px;
  --r-pilule: 999px;
  --ombre-dure: 5px 5px 0 var(--encre);
  --bord: 3px solid var(--encre);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sable); color: var(--encre); font-family: var(--texte); font-size: 17px; line-height: 1.5; }
img { max-width: 100%; }
a { color: var(--brique); }
a:hover { color: var(--bandana-ombre); }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--moutarde); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--encre); color: var(--papier); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 8px; }

/* Titres */
.display { font-family: var(--display); font-weight: 400; letter-spacing: .5px; }
.titre-xl { font-weight: 900; font-stretch: 120%; font-size: clamp(32px, 4.6vw, 58px); line-height: 1.02; margin: 0; }
.titre-l { font-weight: 900; font-stretch: 115%; font-size: clamp(24px, 3vw, 34px); line-height: 1.08; margin: 0; }
.surtitre { margin: 0; font-weight: 800; color: var(--brique); letter-spacing: .6px; text-transform: uppercase; font-size: 14px; }
.muted { color: var(--gris); }
.petit { font-size: 14px; }
.tabnum { font-variant-numeric: tabular-nums; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r-pilule); border: 0; font: 900 16px var(--texte); text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.btn:active { transform: translateY(2px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-rouge { background: var(--bandana); color: #fff; box-shadow: 0 4px 0 var(--bandana-ombre); }
.btn-rouge:hover { color: #fff; }
.btn-moutarde { background: var(--moutarde); color: var(--encre); box-shadow: 0 4px 0 var(--moutarde-ombre); }
.btn-denim { background: var(--denim); color: #fff; }
.btn-cactus { background: var(--cactus); color: #fff; }
.btn-contour { background: transparent; color: var(--encre); border: 2px solid var(--encre); font-weight: 800; }
.btn-contour-clair { background: transparent; color: var(--papier); border: 2px solid var(--papier); font-weight: 800; }
.btn-xl { min-height: 56px; font-size: 18px; padding: 0 26px; }
.btn-bloc { width: 100%; }
.btn-icone { min-width: 48px; padding: 0; }

/* Pastilles, badges, statuts */
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pilule); border: 2px solid var(--encre); background: var(--papier); color: var(--encre); font: 800 14px var(--texte); cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--encre); color: #fff; }
.chip .point { width: 11px; height: 11px; border-radius: 50%; border: 2px solid currentColor; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font: 900 11px/1.6 var(--texte); letter-spacing: .4px; text-transform: uppercase; vertical-align: middle; }
.badge-demo { background: var(--encre); color: var(--moutarde); }
.badge-commandite { background: var(--denim); color: #fff; }
.badge-verifie { background: var(--cactus); color: #fff; }
.badge-prix { background: var(--moutarde); color: var(--encre); }
.badge-membres { background: var(--papier); color: var(--encre); border: 2px solid var(--encre); }
.badge-vedette { background: var(--moutarde); color: var(--encre); border: 2px solid var(--encre); } /* commerce avec un article gratuit ou un lot à gagner */
.statut { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-pilule); font: 800 13px var(--texte); }
.statut.a_venir { border: 2px solid var(--denim); color: var(--denim); }
.statut.bientot { background: var(--moutarde); color: var(--encre); }
.statut.en_cours { background: var(--bandana); color: #fff; }
.statut.termine { background: #D9CDB8; color: var(--gris); }
.statut.disponible { background: var(--cactus); color: #fff; }
.statut.complet { background: var(--bandana); color: #fff; }
.statut.ferme { background: var(--gris); color: #fff; }
.statut.perime, .statut.a_confirmer { border: 2px dashed var(--gris); color: var(--gris); }
.vivant { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: wgVivant 1.2s ease-in-out infinite; }
@keyframes wgVivant { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Cartes */
.carte { background: var(--papier); border: var(--bord); border-radius: var(--r-carte); padding: 18px; }
.carte-ombre { box-shadow: var(--ombre-dure); }
.carte-denim { background: var(--denim); color: var(--sable); border: var(--bord); border-radius: var(--r-carte); padding: 18px; }
.pile { display: flex; flex-direction: column; gap: 12px; }
.rangee { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Formulaires */
.champ { display: flex; flex-direction: column; gap: 5px; font-weight: 800; font-size: 15px; }
.champ input, .champ select, .champ textarea { min-height: 48px; border-radius: 12px; border: 2px solid var(--encre); padding: 10px 12px; font: 400 17px var(--texte); background: #fff; color: var(--encre); width: 100%; }
.champ textarea { min-height: 90px; resize: vertical; }
.champ .aide { font-weight: 400; font-size: 13px; color: var(--gris); }
.champ .erreur { font-weight: 700; font-size: 13px; color: var(--brique); }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.case input { width: 22px; height: 22px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--bandana); }
.message { padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 15px; }
.message.ok { background: var(--cactus-clair); color: #1F5A37; }
.message.erreur { background: var(--rose-pale); color: var(--bandana-ombre); }
.message.info { background: var(--creme-ocre); color: #5A3A0A; }

/* Notifications éphémères */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 2000; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--encre); color: var(--papier); border-radius: 14px; padding: 12px 16px; font-weight: 700; font-size: 15px; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: wgToast .25s ease; }
.toast.ok { background: var(--cactus); color: #fff; }
.toast.erreur { background: var(--bandana); color: #fff; }
@keyframes wgToast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Bandeau hors ligne */
.hors-ligne { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 1500; background: var(--moutarde); color: var(--encre); text-align: center; font-weight: 800; font-size: 14px; padding: 6px 12px; }

/* Squelettes de chargement */
.charge { background: linear-gradient(90deg, #EAD9BC 0%, #F6EAD3 50%, #EAD9BC 100%); background-size: 200% 100%; animation: wgCharge 1.2s linear infinite; border-radius: 12px; min-height: 18px; }
@keyframes wgCharge { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.mouvement-reduit *, .mouvement-reduit *::before, .mouvement-reduit *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

/* Le nom WesternGo garde sa casse, même dans un surtitre ou un en-tête en majuscules */
.marque { text-transform: none; letter-spacing: .01em; }

/* Boutons de partage communs (module /js/partage.js : accueil, application, palmarès des jeux) */
.palm-partage { display: flex; flex-wrap: wrap; gap: 8px; }
.palm-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--encre); font: 800 15px/1 var(--texte); text-decoration: none; cursor: pointer; background: var(--papier); color: var(--encre); }
.palm-btn:hover { color: var(--encre); background: #fff; }
.palm-btn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.palm-fb, .palm-fb:hover { background: #1877F2; color: #fff; border-color: #0E4FA8; }
.palm-x, .palm-x:hover { background: #111; color: #fff; border-color: #000; }
.palm-btn > span { overflow-wrap: anywhere; }

/* Genre d'une scène (enquête, duel, danse, animation, spectacle) : étiquette crème, pictogramme dans un rond de couleur */
.genre { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 10px 2px 2px; border-radius: var(--r-pilule); border: 2px solid var(--encre); background: var(--papier); color: var(--encre); font: 800 12px/1.2 var(--texte); letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }
.genre-ico { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--encre); background: var(--moutarde); color: var(--encre); }
.genre-duel .genre-ico { background: var(--bandana); color: #fff; }
.genre-danse .genre-ico { background: #E984A2; }
.genre-animation .genre-ico { background: var(--ciel); }
.genre-spectacle .genre-ico { background: var(--prune); color: #fff; }

/* Bons coups (accueil et application) : tuile illustrée de la catégorie (/js/icones-bons-coups.js), boutons
   « Voir sur la carte » et « Partager », panneau de partage */
.bon-ico { position: relative; flex: 0 0 96px; width: 96px; height: 96px; border-radius: 22px; border: 3px solid var(--encre); display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: inset 0 -6px 0 rgba(35, 27, 20, .12), 3px 3px 0 var(--encre);
  background: repeating-conic-gradient(from -6deg at 50% 70%, rgba(255, 248, 236, .6) 0 9deg, transparent 9deg 24deg), var(--fond, #F7D98F); }
.bon-ico-dessin { display: flex; }
.bon-ico-dessin svg { width: 78px; height: 78px; filter: drop-shadow(0 2px 0 rgba(35, 27, 20, .2)); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.bon-ico-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bon-ico-photo .bon-ico-dessin { position: absolute; right: -3px; bottom: -3px; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 14px 0 19px 0; border: 3px solid var(--encre); background: var(--fond, #F7D98F); }
.bon-ico-photo .bon-ico-dessin svg { width: 36px; height: 36px; }
.bon-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 15px 0 12px; border-radius: var(--r-pilule); border: 2px solid var(--encre); background: var(--papier); color: var(--encre); font: 800 14.5px var(--texte); text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 var(--encre); transition: transform .1s ease, box-shadow .1s ease; }
.bon-btn:hover { color: var(--encre); background: #fff; }
.bon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--encre); }
.bon-btn-carte, .bon-btn-carte:hover { background: var(--moutarde); }
.bon-btn[aria-expanded="true"] { background: var(--encre); color: var(--papier); }
.bon-partage { margin-top: 10px; padding: 10px; border-radius: 16px; background: var(--sable); border: 2px dashed rgba(35, 27, 20, .35); }
.bon-partage .palm-btn { min-height: 40px; padding: 6px 13px; font-size: 14px; }
