/* HorloBox — onglet L'Écrin. Palette et typographie : design/prompt-claude-design.md et maquette V1.4. */
@font-face { font-family: "Bodoni Moda"; font-weight: 400 600; font-display: swap; src: url(polices/bodoni-moda-latin.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400 600; font-display: swap; src: url(polices/inter-latin.woff2) format("woff2"); }

:root {
  --fond: #14171c; /* Noir encre (essai du 22/11, avant : #0b0b0c) */
  --carte: #1c2027;
  --carte-2: #252a32;
  --filet: rgba(255, 255, 255, 0.06);
  --texte: #f2ede4;
  --texte-2: #9a948c;
  --champagne: #ece5de; /* Nacre (essai du 22/11, avant : #c8a96a) */
  --accent: var(--champagne); /* nacre, sans couleur d'accent ; l'actif ressort par inversion et graisse (essais : or rose #c48b7a, laiton #bfa27a, bleu acier #7f9bb8, or ancien #b08d57, émeraude #2f8a68) : états actifs seulement (22/11) */
  --lueur: #ffd9a0;
  --alerte: #d9705f; /* 5,01:1 sur --carte, 5,50:1 sur --fond ; jamais sur --carte-2 (4,42:1) ni sur fond teinté */
  --serif: "Bodoni Moda", Didot, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent; }
button:disabled, button[aria-disabled="true"] { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Colonne de téléphone, centrée sur un écran large */
.app { max-width: 430px; margin: 0 auto; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* En-tête */
.entete { padding: 40px 24px 0; }
.titre { font: 500 30px/1.1 var(--serif); }
.jauge-ligne { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.jauge { position: relative; width: 30px; height: 12px; border-radius: 3px; background: rgba(242, 237, 228, 0.14); overflow: hidden; }
.jauge > span { position: absolute; inset: 0 auto 0 0; width: var(--niveau, 0%); background: var(--texte); opacity: 0.85; transition: width 600ms ease; }
.jauge-texte { font-weight: 500; font-variant-numeric: tabular-nums; }
.statut { margin-top: 4px; font-size: 13px; color: var(--texte-2); }
/* Titre-bouton (« Mes écrins ») et crayon (renommer) */
.titre-ligne { display: flex; align-items: center; gap: 2px; }
.titre-ligne .titre { min-width: 0; }
.titre-bouton { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.titre-bouton svg { flex: none; margin-top: 4px; color: var(--texte-2); }
.crayon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--texte-2); }

/* Image de l'écrin (rendu PNG en attendant la 3D) */
.heros { position: relative; height: 300px; margin: 8px 0 0; display: flex; align-items: center; justify-content: center; }
.heros img { width: 100%; height: 100%; object-fit: contain; }
/* Canvas 3D : glisser pour tourner autour de l'écrin (touch-action posé par OrbitControls ; la page défile hors de l'écrin) */
/* Le canvas déborde sous la rangée Lumière / Mode : zoomé, le bas de l'écrin passe dessous au lieu d'être coupé (le cadrage reste celui des 300 px, ecrin3d.mjs) */
.heros { --debord: 96px; }
.heros canvas { position: absolute; top: 0; left: 0; width: 100%; height: calc(100% + var(--debord)); display: block; cursor: grab; }
.heros canvas:active { cursor: grabbing; }

.zone { position: relative; z-index: 1; padding: 12px 16px 0; display: flex; flex-direction: column; gap: 12px; } /* au-dessus du débord du canvas 3D */

.bouton-principal {
  width: 100%; min-height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--champagne); color: var(--fond); font-weight: 600;
}

.carte { padding: 20px; border-radius: 20px; background: var(--carte); border: 1px solid var(--filet); }
.carte h2 { font: 500 19px/1.25 var(--serif); letter-spacing: 0.01em; }
.carte h2 .sous { font: 400 13px var(--sans); letter-spacing: 0; }
.carte .sous { font-weight: 400; color: var(--texte-2); }
.carte-titre-serif { font: 500 19px/1.25 var(--serif) !important; }
.note { margin-top: 6px; font-size: 13px; color: var(--texte-2); }
.carte-lumiere { box-shadow: inset 0 1px 0 rgba(255, 177, 110, 0.18); }
.carte-video { display: flex; align-items: center; gap: 12px; padding: 14px 10px 14px 16px; border-color: rgba(255, 177, 110, 0.4); }
.carte-video > div { flex: 1; min-width: 0; }

/* Actions rapides */
.actions { display: flex; justify-content: space-around; padding: 10px 12px 0; }
.action { width: 76px; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.action svg { color: var(--texte); transition: color 300ms ease; }
.action[aria-pressed="true"] svg { color: var(--accent); }
.action span { font-size: 11px; color: var(--texte-2); }

/* Segment Vitrine / Ouverture */
.segment { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 14px; background: var(--carte-2); }
.segment button { min-height: 44px; border-radius: 10px; text-align: center; font-size: 13px; font-weight: 500; color: var(--texte-2); transition: background 300ms ease, color 300ms ease; }
.segment button[aria-checked="true"] { background: var(--accent); color: var(--fond); font-weight: 600; }

/* Curseurs : remplissage champagne par --rempli (0 à 100 %) */
.curseur { margin-top: 16px; }
.curseur-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.curseur-tete label { font-size: 13px; color: var(--texte-2); }
.curseur-tete output { font-weight: 500; font-variant-numeric: tabular-nums; }
.curseur-bornes { display: flex; justify-content: space-between; font-size: 11px; color: var(--texte-2); }
input[type="range"] {
  --rempli: 50%;
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--rempli), rgba(242, 237, 228, 0.14) var(--rempli)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--rempli), rgba(242, 237, 228, 0.14) var(--rempli)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8.5px; border-radius: 50%; background: var(--texte); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.55); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--texte); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.55); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(236, 229, 222, 0.5); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(236, 229, 222, 0.5); }
input[type="range"]:disabled { cursor: default; opacity: 0.45; }

/* Interrupteur (role=switch) */
.ligne { display: flex; align-items: center; gap: 12px; min-height: 72px; }
.ligne > div { flex: 1; min-width: 0; }
.ligne .sous { margin-top: 2px; font-size: 13px; color: var(--texte-2); }
.interrupteur { flex: none; width: 58px; height: 44px; display: flex; align-items: center; justify-content: flex-end; }
.interrupteur > span { position: relative; display: block; width: 50px; height: 30px; border-radius: 15px; background: rgba(242, 237, 228, 0.18); transition: background 300ms ease; }
.interrupteur > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--texte); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); transition: left 300ms ease; }
.interrupteur[aria-checked="true"] > span { background: var(--accent); }
.interrupteur[aria-checked="true"] > span::after { left: 23px; }
.interrupteur:disabled { opacity: 0.45; }
.carte-rotors { padding: 4px 16px 4px 20px; }
.carte-rotors .ligne + .ligne { border-top: 1px solid var(--filet); min-height: 56px; }

/* Rubriques */
.rubriques { padding: 12px 8px 0; }
.rubrique { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 12px; border-radius: 14px; }
.rubrique > span { flex: 1; min-width: 0; }
.rubrique .sous { display: block; margin-top: 1px; font-size: 13px; color: var(--texte-2); }

/* Barre d'onglets */
.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 430px; margin: 0 auto; height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(20, 23, 28, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--filet);
}
.onglet { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--texte-2); font-size: 11px; font-weight: 500; }
.onglet[aria-current="page"] { color: var(--texte); font-weight: 600; }
.onglet[aria-current="page"]::before { content: ""; position: absolute; left: 50%; top: -1px; width: 16px; height: 2px; margin-left: -8px; background: var(--accent); }
.onglet > span { text-align: center; line-height: 1.2; }
.onglet small { display: block; font-size: 10px; font-weight: 400; }

/* Vue Réglages */
a { color: inherit; text-decoration: none; }
.titre:focus { outline: none; }
.entete-retour { display: flex; align-items: center; gap: 4px; padding-left: 8px; }
.retour { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.finitions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.finition { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 84px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--filet); font-size: 13px; font-weight: 500; color: var(--texte-2); transition: border-color 300ms ease, color 300ms ease; }
.finition[aria-checked="true"] { border-color: var(--accent); color: var(--texte); }
.pastille { display: block; width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.pastille-noir { background: #1c1c1c; }
.pastille-marron { background: #4d2d24; }
.pastille-croco { background: repeating-linear-gradient(45deg, #070707 0 3px, #1b1b1b 3px 4px), #0d0d0d; }
.carte-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.carte-lumiere .carte-tete { align-items: center; }
.info { position: relative; flex: none; width: 44px; height: 44px; margin: -10px -12px -10px 0; display: grid; place-items: center; background: none; border: 0; color: var(--texte-2); cursor: pointer; }
.info[aria-expanded="true"] { color: var(--texte); }
.infos { margin: 8px 0 0; }
.infos > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--filet); font-size: 14px; }
.infos dt { color: var(--texte-2); }
.infos dd { margin: 0; font-variant-numeric: tabular-nums; }
.aide { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--carte-2); }
.etiquette { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--champagne); }
.case { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 10px; font-size: 14px; cursor: pointer; }
.case input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.bouton-large { width: 100%; margin-top: 10px; }
.bouton-secondaire:disabled { opacity: 0.45; }

/* Alerte (oublier, erreurs) : texte et bordure, jamais de fond teinté (C5) */
.alerte, .bouton-alerte { color: var(--alerte); }
.bouton-alerte { border-color: var(--alerte); }
.bouton-plein { background: var(--champagne); border-color: var(--champagne); color: var(--fond); font-weight: 600; }

/* Dialogues (Mes écrins, nom, oubli) */
dialog { width: min(398px, calc(100% - 32px)); padding: 20px; border: 1px solid var(--filet); border-radius: 20px; background: var(--carte); color: var(--texte); }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog h2 { font: 500 19px/1.25 var(--serif); }
/* Feuille « Mes écrins » (canevas l. 826-835) : collée en bas, montée 350 ms, voile en fondu 300 ms */
.feuille { width: 100%; max-width: 430px; max-height: 85dvh; margin: auto auto 0; padding: 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); border-radius: 22px 22px 0 0; }
.feuille-panneau { padding: 10px 16px calc(40px + env(safe-area-inset-bottom)); }
.feuille[open] { animation: monte 350ms ease-out both; }
.feuille[open]::backdrop { animation: fondu 300ms ease both; }
@keyframes monte { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .feuille[open], .feuille[open]::backdrop { animation: none; } }
.poignee { display: block; width: 36px; height: 4px; margin: 0 auto 16px; border-radius: 2px; background: rgba(242, 237, 228, 0.2); }
.feuille .feuille-titre { padding: 0 8px 8px; font: 500 11px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-2); }
.ligne-ecrin { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 14px; }
.ligne-ecrin svg { flex: none; }
.ligne-texte { flex: 1; min-width: 0; }
.ligne-nom { display: block; font: 500 18px var(--serif); overflow-wrap: anywhere; }
.ligne-ajout { display: block; font-size: 15px; font-weight: 500; }
.ligne-sous { display: block; margin-top: 1px; font-size: 13px; color: var(--texte-2); }
.coche { color: var(--accent); visibility: hidden; }
.ligne-ecrin[aria-current="true"] .coche { visibility: visible; }
.champ { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--texte-2); }
.champ input { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(242, 237, 228, 0.22); background: var(--carte-2); color: var(--texte); font: 400 16px var(--sans); }
.dialogue-boutons { display: flex; gap: 8px; margin-top: 16px; }
.dialogue-boutons > * { flex: 1; }

/* Démonstration (?demo) */
.demo-boite { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--texte-2); }
.demo-boite select { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(242, 237, 228, 0.22); background: var(--carte-2); color: var(--texte); font: 500 16px var(--sans); } /* 16 px : pas de zoom automatique au focus sur iPhone */
.demo-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.bouton-secondaire { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(242, 237, 228, 0.22); font-size: 13px; font-weight: 500; text-align: center; }
.trame { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--carte-2); font: 12px/1.45 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; color: var(--texte-2); }

/* États particuliers */
.visuellement-cache { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.visuellement-cache:focus-visible { position: static; width: 100%; height: 44px; margin: 8px 0 0; overflow: visible; clip-path: none; white-space: normal; }
.centre { text-align: center; }
.aide-texte { margin-top: 10px; font-size: 14px; }
.bouton-principal:disabled { opacity: 0.6; }

/* Commandes grisées (déconnecté, vidéo) */
.inactif { opacity: 0.38; transition: opacity 300ms ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* Ma Collection (maquette du 23/11, couleurs de l'appli). Flou : contenu factice seulement (collection.mjs). */
.valeur { position: relative; display: block; width: 100%; overflow: hidden; text-align: left; }
.valeur-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 400 13px var(--sans) !important; color: var(--texte-2); }
.pastille-premium { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; border: 1px solid rgba(236, 229, 222, 0.6); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--champagne); }
.valeur-total { display: block; margin-top: 6px; font: 500 44px/1.05 var(--serif); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.courbe { display: block; width: 100%; height: 74px; margin-top: 16px; overflow: visible; }
.courbe path { fill: none; stroke: var(--champagne); stroke-width: 2; vector-effect: non-scaling-stroke; }
.flou { display: block; filter: blur(10px); opacity: 0.85; user-select: none; pointer-events: none; }
.verrou { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px; text-align: center; }
.verrou > span { display: inline-block; padding: 10px 16px; border-radius: 22px; background: rgba(20, 23, 28, 0.85); border: 1px solid rgba(236, 229, 222, 0.5); font-size: 14px; font-weight: 500; line-height: 1.35; }
.insecable { white-space: nowrap; }
.cadenas { display: inline-block; margin-left: 6px; vertical-align: -2px; stroke: var(--champagne); }

/* Catégories repliables (un écrin, ou « Hors écrin ») */
.categorie { margin-top: 8px; }
.categorie h2 { font: inherit; }
.categorie-bouton { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.categorie-nom { flex: 1; min-width: 0; font: 500 20px/1.2 var(--serif); overflow-wrap: anywhere; }
.categorie-sous { font: 400 13px var(--sans); color: var(--texte-2); white-space: nowrap; }
.categorie-compte { flex: none; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.chevron { flex: none; color: var(--texte-2); transition: transform 250ms ease; }
.categorie-bouton[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.categorie-panneau { padding: 0 0 10px; }
.pastille-petite { flex: none; width: 24px; height: 24px; }
.pastille-hors { display: grid; place-items: center; border: 1px solid rgba(242, 237, 228, 0.3); box-shadow: none; }
.pastille-hors svg { width: 14px; height: 14px; }
.zone-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding: 18px 8px 10px; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-2); }
.zone-sous { font-weight: 400; letter-spacing: 0.02em; text-transform: none; }
.emplacements { display: flex; flex-direction: column; gap: 8px; }
.emplacement { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px 8px 10px; border-radius: 16px; background: var(--carte); border: 1px solid var(--filet); }
.badge { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(242, 237, 228, 0.3); color: var(--texte-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.badge-plein { background: var(--champagne); border-color: var(--champagne); color: var(--fond); }
.vignette { flex: none; display: grid; place-items: center; width: 44px; height: 52px; border-radius: 10px; background: var(--carte-2); color: var(--texte-2); overflow: hidden; }
.vignette img, .tuile-image img { width: 100%; height: 100%; object-fit: cover; }
.emplacement-texte { flex: 1; min-width: 0; }
.emplacement-titre { display: block; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.emplacement-titre.libre { color: var(--texte-2); }
.emplacement-sous { display: block; margin-top: 2px; font-size: 12.5px; color: var(--texte-2); }
.chevron-droit { flex: none; color: var(--texte-2); }

/* « Hors écrin » : grille de 2 colonnes, la tuile « + » en premier */
.quota { margin: 12px 8px 0; }
.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 12px; }
.grille > li { display: flex; }
.tuile { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 200px; border-radius: 18px; background: var(--carte); border: 1px solid var(--filet); overflow: hidden; text-align: left; }
.tuile-image { display: grid; place-items: center; height: 132px; background: radial-gradient(80% 70% at 50% 45%, var(--carte-2) 0%, var(--carte) 75%); color: var(--texte-2); }
.tuile-image svg { width: 44px; height: 44px; }
.tuile-texte { display: block; padding: 10px 12px 12px; }
.tuile-modele { display: block; margin-top: 3px; font-size: 14px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.surtitre { display: block; margin: 0; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--texte-2); overflow-wrap: anywhere; }
.tuile-plus, .tuile-verrou .flou { align-items: center; justify-content: center; gap: 14px; text-align: center; font-size: 14px; font-weight: 500; }
.tuile-plus { padding: 12px; background: rgba(28, 32, 39, 0.6); border: 1.5px dashed rgba(242, 237, 228, 0.32); }
.tuile-verrou { border-color: rgba(236, 229, 222, 0.45); }
.tuile-verrou .flou { position: absolute; inset: 0; display: flex; flex-direction: column; filter: blur(7px); opacity: 0.7; }
.rond-plus { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(236, 229, 222, 0.6); color: var(--champagne); }
.invite { align-items: center; padding: 0 6px; }

/* Feuilles de la collection (emplacement, fiche, Premium, saisie) */
.grand-titre { font: 500 22px/1.2 var(--serif) !important; overflow-wrap: anywhere; }
.grand-titre:focus { outline: none; }
.feuille-montre { display: flex; align-items: center; gap: 14px; padding: 0 8px 16px; }
.feuille-montre > div { min-width: 0; }
.liste-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ligne-action { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border-radius: 14px; background: var(--carte-2); font-size: 15px; font-weight: 500; }
.ligne-montre { min-height: 64px; padding-left: 10px; }
.ligne-montre .vignette { background: var(--carte); }
.placer { flex: none; font-size: 13px; font-weight: 600; color: var(--champagne); }
#emplacement-choisir .surtitre { padding: 18px 8px 2px; }
#emplacement-choisir > .grand-titre, #emplacement-choisir > .note { padding: 0 8px; }
.feuille .bouton-large { min-height: 52px; margin-top: 16px; font-size: 15px; }
.feuille .dialogue-boutons .bouton-large { margin-top: 0; }
.feuille .dialogue-boutons form { display: flex; }
.feuille .dialogue-boutons form button { flex: 1; }
.fiche-photo { display: block; width: 100%; max-height: 240px; margin-bottom: 14px; border-radius: 16px; object-fit: cover; }
.valeur-ligne { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; font-weight: 500; text-align: right; }
.valeur-ligne .flou { display: inline-block; filter: blur(6px); }
#fiche-valeur-verrou { flex-direction: column; align-items: flex-end; gap: 0; margin: -6px 0; }
.infos dt { white-space: nowrap; }
#m-valeur-verrou { width: 100%; justify-content: flex-start; margin-top: 12px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(242, 237, 228, 0.22); color: var(--texte-2); text-align: left; }
.champ input[type="file"] { padding: 10px 12px; min-height: 44px; font-size: 14px; }
.liste-premium { margin-top: 12px; padding-left: 20px; list-style: disc; display: grid; gap: 8px; font-size: 15px; }

/* Nouvelle version disponible (hors-ligne.mjs) : discret, juste au-dessus de la barre d’onglets (72 px), sans cacher le nom de l’écrin */
.maj { position: fixed; z-index: 20; bottom: calc(72px + env(safe-area-inset-bottom) + 12px); left: 50%; transform: translateX(-50%); width: min(100% - 32px, 420px); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 14px; border: 1px solid rgba(242, 237, 228, 0.4); background: var(--carte); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); font-size: 14px; animation: fondu 200ms ease-out; }
.maj .bouton-secondaire { flex: none; }
body:has(#maj:not([hidden])) .app { padding-bottom: calc(170px + env(safe-area-inset-bottom)); } /* le bas de chaque vue reste visible sous le bandeau */
@media (prefers-reduced-motion: reduce) { .maj { animation: none; } }

/* Remontoirs et réglages (#rotors, maquette « Rotors » du 30/11, couleurs de l'appli) et entrée depuis l'Écrin / les Réglages */
.lien-rotors { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.lien-rotors:not(:first-child) { border-top: 1px solid var(--filet); }
.lien-rotors > span { flex: 1; min-width: 0; }
.lien-rotors .sous { display: block; margin-top: 2px; font-size: 13px; }
.entete-retour .titre { flex: 1; min-width: 0; }
#info-rotors { margin: 0; }
.intro-rotors { display: flex; align-items: center; gap: 8px; margin: 0 8px; }
.cartes-rotors { display: flex; flex-direction: column; gap: 12px; }
.carte-rotor { padding: 4px 20px 20px; }
.rotor-sous-titre { margin: 14px 0 0; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texte-2); }
.rotor-sous-titre + .segment { margin-top: 8px; }
.segment-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Sans Premium : 800 et 950 lisibles mais estompés, touchables (feuille Premium) ; l'étiquette, sous les boutons, ne capte pas le toucher */
.verrouille .seg-texte { filter: blur(0.8px); }
.rotor-tpd > :nth-child(1) { grid-area: 1 / 1; }
.rotor-tpd > :nth-child(2) { grid-area: 1 / 2; }
.rotor-tpd > :nth-child(3) { grid-area: 1 / 3; } /* placés à la main : l'étiquette ci-dessous occupe aussi la 1re rangée */
.verrou-tpd { grid-column: 2 / 4; grid-row: 2; padding: 6px 0 2px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.verrou-tpd > span { margin: 0 2px; padding: 2px 8px; white-space: nowrap; border-radius: 14px; background: rgba(20, 23, 28, 0.85); border: 1px solid rgba(236, 229, 222, 0.5); color: var(--texte); font-size: 11px; font-weight: 500; line-height: 1.3; text-align: center; }
.verrou-tpd .cadenas { margin-left: 4px; }
.rotor-herite { margin-top: 10px; }
.rotor-montres { margin-top: 8px; }
.ligne-libre { background: none; border: 1px dashed rgba(242, 237, 228, 0.22); cursor: default; }

/* Fiche montre : remontage conseillé et « Appliquer au rotor » */
.conseil { margin-top: 20px; }
.conseil-boutons { display: grid; gap: 8px; margin-top: 14px; }
.bouton-appliquer { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 6px 14px; border-radius: 12px; border: 1px solid var(--champagne); background: var(--champagne); color: var(--fond); font-weight: 600; text-align: center; }
.bouton-appliquer.secondaire, .bouton-appliquer.fait, .bouton-appliquer.verrouille { background: none; color: var(--texte); border-color: rgba(242, 237, 228, 0.32); font-weight: 500; }
.bouton-appliquer:disabled { opacity: 0.45; }
/* Carte d'un rotor : recommandation de chaque place (nom coupé par « … » + réglage), une action, pas un choix */
.rotor-recos { margin-top: 8px; }
.rotor-recos .rotor-reco { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 6px 8px; min-width: 0; }
.reco-nom { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--texte); }
.reco-reglage { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--texte-2); }
.rotor-recos .rotor-reco.fait { background: var(--accent); color: var(--fond); }
.rotor-reco.fait .reco-nom, .rotor-reco.fait .reco-reglage { color: inherit; }
.rotor-recos .rotor-reco:disabled { opacity: 0.45; }
