/* Le carnet de l'enquêteur, ouvert sur son bureau (Inscription.html, Profil.html) : les couleurs du
   livre de Carnet.dc.html. */
:root {
  --bois: #25180F; --cuir: #6b3f23; --cuir-ombre: #3a1f0e; --cuir-clair: #81522f;
  --papier: #EAE0C8; --papier-ombre: #CBBD9C;
  --encre: #2A2118; --rouille: #C7412F; --laiton: #E08A4A; --laiton-fonce: #B8642A; --sepia: #8a5a2a; --fade: #765a33;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --titre: 'Special Elite', 'IBM Plex Sans', system-ui, sans-serif;
  --dossier: 'Special Elite', 'Courier New', monospace;
  --boutique: 'Special Elite', 'IBM Plex Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 40px 20px 48px; color: var(--encre);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: radial-gradient(ellipse at 50% 35%, #3A2416 0%, var(--bois) 62%, #190d07 100%); }
a { color: var(--rouille); }

.livre { position: relative; width: min(1120px, 100%); padding: 22px 26px; background: var(--cuir);
  box-shadow: inset 0 0 0 4px var(--cuir-ombre), inset 0 0 0 6px var(--cuir-clair), 0 0 0 4px #24120a, 0 26px 70px rgba(0, 0, 0, 0.65); }
.pages { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.page { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 30px 34px 34px; min-height: 620px;
  background-color: var(--papier);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(154, 112, 56, 0.16) 31px 32px); }
.page.gauche { box-shadow: inset -26px 0 30px -18px rgba(90, 55, 25, 0.55); }
.page.droite { box-shadow: inset 26px 0 30px -18px rgba(90, 55, 25, 0.55); }
.folio { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font: 12px var(--dossier); color: var(--fade); }

.tete { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; box-shadow: 0 2px 0 var(--papier-ombre); }
.kicker { font: 400 12px var(--dossier); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sepia); }
h1 { margin: 0; font: 700 28px/1.15 var(--titre); letter-spacing: 0; word-spacing: 0.12em; }
.mot { margin: 0; font-size: 14px; line-height: 1.55; text-wrap: pretty; }

label, .etiquette { display: block; font: 600 12px 'IBM Plex Sans', system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sepia); }
.champ { display: flex; flex-direction: column; gap: 6px; }
/* Champ à l'encre : on écrit sur la ligne du carnet. */
input.encre { width: 100%; padding: 6px 2px 4px; border: 0; border-bottom: 2px solid #7a5a32; border-radius: 0; background: transparent; color: var(--encre);
  font: 400 21px var(--dossier); outline: none; }
input.encre::placeholder { color: #8a7547; font-weight: 400; }
input.encre:focus { border-bottom-color: var(--rouille); background: rgba(210, 155, 50, 0.1); }
input.petit { font-size: 17px; }
.aide { margin: 0; font-size: 13px; line-height: 1.45; color: var(--fade); }

/* La fiche d'enquêteur : une photo d'identité collée au carnet, qui suit le joueur pendant qu'il se dessine. */
.fiche { display: flex; align-items: center; gap: 18px; padding: 14px 16px; background: rgba(122, 82, 40, 0.09); box-shadow: inset 0 0 0 2px rgba(122, 82, 40, 0.18); }
.photo { position: relative; flex: none; width: 190px; padding: 8px 8px 24px; background: #f8f1de; box-shadow: 0 0 0 2px rgba(122, 82, 40, 0.25), 3px 5px 0 rgba(90, 55, 25, 0.28); transform: rotate(-2deg); }
.photo::before { content: ''; position: absolute; top: -10px; left: 50%; width: 52px; height: 16px; transform: translateX(-50%) rotate(3deg); background: rgba(210, 155, 50, 0.55); }
.photo img { display: block; width: 100%; height: auto; image-rendering: pixelated; box-shadow: 0 0 0 2px #14111a; background: #35463a center / cover; }
.photo span { position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; font: 12px var(--dossier); color: var(--encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.identite { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.identite b { font: 700 17px var(--titre); color: var(--rouille); overflow-wrap: anywhere; }
.identite small { font: 13px/1.5 var(--dossier); color: var(--sepia); }
.colonne { position: relative; display: flex; flex-direction: column; gap: 18px; }
.colonne[hidden] { display: none; }
.colonne + .colonne { margin-top: 26px; }
.codes-secours { margin: 0; padding: 10px 12px; font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; white-space: pre-wrap; background: rgba(60, 40, 20, 0.08); user-select: all; }
.codes-secours[hidden] { display: none; }
.page.droite .colonne { position: sticky; top: 24px; }
.reglages { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.apercu-mobile { display: none; }
.groupe[hidden] { display: none; }
.groupe { display: flex; flex-direction: column; gap: 5px; }
.choix { display: flex; flex-wrap: wrap; gap: 5px; }
.puce, .nuance { all: unset; box-sizing: border-box; cursor: pointer; }
.puce { padding: 6px 11px; font: 500 13px 'IBM Plex Sans', system-ui, sans-serif; color: var(--encre); background: rgba(122, 82, 40, 0.1); box-shadow: inset 0 0 0 2px rgba(122, 82, 40, 0.22); }
.puce:hover { background: rgba(122, 82, 40, 0.2); }
.puce[aria-pressed=true] { background: #7a4a26; color: #f6ead0; box-shadow: inset 0 -3px 0 #4e2c14, 0 0 0 2px var(--cuir-ombre); }
.nuance { width: 24px; height: 24px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.28); }
.nuance:hover { transform: translateY(-1px); }
.nuance[aria-pressed=true] { box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35), 0 0 0 3px var(--papier), 0 0 0 5px var(--rouille); }
.puce:focus-visible, .nuance:focus-visible, .bouton:focus-visible { outline: 3px solid var(--laiton); outline-offset: 2px; }

.bouton { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px;
  font: 600 13px 'IBM Plex Sans', system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  background: #7a4a26; color: #f6ead0; box-shadow: inset 0 -3px 0 #4e2c14, 0 0 0 2px var(--cuir-ombre); }
.bouton:hover { background: #8d5a31; }
.bouton.or { background: var(--laiton); color: #2e1c0d; box-shadow: inset 0 -3px 0 var(--laiton-fonce), 0 0 0 2px #4d300b; font-size: 13px; padding: 12px 22px; }
.bouton.or:hover { background: #EA9B5E; }
.bouton.hasard { align-self: flex-start; }
.bouton[disabled] { opacity: 0.55; cursor: wait; }
.pas-de-compte { margin: 0; font-size: 13px; }

.erreur { padding: 10px 12px; font-size: 14px; line-height: 1.45; color: #7A1F12; background: #F6E0D8; box-shadow: inset 0 0 0 1px rgba(168, 50, 31, 0.55), inset 4px 0 0 #A8321F; }
.erreur[hidden] { display: none; }
.signer { position: relative; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }

/* Le tampon, quand le carnet est signé. */
.tampon { position: absolute; left: 44px; top: 128px; z-index: 3; padding: 8px 18px; border: 4px solid var(--rouille); color: var(--rouille); font: 400 30px var(--dossier); letter-spacing: 0.12em;
  transform: rotate(-9deg); opacity: 0; pointer-events: none; mix-blend-mode: multiply; }
.signe .tampon { animation: tampon 0.45s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes tampon { from { opacity: 0; transform: rotate(-9deg) scale(2.2); } to { opacity: 0.9; transform: rotate(-9deg) scale(1); } }

@media (max-width: 860px) {
  body { padding: 20px 10px 32px; }
  .livre { padding: 12px; }
  .pages { grid-template-columns: 1fr; }
  .page { min-height: 0; padding: 26px 22px 40px; }
  .page.gauche, .page.droite { box-shadow: none; }
  .page.droite { border-top: 2px dashed var(--papier-ombre); }
  .page.droite .colonne { position: static; }
  .page.droite .fiche { display: none; }
  /* Sur un petit écran, la fiche suit le joueur en haut de la page de gauche. */
  .apercu-mobile { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 4; margin: 0 -22px; padding: 8px 22px; background: var(--papier); box-shadow: 0 2px 0 var(--papier-ombre); }
  .apercu-mobile img { width: 52px; height: auto; aspect-ratio: 26 / 28; image-rendering: pixelated; box-shadow: 0 0 0 2px #14111a; }
  .apercu-mobile b { font: 700 15px var(--titre); color: var(--rouille); overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) { .signe .tampon { animation: none; opacity: 0.9; } .nuance:hover { transform: none; } }

/* --- Profil.html --- */
.dessus { width: min(1120px, 100%); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: -4px; }
.retour { font: 600 14px 'IBM Plex Sans', system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: #efe0c2; text-decoration: none; padding: 10px 2px; }
.retour:hover { color: #fff3d8; }
/* Grand écran : le carnet (inscription, profil) grandit avec la fenêtre au lieu de rester à taille de portable.
   Mise à l'échelle proportionnelle, bornée par la hauteur pour que le livre tienne sans défiler. */
@media (min-width: 1800px) and (min-height: 1000px) { body > .dessus, body > .livre, body > .retour { zoom: 1.2; } }
@media (min-width: 2300px) and (min-height: 1300px) { body > .dessus, body > .livre, body > .retour { zoom: 1.4; } }
@media (min-width: 2500px) and (min-height: 1400px) { body > .dessus, body > .livre, body > .retour { zoom: 1.55; } }
.onglets { display: flex; gap: 6px; }
.onglet { all: unset; box-sizing: border-box; cursor: pointer; padding: 9px 16px 11px; font: 600 13px 'IBM Plex Sans', system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase;
  color: #e6d2ae; background: #3A2416; box-shadow: inset 0 0 0 2px var(--cuir-ombre); }
.onglet:hover { background: #5a341f; }
.onglet[aria-selected=true] { color: var(--encre); background: var(--papier); box-shadow: inset 0 -3px 0 var(--papier-ombre), 0 0 0 2px var(--cuir-ombre); }
.onglet:focus-visible { outline: 3px solid var(--laiton); outline-offset: 2px; }
.solde { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; font: 500 13px 'IBM Plex Sans', system-ui, sans-serif; color: #fff3d8; background: #25180F; box-shadow: inset 0 0 0 2px #81522f; }
.solde svg { flex: none; }
.solde b { font: 700 14px var(--mono); color: #f6d58a; }
.vue[hidden] { display: none; }
.page .colonne.haut { position: sticky; top: 24px; }
.puce.verrou { opacity: 0.55; background: transparent; box-shadow: inset 0 0 0 2px rgba(122, 82, 40, 0.22); }
.puce.verrou::after { content: ''; display: inline-block; width: 7px; height: 8px; margin-left: 6px; vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 8' shape-rendering='crispEdges'%3E%3Cpath d='M2 0h3v1H2zM1 1h1v2H1zM5 1h1v2H5zM0 3h7v5H0z' fill='%238a5a2a'/%3E%3Cpath d='M3 5h1v2H3z' fill='%23efe1bf'/%3E%3C/svg%3E") center / contain no-repeat; image-rendering: pixelated; }
.puce.verrou[aria-pressed=true] { opacity: 1; background: #b9a073; color: var(--encre); box-shadow: inset 0 -3px 0 #8a6a3a, 0 0 0 2px var(--cuir-ombre); }
.statut { margin: 0; min-height: 20px; font: 13px/1.5 'IBM Plex Sans', system-ui, sans-serif; color: var(--sepia); }
.statut b { color: var(--rouille); font-weight: 500; }
.rangee { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ok { color: #3f6a2e; font: 600 13px 'IBM Plex Sans', system-ui, sans-serif; }
.ok[hidden] { display: none; }

/* Sous-onglets : les rubriques de la garde-robe, les rayons de la boutique (une seule affichée à la fois). */
.sous-onglets { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; box-shadow: 0 2px 0 var(--papier-ombre); }
.sous-onglet { all: unset; box-sizing: border-box; cursor: pointer; padding: 8px 14px; font: 600 13px 'IBM Plex Sans', system-ui, sans-serif; color: var(--encre);
  background: rgba(122, 82, 40, 0.1); box-shadow: inset 0 0 0 2px rgba(122, 82, 40, 0.22); }
.sous-onglet:hover { background: rgba(122, 82, 40, 0.2); }
.sous-onglet[aria-selected=true] { background: #7a4a26; color: #f6ead0; box-shadow: inset 0 -3px 0 #4e2c14, 0 0 0 2px var(--cuir-ombre); }
.sous-onglet:focus-visible { outline: 3px solid var(--laiton); outline-offset: 2px; }
.groupe.hors-rubrique { display: none; }
#reglages { gap: 18px; }
#reglages .groupe { gap: 9px; }
#reglages .choix { gap: 7px; }
#reglages .nuance { width: 34px; height: 34px; }

/* Boutique : titres en Archivo Black, noms en Inter, prix en JetBrains Mono, badges en Special Elite. */
#v-boutique .kicker, #v-boutique h1 { font-family: var(--boutique); font-weight: 400; letter-spacing: 0.02em; }
#v-boutique .kicker { font-size: 12px; letter-spacing: 0.18em; }
#v-boutique h1 { font-size: 26px; }
.rayons { display: flex; flex-direction: column; gap: 20px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 14px; }
.tuile { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 7px; padding: 8px 8px 10px;
  background: #f8f1de; box-shadow: 0 0 0 2px rgba(122, 82, 40, 0.25), 0 4px 0 var(--r, #9c8a6a); }
.tuile:hover { transform: translateY(-2px); }
.tuile[aria-pressed=true] { box-shadow: 0 0 0 3px var(--rouille), 0 4px 0 var(--r, #9c8a6a); }
.tuile:focus-visible { outline: 3px solid var(--laiton); outline-offset: 2px; }
.tuile img { display: block; width: 100%; height: auto; image-rendering: pixelated; box-shadow: 0 0 0 2px #14111a; background: #35463a center / cover; }
.tuile b { font: 600 13.5px/1.25 'IBM Plex Sans', system-ui, sans-serif; color: var(--encre); }
.tuile small { display: inline-flex; align-items: center; gap: 5px; }
.tuile small.prix { font: 500 13px var(--mono); color: var(--encre); }
.tuile small.badge { font: 13px var(--dossier); color: #3f6a2e; }
.tuile.trop-cher small.prix { color: #9c7b4e; }
.r-commune { --r: #76654A; } .r-rare { --r: #3a6ac2; } .r-epique { --r: #7a3ab0; } .r-legendaire { --r: #E08A4A; }
.rarete { display: inline-block; align-self: flex-start; padding: 3px 10px; font: 13px var(--dossier); letter-spacing: 0.1em; text-transform: uppercase; color: #fff8e8; background: var(--r, #9c8a6a); }
.vitrine { display: flex; flex-direction: column; gap: 18px; }
.vitrine .photo { width: 240px; align-self: center; }
.vitrine-infos { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.vitrine h2 { margin: 0; font: 700 24px/1.15 var(--titre); word-spacing: 0.12em; }
.prix-ligne { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font: 500 14px 'IBM Plex Sans', system-ui, sans-serif; color: var(--sepia); }
.prix-ligne .prix { display: inline-flex; align-items: center; gap: 6px; font: 500 15px var(--mono); color: var(--encre); }
.prix-ligne .a-toi { font: 15px var(--dossier); color: #3f6a2e; }
.vitrine .bouton.or { font-size: 14px; padding: 14px 26px; font-family: var(--dossier); font-weight: 400; letter-spacing: 0.08em; }
.vitrine .bouton[disabled] { cursor: not-allowed; }
.zone-danger { margin-top: 8px; padding: 14px 16px; box-shadow: inset 0 0 0 2px rgba(154, 63, 37, 0.35); display: flex; flex-direction: column; gap: 12px; }
.bouton.danger { background: var(--rouille); box-shadow: inset 0 -3px 0 #5e2414, 0 0 0 2px #3a1208; }
.bouton.danger:hover { background: #ab4a2c; }
@media (max-width: 860px) { .dessus { flex-wrap: wrap; } .page .colonne.haut { position: static; } }
body.pile { flex-direction: column; justify-content: flex-start; gap: 0; }

/* Inscription : mêmes onglets que Profil.html, une place vide à droite pour centrer ceux-ci. */
.dessus-vide { width: 90px; }
@media (max-width: 860px) { .dessus-vide { display: none; } #v-skin > .apercu-mobile { margin: 0 -12px; padding: 8px 22px; } .vue .page .colonne.haut { position: static; } }
/* Mot de passe : l'œil montre ou cache ce qui est écrit. */
.mdp-champ { position: relative; display: flex; align-items: center; }
.mdp-champ input.encre { padding-right: 44px; }
.oeil { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; right: 0; bottom: 2px; width: 40px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--sepia); }
.oeil:hover { color: var(--rouille); background: rgba(122, 82, 40, 0.12); }
.oeil[aria-pressed=true] { color: var(--rouille); }
.oeil:focus-visible { outline: 3px solid var(--laiton); outline-offset: 2px; }

/* Tourner l'enquêteur (profil, inscription). */
.tourner { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.tourner button { all: unset; cursor: pointer; width: 30px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font: 500 15px 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--encre); background: rgba(122, 82, 40, 0.12); box-shadow: inset 0 0 0 2px rgba(122, 82, 40, 0.25); }
.tourner button:hover { background: rgba(122, 82, 40, 0.24); }
.tourner button:focus-visible { outline: 3px solid var(--laiton); outline-offset: 2px; }
.apercu-mobile img { aspect-ratio: auto !important; }

/* Revue de design : états désactivés lisibles, boutons de la vitrine en Inter */
.bouton[disabled] { opacity: 1; background: #D8C9A4; color: #4A3218; box-shadow: inset 0 -3px 0 #A58B57, 0 0 0 2px #8a7547; }
.vitrine .bouton[disabled] { opacity: 1; background: #d9c58f; color: #4a3218; border-color: #a58b57; box-shadow: 0 4px 0 #a58b57; }
.vitrine .bouton.or { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
h1, h2, h3 { word-spacing: 0.12em; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #25180F !important; outline-offset: 2px; }

.nuance { width: 34px; height: 34px; }
.puce { min-height: 36px; display: inline-flex; align-items: center; }
