/* ============================================
   GUIDES PRIMEBET – STYLES SPÉCIFIQUES
   Version : 1.0
   Inspiré de la boutique (verre, animations)
   ============================================ */

/* Définir les hauteurs par défaut */
:root {
  --header-height: 60px;   /* À ajuster selon votre header */
  --nav-height: 50px;      /* À ajuster selon votre navigation */
}

/* Décalage du contenu principal sous la barre fixe */
main#content.newspaper-article {
  margin-top: calc(var(--header-height, 60px)) !important;
  position: relative;
  top: 0;
}

/* Grille responsive */
.guides-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .guides-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .guides-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Carte Guide – style verre (glass) */
.guide-card {
  display: flex;
  flex-direction: column;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--c-text);
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 260px;
}

.guide-card:hover {
  border-color: var(--c-accent);
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Animation subtile au survol */
.guide-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(99, 195, 255, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.guide-card:hover::after {
  opacity: 1;
}

/* Contenu de la carte */
.guide-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.guide-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--c-accent);
  line-height: 1.3;
  transition: color 0.2s;
}

.guide-card:hover .guide-title {
  color: white;
}

.guide-description {
  font-size: 0.95rem;
  color: var(--c-text-dim);
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.guide-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.guide-date {
  font-size: 0.85rem;
  color: var(--c-text-dim-1);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

.guide-card:hover .guide-date {
  background: rgba(99, 195, 255, 0.15);
  border-color: var(--c-accent);
  color: var(--c-text);
}

/* Ajustements pour très petits écrans */
@media (max-width: 480px) {
  .guide-card {
    padding: 20px;
    min-height: 240px;
  }
  
  .guide-title {
    font-size: 1.2rem;
  }
  
  .guide-description {
    font-size: 0.9rem;
    -webkit-line-clamp: 3;
  }
}

/* Style pour le lien actif dans la navigation */
.nav-link.active-page {
  background: rgba(99, 195, 255, 0.25);
  border-color: var(--c-accent);
  position: relative;
}

.nav-link.active-page::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-accent-2));
  border-radius: 2px;
}

/* ============================================
   GUIDES PRIMEBET – STYLES ARTICLE DÉTAILLÉ
   Version : 1.0
   Usage   : pages individuelles de guides (/guide/*)
   ============================================ */

/* ------------------------------
   CONTENEUR PRINCIPAL
------------------------------ */
.newspaper-article {
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--header-height, 70px) + var(--nav-height, 50px) + 30px) 5% 24px !important;
  background: var(--c-bg);
  color: var(--c-text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

/* Mise en page multicolonnes (grands écrans) */
@media (min-width: 1024px) {
  .newspaper-columns {
    column-count: 2;
    column-gap: 40px;
    column-rule: 1px solid var(--glass-border);
  }

  /* Éviter que certains éléments ne soient coupés entre colonnes */
  .newspaper-columns h1,
  .newspaper-columns h2,
  .newspaper-columns h3,
  .newspaper-columns .highlight-box,
  .newspaper-columns table,
  .newspaper-columns blockquote,
  .newspaper-columns .cta,
  .newspaper-columns .fotter {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ------------------------------
   TYPOGRAPHIE ARTICLE
------------------------------ */
.newspaper-article h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 1rem;
  margin-bottom: 3rem;
  color: white;
  background: linear-gradient(135deg, #fff, var(--c-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.newspaper-article h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--c-accent);
  border-bottom: 2px solid rgba(99, 195, 255, 0.25);
  padding-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.newspaper-article h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.newspaper-article h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--c-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.newspaper-article p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: var(--c-text);
}

/* Intro en plus grand */
.newspaper-article .lede {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--c-text-dim);
  border-left: 4px solid var(--c-accent);
  padding-left: 20px;
  margin: 1.5rem 0;
  font-style: italic;
}

/* Texte secondaire */
.newspaper-article .muted {
  color: var(--c-text-dim-1);
  font-size: 0.95rem;
}

/* ------------------------------
   LETTRINE (DROP CAP)
------------------------------ */
.drop-cap > p:first-of-type::first-letter {
  font-size: 4.5rem;
  font-weight: 800;
  float: left;
  line-height: 0.8;
  margin-right: 12px;
  color: var(--c-accent);
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(99, 195, 255, 0.3);
}

/* ------------------------------
   LISTES
------------------------------ */
.newspaper-article ul,
.newspaper-article ol {
  margin: 1.25rem 0 1.5rem 1.5rem;
}

.newspaper-article li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
  position: relative;
}

.newspaper-article ul > li {
  list-style-type: none;
  padding-left: 1.5rem;
}

.newspaper-article ul > li::before {
  content: "▹";
  color: var(--c-accent);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.newspaper-article ol {
  list-style: none;
  counter-reset: guide-counter;
}

.newspaper-article ol > li {
  counter-increment: guide-counter;
  padding-left: 2rem;
}

.newspaper-article ol > li::before {
  content: counter(guide-counter) ".";
  color: var(--c-accent);
  font-weight: 700;
  position: absolute;
  left: 0;
}

/* ------------------------------
   TABLEAUX (élégants, vitrés)
------------------------------ */
.newspaper-article table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}

.newspaper-article th {
  background: rgba(99, 195, 255, 0.15);
  color: white;
  font-weight: 600;
  padding: 14px 12px;
  text-align: left;
  border-bottom: 2px solid var(--c-accent);
}

.newspaper-article td {
  padding: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.newspaper-article tr:last-child td {
  border-bottom: none;
}

.newspaper-article tbody tr:hover {
  background: rgba(99, 195, 255, 0.05);
  transition: var(--transition);
}

/* ------------------------------
   ENCADRÉS / HIGHLIGHT BOX
------------------------------ */
.newspaper-article .highlight-box {
  background: linear-gradient(145deg, rgba(99, 195, 255, 0.08), rgba(14, 7, 102, 0.12));
  border-left: 6px solid var(--c-accent);
  border-radius: var(--radius);
  padding: 24px;
  margin: 2rem 0;
  position: relative;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.newspaper-article .highlight-box h3 {
  margin-top: 0;
  color: var(--c-accent);
  font-size: 1.3rem;
  border-bottom: none;
  padding-bottom: 0;
}

.newspaper-article .highlight-box p:last-child {
  margin-bottom: 0;
}

/* Variante warning / alerte */
.newspaper-article .highlight-box.warning {
  border-left-color: #ffb347;
  background: linear-gradient(145deg, rgba(255, 179, 71, 0.08), rgba(255, 87, 34, 0.08));
}

.newspaper-article .highlight-box.warning h3 {
  color: #ffb347;
}

/* ------------------------------
   BLOC DE CITATION (blockquote)
------------------------------ */
.newspaper-article blockquote {
  margin: 2rem 0;
  padding: 20px 28px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  position: relative;
  font-style: italic;
  color: var(--c-text-dim);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

.newspaper-article blockquote p {
  margin-bottom: 0.5rem;
}

.newspaper-article blockquote cite {
  display: block;
  margin-top: 12px;
  font-size: 0.9rem;
  font-style: normal;
  color: var(--c-accent);
  font-weight: 500;
  text-align: right;
}

/* ------------------------------
   DÉTAILS / FAQ (accordéon léger)
------------------------------ */
.newspaper-article details {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 8px 16px;
  transition: var(--transition);
}

.newspaper-article details:hover {
  border-color: var(--c-accent);
}

.newspaper-article summary {
  font-weight: 600;
  padding: 12px 0;
  cursor: pointer;
  color: var(--c-text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.newspaper-article summary::-webkit-details-marker {
  display: none;
}

.newspaper-article summary::after {
  content: "▼";
  font-size: 0.8rem;
  color: var(--c-accent);
  transition: transform 0.2s;
}

.newspaper-article details[open] summary::after {
  transform: rotate(180deg);
}

.newspaper-article details p {
  margin: 0 0 16px 0;
  padding-left: 8px;
  border-left: 2px solid var(--c-accent);
}

/* ------------------------------
   DICTIONNAIRE (dl, dt, dd)
------------------------------ */
.newspaper-article dl {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 12px 16px;
  margin: 1.5rem 0;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
}

.newspaper-article dt {
  font-weight: 700;
  color: var(--c-accent);
  text-align: right;
}

.newspaper-article dd {
  margin-left: 0;
  color: var(--c-text-dim);
}

@media (max-width: 768px) {
  main#content.newspaper-article {
    margin-top: calc(var(--header-height, 70px) + var(--nav-height, 50px) + 20px) !important;
  }

  .newspaper-article dl {
    grid-template-columns: 1fr;
  }
  .newspaper-article dt {
    text-align: left;
  }
}

/* ------------------------------
   BOUTONS CTA (hérités + spécifiques)
------------------------------ */
.newspaper-article .cta {
  text-align: center;
  margin: 2.5rem 0;
}

.newspaper-article .btn {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
  color: white;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  border: none;
  box-shadow: 0 8px 20px rgba(99, 195, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
}

.newspaper-article .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(99, 195, 255, 0.4);
}

/* ------------------------------
   PIED D'ARTICLE
------------------------------ */
.newspaper-article .fotter {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--c-text-dim-1);
}

.newspaper-article .fotter a {
  color: var(--c-accent);
  font-weight: 600;
  text-decoration: none;
}

.newspaper-article .fotter a:hover {
  text-decoration: underline;
}

/* ------------------------------
   RESPONSIVE : MOBILE
------------------------------ */
@media (max-width: 768px) {
  .newspaper-article {
    padding: calc(var(--header-height, 70px) + var(--nav-height, 50px) + 20px) 16px 20px !important;
    margin: 0 auto;
  }

  .newspaper-article h1 {
    font-size: 2.4rem;
    margin-top: 0.75rem;
    margin-bottom: 2.75rem;
  }

  .newspaper-article h2 {
    font-size: 1.5rem;
  }

  .newspaper-article h3 {
    font-size: 1.2rem;
  }

  .newspaper-article .lede {
    font-size: 1.1rem;
  }

  .drop-cap > p:first-of-type::first-letter {
    font-size: 3.5rem;
  }

  .newspaper-article table {
    font-size: 0.8rem;
  }

  .newspaper-article th,
  .newspaper-article td {
    padding: 8px 6px;
  }

  .newspaper-article dl {
    grid-template-columns: 1fr;
  }

  .newspaper-article dt {
    text-align: left;
  }
}

/* ------------------------------
   CORRECTIONS POUR LE THÈME SOMBRE
   (assure la lisibilité)
------------------------------ */
.newspaper-article a:not(.btn) {
  color: var(--c-accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dotted rgba(99, 195, 255, 0.4);
  transition: var(--transition);
}

.newspaper-article a:not(.btn):hover {
  border-bottom-color: var(--c-accent);
  color: white;
}

/* Émojis et icônes spéciales */
.newspaper-article h3 emoji,
.newspaper-article h3 i[class*="icon"] {
  font-style: normal;
  font-size: 1.4em;
  vertical-align: middle;
}

/* Le conteneur principal de l'article DOIT être poussé sous le header fixe */
main.newspaper-article,
.newspaper-article:first-child {
  position: relative;
  top: 0; /* annule d'éventuels décalages */
  margin-top: calc(var(--header-height) + var(--nav-height) + 30px);
  /* 30px : marge esthétique supplémentaire */
}

/* Ajustement mobile */
@media (max-width: 768px) {
  main.newspaper-article,
  .newspaper-article:first-child {
    margin-top: calc(var(--header-height) + var(--nav-height) + 20px);
  }
  
  .newspaper-article {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Pour les très petits écrans / orientation portrait */
@media (max-width: 480px) {
  main#content.newspaper-article {
    margin-top: calc(var(--header-height, 70px) + var(--nav-height, 50px) + 10px) !important;
  }

  main.newspaper-article,
  .newspaper-article:first-child {
    margin-top: calc(var(--header-height) + var(--nav-height) + 10px);
  }

  .newspaper-article {
    padding: calc(var(--header-height, 70px) + var(--nav-height, 50px) + 10px) 12px 16px !important;
  }
}

.newspaper-article header {
  margin-top: 0;           /* annule une éventuelle marge par défaut */
  padding-top: 0.5rem;
  padding: 1rem 0 0.5rem 0;    /* petit espace de respiration */
}

@media (min-width: 768px) {
  :root {
    --header-height: 75px;
  }
}
