/* Où est-ce ? */
.oe { --prune: var(--wp--preset--color--prune, #3b1f4a); --lilas: var(--wp--preset--color--lilas, #d9c8ec); --ocre: var(--wp--preset--color--ocre, #e8a33d); --encre: var(--wp--preset--color--encre, #22152b); --blanc: #fff; --fond: var(--wp--preset--color--fond, #f6f2fa); display: flex; flex-direction: column; gap: 32px; }
.oe__titre { font-size: 1.375rem; margin: 0 0 14px; color: var(--prune); }
.oe__aide { font-size: .875rem; opacity: .8; margin: 0; }
.oe__vide, .oe__charge { margin: 0; padding: 18px; border-radius: 18px; background: var(--lilas); font-weight: 600; }
.oe__joueur { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px; border-radius: 18px; background: var(--lilas); }
.oe__pseudo { font-weight: 800; color: var(--prune); }
.oe__bouton { display: inline-flex; justify-content: center; align-items: center; gap: 6px; font: inherit; font-weight: 800; padding: 14px 22px; border-radius: 999px; border: 2px solid var(--ocre); background: var(--ocre); color: var(--encre); box-shadow: 0 5px 0 var(--prune); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.oe__bouton:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--prune); }
.oe__bouton[disabled] { opacity: .5; cursor: not-allowed; }
.oe__lien { font: inherit; font-weight: 700; background: none; border: 0; padding: 6px 0; color: var(--prune); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.oe__lien[disabled] { opacity: .6; cursor: default; text-decoration: none; }

/* Cartes d'énigmes */
.oe__enigmes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.oe-carte { background: var(--blanc); border: 3px solid var(--prune); border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; }
.oe-carte__photo { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.oe-carte--revelee .oe-carte__photo { aspect-ratio: 4 / 3; }
.oe-carte__corps { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.oe-carte__niveau { margin: 0; font-size: .8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--prune); }
.oe-carte--moyen .oe-carte__niveau::before { content: "🌶️ "; }
.oe-carte--expert .oe-carte__niveau::before { content: "🔥 "; }
.oe-carte__ressenti { margin: 0; font-size: 1.25rem; font-weight: 800; }
.oe-carte__titre { margin: 0; font-size: 1.125rem; }
.oe-carte__explication p { margin: 0 0 8px; }
.oe-carte__score { margin: 0; font-weight: 800; padding: 8px 12px; border-radius: 12px; background: var(--lilas); }
.oe-carte__mini { height: 200px; border-radius: 16px; overflow: hidden; z-index: 0; }

/* Fenêtre de jeu */
body.oe-ouvert { overflow: hidden; }
.oe__fenetre { position: fixed; inset: 0; z-index: 100000; background: rgba(34, 21, 43, .6); display: grid; place-items: center; padding: 10px; }
.oe__fenetre[hidden] { display: none; }
.oe-jeu { width: min(760px, 100%); height: min(92vh, 900px); background: var(--blanc); border-radius: 26px; display: flex; flex-direction: column; overflow: hidden; }
.oe-jeu__haut { display: flex; gap: 12px; align-items: flex-start; padding: 12px; position: relative; }
.oe-jeu__vignette { width: 84px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; cursor: zoom-in; flex: 0 0 auto; transition: width .2s ease; }
.oe-jeu__vignette.est-grande { width: 190px; cursor: zoom-out; }
.oe-jeu__info { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-right: 40px; }
.oe-jeu__quartier { margin: 0; font-weight: 700; color: var(--prune); }
.oe-jeu__quartier:empty { display: none; }
.oe-jeu__fermer { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--lilas); font-size: 1.125rem; cursor: pointer; color: var(--encre); }
.oe-jeu__carte { flex: 1; min-height: 240px; z-index: 0; }
.oe-jeu__carte .leaflet-tile-pane, .oe-carte__mini .leaflet-tile-pane { filter: grayscale(1) sepia(.25) hue-rotate(225deg) saturate(1.4) brightness(1.04) contrast(.92); }
.oe-jeu__bas { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.oe-jeu__indices { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.oe-jeu__message { margin: 0; font-size: .875rem; min-height: 1.2em; }
.oe-jeu__resultat { margin: 0; font-size: 1.75rem; font-weight: 900; text-align: center; animation: oePop .45s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes oePop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.oe-epingle { background: none; border: 0; }
.oe-epingle span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); color: #fff; font-weight: 900; font-size: 14px; }

/* Inscription */
.oe-insc { width: min(440px, 100%); background: var(--blanc); border-radius: 26px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; }
.oe-insc h2 { margin: 0; color: var(--prune); }
.oe-insc label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.oe-insc input[type="text"], .oe-insc input[name="pseudo"], .oe-insc input[type="email"] { font: inherit; font-weight: 400; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--lilas); }
.oe-insc .oe-insc__case { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; }
.oe-insc__erreur { margin: 0; color: #b3261e; font-weight: 700; }
.oe-insc__erreur:empty { display: none; }
.oe-insc__boutons { display: flex; gap: 16px; align-items: center; }

/* Classement */
.oe__onglets { display: flex; gap: 8px; margin-bottom: 10px; }
.oe__onglets button { font: inherit; font-weight: 800; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--prune); background: transparent; color: var(--prune); cursor: pointer; }
.oe__onglets button[aria-selected="true"] { background: var(--prune); color: #fff; }
.oe__classement-titre { margin: 0 0 8px; font-weight: 700; opacity: .8; }
.oe__tableau { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.oe-ligne { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--blanc); border: 2px solid var(--lilas); }
.oe-ligne:nth-child(-n+3) { border-color: var(--ocre); }
.oe-ligne.est-moi { background: var(--lilas); }
.oe-ligne__rang { font-weight: 900; font-size: 1.125rem; text-align: center; }
.oe-ligne__pseudo { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oe-ligne__points { font-weight: 800; font-variant-numeric: tabular-nums; }

.oe__regles { padding: 14px 18px; border-radius: 18px; background: var(--lilas); }
.oe__regles summary { font-weight: 800; cursor: pointer; }
.oe__regles ul { margin: 10px 0 0; padding-left: 20px; }

@media (prefers-reduced-motion: reduce) { .oe-jeu__resultat { animation: none; } }
