/* ==========================================================================
   BOXERGON — Guides athlète et coach (guide-athlete.html, guide-coach.html)
   Styles communs aux deux guides, préfixe g-. Charge après style.css.
   ========================================================================== */


/* --- En-tête du guide --- */
.g-hero { padding: 9rem 0 4rem; overflow: hidden; }
.g-hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 3rem; align-items: center;
}
.g-hero .hero-title { margin-bottom: 1.25rem; }
.g-hero-sub { color: var(--text-dim); font-size: 1.15rem; max-width: 34rem; margin-bottom: 2rem; }
.g-toc { display: flex; flex-wrap: wrap; gap: 0.6rem; counter-reset: toc; }
.g-toc a {
  counter-increment: toc;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.95rem; border: 1px solid var(--border-strong); border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  font-size: 0.95rem; transition: var(--transition);
}
.g-toc a::before { content: counter(toc, decimal-leading-zero); color: var(--sand); font-weight: 700; }
.g-toc a:hover, .g-toc a:focus-visible { border-color: var(--volt); color: var(--volt); }
.g-toc a.g-toc-rules { border-color: var(--volt); color: var(--volt); }
.g-toc a.g-toc-rules::before { content: '!'; color: var(--volt); }
@media (max-width: 900px) {
  .g-hero { padding-top: 7.5rem; }
  .g-hero-grid { grid-template-columns: 1fr; text-align: center; }
  .g-hero-sub { margin-left: auto; margin-right: auto; }
  .g-toc { justify-content: center; }
}

/* --- Téléphone (captures réelles de l'app) --- */
.g-phone {
  width: 270px; max-width: 100%; aspect-ratio: 540 / 1050;
  margin: 0 auto; border-radius: 36px; overflow: hidden;
  border: 9px solid #1E1E1E; background: var(--bg);
  box-shadow: 0 30px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(201,176,138,0.18), 0 0 80px rgba(166,255,0,0.06);
}
.g-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Capture plus courte qu'un écran (recadrée) : le cadre suit l'image. */
.g-phone.g-free { aspect-ratio: auto; }
.g-phone.g-free img { height: auto; }
.g-duo { display: flex; justify-content: center; align-items: flex-start; }
.g-duo .g-phone { width: 230px; margin: 0; }
.g-duo .g-phone + .g-phone { margin-left: -40px; margin-top: 3.5rem; }
@media (max-width: 600px) {
  .g-phone { width: 240px; }
  .g-duo .g-phone { width: 168px; border-width: 6px; border-radius: 26px; }
  .g-duo .g-phone + .g-phone { margin-left: -26px; margin-top: 2.5rem; }
}

/* --- Chapitres --- */
.g-chap { padding: 5.5rem 0; border-top: 1px solid var(--border); }
.g-chap.section-deep { border-top: none; }
.g-chap-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 4rem; align-items: center;
}
.g-chap-grid.g-rev .g-chap-text { order: 2; }
.g-chap-grid.g-rev .g-chap-visual { order: 1; }
@media (max-width: 900px) {
  .g-chap { padding: 4rem 0; }
  .g-chap-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .g-chap-grid.g-rev .g-chap-text { order: 1; }
  .g-chap-grid.g-rev .g-chap-visual { order: 2; }
}
.g-num {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 3.5rem; line-height: 1; color: var(--sand); margin-bottom: 0.5rem;
}
.g-chap h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.g-chap .lead { margin-bottom: 1.75rem; max-width: 36rem; }
.g-chap p + p { margin-top: 1rem; }

.g-steps { counter-reset: step; display: grid; gap: 0.9rem; margin-bottom: 1.5rem; }
.g-steps li {
  counter-increment: step; position: relative; padding-left: 3rem; min-height: 2rem;
  display: flex; flex-direction: column; justify-content: center;
}
.g-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--volt); color: var(--bg);
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.g-ui { color: var(--sand); font-weight: 600; white-space: nowrap; }
.g-bullets { display: grid; gap: 0.8rem; margin-bottom: 1.5rem; }
.g-bullets li { position: relative; padding-left: 1.4rem; }
.g-bullets li::before {
  content: ''; position: absolute; left: 0; top: 0.65em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--volt);
}
.g-tip {
  border-left: 3px solid var(--sand); background: rgba(201,176,138,0.07);
  padding: 0.9rem 1.1rem; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-size: 0.95rem; color: var(--text);
}
.g-tip strong { color: var(--sand); font-family: var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; margin-right: 0.35rem; }

/* --- Maquettes d'écran en HTML (quand aucune capture n'existe) --- */
.g-app {
  width: 100%; max-width: 340px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 22px;
  padding: 1.4rem; box-shadow: 0 25px 50px rgba(0,0,0,0.45);
}
.g-app + .g-app { margin-top: 1.25rem; }
.g-app-title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; text-transform: none; margin-bottom: 0.2rem; }
.g-app-cap { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 0.9rem; }
.g-app-input {
  display: flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 0.75rem 0.9rem;
  background: var(--bg); font-family: var(--font-display); letter-spacing: 0.12em; font-size: 1.1rem;
}
.g-app-input svg { width: 18px; height: 18px; flex: none; stroke: var(--sand); fill: none; stroke-width: 2; }
.g-caret { width: 2px; height: 1.1em; background: var(--volt); animation: g-blink 1s steps(1) infinite; }
@keyframes g-blink { 50% { opacity: 0; } }
.g-app-btn {
  display: block; width: 100%; text-align: center; margin-top: 1rem;
  padding: 0.75rem; border-radius: 999px; background: var(--sand); color: var(--bg);
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.g-app-btn.volt { background: var(--volt); }
.g-app-card {
  border: 1px solid rgba(201,176,138,0.45); border-radius: 14px; padding: 0.9rem 1rem; background: var(--bg);
}
.g-app-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.g-app-strong { font-weight: 600; }
.g-app-small { color: var(--text-dim); font-size: 0.82rem; }
.g-app-x {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 0.9rem; flex: none;
}
.g-app-link { display: flex; align-items: center; gap: 0.7rem; }
.g-app-link svg { width: 20px; height: 20px; stroke: var(--sand); fill: none; stroke-width: 2; flex: none; }
.g-app-link span:last-child { margin-left: auto; color: var(--text-dim); }

/* Vie d'une séance à noter */
.g-life { display: flex; align-items: center; gap: 0.5rem; margin: 1.5rem 0; }
.g-life-stop { text-align: center; flex: none; width: 5.6rem; }
.g-life-dot {
  width: 2.6rem; height: 2.6rem; margin: 0 auto 0.4rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 0.85rem;
  background: var(--bg-card-2); border: 2px solid var(--sand); color: var(--sand);
}
.g-life-stop.on .g-life-dot { background: var(--volt); border-color: var(--volt); color: var(--bg); }
.g-life-stop.end .g-life-dot { border-style: dashed; border-color: var(--text-dim); color: var(--text-dim); }
.g-life-label { font-size: 0.8rem; line-height: 1.3; color: var(--text-dim); }
.g-life-bar { flex: 1; height: 2px; background: linear-gradient(90deg, var(--volt), var(--sand)); margin-bottom: 1.7rem; min-width: 1rem; }

/* Légende du carnet */
.g-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.6rem 1.2rem; margin-bottom: 1.5rem; }
.g-legend li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.95rem; }
.g-sw { width: 1.4rem; height: 1.4rem; border-radius: 6px; flex: none; position: relative; }
.g-sw.perf { background: var(--volt); }
.g-sw.note { border: 2px solid var(--volt); }
.g-sw.prevue { border: 2px solid var(--text-dim); }
.g-sw.box { background: var(--bg-card-2); }
.g-sw.box::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--sand); }
.g-sw.today { border: 2px solid var(--sand); }

/* Communauté */
.g-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
@media (max-width: 900px) { .g-cards { grid-template-columns: 1fr; } }
.g-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.6rem; }
.g-card svg { width: 30px; height: 30px; stroke: var(--sand); fill: none; stroke-width: 1.8; margin-bottom: 1rem; }
.g-card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.g-card p { color: var(--text-dim); font-size: 0.95rem; }
.g-centered { text-align: center; max-width: 46rem; margin: 0 auto; }
.g-centered .lead { margin-left: auto; margin-right: auto; }

/* --- Simulateur de scan --- */
/* Ordinateur : réglages, explication et programme à gauche, téléphone collant à droite.
   Téléphone : réglages, puis le téléphone, puis l'explication — on voit l'effet sans défiler. */
.g-sim-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  grid-template-areas: "controls screen" "detail screen";
  grid-template-rows: auto 1fr;
  column-gap: 3.5rem; align-items: start; margin-top: 3rem;
}
.g-sim-controls { grid-area: controls; }
.g-sim-detail { grid-area: detail; }
.g-sim-grid > .g-screen { grid-area: screen; position: sticky; top: 6.5rem; }
.g-sim-detail .g-sim-why { margin: 0 0 2rem; }
@media (max-width: 900px) {
  .g-sim-grid { grid-template-columns: 1fr; grid-template-areas: "controls" "screen" "detail"; grid-template-rows: none; }
  .g-sim-grid > .g-screen { position: static; margin-bottom: 1.5rem; }
}
.g-sim-clock { display: flex; align-items: baseline; gap: 0.9rem; margin-bottom: 0.4rem; }
.g-sim-time { font-family: var(--font-display); font-weight: 800; font-size: 3.6rem; line-height: 1; color: var(--volt); }
.g-sim-clock span:last-child { color: var(--text-dim); }
.g-sim-range { width: 100%; accent-color: var(--volt); margin: 0.6rem 0 1rem; height: 2rem; cursor: pointer; }
.g-sim-presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.g-sim-presets button {
  padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--border-strong);
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.05em; font-size: 0.95rem;
  transition: var(--transition);
}
.g-sim-presets button:hover, .g-sim-presets button:focus-visible { border-color: var(--volt); color: var(--volt); }
.g-sim-presets button[aria-pressed="true"] { background: var(--volt); border-color: var(--volt); color: var(--bg); }
.g-sim-day { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.12em; color: var(--sand); font-size: 0.95rem; margin-bottom: 0.8rem; }
.g-sim-list { display: grid; gap: 0.6rem; }
.g-sim-slot {
  display: grid; grid-template-columns: 4.4rem minmax(0, 1fr); gap: 0.9rem; align-items: center;
  padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card);
  transition: var(--transition);
}
.g-sim-slot.in { border-color: var(--volt); box-shadow: 0 0 0 1px rgba(166,255,0,0.25); }
.g-sim-slot-h { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.g-sim-slot-h small { display: block; color: var(--text-dim); font-weight: 500; font-size: 0.8rem; }
.g-sim-slot-name { font-weight: 600; }
.g-sim-slot-tag { color: var(--text-dim); font-size: 0.85rem; }
.g-sim-slot.in .g-sim-slot-tag::after { content: ' · proposé au scan'; color: var(--volt); }
.g-sim-why {
  margin-top: 1.5rem; padding: 1rem 1.2rem; border-radius: var(--radius-lg);
  background: rgba(166,255,0,0.07); border: 1px solid rgba(166,255,0,0.25); font-size: 0.98rem;
}
.g-sim-why strong { color: var(--volt); }

.g-screen {
  width: 100%; max-width: 340px; margin: 0 auto; min-height: 560px;
  border-radius: 36px; border: 9px solid #1E1E1E; background: var(--bg);
  box-shadow: 0 30px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(201,176,138,0.18);
  padding: 1.1rem 1rem 1.4rem; font-size: 0.92rem;
}
.g-screen-bar { display: flex; align-items: center; gap: 0.8rem; font-weight: 600; font-size: 1.05rem; margin-bottom: 1.1rem; }
.g-screen-bar span:first-child { font-size: 1.4rem; line-height: 1; color: var(--text-dim); }
.g-screen-body { animation: g-in 0.35s ease; }
@keyframes g-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.g-s-ok {
  display: flex; gap: 0.75rem; align-items: center; padding: 0.85rem 0.9rem; border-radius: 14px;
  background: rgba(166,255,0,0.08); border: 1px solid rgba(166,255,0,0.35); color: var(--volt); margin-bottom: 1rem;
}
.g-s-ok b { display: block; font-family: var(--font-display); font-size: 1.2rem; }
.g-s-check {
  width: 26px; height: 26px; border-radius: 50%; background: var(--volt); color: var(--bg); flex: none;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.g-s-box { color: var(--volt); font-weight: 600; margin-bottom: 0.3rem; }
.g-s-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1.1; margin-bottom: 0.6rem; }
.g-s-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.g-s-badge {
  background: var(--volt); color: var(--bg); border-radius: 6px; padding: 0.15rem 0.55rem;
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.06em; font-size: 0.85rem;
}
.g-s-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 0.9rem 1rem; margin-bottom: 1rem; }
.g-s-card li { position: relative; padding-left: 1rem; margin: 0.25rem 0; }
.g-s-card li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--volt); }
.g-s-cta {
  display: block; text-align: center; padding: 0.75rem; border-radius: 999px; background: var(--volt); color: var(--bg);
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.g-s-info {
  padding: 1rem; border-radius: 14px; background: rgba(201,176,138,0.1); border: 1px solid rgba(201,176,138,0.45);
  color: var(--sand); line-height: 1.5;
}
.g-s-h { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 0.2rem; }
.g-s-sub { color: var(--text-dim); margin-bottom: 1rem; }
.g-s-choice {
  width: 100%; text-align: left; display: flex; gap: 1rem; align-items: center;
  padding: 0.8rem 0.9rem; margin-bottom: 0.7rem; border-radius: 14px;
  background: var(--bg-card); border: 1px solid rgba(166,255,0,0.45); transition: var(--transition);
}
.g-s-choice:hover, .g-s-choice:focus-visible { border-color: var(--volt); transform: translateY(-2px); }
.g-s-choice-h { font-family: var(--font-display); font-weight: 700; color: var(--volt); font-size: 1.35rem; line-height: 1; }
.g-s-choice-h small { display: block; color: var(--text-dim); font-size: 0.75rem; font-weight: 500; margin-top: 0.2rem; }
.g-s-choice-lib { display: block; color: var(--sand); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.8rem; }
.g-s-choice-wod { display: block; font-weight: 600; }
.g-s-choice-when { display: block; color: var(--text-dim); font-size: 0.8rem; }
.g-s-back { margin-top: 1rem; color: var(--text-dim); font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; }
.g-s-back:hover { color: var(--text); }

/* --- Règles (FAQ, fond clair) ---
   Les couleurs sur fond Sable clair viennent de style.css (.section-light .faq-*) ;
   ici, seulement la mise en page propre au guide (taille, listes, réponses plus longues). */
.g-rules .faq-question { font-size: 1.2rem; font-weight: 700; }
.g-rules .faq-answer-inner { font-size: 1rem; }
.g-rules .faq-answer-inner p + p,
.g-rules .faq-answer-inner p + ul,
.g-rules .faq-answer-inner ul + p { margin-top: 0.6rem; }
.g-rules .faq-answer-inner ul { display: grid; gap: 0.3rem; }
.g-rules .faq-answer-inner li { position: relative; padding-left: 1.1rem; }
.g-rules .faq-answer-inner li::before { content: '–'; position: absolute; left: 0; color: #6B5A3F; }
.g-rules .faq-item.open .faq-answer { max-height: 640px; }

@media (prefers-reduced-motion: reduce) {
  .g-caret, .g-screen-body { animation: none; }
  .g-s-choice:hover { transform: none; }
}
