/* cms-mobile.css — Fix audit 2026-07-03 : réduire H2 + hiérarchie H1>H2 + charte cohérente pages CMS */
@media (max-width: 768px) {
  /* H1 pages CMS - plus visible */
  .cms-id-1 h1, .cms-id-1 .h1, .cms-id-1 .page-title,
  .cms-id-28 h1, .cms-id-28 .h1, .cms-id-28 .page-title,
  .cms-id-18 h1, .cms-id-18 .h1, .cms-id-18 .page-title,
  #main .cms-content h1,
  #main .page-header .h1.page-title {
    font-size: 22px !important;
    line-height: 1.25 !important;
    color: #000F8F !important;
    text-align: center !important;
    margin: 12px 0 !important;
    font-weight: 800 !important;
  }

  /* H2 CMS - RÉDUIRE (avant : 40px+ 4 lignes) - Sélecteurs étendus pour catch tous les CMS PS */
  body[class*="cms-id"] h2,
  body.cms-id-1 h2, body.cms-id-2 h2, body.cms-id-11 h2, body.cms-id-12 h2,
  body.cms-id-27 h2, body.cms-id-28 h2, body.cms-id-18 h2,
  .cms-content h2, #main .cms-content h2,
  #main #content h2, .page-cms h2,
  #main .rte-content h2,
  #content-wrapper .rte-content h2,
  .page-cms #main #content h2,
  #wrapper .page-cms h2,
  body[class*="cms-id"] .rte-content h2,
  body[class*="cms-id"] #main h2 {
    font-size: 17px !important;
    line-height: 1.3 !important;
    color: #000F8F !important;
    margin: 16px 0 8px !important;
    font-weight: 700 !important;
    padding-bottom: 6px !important;
    border-bottom: 2px solid #79a500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-align: left !important;
  }
  /* Cas particulier : H2 avec texte-transform uppercase dans un heading */
  body[class*="cms-id"] .elementor-heading-title,
  body[class*="cms-id"] h2.uppercase,
  body[class*="cms-id"] h2[style*="uppercase"] {
    font-size: 17px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
  }

  /* H3 CMS */
  .cms-content h3, .cms-content h4,
  #main .cms-content h3, #main .cms-content h4,
  #main #content h3 {
    font-size: 15px !important;
    color: #79a500 !important;
    margin: 12px 0 4px !important;
    font-weight: 700 !important;
  }

  /* Texte body plus lisible */
  .cms-content p, .cms-content li,
  #main .cms-content p, #main .cms-content li,
  #main .rte-content p {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin: 0 0 12px !important;
    color: #374151 !important;
  }

  /* Container plus compact */
  #main #content-wrapper, #main #content {
    padding: 8px 12px !important;
  }

  /* Liste avec bullets stylées */
  .cms-content ul li {
    padding-left: 4px;
    list-style: none;
    position: relative;
  }
  .cms-content ul li::before {
    content: "•";
    color: #79a500;
    font-weight: 800;
    margin-right: 8px;
    display: inline-block;
    width: 16px;
    text-align: center;
    margin-left: -16px;
  }

  /* Tableaux si présents */
  .cms-content table {
    width: 100% !important;
    font-size: 12px !important;
    border-collapse: collapse !important;
    margin: 12px 0 !important;
  }
  .cms-content table th, .cms-content table td {
    padding: 8px 10px !important;
    border: 1px solid #e5e7eb !important;
    text-align: left !important;
  }
  .cms-content table th {
    background: #000F8F !important;
    color: #fff !important;
    font-weight: 700 !important;
  }

  /* Lien intra CMS */
  .cms-content a { color: #79a500 !important; font-weight: 600 !important; }
  .cms-content a:hover { color: #5e8200 !important; }

  /* Accordéons via <details> injectés par cms-fixes.js */
  details.eg-faq {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 8px 0;
    padding: 0;
    overflow: hidden;
    transition: box-shadow .15s;
  }
  details.eg-faq[open] {
    box-shadow: 0 4px 12px rgba(0,15,143,.08);
    border-color: #000F8F;
  }
  details.eg-faq summary {
    cursor: pointer;
    padding: 14px 18px 14px 42px;
    font-weight: 700;
    color: #000F8F;
    font-size: 15px;
    line-height: 1.35;
    position: relative;
    list-style: none;
    background: linear-gradient(180deg, #fff, #f9fafb);
    transition: background .15s;
  }
  details.eg-faq summary::-webkit-details-marker { display: none; }
  details.eg-faq summary::before {
    content: "+";
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #79a500; color: #fff;
    font-weight: 800; font-size: 16px;
    line-height: 20px; text-align: center;
    transition: transform .2s, background .15s;
  }
  details.eg-faq[open] summary::before {
    content: "−";
    background: #000F8F;
  }
  details.eg-faq summary:hover { background: linear-gradient(180deg, #f9fafb, #f3f4f6); }
  details.eg-faq .eg-faq-body {
    padding: 4px 18px 16px 42px;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
  }
  details.eg-faq .eg-faq-body p:last-child { margin-bottom: 0 !important; }
}
