/* CompteARebours — l'APPAREIL reste noir dans les deux thèmes, comme le vrai écran d'un ordinateur de plongée.
   couleur-fixe: palette propre à l'appareil (écran noir, valeurs blanches, zones de vitesse). Les jetons de thème ne
   s'appliquent pas à un objet : un écran de plongée n'a pas de thème clair. */
.cr {
  --cr-bg: #03070b; --cr-panel: #0a1119; --cr-line: #16222e; --cr-fg: #eaf2f8; --cr-mute: #8aa0b4; --cr-cy: #00e0ec;
  --cr-ok: #3ddc84; --cr-warn: #ffb020; --cr-bad: #ff5a4d; --cr-slow: #5d7da0; --cr-neu: #1a2735; --cr-green: #27e36a;
  display: flex; flex-direction: column; gap: 18px; width: 100%; min-width: 0; margin-top: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.cr * { box-sizing: border-box; }
.cr-z-slow { --zc: var(--cr-slow); } .cr-z-good { --zc: var(--cr-ok); } .cr-z-warn { --zc: var(--cr-warn); } .cr-z-bad { --zc: var(--cr-bad); } .cr-z-neu { --zc: var(--cr-neu); }

/* ═══ La montre : ronde, d'après le Shearwater Teric ═══ */
.cr-watchwrap { display: flex; justify-content: center; }
.cr-watch {
  position: relative; width: min(340px, 100%, 36vh); aspect-ratio: 1; border-radius: 50%; container-type: inline-size;
  background: conic-gradient(from 210deg, #2a323c, #0b0f14 30%, #39424d 52%, #0b0f14 78%, #2a323c);
  box-shadow: 0 24px 44px -24px rgba(0, 0, 0, 0.7), inset 0 0 0 1px #566474;
}
.cr-watch::before, .cr-watch::after { content: ""; position: absolute; right: -1.2cqw; width: 2cqw; height: 12cqw; border-radius: 3px; background: linear-gradient(#566474, #1c242d); }
.cr-watch::before { top: 24%; transform: rotate(-12deg); } .cr-watch::after { top: 58%; transform: rotate(12deg); }
.cr-face {
  position: absolute; inset: 3.2cqw; border-radius: 50%; background: #000; overflow: hidden; color: #fff;
  display: grid; grid-template-rows: 1.3fr 1fr 1.3fr; box-shadow: inset 0 0 0 3px #05080b;
}
.cr-face > div { display: flex; align-items: center; justify-content: center; position: relative; }
.cr-lab { font: 600 2.9cqw Inter, system-ui, sans-serif; letter-spacing: 0.06em; color: #9fb4c8; text-transform: uppercase; }
.cr-rA { padding-top: 12%; gap: 6px; align-items: flex-end !important; }
.cr-dep { font-weight: 800; font-size: 19.5cqw; line-height: 0.82; letter-spacing: -0.045em; }
.cr-dep small { font-size: 0.5em; letter-spacing: -0.02em; vertical-align: top; position: relative; top: 0.1em; }
.cr-dep em { font: 600 0.2em Inter, system-ui, sans-serif; font-style: normal; color: #9fb4c8; margin-left: 3px; letter-spacing: 0; }
.cr-tmp { position: absolute; left: 25%; top: 17%; font: 600 3.6cqw Inter, system-ui, sans-serif; color: #cfe0ee; }
.cr-chev { display: flex; flex-direction: column; gap: 1px; margin: 0 0 4px 6px; }
.cr-chev svg { display: block; width: 7.6cqw; height: 2.6cqw; }
.cr-chev path { fill: none; stroke: #3a4048; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cr-chev svg.on path { stroke: var(--zc, #fff); }
.cr-chev.cr-z-slow svg.on path, .cr-chev.cr-z-good svg.on path, .cr-chev.cr-z-neu svg.on path { stroke: #fff; }
.cr-rB { border-top: 2px solid #1d232a; display: grid !important; grid-template-columns: 1fr 1fr; align-items: stretch !important; }
.cr-rB > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.cr-rB > div + div { border-left: 2px solid #1d232a; }
.cr-big { font-weight: 800; font-size: 8.4cqw; line-height: 1; }
.cr-big small { font-size: 0.5em; font-weight: 600; color: #9fb4c8; margin-left: 2px; }
.cr-green { color: var(--cr-green) !important; }
.cr-big.cr-v-warn { color: var(--cr-warn); } .cr-big.cr-v-bad { color: var(--cr-bad); }
.cr-rC { border-top: 2px solid #1d232a; flex-direction: column; gap: 4px; padding-bottom: 14%; }
.cr-dtr { font-weight: 800; font-size: 8.2cqw; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.cr-dtr i { font-style: normal; font-weight: 800; font-size: 0.82em; color: var(--cr-cy); margin-right: 1px; }
.cr-dtr span + span { margin-left: 0.2em; }
.cr-dtr.cr-moyen { font-size: 9.8cqw; }
.cr-dtr.cr-court { font-size: 12cqw; }
.cr-face > .cr-surface { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; flex-direction: column; text-align: center; gap: 4px; background: rgba(0, 0, 0, 0.86); color: var(--cr-green); font-weight: 800; font-size: 7cqw; letter-spacing: 0.05em; padding: 4cqw; z-index: 5; }
.cr-surface small { font: 600 3.4cqw Inter, system-ui, sans-serif; color: #fff; letter-spacing: 0.08em; }
.cr-watch.done .cr-face > .cr-surface { display: flex; }

/* ═══ Le graphique de plongée (comme dans le carnet AWA) ═══ */
.cr-chart { background: #070c12; border: 1px solid var(--cr-line); border-radius: 14px; color: var(--cr-fg); overflow: hidden; }
.cr-read { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--cr-line); border-bottom: 1px solid var(--cr-line); }
.cr-read > div { background: var(--cr-panel); padding: 10px 14px; min-width: 0; }
.cr-l { font: 400 0.62rem ui-monospace, 'Share Tech Mono', monospace; color: var(--cr-mute); letter-spacing: 0.12em; text-transform: uppercase; }
.cr-v { font-weight: 800; font-size: 1.15rem; margin-top: 2px; }
.cr-v small { font: 400 0.6em ui-monospace, monospace; color: var(--cr-mute); margin-left: 3px; }
.cr-v.cr-v-warn { color: var(--cr-warn); } .cr-v.cr-v-bad { color: var(--cr-bad); } .cr-v.cr-v-good { color: var(--cr-ok); }
.cr-plot { position: relative; height: clamp(170px, 28vh, 320px); touch-action: pan-y; cursor: crosshair; user-select: none; }
.cr-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cr-grid { stroke: var(--cr-line); stroke-width: 1; }
.cr-sep { stroke: #3a5166; stroke-dasharray: 3 5; }
.cr-futur { fill: none; stroke: #3a5166; stroke-width: 2; stroke-dasharray: 4 6; }
.cr-passe { fill: none; stroke: var(--cr-cy); stroke-width: 3; stroke-linejoin: round; }
.cr-s1 { stop-color: var(--cr-cy); stop-opacity: 0.5; } .cr-s0 { stop-color: var(--cr-cy); stop-opacity: 0; }
.cr-sel { fill: #fff; fill-opacity: 0.1; stroke: #fff; stroke-opacity: 0.5; }
.cr-cur { stroke: #fff; stroke-opacity: 0.55; stroke-dasharray: 3 4; }
.cr-pt { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--cr-fg); border: 3px solid var(--cr-cy); box-shadow: 0 0 0 4px rgba(0, 224, 236, 0.22), 0 0 16px var(--cr-cy); pointer-events: none; z-index: 2; }
.cr-yl { position: absolute; left: 8px; font: 400 0.62rem ui-monospace, monospace; color: var(--cr-mute); transform: translateY(-50%); background: #070c12; padding: 0 3px; border-radius: 3px; }
.cr-meas { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: var(--cr-fg); color: #03070b; border-radius: 8px; padding: 5px 10px; font: 400 0.72rem ui-monospace, monospace; white-space: nowrap; max-width: 96%; overflow: hidden; text-overflow: ellipsis; z-index: 3; }
.cr-ribbon { height: 8px; display: flex; }
.cr-rb { flex: 1; background: var(--zc); }
.cr-xl { position: relative; height: 24px; margin-top: 4px; font: 400 0.62rem ui-monospace, monospace; color: var(--cr-mute); }
.cr-xl span { position: absolute; top: 2px; }
.cr-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 6px 14px 12px; font: 400 0.66rem ui-monospace, monospace; color: var(--cr-mute); }
.cr-legend i { display: inline-block; width: 14px; height: 5px; border-radius: 2px; margin-right: 5px; vertical-align: middle; background: var(--zc); }
@media (max-width: 560px) { .cr-read { grid-template-columns: 1fr 1fr; } .cr-meas { font-size: 0.6rem; } }

/* ═══ Panneau noir de la page d'attente (Armel, 22/11 : fond noir, montre en haut, courbe sur presque toute la largeur) ═══ */
.cr-page { background: #03070b; box-shadow: 0 0 0 100vmax #03070b; clip-path: inset(0 -100vmax); padding: 2rem 0 3rem; min-height: 70vh; }
.cr-notice { --cr-fg: #eaf2f8; --cr-mute: #8aa0b4; background: #03070b; border: 1px solid #16222e; border-radius: 16px; padding: 1.2rem 1rem 1.4rem; color: #eaf2f8; max-width: 34rem; margin: 0 auto; }
.cr-page .cr-notice { border-color: transparent; }
.cr-notice.cr-wide { max-width: 1040px; }
.cr-notice-head { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 52rem; margin: 0 auto; }
.cr-notice-title { color: #eaf2f8; font-weight: 800; font-size: clamp(1.15rem, 2.4vw, 1.75rem); letter-spacing: -0.01em; }
.cr-notice-text { color: #9fb4c8; font-size: clamp(0.85rem, 1.3vw, 1rem); line-height: 1.5; margin: 0.3rem 0 0; text-wrap: balance; }
.cr-notice-foot { text-align: center; margin-top: 1rem; } .cr-notice-foot strong { color: #eaf2f8; }
.cr-notice-link { display: flex; justify-content: center; align-items: center; min-height: 44px; width: fit-content; margin: 0.7rem auto 0; padding: 0 1.4rem; color: #00e0ec; font-weight: 700; font-size: 0.9rem; text-decoration: none; border: 1px solid #00e0ec; border-radius: var(--awa-radius-btn, 6px); }
/* Sur l'accueil (colonne étroite), le panneau sort de la colonne pour occuper presque toute la largeur de l'écran. */
.cr-notice.cr-wide.cr-compact { position: relative; width: min(1040px, calc(100vw - 40px)); left: 50%; transform: translateX(-50%); max-width: none; }
.cr-notice.cr-wide .cr { margin-top: 1.1rem; }

@media (max-width: 560px) {
  .cr-page { padding: 0.6rem 0 0.8rem; min-height: 0; }
  .cr-notice { padding: 0.5rem 0.7rem 0.7rem; border-radius: 12px; }
  .cr-notice-title { font-size: 1.05rem; }
  .cr-notice-text { font-size: 0.78rem; margin-top: 0.15rem; }
  .cr { gap: 8px; margin-top: 0.5rem; }
  .cr-watch { width: min(340px, 100%, 31vh); }
  .cr-read { grid-template-columns: 1.9fr 1fr 1fr; }
  .cr-read > div:first-child .cr-v { font-size: 0.8rem; letter-spacing: -0.02em; }
  .cr-read > div { padding: 6px 9px; }
  .cr-l { font-size: 0.55rem; letter-spacing: 0.08em; }
  .cr-v { font-size: 0.9rem; white-space: nowrap; }
  .cr-plot { height: clamp(96px, 17vh, 200px); }
  .cr-yl { font-size: 0.55rem; }
  .cr-xl { height: 18px; margin-top: 2px; font-size: 0.55rem; }
  .cr-legend { display: none; }
  .cr-notice-foot { font-size: 0.76rem; margin-top: 0.6rem; }
  .cr-notice-link { min-height: 40px; margin-top: 0.45rem; }
}

.cr-social { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 0.5rem; color: #9fb4c8; font-size: 0.8rem; }
.cr-social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--awa-radius-btn, 6px); color: #eaf2f8; }
.cr-social a:hover, .cr-social a:focus-visible { color: #00e0ec; outline: 1px solid #00e0ec; }
