/* =====================================================================
   LDDTE — Typography Styles for Articles
   Cible : Contenus d'articles Elementor uniquement
   Version nettoyée - Suppression des interférences header/footer
   ===================================================================== */

/* Variables de couleurs et styles de base */
body.single-post {
  --indigo: #1E40AF; 
  --indigo-dark: #1E3A8A;
  --blue-mid: #2563EB; 
  --blue-light: #0EA5E9;
  --turquoise: #06B6D4; 
  --orange: #F47A60;
  --text: #000000; 
  --muted: #2C3E50; 
  --paper: #fff;
  --ink: #000000; 
  --ink-2: #1a1a1a;

  /* Effets visuels */
  --ring: 0 0 0 1px rgba(2,6,23,.06), 0 12px 30px rgba(7,17,42,.10);
  --shadow-soft: 0 10px 30px rgba(7,17,42,.12);
  --radius: 14px;
}

/* ==========================================
   CONTENEUR PRINCIPAL ARTICLE ELEMENTOR
   ========================================== */

.elementor-widget-theme-post-content {
  color: #000000 !important;
  background: #fafbfc !important;
  font-size: 1.06rem;
  line-height: 1.8;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  hanging-punctuation: first allow-end;
}

/* Sélection de texte */
.elementor-widget-theme-post-content ::selection {
  background: rgba(14,165,233,.22); 
  color: #000000;
}

/* ==========================================
   TITRES - HIÉRARCHIE TYPOGRAPHIQUE
   ========================================== */

.elementor-widget-theme-post-content h1,
.elementor-widget-theme-post-content h2,
.elementor-widget-theme-post-content h3,
.elementor-widget-theme-post-content h4,
.elementor-widget-theme-post-content h5,
.elementor-widget-theme-post-content h6 {
  font-weight: 900; 
  line-height: 1.2; 
  color: #000000 !important;
  margin: 1.5em 0 .6em;
  position: relative;
}

.elementor-widget-theme-post-content h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
}

.elementor-widget-theme-post-content h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  padding-bottom: .25em;
  background: linear-gradient(90deg, rgba(14,165,233,.28), rgba(30,64,175,.28)) bottom/0 3px no-repeat;
  transition: background-size .35s ease;
}

.elementor-widget-theme-post-content h2:hover {
  background-size: 100% 3px;
}

.elementor-widget-theme-post-content h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.3rem);
}

/* Hashtag d'ancre au survol */
.elementor-widget-theme-post-content h2:hover::after,
.elementor-widget-theme-post-content h3:hover::after {
  content: "#";
  position: absolute; 
  left: -1.2ch; 
  top: 0;
  color: rgba(14,165,233,.8); 
  font-weight: 800;
}

/* ==========================================
   PARAGRAPHES ET TEXTE COURANT
   ========================================== */

.elementor-widget-theme-post-content p {
  color: #000000 !important;
}

@media (min-width: 900px) {
  .elementor-widget-theme-post-content > p:first-of-type:not(:has(img)) {
    font-size: 1.12rem;
  }
  
  /* Drop cap sur paragraphe avec classe .lead */
  .elementor-widget-theme-post-content .lead:first-letter {
    float: left; 
    font-size: 3.2em; 
    line-height: .9; 
    padding: .08em .12em 0 0;
    font-weight: 900; 
    color: #000000;
  }
}

/* ==========================================
   LIENS AVEC ANIMATION
   ========================================== */

.elementor-widget-theme-post-content a {
  color: #1E40AF !important;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) bottom/0 2px no-repeat;
  transition: background-size .25s ease, color .25s ease;
}

.elementor-widget-theme-post-content a:hover {
  color: #1E3A8A !important;
  background-size: 100% 2px;
}

/* Indicateur liens externes */
.elementor-widget-theme-post-content a[href^="http"]:not([href*="aurelienbamde.com"])::after {
  content: "↗"; 
  font-size: .82em; 
  margin-left: .25em; 
  opacity: .8;
}

/* ==========================================
   LISTES STYLISÉES
   ========================================== */

.elementor-widget-theme-post-content ul { 
  margin: 0 0 1em 1.1em;
  color: #000000 !important;
}

.elementor-widget-theme-post-content ol { 
  margin: 0 0 1em 1.25em;
  color: #000000 !important;
}

.elementor-widget-theme-post-content li {
  color: #000000 !important;
}

.elementor-widget-theme-post-content li::marker { 
  color: #1E40AF !important; 
  font-weight: 800;
}

/* Liste avec checkmarks */
.elementor-widget-theme-post-content ul.checklist { 
  list-style: none; 
  margin-left: 0;
}

.elementor-widget-theme-post-content ul.checklist li {
  position: relative; 
  padding-left: 1.6em;
  color: #000000 !important;
}

.elementor-widget-theme-post-content ul.checklist li::before {
  content: "✓"; 
  position: absolute; 
  left: .2em; 
  color: #06B6D4; 
  font-weight: 900;
}

/* ==========================================
   CITATIONS ET BLOCS DE CONTENU
   ========================================== */

.elementor-widget-theme-post-content blockquote {
  margin: 1.3em 0;
  padding: 1em 1.1em;
  background: linear-gradient(90deg, rgba(14,165,233,.15), rgba(14,165,233,.08));
  border-left: 4px solid var(--blue-light);
  border-radius: 12px;
  color: #000000 !important;
  box-shadow: var(--ring);
}

.elementor-widget-theme-post-content .pullquote {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 700; 
  line-height: 1.35;
  padding: 1.1em 1.2em;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(14,165,233,.25);
  box-shadow: var(--ring);
  color: #000000 !important;
}

/* ==========================================
   ÉLÉMENTS CODE ET TECHNIQUE
   ========================================== */

.elementor-widget-theme-post-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f8f9fa;
  color: #000000 !important;
  padding: .18em .38em; 
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.elementor-widget-theme-post-content kbd {
  font-family: inherit; 
  font-weight: 800; 
  font-size: .86em;
  background: #fff; 
  border: 1px solid #d9e1f2; 
  border-bottom-width: 2px; 
  border-radius: 8px;
  padding: .15em .4em; 
  box-shadow: 0 2px 0 rgba(2,6,23,.08);
  color: #000000 !important;
}

.elementor-widget-theme-post-content pre {
  background: #f8f9fa; 
  border: 1px solid #dee2e6;
  padding: 16px; 
  border-radius: 14px; 
  overflow: auto; 
  box-shadow: var(--shadow-soft);
  color: #000000 !important;
}

/* ==========================================
   IMAGES ET FIGURES
   ========================================== */

.elementor-widget-theme-post-content img {
  max-width: 100%; 
  height: auto; 
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform .35s ease, box-shadow .35s ease;
}

.elementor-widget-theme-post-content img:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(7,17,42,.16);
}

.elementor-widget-theme-post-content figure { 
  margin: 1.2em 0; 
}

.elementor-widget-theme-post-content figcaption {
  font-size: .9rem; 
  color: #2C3E50 !important; 
  text-align: center; 
  margin-top: .55em;
}

/* Figure élargie */
@media (min-width: 980px) {
  .elementor-widget-theme-post-content figure.wide {
    margin-left: calc(-8vw); 
    margin-right: calc(-8vw);
  }
}

/* ==========================================
   TABLEAUX RESPONSIVE
   ========================================== */

.elementor-widget-theme-post-content table {
  width: 100%; 
  border-collapse: collapse; 
  margin: 1.1em 0; 
  font-size: .98rem;
  overflow: hidden; 
  border-radius: 12px; 
  box-shadow: var(--shadow-soft);
  background: #fff;
}

.elementor-widget-theme-post-content th {
  text-align: left; 
  background: #f8f9fa; 
  color: #000000 !important; 
  font-weight: 900;
  position: sticky; 
  top: 0; 
  z-index: 1;
}

.elementor-widget-theme-post-content td {
  color: #000000 !important;
}

.elementor-widget-theme-post-content th, 
.elementor-widget-theme-post-content td {
  border: 1px solid #dee2e6; 
  padding: 10px 12px;
}

.elementor-widget-theme-post-content tbody tr:nth-child(even) { 
  background: #fafbfe; 
}

@media (max-width: 680px) {
  .elementor-widget-theme-post-content table { 
    display: block; 
    overflow-x: auto; 
  }
}

/* ==========================================
   BOÎTES D'ALERTE ET NOTES
   ========================================== */

.elementor-widget-theme-post-content .note,
.elementor-widget-theme-post-content .info,
.elementor-widget-theme-post-content .warning,
.elementor-widget-theme-post-content .tip {
  background: #fff; 
  border: 1px solid #dee2e6; 
  border-radius: 14px; 
  padding: 12px 14px;
  box-shadow: var(--ring);
  color: #000000 !important;
  margin: 1em 0;
}

.elementor-widget-theme-post-content .note,
.elementor-widget-theme-post-content .info { 
  border-left: 4px solid var(--turquoise); 
}

.elementor-widget-theme-post-content .warning { 
  border-left: 4px solid var(--orange); 
  background: #fff7f5; 
}

.elementor-widget-theme-post-content .tip { 
  border-left: 4px solid var(--blue-light); 
  background: #f6fbff; 
}

/* ==========================================
   NOTES DE BAS DE PAGE
   ========================================== */

.elementor-widget-theme-post-content sup a {
  text-decoration: none; 
  background: linear-gradient(currentColor,currentColor) bottom/100% 2px no-repeat;
  padding: 0 .1em;
  color: #1E40AF !important;
}

.elementor-widget-theme-post-content .footnotes {
  margin-top: 1.6em; 
  font-size: .95rem; 
  color: #2C3E50 !important;
  border-top: 2px dashed #e6e9f2; 
  padding-top: 1em;
}

.elementor-widget-theme-post-content .footnotes li { 
  margin: .4em 0;
  color: #000000 !important;
}

/* ==========================================
   SÉPARATEURS
   ========================================== */

.elementor-widget-theme-post-content hr {
  border: 0; 
  height: 2px; 
  background: linear-gradient(90deg, var(--indigo-dark), var(--blue-mid), var(--blue-light));
  opacity: .18; 
  margin: 1.6em 0;
}

/* ==========================================
   MODE SOMBRE (PRÉFÉRENCE SYSTÈME)
   ========================================== */

@media (prefers-color-scheme: dark) {
  .elementor-widget-theme-post-content { 
    color: #e9eefc !important;
    background: #1a1a1a !important;
  }
  
  .elementor-widget-theme-post-content h1,
  .elementor-widget-theme-post-content h2,
  .elementor-widget-theme-post-content h3,
  .elementor-widget-theme-post-content h4,
  .elementor-widget-theme-post-content h5,
  .elementor-widget-theme-post-content h6,
  .elementor-widget-theme-post-content p,
  .elementor-widget-theme-post-content li {
    color: #e9eefc !important;
  }
  
  .elementor-widget-theme-post-content a { 
    color: #76a7ff !important; 
  }
  
  .elementor-widget-theme-post-content blockquote {
    background: linear-gradient(90deg, rgba(14,165,233,.14), rgba(14,165,233,.06));
    color: #d7e6ff !important; 
    border-left-color: #58c8ff;
  }
  
  .elementor-widget-theme-post-content pre {
    background: #2a2a2a; 
    border-color: #3b4b66; 
    color: #e9eefc !important;
  }
  
  .elementor-widget-theme-post-content table { 
    background: #1a1a1a 
  }
  
  .elementor-widget-theme-post-content th { 
    background: #2a2a2a; 
    color: #e9eefc !important; 
  }
  
  .elementor-widget-theme-post-content td { 
    color: #e9eefc !important; 
  }
  
  .elementor-widget-theme-post-content td, 
  .elementor-widget-theme-post-content th {
    border-color: #3a3a3a;
  }
  
  .elementor-widget-theme-post-content .note,
  .elementor-widget-theme-post-content .info,
  .elementor-widget-theme-post-content .warning,
  .elementor-widget-theme-post-content .tip {
    background: #2a2a2a; 
    border-color: #3a3a3a; 
    color: #e9eefc !important;
  }
}

/* ==========================================
   ACCESSIBILITÉ - RÉDUCTION ANIMATIONS
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  * { 
    animation-duration: .001ms !important; 
    animation-iteration-count: 1 !important; 
    transition-duration: 0ms !important; 
    scroll-behavior: auto !important;
  }
}