/* ==========================================================
   Mazirat - pages interieures (header F, contenus, modules)
   Feuille importee dans la charte : /template/mazirat-pages.css
   Couleurs : vert fonce #1F7A6E (texte/fonds, 5,2:1 sur blanc)
              vert clair #2FA898 (decor uniquement)
              bleu nuit #142F3F (texte) - creme #FEF6EA (fond)
   ========================================================== */


/* ---------- Bandeau photo : uniquement sur l'accueil (body-page-1) ---------- */
body:not(.body-page-1) .template-animation { display: none; }
body:not(.body-page-1) .template-header { position: relative; top: auto; height: auto; margin: 30px 0 40px; }
body:not(.body-page-1) .template-header::before { background: none; }
/* Fond beige uni sur toutes les pages interieures (l'accueil garde son fond) */
body.body-pages:not(.body-page-1) { background-color: #FEF6EA; background-image: none; }
body:not(.body-page-1) .logo-essentiel img { content: url("/template/logo-couleur.png"); }
@media (max-width: 768px) { body:not(.body-page-1) .template-header { margin: 0 0 6px; } }


/* ---------- Largeur du contenu des pages interieures (alignee sur le pied de page) ---------- */
body:not(.body-page-1) .wrapper-contents { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; box-sizing: border-box; }

/* ---------- Fil d'Ariane ---------- */
.mz-ariane { margin: 0 0 18px; font-family: "Bellota Text", Tahoma, sans-serif; font-size: 15px; color: #142F3F; }
.mz-ariane ol { list-style: none; margin: 0; padding: 6px 14px; background: #FFFFFF; border-radius: 999px; display: inline-flex; flex-wrap: wrap; gap: 4px 0; }
.mz-ariane li { margin: 0; padding: 0; }
.mz-ariane li + li::before { content: "\203A"; margin: 0 8px; color: #1F7A6E; }
.mz-ariane a { color: #1F7A6E; text-decoration: underline; }
.mz-ariane a:hover { color: #142F3F; }

/* ---------- Header F : pictogramme + rubrique + H1 ---------- */
table.mz-entete { border-collapse: collapse; margin: 0 0 14px; width: auto; }
table.mz-entete td { padding: 0; vertical-align: middle; border: 0; }
table.mz-entete td.mz-entete-picto { padding-right: 28px; width: 110px; }
.mz-picto { display: block; width: 110px; height: 110px; border-radius: 50%; background: #1F7A6E center / 58px 58px no-repeat; }
.mz-picto-mairie { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9.5 12 4l9 5.5M4 9.5h16M6 9.5V18M10 9.5V18M14 9.5V18M18 9.5V18M3 20.5h18M4 18h16'/%3E%3C/svg%3E"); }
.mz-picto-vie { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11.5 12 4l9 7.5M5.5 9.5V20h13V9.5M10 20v-5.5h4V20'/%3E%3C/svg%3E"); }
.mz-picto-tourisme { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 19 9 8l4 7 3-4 5 8z'/%3E%3Ccircle cx='17' cy='6' r='2'/%3E%3C/svg%3E"); }
.mz-picto-contact { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }

.mz-rubrique { margin: 0 0 6px; font-family: "Bellota Text", Tahoma, sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #1F7A6E; }
table.mz-entete h1 { margin: 0; font-family: Bellota, cursive; font-weight: 700; font-size: 56px; line-height: 1.05; color: #142F3F; text-align: left; }

.mz-chapo { margin: 0 0 18px; max-width: 860px; font-family: "Bellota Text", Tahoma, sans-serif; font-size: 19px; line-height: 1.55; color: #142F3F; }

hr.mz-vague { border: 0; height: 18px; margin: 0 0 30px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='54' height='18' viewBox='0 0 54 18'%3E%3Cpath d='M0 9 C 9 1, 18 1, 27 9 S 45 17, 54 9' fill='none' stroke='%232FA898' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center; }

/* ---------- Tableau 2 colonnes : texte + encadre ---------- */
table.mz-2col { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 30px; }
table.mz-2col td { vertical-align: top; padding: 0; border: 0; }
table.mz-2col td.mz-col-texte { width: 66%; padding-right: 40px; }
table.mz-2col td.mz-col-encadre { width: 34%; }

.mz-col-texte, .mz-encadre { font-family: "Bellota Text", Tahoma, sans-serif; color: #142F3F; }
.mz-col-texte p { margin: 0 0 14px; font-size: 17px; line-height: 1.7; }
.mz-col-texte h2, .mz-telechargements h2 { margin: 0 0 14px; font-family: Bellota, cursive; font-weight: 700; font-size: 32px; line-height: 1.2; color: #1F7A6E; }

.mz-encadre { background: #FFFFFF; border: 1px solid #E8DCC8; border-radius: 22px; padding: 26px 28px; }
.mz-encadre h2 { margin: 0 0 12px; font-family: Bellota, cursive; font-weight: 700; font-size: 24px; line-height: 1.2; color: #142F3F; }
.mz-encadre p { margin: 0 0 12px; font-size: 16px; line-height: 1.55; }
.mz-encadre p:last-child { margin-bottom: 0; }

a.mz-bouton-tel { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #1F7A6E; color: #FFFFFF !important; font-weight: 700; font-size: 17px; text-decoration: none; }
a.mz-bouton-tel::before { content: ""; width: 18px; height: 18px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E") center / contain no-repeat; }
a.mz-bouton-tel:hover { background: #142F3F; }

/* ---------- Module Telechargement (dans .mz-telechargements) ---------- */
.mz-telechargements { font-family: "Bellota Text", Tahoma, sans-serif; color: #142F3F; margin: 0 0 30px; }
.mz-telechargements .telechargement-groupe { margin: 0 0 28px; }
.mz-telechargements .telechargement-groupe-nom { background: none; padding: 0; margin: 0 0 16px; font-family: Bellota, cursive; font-weight: 700; font-size: 32px; line-height: 1.2; color: #1F7A6E; }
.mz-telechargements ul.telechargement-groupe-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mz-telechargements ul.telechargement-groupe-liste li { position: relative; margin: 0; padding: 20px 22px 20px 92px; min-height: 62px; background: #FFFFFF; border: 1px solid #E8DCC8; border-radius: 18px; list-style: none; }
.mz-telechargements ul.telechargement-groupe-liste li::before { content: ""; position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 52px; height: 62px; border-radius: 10px; border: 2px solid #1F7A6E; box-sizing: border-box; background: #FEF6EA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F7A6E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 19.5h14'/%3E%3C/svg%3E") center / 24px 24px no-repeat; }
.mz-telechargements a.telechargement { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; color: #142F3F; font-size: 15px; text-decoration: none; }
.mz-telechargements a.telechargement b { order: -1; flex-basis: 100%; font-size: 18px; font-weight: 700; text-decoration: underline; margin-bottom: 2px; }
.mz-telechargements a.telechargement::before { content: ""; font: inherit; font-size: 15px; margin: 0; }
.mz-telechargements a.telechargement-pdf::before { content: "PDF \00B7"; }
.mz-telechargements a.telechargement-doc::before, .mz-telechargements a.telechargement-docx::before { content: "Word \00B7"; }
.mz-telechargements a.telechargement-xls::before, .mz-telechargements a.telechargement-xlsx::before { content: "Excel \00B7"; }
.mz-telechargements a.telechargement-zip::before { content: "ZIP \00B7"; }
.mz-telechargements a.telechargement-jpg::before, .mz-telechargements a.telechargement-jpeg::before, .mz-telechargements a.telechargement-png::before { content: "Image \00B7"; }
.mz-telechargements a.telechargement::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.mz-telechargements a.telechargement:hover b { color: #1F7A6E; }
.mz-telechargements .telechargement-description { margin: 2px 0 0; font-size: 15px; color: #4A5A63; }
.mz-telechargements .telechargement-date-publication { display: none; }


/* ---------- Liens dans le texte et l'encadre : toujours soulignes (RGAA 10.6) ---------- */
.mz-col-texte a, .mz-encadre a:not(.mz-bouton-tel), .mz-chapo a { color: #1F7A6E; text-decoration: underline; font-weight: 700; }
.mz-col-texte a:hover, .mz-encadre a:not(.mz-bouton-tel):hover { color: #142F3F; }
.mz-col-texte a:focus-visible, .mz-encadre a:not(.mz-bouton-tel):focus-visible { outline: 3px solid #142F3F; outline-offset: 3px; border-radius: 4px; }

/* ---------- Focus clavier visible (RGAA 10.7) ---------- */
.mz-ariane a:focus-visible,
a.mz-bouton-tel:focus-visible,
.mz-telechargements a.telechargement:focus-visible { outline: 3px solid #142F3F; outline-offset: 3px; border-radius: 4px; }
.mz-telechargements a.telechargement:focus-visible::after { outline: 3px solid #142F3F; outline-offset: 2px; }

/* ---------- Tablette ---------- */
@media (max-width: 1000px) {
  table.mz-entete h1 { font-size: 44px; }
  .mz-telechargements ul.telechargement-groupe-liste { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Mobile : les tableaux passent sur une colonne ---------- */
@media (max-width: 768px) {
  table.mz-entete td.mz-entete-picto { padding-right: 14px; width: 60px; }
  .mz-picto { width: 60px; height: 60px; background-size: 32px 32px; }
  table.mz-entete h1 { font-size: 32px; line-height: 1.1; }
  .mz-rubrique { font-size: 13px; }
  .mz-chapo { font-size: 17px; }
  table.mz-2col, table.mz-2col tbody, table.mz-2col tr, table.mz-2col td { display: block; width: 100% !important; box-sizing: border-box; }
  table.mz-2col td.mz-col-texte { padding-right: 0; margin-bottom: 20px; }
  .mz-col-texte h2, .mz-telechargements h2, .mz-telechargements .telechargement-groupe-nom { font-size: 26px; }
  .mz-col-texte p { font-size: 16px; }
  .mz-encadre { padding: 22px; }
  .mz-telechargements ul.telechargement-groupe-liste li { padding: 14px 16px 14px 76px; }
  .mz-telechargements ul.telechargement-groupe-liste li::before { left: 16px; width: 44px; height: 52px; }
  .mz-telechargements a.telechargement b { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) { .mz-telechargements * { transition: none !important; } }
