/* ============================================
   MAROCAINS DU MONDE - STYLE RAFFINÉ
   Version 1.0 - Février 2026
   Fichier CSS principal
   ============================================ */

/* ============================================
   1. VARIABLES CSS (Couleurs Maroc)
   ============================================ */

:root {
  /* Couleurs principales */
  --mdm-rouge: #C1272D;
  --mdm-vert: #006233;
  --mdm-or: #FFD700;
  
  /* Couleurs secondaires */
  --mdm-bordeaux: #8B1A1F;
  --mdm-vert-emeraude: #008C54;
  --mdm-or-pale: #FFF4CC;
  
  /* Couleurs neutres */
  --mdm-gris-fonce: #2C2C2C;
  --mdm-gris-moyen: #6B6B6B;
  --mdm-gris-clair: #E8E8E8;
  --mdm-blanc-casse: #FAFAFA;
  --mdm-blanc: #FFFFFF;
  
  /* Typographie */
  --mdm-font-title: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --mdm-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================
   2. CONTENEUR ARTICLE GLOBAL
   ============================================ */

.article-mdm,
.article-mdm-content {
  font-family: var(--mdm-font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--mdm-gris-fonce);
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* Reset des marges pour éviter conflits avec Kadence */
.article-mdm > *:first-child,
.article-mdm-content > *:first-child {
  margin-top: 0;
}

/* ============================================
   3. TYPOGRAPHIE
   ============================================ */

/* Titres H1 */
.article-mdm h1,
.article-mdm-content h1 {
  font-family: var(--mdm-font-title);
  font-size: 42px;
  font-weight: 700;
  color: var(--mdm-rouge);
  line-height: 1.2;
  margin: 40px 0 20px 0;
}

/* Titres H2 */
.article-mdm h2,
.article-mdm-content h2 {
  font-family: var(--mdm-font-title);
  font-size: 32px;
  font-weight: 600;
  color: var(--mdm-vert);
  margin: 50px 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--mdm-or);
}

/* Titres H3 */
.article-mdm h3,
.article-mdm-content h3 {
  font-family: var(--mdm-font-title);
  font-size: 24px;
  font-weight: 600;
  color: var(--mdm-gris-fonce);
  margin: 35px 0 16px 0;
}

/* Titres H4 */
.article-mdm h4,
.article-mdm-content h4 {
  font-family: var(--mdm-font-title);
  font-size: 20px;
  font-weight: 600;
  color: var(--mdm-gris-fonce);
  margin: 28px 0 12px 0;
}

/* Paragraphes */
.article-mdm p,
.article-mdm-content p {
  margin: 0 0 20px 0;
}

/* Texte en gras */
.article-mdm strong,
.article-mdm-content strong {
  font-weight: 600;
  color: var(--mdm-rouge);
}

/* Liens */
.article-mdm a,
.article-mdm-content a {
  color: var(--mdm-vert);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.article-mdm a:hover,
.article-mdm-content a:hover {
  border-bottom-color: var(--mdm-vert);
}

/* ============================================
   4. BLOCS D'ALERTE
   ============================================ */

/* Base commune pour tous les blocs d'alerte */
.alert-astuce,
.alert-important,
.alert-danger,
.alert-info,
.alert-success {
  border-radius: 12px;
  padding: 20px 24px;
  margin: 30px 0;
  position: relative;
  overflow: hidden;
}

/* Icône emoji en watermark */
.alert-astuce::before,
.alert-important::before,
.alert-danger::before,
.alert-info::before,
.alert-success::before {
  position: absolute;
  top: 16px;
  left: -30px;
  font-size: 80px;
  opacity: 0.1;
  transform: rotate(-15deg);
}

/* Titres des alertes */
.alert-astuce-title,
.alert-important-title,
.alert-danger-title,
.alert-info-title,
.alert-success-title {
  font-family: var(--mdm-font-title);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Contenu des alertes */
.alert-astuce-content,
.alert-important-content,
.alert-danger-content,
.alert-info-content,
.alert-success-content {
  margin: 0;
  line-height: 1.6;
}

/* Alerte ASTUCE (💡 vert) */
.alert-astuce {
  background: linear-gradient(135deg, #E8F5E9 0%, #F1F8E9 100%);
  border-left: 5px solid #4CAF50;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.alert-astuce::before {
  content: '💡';
}

.alert-astuce-title {
  color: #2E7D32;
}

.alert-astuce-content {
  color: #1B5E20;
}

/* Alerte IMPORTANT (⚠️ orange) */
.alert-important {
  background: linear-gradient(135deg, #FFF3E0 0%, #FFECB3 100%);
  border-left: 5px solid #FF9800;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}

.alert-important::before {
  content: '⚠️';
}

.alert-important-title {
  color: #E65100;
}

.alert-important-content {
  color: #BF360C;
}

/* Alerte DANGER (🚨 rouge) */
.alert-danger {
  background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
  border-left: 5px solid #F44336;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.15);
}

.alert-danger::before {
  content: '🚨';
}

.alert-danger-title {
  color: #C62828;
}

.alert-danger-content {
  color: #B71C1C;
}

/* Alerte INFO (ℹ️ bleu) */
.alert-info {
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  border-left: 5px solid #2196F3;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.alert-info::before {
  content: 'ℹ️';
}

.alert-info-title {
  color: #1565C0;
}

.alert-info-content {
  color: #0D47A1;
}

/* Alerte SUCCÈS (✅ vert foncé) */
.alert-success {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border-left: 5px solid #4CAF50;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.alert-success::before {
  content: '✅';
}

.alert-success-title {
  color: #2E7D32;
}

.alert-success-content {
  color: #1B5E20;
}

/* ============================================
   5. TABLEAUX RESPONSIVES
   ============================================ */

/* Wrapper avec scroll horizontal */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 30px 0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background: var(--mdm-blanc);
}

/* Tableau desktop */
.table-responsive {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  font-size: 15px;
}

/* En-tête du tableau */
.table-responsive thead {
  background: linear-gradient(135deg, var(--mdm-rouge) 0%, var(--mdm-bordeaux) 100%);
  color: var(--mdm-blanc);
}

.table-responsive thead th {
  padding: 16px 12px;
  text-align: left;
  font-family: var(--mdm-font-title);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
}

.table-responsive thead th:first-child {
  border-radius: 12px 0 0 0;
}

.table-responsive thead th:last-child {
  border-radius: 0 12px 0 0;
}

/* Corps du tableau */
.table-responsive tbody tr {
  border-bottom: 1px solid var(--mdm-gris-clair);
  transition: background-color 0.2s ease;
}

.table-responsive tbody tr:hover {
  background-color: var(--mdm-or-pale);
}

.table-responsive tbody tr:last-child {
  border-bottom: none;
}

.table-responsive tbody td {
  padding: 14px 12px;
  color: var(--mdm-gris-fonce);
  border: none;
}

.table-responsive tbody td strong {
  color: var(--mdm-rouge);
  font-weight: 600;
}

/* Badge "Recommandé" dans tableau */
.badge-recommande {
  display: inline-block;
  background: linear-gradient(135deg, var(--mdm-or), #FFC700);
  color: var(--mdm-gris-fonce);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

/* Version mobile (cartes) */
.table-mobile-cards {
  display: none;
}

.table-card {
  background: var(--mdm-blanc);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-left: 4px solid var(--mdm-rouge);
}

.table-card-title {
  font-family: var(--mdm-font-title);
  font-size: 18px;
  font-weight: 600;
  color: var(--mdm-rouge);
  margin: 0 0 16px 0;
}

.table-card-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--mdm-gris-clair);
}

.table-card-row:last-child {
  border-bottom: none;
}

.table-card-label {
  font-weight: 600;
  color: var(--mdm-gris-moyen);
  font-size: 14px;
}

.table-card-value {
  color: var(--mdm-gris-fonce);
  font-size: 15px;
  text-align: right;
}

/* Afficher cartes sur mobile, cacher tableau */
@media (max-width: 768px) {
  .table-responsive {
    display: none;
  }
  
  .table-mobile-cards {
    display: block;
  }
}

/* =========================
   5Bis. TABLEAUX LARGES - SOLUTION GLOBALE
========================= */

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.table-scroll table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

/* En-tête du tableau */
.table-scroll thead {
  background: linear-gradient(135deg, var(--mdm-rouge) 0%, var(--mdm-bordeaux) 100%);
  color: var(--mdm-blanc);
}

.table-thead thead th {
  padding: 16px 12px;
  text-align: left;
  font-family: var(--mdm-font-title);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
}

.table-thead thead th:first-child {
  border-radius: 12px 0 0 0;
}

.table-responsive thead th:last-child {
  border-radius: 0 12px 0 0;
}


.table-scroll td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}

.table-scroll th {
  font-weight: 700;
}

.article-mdm,
.article-mdm-content,
.entry-content,
.wp-block-post-content {
  max-width: 100%;
}

/* ============================================
   6. LISTES STYLISÉES
   ============================================ */

/* Listes à puces avec flèche dorée */
.article-mdm ul,
.article-mdm-content ul {
  list-style: none;
  padding-left: 0;
  margin: 20px 0;
}

.article-mdm ul li,
.article-mdm-content ul li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.article-mdm ul li::before,
.article-mdm-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--mdm-or);
  font-size: 20px;
  font-weight: bold;
}

/* Liste avec checkmarks ✅ */
.list-check li::before {
  content: '✅';
  font-size: 16px;
}

/* Liste avec croix ❌ */
.list-cross li::before {
  content: '❌';
  font-size: 16px;
}

/* Listes numérotées */
.article-mdm ol,
.article-mdm-content ol {
  padding-left: 28px;
  margin: 20px 0;
}

.article-mdm ol li,
.article-mdm-content ol li {
  margin-bottom: 12px;
  line-height: 1.6;
}

/* ============================================
   7. SOMMAIRE
   ============================================ */

.sommaire {
  background: linear-gradient(135deg, var(--mdm-blanc-casse) 0%, #F5F5F5 100%);
  border: 2px solid var(--mdm-gris-clair);
  border-radius: 12px;
  padding: 24px;
  margin: 40px 0;
}

.sommaire-title {
  font-family: var(--mdm-font-title);
  font-size: 22px;
  font-weight: 600;
  color: var(--mdm-gris-fonce);
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sommaire-list {
  list-style: decimal;
  padding-left: 28px;
  margin: 0;
}

.sommaire-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--mdm-gris-clair);
}

.sommaire-list li:last-child {
  border-bottom: none;
}

.sommaire-list a {
  color: var(--mdm-vert);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: block;
}

.sommaire-list a:hover {
  color: var(--mdm-rouge);
  padding-left: 8px;
}

/* ============================================
   8. BOUTONS CTA
   ============================================ */

.btn-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--mdm-rouge) 0%, var(--mdm-bordeaux) 100%);
  color: var(--mdm-blanc);
  font-family: var(--mdm-font-title);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(193, 39, 45, 0.3);
  transition: all 0.3s ease;
  margin: 20px 0;
  border: none;
  cursor: pointer;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(193, 39, 45, 0.4);
  border-bottom: none;
  color: var(--mdm-blanc);
}

/* ============================================
   9. META INFORMATIONS
   ============================================ */

.article-meta {
  background: linear-gradient(135deg, var(--mdm-or-pale) 0%, var(--mdm-blanc-casse) 100%);
  padding: 16px 24px;
  border-radius: 12px;
  margin: 30px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--mdm-gris-moyen);
  border-left: 4px solid var(--mdm-or);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-meta-item svg {
  flex-shrink: 0;
}

/* ============================================
   10. CONCLUSION & SOURCES
   ============================================ */

.conclusion-box {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border-left: 5px solid #4CAF50;
  border-radius: 12px;
  padding: 30px;
  margin: 50px 0;
}

.conclusion-title {
  font-family: var(--mdm-font-title);
  font-size: 28px;
  font-weight: 600;
  color: #2E7D32;
  margin: 0 0 20px 0;
}

.sources-list {
  font-size: 14px;
  color: var(--mdm-gris-moyen);
  margin: 30px 0;
  padding: 20px;
  background: var(--mdm-blanc-casse);
  border-radius: 8px;
}

.sources-list strong {
  color: var(--mdm-gris-fonce);
}

/* ============================================
   11. RESPONSIVE MOBILE
   ============================================ */

@media (max-width: 768px) {
  .article-mdm,
  .article-mdm-content {
    font-size: 16px;
    padding: 0 14px;
  }
  
  .article-mdm h1,
  .article-mdm-content h1 {
    font-size: 32px;
  }
  
  .article-mdm h2,
  .article-mdm-content h2 {
    font-size: 26px;
  }
  
  .article-mdm h3,
  .article-mdm-content h3 {
    font-size: 20px;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 12px;
  }
  
  .alert-astuce,
  .alert-important,
  .alert-danger,
  .alert-info,
  .alert-success {
    padding: 16px 18px;
  }
  
  .alert-astuce-title,
  .alert-important-title,
  .alert-danger-title,
  .alert-info-title,
  .alert-success-title {
    font-size: 16px;
  }
  
  .btn-cta {
    width: 100%;
    text-align: center;
  }
  
  .sommaire {
    padding: 20px;
  }
}

/* Ajustement des listes pour meilleure largeur mobile */

.article-mdm ul,
.article-mdm-content ul,
.article-mdm ol,
.article-mdm-content ol {
  padding-left: 16px;
  margin-left: 0;
}

.article-mdm li,
.article-mdm-content li {
  margin-bottom: 6px;
}

@media (max-width: 768px) {

.article-mdm ul,
.article-mdm-content ul,
.article-mdm ol,
.article-mdm-content ol {
  padding-left: 14px;
}

}

/* ========================================
   4️⃣ Correction : Masquer le titre textuel dans les articles ET catégories
======================================== */
.single .site-branding .site-title,
.single .site-branding .site-title a,
.archive .site-branding .site-title,
.archive .site-branding .site-title a,
.category .site-branding .site-title,
.category .site-branding .site-title a,
.tax-category .site-branding .site-title,
.tax-category .site-branding .site-title a {
    display: none !important;
}

/* Garder uniquement le logo visible */
.site-branding .custom-logo-link {
    display: block !important;
}


/* ========================================
   5️⃣ Correction : Isoler les "Publications similaires"
======================================== */
.article-mdm .related-posts,
.article-mdm .related-articles,
.article-mdm .kb-related-posts,
.article-mdm .wp-block-post-template {
    background: transparent !important;
    padding: 0 !important;
    margin: 2rem 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.article-mdm .related-posts h2,
.article-mdm .related-posts h3 {
    font-family: 'Montserrat', sans-serif !important;
    color: #2C2C2C !important;
    font-size: 1.8rem !important;
    margin-bottom: 1rem !important;
}

.article-mdm .related-posts article {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========================================
   🏠 PAGE D'ACCUEIL - BLOCS PERSONNALISÉS
======================================== */

/* ========================================
   🏠 BLOC 1 : HERO BANNER (Page d'accueil)
======================================== */
.hero-banner {
    position: relative;
    height: 600px;
    background: linear-gradient(135deg, #C1272D 0%, #8B1A1F 35%, #006233 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1539037116277-4db20889f2d4?w=1920&h=600&fit=crop') center/cover no-repeat;
    opacity: 0.15;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
}

.hero-logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 2rem;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 2rem 0;
    font-weight: 300;
}

.hero-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #2C2C2C;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    color: #2C2C2C;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .hero-banner {
        height: 500px;
    }
    
    .hero-logo {
        max-width: 200px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        height: 400px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}


/* ========================================
   BLOC 2 : Section Valeur (3 colonnes)
======================================== */
.value-section {
    background: linear-gradient(135deg, rgba(193,39,45,0.03) 0%, rgba(0,98,51,0.03) 100%);
    padding: 4rem 2rem;
    margin: 0 auto;
}

.value-section .section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2C2C2C;
    text-align: center;
    margin-bottom: 3rem;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.value-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(193,39,45,0.15);
}

.value-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.value-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #C1272D;
    margin: 1rem 0;
}

.value-card p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #6B6B6B;
    line-height: 1.6;
}

/* ========================================
   BLOC 4 : Catégories Populaires
======================================== */
.categories-section {
    padding: 3rem 2rem;
    background: #FAFAFA;
    text-align: center;
}

.categories-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #2C2C2C;
    margin-bottom: 2rem;
}

.category-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #C1272D 0%, #8B1A1F 100%);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(193,39,45,0.2);
}

.category-badge:hover {
    background: linear-gradient(135deg, #8B1A1F 0%, #C1272D 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(193,39,45,0.35);
    color: white;
}

.category-badge span {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* ========================================
   BLOC 5 : Newsletter
======================================== */
.newsletter-homepage {
    background: linear-gradient(135deg, #C1272D 0%, #8B1A1F 35%, #006233 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    margin: 2rem 0;
}

.newsletter-homepage h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.newsletter-homepage p {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.newsletter-homepage .brevo-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-homepage .privacy-note {
    font-size: 0.85rem;
    margin-top: 1rem;
    opacity: 0.8;
}

.newsletter-homepage .privacy-note a {
    color: #FFD700;
    text-decoration: underline;
}

/* ========================================
   📱 RESPONSIVE MOBILE (≤768px)
======================================== */
@media (max-width: 768px) {
    .value-section {
        padding: 2rem 1rem;
    }

    .value-section .section-title {
        font-size: 1.8rem;
    }

    .value-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .categories-section h2 {
        font-size: 1.6rem;
    }

    .category-badge {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }

    .newsletter-homepage h2 {
        font-size: 1.6rem;
    }

    .newsletter-homepage p {
        font-size: 1rem;
    }
}

/* ========================================
   6️⃣ Correction : Forcer l'affichage du Footer
======================================== */
#colophon,
.site-footer,
footer[role="contentinfo"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #2C2C2C !important;
    color: #E8E8E8 !important;
    padding: 2rem 1rem !important;
    margin-top: 3rem !important;
}

.site-footer a {
    color: #FFD700 !important;
    text-decoration: none !important;
}

.site-footer a:hover {
    color: #C1272D !important;
}

/* Réinitialiser les styles Footer dans .article-mdm */
.article-mdm ~ #colophon,
.article-mdm ~ .site-footer {
    background: #2C2C2C !important;
    padding: 2rem 1rem !important;
}


/* ========================================
   7️⃣ Masquer les commentaires dans les articles
======================================== */
.single .comments-area,
.single #comments,
.single .comment-respond {
    display: none !important;
}

/* ========================================
   8️⃣ FOOTER : Menu et liens visibles
======================================== */

/* Footer principal */
#colophon,
.site-footer,
footer[role="contentinfo"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #2C2C2C !important;
    color: #E8E8E8 !important;
    padding: 2rem 1rem !important;
    margin-top: 3rem !important;
    border-top: 3px solid #C1272D;
}

/* Menu footer (liens) */
.footer-navigation,
.site-footer .footer-menu,
.site-footer nav,
.footer-widget-area {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-navigation ul,
.site-footer .footer-menu ul {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-navigation li,
.site-footer .footer-menu li {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.footer-navigation a,
.site-footer .footer-menu a,
.site-footer a {
    color: #FFD700 !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-navigation a:hover,
.site-footer .footer-menu a:hover,
.site-footer a:hover {
    color: #C1272D !important;
    text-decoration: underline;
}

/* Copyright / Crédits */
.site-info,
.footer-center-content,
.site-footer .copyright {
    text-align: center;
    font-size: 0.9rem;
    color: #E8E8E8 !important;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-info a {
    color: #FFD700 !important;
    font-weight: 500;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .footer-navigation ul,
    .site-footer .footer-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .site-footer {
        padding: 1.5rem 1rem !important;
    }
}

/* ========================================
   9️⃣ OPTIMISATION UX MOBILE + MENU PRO
   À ajouter tout en bas du custom-style.css
======================================== */

/* ---------------------------
   A. Variables de layout
---------------------------- */
:root {
  --mdm-content-max: 860px;
  --mdm-content-max-wide: 1100px;
  --mdm-mobile-gutter: 14px;
  --mdm-tablet-gutter: 20px;
  --mdm-desktop-gutter: 24px;
  --mdm-header-height: 88px;
  --mdm-radius-soft: 12px;
  --mdm-shadow-soft: 0 8px 24px rgba(0,0,0,0.06);
}

/* ---------------------------
   B. Largeur article plus propre
---------------------------- */

/* Conteneur principal article */
.article-mdm,
.article-mdm-content {
  max-width: var(--mdm-content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--mdm-desktop-gutter);
  padding-right: var(--mdm-desktop-gutter);
  box-sizing: border-box;
}

/* Empêcher certains blocs internes de rétrécir inutilement */
.article-mdm > *,
.article-mdm-content > * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Images et embeds fluides */
.article-mdm img,
.article-mdm-content img,
.article-mdm iframe,
.article-mdm-content iframe,
.article-mdm video,
.article-mdm-content video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Paragraphes : mesure de lecture plus régulière */
.article-mdm p,
.article-mdm-content p,
.article-mdm li,
.article-mdm-content li {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ---------------------------
   C. Kadence / thème : neutraliser les wrappers trop étroits
---------------------------- */

/* Ajuste la largeur réelle de l'article sur single */
.single .entry-content,
.single .content-area,
.single .site-main,
.single .article-content,
.single .inside-article,
.single .post-content,
.single .kt-post-content,
.single .wp-block-post-content {
  box-sizing: border-box;
}

/* Si Kadence ou le thème force un conteneur trop étroit */
.single .content-container,
.single .entry-hero-container-inner,
.single .site-container,
.single .content-wrap {
  box-sizing: border-box;
}

/* ---------------------------
   D. Mobile UX : moins de marge, meilleur rythme
---------------------------- */
@media (max-width: 768px) {
  .article-mdm,
  .article-mdm-content {
    font-size: 16px;
    line-height: 1.72;
    padding-left: var(--mdm-mobile-gutter);
    padding-right: var(--mdm-mobile-gutter);
    max-width: 100%;
  }

  /* Réduire les grands blancs autour des titres */
  .article-mdm h1,
  .article-mdm-content h1 {
    font-size: clamp(2rem, 7.2vw, 2.45rem);
    line-height: 1.16;
    margin: 24px 0 16px 0;
    letter-spacing: -0.02em;
  }

  .article-mdm h2,
  .article-mdm-content h2 {
    font-size: clamp(1.55rem, 5.6vw, 1.9rem);
    line-height: 1.22;
    margin: 34px 0 16px 0;
    padding-bottom: 10px;
  }

  .article-mdm h3,
  .article-mdm-content h3 {
    font-size: 1.28rem;
    line-height: 1.3;
    margin: 28px 0 12px 0;
  }

  .article-mdm p,
  .article-mdm-content p {
    margin-bottom: 18px;
  }

  /* Encadrés : plus compacts, plus propres */
  .alert-astuce,
  .alert-important,
  .alert-danger,
  .alert-info,
  .alert-success,
  .sommaire,
  .conclusion-box,
  .article-meta {
    margin: 22px 0;
    padding: 16px 16px;
    border-radius: 10px;
  }

  .article-meta {
    gap: 10px;
  }

  .table-wrapper {
    margin: 22px 0;
    border-radius: 10px;
  }

  .table-card {
    padding: 16px;
    border-radius: 10px;
  }

  .btn-cta {
    width: 100%;
    padding: 14px 18px;
    border-radius: 10px;
  }
}

/* Petits smartphones */
@media (max-width: 480px) {
  .article-mdm,
  .article-mdm-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .article-mdm h1,
  .article-mdm-content h1 {
    font-size: clamp(1.9rem, 8vw, 2.25rem);
  }

  .alert-astuce,
  .alert-important,
  .alert-danger,
  .alert-info,
  .alert-success,
  .sommaire,
  .conclusion-box,
  .article-meta {
    padding: 14px 14px;
  }
}

/* Tablettes */
@media (min-width: 769px) and (max-width: 1024px) {
  .article-mdm,
  .article-mdm-content {
    padding-left: var(--mdm-tablet-gutter);
    padding-right: var(--mdm-tablet-gutter);
  }
}

/* ---------------------------
   E. Header / menu desktop plus pro
---------------------------- */

/* Barre header plus nette */
.site-header,
#masthead {
  background: #ffffff;
  border-bottom: 1px solid rgba(44,44,44,0.08);
  box-shadow: 0 2px 14px rgba(0,0,0,0.04);
}

/* Conteneur header mieux maîtrisé */
.site-header .site-container,
#masthead .site-container,
.site-header-row-container-inner,
.site-main-header-inner-wrap {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* Ligne du haut plus compacte */
.site-branding,
.site-header .site-branding {
  display: flex;
  align-items: center;
}

/* Logo mieux calibré */
.custom-logo,
.site-branding img {
  max-height: 56px;
  width: auto;
}

/* Navigation principale */
.main-navigation,
.primary-navigation,
.header-navigation {
  display: flex;
  align-items: center;
}

/* Liste menu desktop */
.main-navigation ul,
.primary-navigation ul,
.header-navigation ul {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Items plus premium */
.main-navigation .menu > li,
.primary-navigation .menu > li,
.header-navigation .menu > li {
  position: relative;
  margin: 0;
}

/* Liens menu */
.main-navigation a,
.primary-navigation a,
.header-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: #344054;
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

/* Hover */
.main-navigation a:hover,
.primary-navigation a:hover,
.header-navigation a:hover {
  background: rgba(193, 39, 45, 0.06);
  color: #C1272D;
  transform: translateY(-1px);
}

/* Item actif */
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a,
.primary-navigation .current-menu-item > a,
.primary-navigation .current-menu-ancestor > a,
.header-navigation .current-menu-item > a,
.header-navigation .current-menu-ancestor > a {
  color: #C1272D;
  background: rgba(193, 39, 45, 0.08);
}

/* Soulignement discret premium */
.main-navigation .menu > li > a::after,
.primary-navigation .menu > li > a::after,
.header-navigation .menu > li > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  background: linear-gradient(90deg, #C1272D 0%, #FFD700 100%);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.main-navigation .menu > li:hover > a::after,
.main-navigation .current-menu-item > a::after,
.main-navigation .current-menu-ancestor > a::after,
.primary-navigation .menu > li:hover > a::after,
.primary-navigation .current-menu-item > a::after,
.primary-navigation .current-menu-ancestor > a::after,
.header-navigation .menu > li:hover > a::after,
.header-navigation .current-menu-item > a::after,
.header-navigation .current-menu-ancestor > a::after {
  transform: scaleX(1);
}

/* Sous-menus plus propres */
.main-navigation .sub-menu,
.primary-navigation .sub-menu,
.header-navigation .sub-menu {
  background: #ffffff;
  border: 1px solid rgba(44,44,44,0.08);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  padding: 10px;
  min-width: 250px;
}

.main-navigation .sub-menu a,
.primary-navigation .sub-menu a,
.header-navigation .sub-menu a {
  min-height: auto;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 500;
}

.main-navigation .sub-menu a::after,
.primary-navigation .sub-menu a::after,
.header-navigation .sub-menu a::after {
  display: none;
}

/* ---------------------------
   F. Header mobile plus propre
---------------------------- */
@media (max-width: 1024px) {
  .site-header .site-container,
  #masthead .site-container,
  .site-header-row-container-inner,
  .site-main-header-inner-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  .custom-logo,
  .site-branding img {
    max-height: 46px;
  }
}

/* ---------------------------
   G. Menu catégories / listes de navigation si affichées en grille
---------------------------- */
.header-navigation .menu,
.main-navigation .menu,
.primary-navigation .menu {
  flex-wrap: wrap;
}

/* Si le thème espace trop les items sur une ligne très large */
@media (min-width: 1200px) {
  .main-navigation ul,
  .primary-navigation ul,
  .header-navigation ul {
    gap: 8px;
  }

  .main-navigation a,
  .primary-navigation a,
  .header-navigation a {
    padding: 10px 12px;
  }
}

/* =========================
   CARDS INFORMATIVES
========================= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin: 28px 0;
}

.card-mdm {
  background: #ffffff;
  border: 1px solid #e6ecea;
  border-radius: 12px;
  padding: 22px 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card-mdm:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}


.card-icon {
  font-size: 36px;
  width: 60px;
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 auto 12px auto;

  border-radius: 12px;
  background: #eef5f2;
}

.card-mdm h3 {
  font-size: 1.05rem;
  margin: 6px 0 10px 0;
  color: #0b5d3b; /* vert maroc */
  font-weight: 700;
}

.card-mdm p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  color: #4b5563;
}

.card-mdm:hover h3 {
  color: #c1272d;
}

/* =========================
   HIGHLIGHT INFORMATION
========================= */

.highlight-box {
  background: #eef5f2;
  border-left: 5px solid #0b5d3b;
  padding: 18px 20px;
  margin: 26px 0;
  border-radius: 10px;
}

.highlight-box strong {
  color: #0b5d3b;
}

.highlight-box p {
  margin: 0;
  line-height: 1.65;
}

.highlight-important {
  background: #f0f7f4;
  border-left: 6px solid #c1272d; /* rouge maroc */
  padding: 18px 20px;
  border-radius: 10px;
  margin: 28px 0;
}

/* =========================
   REGLEMENTATION / PLAFONDS
========================= */

.reg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin: 30px 0;
}

.reg-mdm {
  background: #ffffff;
  border: 1px solid #e6ecea;
  border-top: 6px solid transparent;
  border-radius: 12px;
  padding: 24px 22px;
  text-align: center;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Bordure haute dégradée rouge -> vert */
.reg-mdm::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 6px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  background: linear-gradient(to left, #c1272d, #0b5d3b);
}

.reg-mdm:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

/* valeur principale */

.reg-mdm .value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0b5d3b;
  margin-bottom: 8px;
}

/* label explicatif */

.reg-mdm .label {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4b5563;
}

/* =========================
   COMPARAISON D'ACTEURS / SERVICES
========================= */

.compare-entity {
  background: #ffffff;
  border: 1px solid #e6ecea;
  border-left: 5px solid #c9a227;
  border-radius: 12px;
  padding: 22px 24px;
  margin: 28px 0;
}

/* titre */

.compare-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* description */

.compare-desc {
  margin-bottom: 14px;
  line-height: 1.6;
}

/* grille avantages / inconvénients */

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 14px 0;
}

/* listes */

.pros-list,
.cons-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.pros-list li,
.cons-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* icônes */

.compare-entity .compare-grid .pros-list li::before { content: "✅ "; }
.compare-entity .compare-grid .cons-list li::before { content: "❌ "; }

/* bloc "idéal pour" */

.compare-ideal {
  margin-top: 14px;
  font-size: 0.95rem;
}

.compare-ideal strong {
  color: #0b5d3b;
}

/* ========================================
   CORRECTIFS MOBILE - COMPONENTS MDM
======================================== */
@media (max-width: 768px) {

  /* ---------- Cards ---------- */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 22px 0;
  }

  .card-mdm {
    padding: 18px 16px;
    border-radius: 10px;
    text-align: left;
  }

  .card-icon {
    width: 52px;
    height: 52px;
    font-size: 28px;
    margin: 0 0 12px 0;
  }

  .card-mdm h3 {
    font-size: 1rem;
    line-height: 1.3;
    margin: 4px 0 8px 0;
  }

  .card-mdm p {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  /* ---------- Highlight ---------- */
  .highlight-box {
    padding: 14px 14px;
    margin: 20px 0;
    border-left-width: 4px;
    border-radius: 8px;
  }

  .highlight-box p {
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 0;
  }

  /* ---------- Regulation grid ---------- */
  .reg-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 22px 0;
  }

  .reg-mdm {
    padding: 18px 14px;
    border-radius: 10px;
  }

  .reg-mdm::before {
    height: 5px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
  }

  .reg-mdm .value {
    font-size: 1.45rem;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  .reg-mdm .label {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  /* ---------- Compare entity ---------- */
  .compare-entity {
    padding: 18px 16px;
    margin: 22px 0;
    border-radius: 10px;
  }

  .compare-title {
    font-size: 1.05rem;
    line-height: 1.35;
    margin-bottom: 10px;
    gap: 6px;
  }

  .compare-desc {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 12px;
  }

  .compare-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 12px 0;
  }

  .pros-list,
  .cons-list {
    margin: 0;
    padding-left: 0;
  }

  .pros-list li,
  .cons-list li {
    font-size: 0.97rem;
    line-height: 1.55;
    margin-bottom: 8px;
  }

  .compare-ideal {
    font-size: 0.96rem;
    line-height: 1.55;
    margin-top: 12px;
  }

  /* ---------- Tables scrollables ---------- */
  .table-scroll {
    margin: 20px 0;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .table-scroll table {
    width: max-content;
    min-width: 640px;
  }

  .table-scroll th,
  .table-scroll td {
    padding: 10px 12px;
    font-size: 0.95rem;
    line-height: 1.45;
    white-space: nowrap;
  }
}

/* ========================================
   TRÈS PETITS ÉCRANS
======================================== */
@media (max-width: 480px) {

  .card-mdm,
  .highlight-box,
  .reg-mdm,
  .compare-entity {
    padding-left: 13px;
    padding-right: 13px;
  }

  .card-icon {
    width: 48px;
    height: 48px;
    font-size: 26px;
  }

  .reg-mdm .value {
    font-size: 1.3rem;
  }

  .compare-title {
    font-size: 1rem;
  }

  .table-scroll table {
    min-width: 560px;
  }

  .table-scroll th,
  .table-scroll td {
    padding: 9px 10px;
    font-size: 0.92rem;
  }
}