/* Ediware brand overrides on top of Hextra defaults.
   Phase 2 : palette primaire (bleu Ediware #0073C7), typographie Inter + JetBrains Mono. */

/* Bleu Ediware #0074C6 (brief v2) = HSL(204.8, 100%, 38.8%) */
:root {
  --primary-hue: 205deg;
  --primary-saturation: 100%;
  --primary-lightness: 38.8%;
}

.dark {
  --primary-hue: 203deg;
  --primary-saturation: 70%;
  --primary-lightness: 55%;
}

html {
  font-family:
    'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

code, kbd, pre, samp {
  font-family:
    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
}

/* Hiérarchie typographique : séparateurs visuels sous les H2 + espacement aéré.
   Inspiré de la démo Hextra https://imfing.github.io/hextra/docs/. */
.content h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.dark .content h2 {
  border-bottom-color: #262626;
}

.content h3 {
  margin-top: 1.75rem;
}

.content h4 {
  margin-top: 1.25rem;
}

/* Premier H2 : pas de top margin si en haut du content */
.content > h2:first-child {
  margin-top: 0;
}

/* Cards Hextra : aligner le contenu en haut (par défaut Hextra utilise mt-auto pour pousser en bas).
   Plus lisible quand les cards ont des hauteurs uniformes mais des contenus de tailles variables. */
.hextra-cards .hextra-card > div {
  margin-top: 0;
  margin-bottom: auto;
}

/* === Home : hero row (badge gauche / pill changelog droite) === */
.home-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  align-self: stretch;
  width: 100%;
}

/* === Home : pill compact changelog (en regard du hero badge) === */
.changelog-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  background: white;
  color: #4b5563;
  font-size: 0.8125rem;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.changelog-pill:hover {
  border-color: #0074C6;
  color: #0074C6;
  transform: translateY(-1px);
}
.dark .changelog-pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: #262626;
  color: #9ca3af;
}
.dark .changelog-pill:hover {
  border-color: #0074C6;
  color: #4FA8E8;
}
.changelog-pill-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
.changelog-pill-text strong { color: #1f2937; font-weight: 600; }
.dark .changelog-pill-text strong { color: #e5e7eb; }
.changelog-pill-sep { color: #d1d5db; }
.dark .changelog-pill-sep { color: #4b5563; }
.changelog-pill-arrow {
  color: #0074C6;
  font-weight: 600;
  margin-left: 0.125rem;
}

/* Variante statique (sans animation) pour le trust pill côté EN */
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  background: white;
  color: #4b5563;
  font-size: 0.8125rem;
  text-decoration: none;
}
.dark .trust-pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: #262626;
  color: #9ca3af;
}
.trust-pill strong { color: #1f2937; font-weight: 600; }
.dark .trust-pill strong { color: #e5e7eb; }
.trust-pill-icon {
  display: inline-flex;
  color: #0074C6;
}
.trust-pill-icon svg { width: 14px; height: 14px; }

/* === Home : bandeau compteur changelog (trust signal) === */
.changelog-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 2rem 0 2.5rem;
  padding: 0.9rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #F5F7FA;
  font-size: 0.9375rem;
  color: #1f2937;
  text-decoration: none;
  transition: all 0.15s ease;
}
.changelog-banner:hover {
  border-color: #0074C6;
  background: white;
}
.dark .changelog-banner {
  background: rgba(255, 255, 255, 0.04);
  border-color: #262626;
  color: #e5e7eb;
}
.dark .changelog-banner:hover {
  border-color: #0074C6;
  background: rgba(255, 255, 255, 0.07);
}
.changelog-banner-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.changelog-banner-count strong { color: #0074C6; font-weight: 700; }
.changelog-banner-sep { color: #9ca3af; }
.changelog-banner-date { color: #4b5563; }
.dark .changelog-banner-date { color: #9ca3af; }
.changelog-banner-date strong { color: #1f2937; font-weight: 600; }
.dark .changelog-banner-date strong { color: #e5e7eb; }
.changelog-banner-link {
  margin-left: auto;
  color: #0074C6;
  font-weight: 500;
  white-space: nowrap;
}

/* === Home : grid 2 colonnes (Démarrer / Nouveautés) === */
.home-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0 0;
  align-items: stretch;
  align-self: stretch;
  width: 100%;
}
@media (max-width: 768px) {
  .home-two-cols { grid-template-columns: 1fr; }
}

/* === Home : bloc "Dernières nouveautés" === */
.latest-changelog {
  margin: 0;
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: white;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.latest-changelog-list { flex: 1; }
.dark .latest-changelog {
  border-color: #262626;
  background: rgba(255, 255, 255, 0.03);
}
.latest-changelog-title {
  font-size: 1.25rem !important;
  font-weight: 700;
  margin: 0 0 1rem !important;
  padding: 0 !important;
  border: none !important;
}
.latest-changelog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.latest-changelog-entry {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.9375rem;
}
.dark .latest-changelog-entry {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.latest-changelog-entry:last-child { border-bottom: none; }
.latest-changelog-date {
  flex-shrink: 0;
  width: 4.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0074C6;
  font-variant-numeric: tabular-nums;
  padding-top: 0.1rem;
}
.latest-changelog-text { color: #1f2937; }
.dark .latest-changelog-text { color: #e5e7eb; }
.latest-changelog-more {
  display: inline-block;
  margin-top: 0.75rem;
  color: #0074C6;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
}
.latest-changelog-more:hover { text-decoration: underline; }

/* === Home : Démarrer en 5 minutes === */
.home-quickstart {
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: white;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.dark .home-quickstart {
  border-color: #262626;
  background: rgba(255, 255, 255, 0.03);
}
.home-quickstart-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem !important;
  font-weight: 700;
  margin: 0 0 1rem !important;
  padding: 0 !important;
  border: none !important;
}
.home-quickstart-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.home-quickstart-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.dark .home-quickstart-list li {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.home-quickstart-list li:last-child { border-bottom: none; }
.home-quickstart-list a {
  display: inline-block;
  color: #1f2937;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s;
}
.dark .home-quickstart-list a { color: #e5e7eb; }
.home-quickstart-list a:hover { color: #0074C6; }
.home-quickstart-list a::before {
  content: "→ ";
  color: #0074C6;
  font-weight: 600;
  margin-right: 0.25rem;
}

/* === Home : FAQ === */
.home-faq {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: white;
  align-self: stretch;
  width: 100%;
}
.dark .home-faq {
  border-color: #262626;
  background: rgba(255, 255, 255, 0.03);
}
.home-faq h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding: 0;
  border: none;
}
.home-faq ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 2rem;
}
@media (max-width: 768px) {
  .home-faq ul { columns: 1; }
}
.home-faq li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  break-inside: avoid;
}
.dark .home-faq li {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.home-faq a {
  color: #1f2937;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s;
}
.dark .home-faq a { color: #e5e7eb; }
.home-faq a:hover { color: #0074C6; }
.home-faq a::before {
  content: "▸\00a0\00a0";
  color: #9ca3af;
}

/* === Home : feature-grid stretch === */
.hextra-feature-grid {
  align-self: stretch;
  width: 100%;
}

/* === Pages doc : capture d'écran via shortcode {{< screen >}} === */
.screen {
  margin: 1.5rem 0;
}
.screen img {
  width: 100%;
  height: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.dark .screen img {
  border-color: #262626;
}
.screen figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
}
.dark .screen figcaption {
  color: #9ca3af;
}

/* === Pages doc : encart méta sous le H1 (auteur + reading time) === */
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: -0.25rem 0 1.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}
.dark .doc-meta { color: #9ca3af; }
.doc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.doc-meta-item svg {
  width: 1rem;
  height: 1rem;
  color: #0074C6;
  flex-shrink: 0;
}
.doc-meta-item strong {
  color: #1f2937;
  font-weight: 600;
}
.dark .doc-meta-item strong { color: #e5e7eb; }

/* === Home : Footer trust signal === */
.home-trust {
  margin: 3rem 0 0;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}
.dark .home-trust {
  border-top-color: #262626;
  color: #9ca3af;
}
.home-trust strong { color: #1f2937; font-weight: 600; }
.dark .home-trust strong { color: #e5e7eb; }

/* === Page Changelog : cards stats hero === */
.changelog-stat {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
}
.dark .changelog-stat {
  border-color: #262626;
  background: rgba(255, 255, 255, 0.03);
}
.changelog-stat-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
  color: #0074C6;
}
.changelog-stat-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}
.changelog-stat-value {
  font-size: 2.5rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0074C6;
}
.changelog-stat-value-sm {
  font-size: 1.5rem;
  font-weight: 600;
}
.changelog-stat-label {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}
.dark .changelog-stat-label {
  color: #9ca3af;
}

/* === Page Changelog : timeline visuelle === */
/* Active uniquement quand la page a type=changelog (cf front matter) */
.changelog-page .content > h2 {
  margin-top: 3rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.15);
  letter-spacing: -0.02em;
  border-bottom: none;
  scroll-margin-top: 5rem;
}
.dark .changelog-page .content > h2 {
  color: rgba(255, 255, 255, 0.18);
}
.changelog-page .content > ul {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid #0074C6;
  margin-left: 0.5rem;
  list-style: none;
}
.changelog-page .content > ul > li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 0;
  list-style: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.dark .changelog-page .content > ul > li {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.changelog-page .content > ul > li:last-child {
  border-bottom: none;
}
.changelog-page .content > ul > li::before {
  content: "";
  position: absolute;
  left: -1.97rem;
  top: 1.1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0074C6;
  border: 2px solid var(--changelog-h2-bg, #ffffff);
}
.changelog-page .content > ul > li > strong:first-child {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  margin-right: 0.6rem;
  background: rgba(0, 116, 198, 0.08);
  border-radius: 0.375rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0074C6;
  font-variant-numeric: tabular-nums;
}
.dark .changelog-page .content > ul > li > strong:first-child {
  background: rgba(0, 116, 198, 0.15);
  color: #4FA8E8;
}
/* Sous-bullets : indented, pas de point */
.changelog-page .content > ul > li > ul {
  margin-top: 0.4rem;
  padding-left: 1rem;
  list-style: disc;
}
.changelog-page .content > ul > li > ul > li {
  padding: 0.15rem 0;
  border: none;
}
/* Badges (injectés par JS) */
.changelog-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  margin-right: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: 0.05rem;
}

/* === Page Contact : grid de canaux (téléphone, email, chat) === */
.contact-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0 2rem;
}
.contact-channels.contact-channels--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.contact-channels.contact-channels--single {
  grid-template-columns: 1fr;
  max-width: 32rem;
}
@media (max-width: 768px) {
  .contact-channels,
  .contact-channels.contact-channels--two {
    grid-template-columns: 1fr;
  }
}
/* Card horizontale (icône gauche, texte droite) pour le Chat en pleine largeur */
.contact-card.contact-card--row {
  flex-direction: row;
  align-items: flex-start;
  gap: 1.5rem;
  margin: 0 0 2rem;
}
.contact-card.contact-card--row .contact-card__icon {
  flex-shrink: 0;
}
.contact-card.contact-card--row .contact-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-width: 0;
}
.contact-card.contact-card--row .contact-card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
}
.dark .contact-card.contact-card--row .contact-card__title { color: #f3f4f6; }
.contact-card.contact-card--row .contact-card__desc {
  flex: 0;
}
@media (max-width: 640px) {
  .contact-card.contact-card--row {
    flex-direction: column;
  }
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.dark .contact-card {
  border-color: #262626;
  background: rgba(255, 255, 255, 0.03);
}
a.contact-card:hover {
  transform: translateY(-2px);
  border-color: #0074C6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.dark a.contact-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.contact-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.625rem;
  background: rgba(0, 116, 198, 0.08);
  color: #0074C6;
}
.dark .contact-card__icon {
  background: rgba(0, 116, 198, 0.15);
  color: #4FA8E8;
}
.contact-card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}
.contact-card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
}
.dark .contact-card__title { color: #f3f4f6; }
.contact-card__desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #4b5563;
  flex: 1;
}
.dark .contact-card__desc { color: #9ca3af; }
.contact-card__action {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0074C6;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dark .contact-card__action { color: #4FA8E8; }
.contact-card__action--muted {
  color: #6b7280;
  font-weight: 500;
  font-size: 0.875rem;
}
.dark .contact-card__action--muted { color: #9ca3af; }
a.contact-card .contact-card__action svg {
  transition: transform 0.2s ease;
}
a.contact-card:hover .contact-card__action svg {
  transform: translateX(3px);
}
.contact-note {
  margin: 2rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid #0074C6;
  background: #F5F7FA;
  border-radius: 0 0.375rem 0.375rem 0;
  font-size: 0.9375rem;
  color: #4b5563;
}
.dark .contact-note {
  background: rgba(255, 255, 255, 0.03);
  color: #9ca3af;
}

/* === Livres blancs : liste en rows (vignette portrait gauche, texte droite) === */
.livres-blancs-list {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
}
.livre-blanc-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
}
.livre-blanc-row:first-child { padding-top: 0.5rem; }
.livre-blanc-row:last-child { border-bottom: none; }
.dark .livre-blanc-row { border-bottom-color: #262626; }
@media (min-width: 640px) {
  .livre-blanc-row { flex-direction: row; gap: 1.75rem; align-items: flex-start; }
}
.livre-blanc-row__cover {
  flex-shrink: 0;
  width: 140px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.375rem;
  background: #f3f4f6;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.dark .livre-blanc-row__cover { background: #262626; }
@media (min-width: 640px) {
  .livre-blanc-row__cover { width: 180px; }
}
.livre-blanc-row:hover .livre-blanc-row__cover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.livre-blanc-row__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.livre-blanc-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.content .livre-blanc-row__title,
.livre-blanc-row__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: #111827;
  transition: color 0.15s ease;
}
@media (min-width: 640px) {
  .livre-blanc-row__title { font-size: 1.25rem; }
}
.dark .livre-blanc-row__title { color: #f3f4f6; }
.livre-blanc-row:hover .livre-blanc-row__title { color: #0074C6; }
.dark .livre-blanc-row:hover .livre-blanc-row__title { color: #4FA8E8; }
.livre-blanc-row__desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.625;
  color: #4b5563;
}
.dark .livre-blanc-row__desc { color: #9ca3af; }
.livre-blanc-row__cta {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0074C6;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dark .livre-blanc-row__cta { color: #4FA8E8; }
.livre-blanc-row__cta svg {
  transition: transform 0.2s ease;
}
.livre-blanc-row:hover .livre-blanc-row__cta svg {
  transform: translateX(3px);
}
