/* ============================================================
   Page Technologies : chiffres clés, visionneuse avant / après
   (image d'origine ↔ transcription brute), points forts, comparatif.
   Reprend le vocabulaire de l'accueil : dégradé bleu → violet,
   cartes arrondies, fonds de section pâles.
   ============================================================ */

.tech-page {
  --tech-ink: #1d2433;
  --tech-muted: #5b6475;
  --tech-line: #e4e7ee;
  --tech-soft: #f6f7fb;
  --tech-accent: var(--uw-primary-text, #0b60de);
  --tech-accent-soft: #e8f0ff;
  --tech-gradient: linear-gradient(90deg, var(--bs-primary, #0d6efd), #6610f2);
  color: var(--tech-ink);
}
.tech-page section { padding: 4.5rem 0; }

.tech-eyebrow {
  margin: 0 0 .6rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--tech-accent);
}

/* ---------- En-tête ---------- */
.tech-page .tech-hero {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(102, 16, 242, .07), transparent 60%),
    radial-gradient(70% 80% at 0% 100%, rgba(13, 110, 253, .06), transparent 60%);
}
.tech-hero__title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.12; letter-spacing: -.02em;
  margin: 0 0 1rem;
  background: var(--tech-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .tech-hero__title { color: var(--tech-accent); }
}
.tech-hero__lead { color: #374151; max-width: 36rem; }

.tech-metrics {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
}
.tech-metric {
  position: relative; display: flex; flex-direction: column; gap: .15rem;
  padding: 1.25rem 1.25rem 1.1rem;
  background: #fff; border: 1px solid var(--tech-line); border-radius: 18px;
  box-shadow: 0 6px 18px -10px rgba(29, 36, 51, .18);
}
.tech-metric__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; margin-bottom: .5rem;
  border-radius: 11px; background: var(--tech-accent-soft); color: var(--tech-accent); font-size: .95rem;
}
.tech-metric__value {
  font-size: clamp(1.8rem, 3.4vw, 2.3rem); font-weight: 700; line-height: 1.1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  background: var(--tech-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tech-metric__value small { font-size: .55em; font-weight: 600; }
.tech-metric__label { font-size: .9rem; color: var(--tech-muted); line-height: 1.35; }

/* ---------- Démonstration ---------- */
.tech-page .tech-demo { background: linear-gradient(180deg, #f5f8ff 0%, #fbfcff 100%); border-top: 1px solid rgba(0, 0, 0, .05); }
.tech-section-head { max-width: 46rem; margin: 0 auto 2.25rem; text-align: center; }
.tech-section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -.01em; margin-bottom: .75rem; }
.tech-section-head p:last-child { color: var(--tech-muted); margin: 0; }

.tech-tabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem;
  margin-bottom: 1.25rem;
}
.tech-tabs[hidden] { display: none; }
.tech-tab {
  display: flex; align-items: center; gap: .75rem; min-width: 0;
  padding: .6rem .75rem; text-align: left;
  background: #fff; border: 1px solid var(--tech-line); border-radius: 14px;
  color: var(--tech-ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tech-tab img {
  flex: none; width: 44px; height: 56px; object-fit: cover; object-position: top;
  border-radius: 7px; border: 1px solid var(--tech-line); background: var(--tech-soft);
}
.tech-tab__text { display: flex; flex-direction: column; min-width: 0; }
.tech-tab__title { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.tech-tab__rate { font-size: .8rem; color: var(--tech-muted); }
.tech-tab:hover { border-color: #c9d6f5; transform: translateY(-1px); }
.tech-tab[aria-selected="true"] {
  border-color: var(--tech-accent);
  box-shadow: 0 0 0 3px rgba(11, 96, 222, .12), 0 8px 20px -12px rgba(11, 96, 222, .45);
}
.tech-tab[aria-selected="true"] .tech-tab__rate { color: var(--tech-accent); font-weight: 600; }
.tech-tab:focus-visible { outline: 3px solid var(--tech-accent); outline-offset: 2px; }

.tech-panel {
  background: #fff; border: 1px solid var(--tech-line); border-radius: 22px;
  padding: 1.5rem; box-shadow: 0 18px 40px -28px rgba(29, 36, 51, .35);
}
.tech-panel + .tech-panel { margin-top: 1.5rem; }
.tech-panel[hidden] { display: none; }
.tech-panel:focus-visible { outline: 3px solid var(--tech-accent); outline-offset: 3px; }
.tech-panel__intro {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem 2rem;
  margin-bottom: 1.25rem;
}
.tech-panel__intro > div { flex: 1 1 26rem; }
.tech-panel__title { font-size: 1.25rem; font-weight: 700; margin: 0 0 .35rem; }
.tech-panel__desc { color: var(--tech-muted); margin: 0; max-width: 60ch; font-size: 1rem; }
.tech-score {
  display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; margin: 0;
}
.tech-score__rate {
  display: inline-block; padding: .35rem .8rem; border-radius: 999px;
  background: #e7f6ee; color: #146c43; font-weight: 700; font-size: .9rem;
}
.tech-score__errors { font-size: .8rem; color: var(--tech-muted); }

.tech-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tech-pane {
  display: flex; flex-direction: column; min-width: 0; margin: 0;
  border: 1px solid var(--tech-line); border-radius: 16px; overflow: hidden; background: var(--tech-soft);
}
.tech-pane__bar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  min-height: 2.9rem; padding: .45rem .6rem .45rem .9rem;
  background: #fff; border-bottom: 1px solid var(--tech-line);
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tech-muted);
}
.tech-pane__bar > span:first-child { display: inline-flex; align-items: center; gap: .45rem; }
.tech-pane__action {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem;
  border-radius: 9px; color: var(--tech-muted); text-decoration: none;
}
.tech-pane__action:hover { background: var(--tech-soft); color: var(--tech-accent); }
.tech-pane__action:focus-visible { outline: 3px solid var(--tech-accent); outline-offset: 1px; }
.tech-pane__body { height: clamp(22rem, 62vh, 38rem); overflow: auto; overscroll-behavior: contain; }
.tech-pane__body--image {
  display: flex; align-items: flex-start; justify-content: center; padding: 1rem;
  background:
    linear-gradient(45deg, #eef1f6 25%, transparent 25%, transparent 75%, #eef1f6 75%) 0 0 / 18px 18px,
    linear-gradient(45deg, #eef1f6 25%, transparent 25%, transparent 75%, #eef1f6 75%) 9px 9px / 18px 18px,
    #f7f8fb;
}
.tech-pane__body--image img {
  width: auto; max-width: 100%; height: auto; max-height: 100%;
  border-radius: 6px; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .45);
}

.tech-switch { display: inline-flex; padding: .2rem; gap: .15rem; background: var(--tech-soft); border: 1px solid var(--tech-line); border-radius: 999px; }
.tech-switch__btn {
  border: 0; background: transparent; border-radius: 999px; padding: .25rem .7rem;
  font-size: .75rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--tech-muted);
}
.tech-switch__btn[aria-pressed="true"] { background: #fff; color: var(--tech-accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.tech-switch__btn:focus-visible { outline: 3px solid var(--tech-accent); outline-offset: 1px; }

/* Rendu « document » de la transcription */
.tech-doc {
  min-height: 100%; padding: 1.75rem 2rem; background: #fff;
  font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.6; color: #222;
}
.tech-doc h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 1rem; }
.tech-doc h2 { font-size: 1.15rem; font-weight: 700; margin: 1.25rem 0 1rem; }
.tech-doc p { margin: 0 0 1rem; }
.tech-doc img { max-width: 100%; height: auto; border: 1px solid var(--tech-line); border-radius: 4px; }
.tech-doc figure { margin: 0 0 1rem; }
.tech-doc figcaption { font-size: .85rem; color: var(--tech-muted); margin-top: .35rem; }
.tech-doc sup { color: var(--tech-accent); }
.tech-doc__verse { padding-left: 1.25rem; }
.tech-doc__notes { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--tech-line); font-size: .88rem; }
.tech-doc__notes p { margin-bottom: .6rem; }

.tech-md {
  min-height: 100%; margin: 0; padding: 1.25rem 1.5rem;
  background: #0f172a; color: #e2e8f0;
  font-size: .82rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
}
.tech-md code { color: inherit; font-size: inherit; }

.tech-method {
  display: flex; gap: .5rem; align-items: flex-start;
  max-width: 60rem; margin: 1.5rem auto 0;
  font-size: .85rem; color: var(--tech-muted);
}
.tech-method svg, .tech-method i { margin-top: .2rem; flex: none; }

/* ---------- Points forts ---------- */
.tech-page .tech-features { border-top: 1px solid rgba(0, 0, 0, .05); }

/* ---------- Comparatif ---------- */
.tech-page .tech-comparison { border-top: 1px solid rgba(0, 0, 0, .05); }
.tech-table { background: #fff; border: 1px solid var(--tech-line); border-radius: 16px; }
.tech-table table { --bs-table-bg: transparent; }
.tech-table th, .tech-table td { padding: .9rem 1rem; border-color: var(--tech-line); }
.tech-table thead th {
  font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--tech-muted);
  background: var(--tech-soft);
}
.tech-table tbody tr:last-child > * { border-bottom: 0; }
.tech-table .tech-table__us { background: rgba(13, 110, 253, .05); font-weight: 600; color: var(--tech-ink); }
.tech-table thead .tech-table__us { color: var(--tech-accent); background: var(--tech-accent-soft); }
.tech-table:focus-visible { outline: 3px solid var(--tech-accent); outline-offset: 2px; }

/* ---------- Appel à l'action ---------- */
.tech-page .tech-cta { padding-top: 1rem; }
.tech-cta__box {
  padding: 3rem 1.5rem; border-radius: 24px; text-align: center; color: #fff;
  background: linear-gradient(120deg, #0b5ed7 0%, #5a22e6 100%);
  box-shadow: 0 24px 48px -28px rgba(76, 42, 220, .7);
}
.tech-cta__box h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: .75rem; }
.tech-cta__box p { max-width: 38rem; margin: 0 auto; color: rgba(255, 255, 255, .88); }
.tech-cta__box .btn-light { color: #3b1fc2; font-weight: 600; }

/* ---------- Adaptations ---------- */
@media (max-width: 991.98px) {
  .tech-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-compare { grid-template-columns: minmax(0, 1fr); }
  .tech-pane__body { height: auto; max-height: 30rem; }
  .tech-pane__body--image img { max-height: 28rem; }
}
@media (max-width: 575.98px) {
  .tech-page section { padding: 3rem 0; }
  .tech-page .tech-hero { padding: 2.25rem 0 2.5rem; }
  .tech-metrics { gap: .6rem; }
  .tech-metric { padding: 1rem; border-radius: 14px; }
  .tech-tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -.75rem 1rem; padding: .25rem .75rem .5rem; }
  .tech-tabs::-webkit-scrollbar { display: none; }
  .tech-tab { flex: 0 0 78%; scroll-snap-align: start; }
  .tech-panel { padding: 1rem; border-radius: 18px; }
  .tech-score { align-items: flex-start; }
  .tech-doc { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tech-tab, .tech-tab:hover { transition: none; transform: none; }
}
