/* Catalogue d'horloges numériques — partagé entre le player et l'admin.
   Chaque horloge = .hw.hw-<style> ; les chiffres vivent dans .j-hh/.j-mm/.j-ss.
   Tailles en em → l'horloge hérite du font-size de sa zone/bloc.
   Couleurs : variables du thème (--accent, --texte, --primaire) avec replis. */

.hw {
  display: inline-flex; /* largeur = contenu → mesurable pour l'auto-ajustement */
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  white-space: nowrap; /* jamais de retour à la ligne dans une horloge… */
}
.hw-lettres .hwt-h, .hw-lettres .hwt-m { white-space: normal; } /* …sauf l'heure en toutes lettres */
.hw .hws-ligne, .hw .hwx-ligne, .hw .hwo-ligne { display: flex; align-items: center; }
.hw .hws-groupe-s, .hw .hwx-groupe-s, .hw .hwo-groupe-s { display: inline-flex; align-items: center; }
.hw .hw-unite { display: inline-flex; flex-direction: column; align-items: center; }
.hw .hw-lab { display: none; font-size: .22em; letter-spacing: .25em; opacity: .6; margin-top: .5em; }
.hw .hw-sep { padding: 0 .12em; }
.hw .hw-s { font-size: .55em; align-self: flex-end; margin-bottom: .08em; }
.hw.hw-sans-sec .hw-s, .hw.hw-sans-sec .hw-sep-s { display: none !important; }

/* période AM/PM (format 12 h, disponible sur tous les styles) */
.hw .hw-ampm { font-size: .32em; margin-left: .5em; font-weight: 700; letter-spacing: .1em;
               color: #c9a227; color: var(--accent, #c9a227); align-self: flex-start; margin-top: .3em; }

/* clignotement doux des deux-points */
@keyframes hw-clignote { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .25; } }

/* 1 — classique : gros chiffres gras */
.hw-classique { font-size: 1em; font-weight: 700; letter-spacing: .04em; }

/* 2 — minimal : très fin, aéré */
.hw-minimal { font-weight: 200; letter-spacing: .14em; }
.hw-minimal .hw-sep { opacity: .35; font-weight: 100; }

/* 3 — néon : lueur cyan */
.hw-neon { font-weight: 700; color: #7df9ff; letter-spacing: .06em;
  text-shadow: 0 0 .06em #7df9ff, 0 0 .25em #00c8d7, 0 0 .6em #0093a3; }
.hw-neon .hw-sep { animation: hw-clignote 2s infinite; }

/* 4 — rétro : terminal ambre sur panneau sombre */
.hw-retro { font-family: Consolas, "Courier New", monospace; font-weight: 700; color: #ffb000;
  background: #14100a; border: .06em solid #3a2c12; border-radius: .18em; padding: .22em .4em;
  text-shadow: 0 0 .18em rgba(255, 176, 0, .55); }
.hw-retro .hw-sep { animation: hw-clignote 1s infinite; }

/* 5 — LED : afficheur rouge, fantôme « 88:88 » derrière */
.hw-led { position: relative; font-family: Consolas, "Courier New", monospace; font-weight: 700;
  color: #ff3b30; background: #0a0a0a; border-radius: .14em; padding: .22em .4em;
  text-shadow: 0 0 .12em rgba(255, 59, 48, .8); }
.hw-led .hw-fantome { position: absolute; top: .22em; left: .4em; right: .4em; color: #ff3b30;
  opacity: .09; text-shadow: none; pointer-events: none; }
.hw-led .hw-sep { animation: hw-clignote 1s infinite; }

/* 6 — flip : cartes à volets */
.hw-flip .hw-unite { position: relative; background: #1c1c1e; color: #f5f5f7;
  border-radius: .14em; padding: .18em .16em .2em; margin: 0 .05em;
  box-shadow: 0 .08em .2em rgba(0, 0, 0, .55); overflow: hidden; }
.hw-flip .hw-unite:after { content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: .035em; background: rgba(0, 0, 0, .75); }
.hw-flip .hw-sep { color: inherit; opacity: .5; }
.hw-flip .hw-s { align-self: center; margin-bottom: 0; }

/* 7 — blocs : chaque unité dans sa carte avec libellé */
.hw-blocs .hw-unite { background: rgba(255, 255, 255, .05); border: .05em solid #c9a227;
  border-color: var(--accent, #c9a227); border-radius: .16em; padding: .2em .18em; margin: 0 .06em; }
.hw-blocs .hw-lab { display: block; }
.hw-blocs .hw-sep { display: none; }
.hw-blocs .hw-s { font-size: 1em; align-self: center; margin-bottom: 0; }
.hw-blocs { font-weight: 700; }

/* 8 — verre : carte translucide (glassmorphism, repli simple) */
.hw-verre { font-weight: 600; letter-spacing: .05em;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
  border-radius: .25em; padding: .25em .5em;
  box-shadow: 0 .1em .5em rgba(0, 0, 0, .3); }
@supports (backdrop-filter: blur(4px)) {
  .hw-verre { backdrop-filter: blur(6px); background: rgba(255, 255, 255, .07); }
}

/* 9 — dégradé : chiffres en dégradé or (repli : couleur accent) */
.hw-degrade { font-weight: 800; color: #c9a227; color: var(--accent, #c9a227); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hw-degrade .hw-texte { background: linear-gradient(180deg, #f6e39a 0%, #c9a227 55%, #8a6b12 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
}

/* 10 — contour : chiffres évidés */
.hw-contour { font-weight: 800; letter-spacing: .05em; color: transparent;
  -webkit-text-stroke: .028em #f4efe3; -webkit-text-stroke-color: var(--texte, #f4efe3); }
@supports not (-webkit-text-stroke: 1px #fff) {
  .hw-contour { color: #f4efe3; color: var(--texte, #f4efe3); }
}

/* 11 — ombre : relief à ombre portée longue */
.hw-ombre { font-weight: 800; color: #f4efe3; color: var(--texte, #f4efe3);
  text-shadow: .02em .02em 0 #c9a227, .05em .05em 0 rgba(201, 162, 39, .55),
               .09em .09em 0 rgba(201, 162, 39, .3), .14em .14em .1em rgba(0, 0, 0, .45); }

/* 13 — moderne : carte type « digital clock » (Poppins si disponible),
        heure + période + date intégrée */
.hw-moderne { flex-direction: column;
  font-family: Poppins, "Segoe UI", "Noto Sans", Arial, sans-serif; font-weight: 600;
  color: #ffffff; background: linear-gradient(145deg, #2b2b30, #191921);
  border-radius: .22em; padding: .3em .55em .3em;
  box-shadow: 0 .12em .5em rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07); }
.hw-moderne .hw-ligne { display: flex; align-items: center; }
.hw-moderne .hw-s { color: #c9a227; color: var(--accent, #c9a227); }
.hw-moderne .hw-sep { opacity: .55; }
.hw-moderne .hw-date { font-size: .17em; font-weight: 400; letter-spacing: .18em;
  opacity: .8; margin-top: .9em; text-transform: uppercase; }

/* 12 — capsule : pilule aux couleurs du thème */
.hw-capsule { font-weight: 700; background: #0f5132; background: var(--primaire, #0f5132);
  border: .05em solid #c9a227; border-color: var(--accent, #c9a227);
  border-radius: 2em; padding: .22em .6em; }
.hw-capsule .hw-s { color: #c9a227; color: var(--accent, #c9a227); }

/* 14 — anneaux : « minimal dot clock » — points sur un cercle,
        heures / minutes / secondes en couleurs, heure discrète au centre */
.hw-anneaux .hwa-cadran { position: relative; width: 6em; height: 6em; }
.hw-anneaux .hwa-dot { position: absolute; top: 50%; left: 50%; margin: -.045em;
  width: .09em; height: .09em; border-radius: .1em; background: #ffffff; opacity: .18; }
.hw-anneaux .hwa-h .hwa-dot { width: .13em; height: .5em; margin: -.25em -.065em; opacity: .28; }
.hw-anneaux .hwa-m .hwa-dot { width: .09em; height: .24em; margin: -.12em -.045em; }
.hw-anneaux .hwa-s .hwa-dot { opacity: 0; }
.hw-anneaux .hwa-h .hwa-dot.actif { background: #0069a8; opacity: 1; }
.hw-anneaux .hwa-m .hwa-dot.actif { background: #00bcff; opacity: 1; }
.hw-anneaux .hwa-s .hwa-dot.actif { background: #fb2c36; opacity: 1; }
.hw-anneaux .hwa-time { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
  font-family: Consolas, "Courier New", monospace; font-size: .55em; opacity: .55; }
.hw-anneaux .hwa-time .hw-sep { padding: 0 .04em; }

/* 15 — cube 3D : secondes dessus, minutes devant, heures à gauche */
.hw-cube3d { perspective: 20em; padding: 1em .8em .5em; }
.hw-cube3d .hwc-scene { position: relative; width: 2.6em; height: 2.6em;
  transform-style: preserve-3d; transform: rotateX(-32deg) rotateY(45deg); }
.hw-cube3d .hwc-face { position: absolute; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: Consolas, "Courier New", monospace; font-weight: 700; font-size: 1.5em;
  color: #2982ff; text-shadow: 0 0 .25em rgba(41, 130, 255, .8); background: #111; }
.hw-cube3d .hwc-front { transform: translateZ(1.3em); background: #131313; }
.hw-cube3d .hwc-left { transform: rotateY(-90deg) translateZ(1.3em); background: #0c0c0c; }
.hw-cube3d .hwc-top { transform: rotateX(90deg) translateZ(1.3em); background: #181818; }

/* 16 — analogique : cadran épuré blanc, cerclage turquoise */
.hw-analogique .hwl-cadran { position: relative; width: 5em; height: 5em;
  background: #ffffff; border: .32em solid #67d2c8; border-radius: 50%;
  box-shadow: .12em .12em .4em rgba(0, 0, 0, .25); }
.hw-analogique .hwl-rep { position: absolute; background: #262626; }
.hw-analogique .hwl-rn { width: .07em; height: .22em; top: .1em; left: 50%; margin-left: -.035em; }
.hw-analogique .hwl-rs { width: .07em; height: .22em; bottom: .1em; left: 50%; margin-left: -.035em; }
.hw-analogique .hwl-re { width: .22em; height: .07em; right: .1em; top: 50%; margin-top: -.035em; }
.hw-analogique .hwl-ro { width: .22em; height: .07em; left: .1em; top: 50%; margin-top: -.035em; }
.hw-analogique .hwl-aig { position: absolute; left: 50%; bottom: 50%;
  transform-origin: 50% 100%; transform: translateX(-50%); border-radius: .1em; }
.hw-analogique .hwl-h { width: .16em; height: 27%; background: #262626; }
.hw-analogique .hwl-m { width: .11em; height: 37%; background: #262626; }
.hw-analogique .hwl-s { width: .06em; height: 42%; background: #e74c3c; }
.hw-analogique .hwl-centre { position: absolute; left: 50%; top: 50%; width: .3em; height: .3em;
  margin: -.15em; background: #262626; border-radius: 50%; }

/* 17 — panneau : colonnes jour / heures / minutes / secondes avec libellés */
.hw-panneau { background: #080808; border-radius: .12em; padding: .55em .35em;
  box-shadow: 0 .1em .6em rgba(0, 0, 0, .35); color: #ffffff; }
.hw-panneau .hwp-col { position: relative; display: inline-flex; flex-direction: column;
  align-items: center; margin: 0 .42em; min-width: 1.5em; }
.hw-panneau .hwp-val { font-weight: 600; font-size: 1em; line-height: 1.1;
  font-variant-numeric: tabular-nums; text-transform: uppercase; }
.hw-panneau .hwp-lab { font-size: .2em; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255, 255, 255, .35); margin-top: .9em; }
.hw-panneau .hwp-col:not(:last-of-type):before,
.hw-panneau .hwp-col:not(:last-of-type):after { content: ""; position: absolute;
  right: -.46em; width: .07em; height: .07em; border-radius: 50%;
  background: rgba(255, 255, 255, .3); }
.hw-panneau .hwp-col:not(:last-of-type):before { top: 32%; }
.hw-panneau .hwp-col:not(:last-of-type):after { top: 48%; }
.hw-panneau.hw-sans-sec .hwp-secondes { display: none !important; }
.hw-panneau.hw-sans-sec .hwp-col:nth-last-of-type(2):before,
.hw-panneau.hw-sans-sec .hwp-col:nth-last-of-type(2):after { display: none; }

/* 18 — tarte : camembert canvas (parts concentriques s/min/h) */
.hw-tarte canvas { width: 5.4em; height: 5.4em; border-radius: .25em;
  box-shadow: 0 .1em .5em rgba(0, 0, 0, .4); }

/* 19 — arcs : anneaux de progression (minutes ext., heures int.) */
.hw-arcs .hwr-boite { position: relative; width: 6em; height: 6em; }
.hw-arcs svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.hw-arcs .hwr-tr { fill: none; stroke: rgba(255, 255, 255, .09); stroke-width: 1.4; }
.hw-arcs .hwr-arc { fill: none; stroke-width: 2.6; stroke-linecap: round; }
.hw-arcs .hwr-arc-m { stroke: #c9a227; stroke: var(--accent, #c9a227); }
.hw-arcs .hwr-arc-h { stroke: #f4efe3; stroke: var(--texte, #f4efe3); }
.hw-arcs .hwr-pt-m { fill: #c9a227; fill: var(--accent, #c9a227); }
.hw-arcs .hwr-pt-h { fill: #f4efe3; fill: var(--texte, #f4efe3); }
.hw-arcs .hwr-centre { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; font-size: .58em; font-weight: 600; }

/* 21 — segments : afficheur 7 segments néon */
.hw-segments { background: #060a0a; border-radius: .15em; padding: .3em .35em; }
.hw-segments .hws-dig { position: relative; display: inline-block; width: .62em; height: 1.05em; margin: 0 .06em; }
.hw-segments .hws-s { position: absolute; background: #16f7ec; opacity: .05; border-radius: .05em; }
.hw-segments .hws-a, .hw-segments .hws-g, .hw-segments .hws-d { left: .1em; right: .1em; height: .09em; }
.hw-segments .hws-a { top: 0; }
.hw-segments .hws-g { top: 50%; margin-top: -.045em; }
.hw-segments .hws-d { bottom: 0; }
.hw-segments .hws-f, .hw-segments .hws-b, .hw-segments .hws-e, .hw-segments .hws-c {
  width: .09em; height: 42%; }
.hw-segments .hws-f { left: 0; top: .06em; }
.hw-segments .hws-b { right: 0; top: .06em; }
.hw-segments .hws-e { left: 0; bottom: .06em; }
.hw-segments .hws-c { right: 0; bottom: .06em; }
.hw-segments .hws-s.on { opacity: 1; box-shadow: 0 0 .12em #16f7ec, 0 0 .3em rgba(22, 247, 236, .5); }
.hw-segments .hws-colon { display: inline-flex; flex-direction: column; justify-content: space-around;
  height: 1.05em; margin: 0 .08em; vertical-align: top; }
.hw-segments .hws-colon span { width: .1em; height: .1em; border-radius: 50%; background: #16f7ec;
  box-shadow: 0 0 .12em #16f7ec; animation: hw-clignote 1s infinite; }
.hw-segments.hw-sans-sec .hws-groupe-s { display: none; }

/* 22 — neumorph : analogique soft-UI, aiguilles souples */
.hw-neumorph .hwn-cadran { position: relative; width: 5em; height: 5em; border-radius: 50%;
  background: #e0e5ec;
  box-shadow: .3em .3em .7em #b8bec9, -.3em -.3em .7em #ffffff,
              inset .04em .04em .1em rgba(255, 255, 255, .8); }
.hw-neumorph .hwn-rep { position: absolute; background: #a3aab6; border-radius: .05em; }
.hw-neumorph .hwn-rn { width: .07em; height: .25em; top: .25em; left: 50%; margin-left: -.035em; }
.hw-neumorph .hwn-rs { width: .07em; height: .25em; bottom: .25em; left: 50%; margin-left: -.035em; }
.hw-neumorph .hwn-re { width: .25em; height: .07em; right: .25em; top: 50%; margin-top: -.035em; }
.hw-neumorph .hwn-ro { width: .25em; height: .07em; left: .25em; top: 50%; margin-top: -.035em; }
.hw-neumorph .hwn-aig { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%;
  transform: translateX(-50%); border-radius: .12em;
  transition: transform .3s cubic-bezier(.4, 2.3, .6, .6); }
.hw-neumorph .hwn-h { width: .17em; height: 24%; background: #44476a; }
.hw-neumorph .hwn-m { width: .12em; height: 34%; background: #44476a; }
.hw-neumorph .hwn-s { width: .06em; height: 40%; background: #ff6b6b; }
.hw-neumorph .hwn-centre { position: absolute; left: 50%; top: 50%; width: .34em; height: .34em;
  margin: -.17em; background: #44476a; border-radius: 50%;
  box-shadow: .05em .05em .12em #b8bec9; }

/* 23 — pixel : chiffres en matrice de points 3×5 */
.hw-pixel { background: rgba(0, 0, 0, .35); border-radius: .12em; padding: .28em .3em; }
.hw-pixel .hwx-d { display: inline-block; width: .56em; margin: 0 .07em; font-size: 1em; line-height: 0; }
.hw-pixel .hwx-c { display: inline-block; width: .155em; height: .155em; margin: .0125em;
  border-radius: .035em; background: #c9a227; background: var(--accent, #c9a227); opacity: .07; }
.hw-pixel .hwx-c.on { opacity: 1; }
.hw-pixel .hwx-colon { display: inline-flex; flex-direction: column; justify-content: space-around;
  height: .9em; margin: 0 .06em; vertical-align: top; }
.hw-pixel .hwx-colon span { width: .14em; height: .14em; border-radius: .03em;
  background: #c9a227; background: var(--accent, #c9a227); animation: hw-clignote 1s infinite; }
.hw-pixel.hw-sans-sec .hwx-groupe-s { display: none; }

/* 24 — rouleaux : odomètre, les chiffres glissent */
.hw-rouleaux { font-weight: 700; background: rgba(255, 255, 255, .05); border-radius: .14em;
  padding: .18em .3em; font-variant-numeric: tabular-nums; }
.hw-rouleaux .hwo-col { display: inline-block; height: 1.1em; overflow: hidden; vertical-align: top; }
.hw-rouleaux .hwo-strip { display: block; transition: transform .45s cubic-bezier(.25, .9, .3, 1.1); }
.hw-rouleaux .hwo-strip i { display: block; width: .64em; height: 1.1em; line-height: 1.1;
  font-style: normal; text-align: center; }
.hw-rouleaux .hwo-sep { display: inline-block; vertical-align: top; line-height: 1.05; opacity: .5; }
.hw-rouleaux.hw-sans-sec .hwo-groupe-s { display: none; }

/* 25 — lettres : heure en toutes lettres */
.hw-lettres .hwt { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.25; }
.hw-lettres .hwt-pre { font-size: .3em; letter-spacing: .45em; text-transform: uppercase;
  color: #c9a227; color: var(--accent, #c9a227); margin-bottom: .6em; }
.hw-lettres .hwt-h { font-size: .9em; font-weight: 700; }
.hw-lettres .hwt-m { font-size: .55em; font-weight: 300; opacity: .85; margin-top: .3em; }

/* 20 — flat : analogique plat, aiguilles arrondies à rebond élastique */
.hw-flat .hwf-svg { width: 5.6em; height: 5.6em; }
.hw-flat .hwf-face { fill: #f4f3ed; }
.hw-flat .hwf-rim { fill: none; stroke: #383838; stroke-width: 6; }
.hw-flat .hwf-axe { fill: #383838; }
.hw-flat .hwf-aig { transform-origin: 50% 50%;
  transition: transform .32s cubic-bezier(.4, 2.2, .6, .6); }
.hw-flat .hwf-aig line { stroke: #383838; stroke-width: 5; stroke-linecap: round; }
.hw-flat .j-flat-m line { stroke-width: 3.6; }
.hw-flat .hwf-sec line { stroke: #e74c3c; stroke-width: 1.8; }
