:root {
  --fond: #14110F; --scene: #1E1A17; --carte: #26211D; --ligne: #3A332D;
  --texte: #F3ECE2; --doux: #CFC4B6; --discret: #B5A99A; --accent: #D9BF8C;
  --serif: 'Bodoni Moda', Georgia, serif; --sans: Manrope, system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--fond); color: var(--texte); font-family: var(--sans); overflow: hidden; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; }
#app { height: 100%; display: flex; flex-direction: column; }
.barre { display: flex; justify-content: space-between; align-items: center; padding: 20px 28px; min-height: 96px; }
.logo { background: none; border: 1px dashed #6B5E52; border-radius: 8px; min-width: 170px; height: 56px; padding: 0 16px; color: var(--discret); font-size: 13px; display: flex; align-items: center; justify-content: center; }
.logo.avec-image { border: 0; padding: 0; }
.logo img { max-height: 56px; max-width: 220px; }
.droite { display: flex; gap: 10px; align-items: center; }
.langues { display: flex; gap: 4px; }
.langues button, .pilule, .puce { min-width: 48px; height: 46px; padding: 0 16px; border-radius: 23px; border: 1px solid var(--ligne); background: transparent; color: var(--doux); font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.langues button.on, .puce.on { background: var(--texte); color: var(--fond); border-color: var(--texte); font-weight: 600; }
.puce.accent.on { background: var(--accent); border-color: var(--accent); }
#ecran { flex: 1; min-height: 0; position: relative; }
.ecran { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 0 28px 32px; animation: entree .35s ease; }
@keyframes entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.surtitre { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
h1 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.05; }
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; height: 76px; border-radius: 38px; border: 0; background: var(--accent); color: var(--fond); font-weight: 600; font-size: 20px; width: 100%; }
.secondaire { height: 56px; border-radius: 28px; border: 1px solid var(--ligne); background: transparent; color: var(--texte); font-size: 15px; font-weight: 500; flex: 1; }
.note { font-size: 13px; color: var(--discret); text-align: center; margin: 0; }

/* veille */
.scene { position: relative; flex: 1; min-height: 0; border-radius: 24px; background: var(--scene); overflow: hidden; }
.scene img.diapo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.scene img.diapo.on { opacity: 1; animation: lent 14s linear forwards; }
@keyframes lent { from { transform: scale(1); } to { transform: scale(1.08); } }
.etiquette { position: absolute; left: 20px; bottom: 20px; padding: 12px 16px; border-radius: 12px; background: rgba(20,17,15,.78); display: flex; flex-direction: column; gap: 4px; }
.etiquette small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--discret); }
.etiquette span { font-family: var(--serif); font-size: 22px; }
.bas-veille { padding: 32px 20px 0; display: flex; flex-direction: column; gap: 16px; }
.bas-veille h1 { font-size: clamp(44px, 7vw, 60px); }
.bas-veille p { margin: 0; font-size: 19px; line-height: 1.5; color: var(--doux); }

/* choix */
.tuiles { display: flex; flex-direction: column; gap: 18px; flex: 1; min-height: 0; margin-top: 24px; }
.tuile { flex: 1; display: flex; align-items: center; gap: 24px; padding: 16px 28px 16px 16px; border-radius: 24px; background: var(--scene); border: 0; text-align: left; min-height: 0; }
.tuile .vignette { height: 100%; aspect-ratio: 1.1; max-height: 260px; border-radius: 16px; background: var(--carte); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tuile .vignette img { width: 100%; height: 100%; object-fit: cover; }
.tuile b { font-family: var(--serif); font-weight: 400; font-size: 38px; display: block; }
.tuile small { font-size: 16px; color: var(--discret); }
.tuile[disabled] { opacity: .45; }

/* galerie */
.tete-galerie { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 18px; }
.tete-galerie .gauche { display: flex; align-items: center; gap: 14px; }
.rond { width: 46px; height: 46px; border-radius: 23px; border: 1px solid var(--ligne); background: transparent; display: flex; align-items: center; justify-content: center; }
.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; overflow-y: auto; padding-bottom: 12px; }
.carte { border: 0; background: var(--scene); border-radius: 16px; padding: 10px 10px 14px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.carte .vue { position: relative; aspect-ratio: 1; border-radius: 10px; background: var(--carte); overflow: hidden; }
.carte .vue img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s; }
.carte .vue img.on { opacity: 1; }
.badge { position: absolute; right: 8px; top: 8px; z-index: 2; font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: var(--fond); font-weight: 600; }
.carte b { font-family: var(--serif); font-weight: 400; font-size: 21px; }
.carte small { font-size: 13px; color: var(--discret); }

/* fiche */
.visionneuse { position: relative; height: 52%; margin: 0 -28px; background: var(--scene); }
.visionneuse canvas { display: block; touch-action: none; }
.visionneuse .rond { position: absolute; left: 24px; top: 16px; background: rgba(20,17,15,.8); z-index: 2; }
.astuce { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: var(--doux); font-size: 15px; pointer-events: none; }
.infos { display: flex; flex-direction: column; gap: 18px; padding-top: 26px; flex: 1; min-height: 0; }
.ligne-titre { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.infos h1 { font-size: 44px; }
.infos p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--doux); }
.prix { font-size: 20px; white-space: nowrap; }
.groupe-choix { display: flex; flex-direction: column; gap: 8px; }
.groupe-choix > span { font-size: 13px; color: var(--discret); }
.choix { display: flex; gap: 8px; flex-wrap: wrap; }
.pastille { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.actions { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.actions .rangee { display: flex; gap: 12px; }

/* essayage */
.camera { position: absolute; inset: 0; overflow: hidden; background: #2A2420; }
.surcouche { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: 20px 24px; }
.surcouche > * { pointer-events: auto; }
.haut-essai { display: flex; justify-content: space-between; align-items: center; }
.bloc { background: rgba(20,17,15,.8); border-radius: 26px; padding: 4px; display: flex; gap: 4px; }
.bloc .puce { border: 0; }
.message { align-self: center; padding: 10px 18px; border-radius: 22px; background: rgba(20,17,15,.8); font-size: 16px; }
.panneau-essai { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(20,17,15,.92) 22%); padding: 60px 24px 26px; display: flex; flex-direction: column; gap: 14px; }
.panneau-essai .ligne { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* sélection + toast */
#voile { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; z-index: 20; }
.feuille { width: 100%; background: var(--scene); border-radius: 24px 24px 0 0; padding: 28px; display: flex; flex-direction: column; gap: 16px; max-height: 70%; }
.feuille .liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; overflow-y: auto; }
.feuille .liste figure { margin: 0; background: var(--carte); border-radius: 12px; overflow: hidden; }
.feuille .liste img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.feuille figcaption { padding: 8px 10px; font-size: 14px; }
#toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--texte); color: var(--fond); padding: 14px 22px; border-radius: 28px; font-weight: 600; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 30; }
#toast.on { opacity: 1; }

[hidden] { display: none !important; }
.puce.seule.on { background: transparent; border: 2px solid var(--accent); }
