/* Eminax — thème WordPress : styles des compositions
   À réutiliser telle quelle sur mairesia.eminax.fr et echarpe.eminax.fr
   (voir shared/LISEZMOI.md). Polices auto-hébergées : aucun appel à Google. */

:root {
  --encre: #0f1745;
  --encre-2: #1d2a6b;
  --papier: #f2f4f8;
  --blanc: #ffffff;
  --sceau: #d1322f;
  --balise: #f2c230;
  --gris: #565f82;
  --filet: #cfd5e4;

  --titre: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --texte: "Literata", Georgia, "Times New Roman", serif;

  --mesure: 68ch;
  --page: 1160px;
  --gouttiere: clamp(20px, 5vw, 56px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--balise);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--encre);
}

.contenu {
  width: min(100% - 2 * var(--gouttiere), var(--page));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.evitement {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--balise);
  color: var(--encre);
  padding: 10px 16px;
  font-family: var(--titre);
  font-weight: 700;
  z-index: 100;
}
.evitement:focus {
  top: 12px;
}

/* ── Titres ─────────────────────────────────────────── */
h1,
h2,
h3 {
  font-family: var(--titre);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.005em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.9rem, 7.4vw, 5.6rem);
  line-height: 0.95;
}
h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
}
h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.08;
}
p {
  margin: 0 0 1em;
  max-width: var(--mesure);
  text-wrap: pretty;
}
.chapo {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  max-width: 54ch;
}

/* ── Bande tricolore (le seul rappel de l'écharpe) ───── */
.echarpe {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 6px;
  background: var(--blanc);
}
.echarpe i:nth-child(1) {
  background: var(--encre);
}
.echarpe i:nth-child(3) {
  background: var(--sceau);
}

/* ── En-tête ────────────────────────────────────────── */
.entete {
  background: var(--papier);
  border-bottom: 1px solid var(--filet);
}
.entete .contenu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
.marque {
  font-family: var(--titre);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.marque b {
  color: var(--sceau);
  font-weight: 700;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 34px);
  font-family: var(--titre);
  font-weight: 600;
  font-size: 1.2rem;
}
.nav a {
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: var(--encre);
}
.nav .bouton {
  border-bottom: 0;
}
.menu-bascule {
  display: none;
}

@media (max-width: 760px) {
  .menu-bascule {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 600 1.15rem/1 var(--titre);
    color: var(--encre);
    background: none;
    border: 2px solid var(--encre);
    padding: 10px 14px;
    cursor: pointer;
  }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 78px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--papier);
    border-bottom: 1px solid var(--filet);
    padding: 8px var(--gouttiere) 24px;
    z-index: 20;
  }
  .nav.ouvert {
    display: flex;
  }
  .nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--filet);
    font-size: 1.4rem;
  }
  .nav .bouton {
    margin-top: 16px;
    width: auto;
    padding: 14px 22px;
    border: 0;
  }
  .entete {
    position: relative;
  }
}

/* ── Boutons ────────────────────────────────────────── */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: var(--encre);
  color: var(--blanc);
  padding: 14px 24px;
  border: 2px solid var(--encre);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.bouton:hover {
  background: var(--sceau);
  border-color: var(--sceau);
}
.bouton.clair {
  background: transparent;
  color: var(--encre);
}
.bouton.clair:hover {
  background: var(--encre);
  color: var(--blanc);
  border-color: var(--encre);
}
.sur-encre .bouton {
  background: var(--balise);
  border-color: var(--balise);
  color: var(--encre);
}
.sur-encre .bouton:hover {
  background: var(--blanc);
  border-color: var(--blanc);
}
.sur-encre .bouton.clair {
  background: transparent;
  color: var(--blanc);
  border-color: var(--blanc);
}
.sur-encre .bouton.clair:hover {
  background: var(--blanc);
  color: var(--encre);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* ── Accueil : héros ────────────────────────────────── */
.heros {
  padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 8vw, 104px);
}
.heros .contenu {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.heros h1 {
  margin-bottom: 28px;
}
@media (max-width: 900px) {
  .heros .contenu {
    grid-template-columns: 1fr;
  }
}

/* Composeur M.A.I.R.E.S. */
.composeur {
  background: var(--encre);
  color: var(--blanc);
  padding: clamp(20px, 3vw, 32px);
  border-radius: 2px;
  box-shadow: 10px 10px 0 var(--balise);
  margin-right: 10px;
  margin-bottom: 10px;
}
.composeur h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.composeur .aide {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: #c3c9e6;
  max-width: none;
}
.lettres {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.lettre {
  font-family: var(--titre);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  padding: 12px 0 10px;
  background: transparent;
  color: var(--blanc);
  border: 2px solid #5360a6;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.lettre small {
  display: block;
  font-family: var(--texte);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0;
  margin-top: 6px;
  color: inherit;
  opacity: 0.85;
}
.lettre[aria-pressed="true"] {
  background: var(--balise);
  border-color: var(--balise);
  color: var(--encre);
}
.sortie {
  background: #0a1033;
  border-left: 4px solid var(--balise);
  padding: 16px 18px;
  min-height: 15.5rem;
  font-size: 0.97rem;
  line-height: 1.55;
}
.sortie p {
  margin: 0 0 0.55em;
  max-width: none;
}
.sortie p:last-child {
  margin-bottom: 0;
}
.sortie .vide {
  color: #aab2d8;
  font-style: italic;
}
.sortie .ligne b {
  font-family: var(--titre);
  color: var(--balise);
  margin-right: 6px;
  font-size: 1.1em;
}
.sortie .ligne {
  animation: apparition 0.28s ease-out;
}
@keyframes apparition {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
.compteur {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.88rem;
  color: #c3c9e6;
}
.compteur strong {
  color: var(--blanc);
  font-family: var(--titre);
  font-size: 1.15rem;
}

/* ── Sections ───────────────────────────────────────── */
.section {
  padding: clamp(56px, 8vw, 104px) 0;
}
.section.blanche {
  background: var(--blanc);
}
.section.sur-encre {
  background: var(--encre);
  color: var(--blanc);
}
.section-tete {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 32px 64px;
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-tete p {
  margin: 0;
}
@media (max-width: 800px) {
  .section-tete {
    grid-template-columns: 1fr;
  }
}

/* Liste des offres */
.offres {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 2px solid var(--encre);
}
.offre {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto;
  gap: 12px 40px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 2px solid var(--encre);
}
.offre h3 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}
.offre p {
  margin: 0;
}
.offre .lien {
  font-family: var(--titre);
  font-weight: 700;
  font-size: 1.2rem;
  white-space: nowrap;
}
@media (max-width: 800px) {
  .offre {
    grid-template-columns: 1fr;
  }
}

/* Outils */
.outils {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
@media (max-width: 860px) {
  .outils {
    grid-template-columns: 1fr;
  }
}
.outil {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--encre);
  background: var(--blanc);
}
.outil.sombre {
  background: var(--encre);
  color: var(--blanc);
  border-color: var(--encre);
}
.outil-visuel {
  padding: 26px;
  border-bottom: 2px solid var(--encre);
  min-height: 190px;
  display: flex;
  align-items: center;
}
.outil.sombre .outil-visuel {
  border-bottom-color: #3a4687;
}
.outil-corps {
  padding: 26px 26px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.outil-corps h3 {
  margin-bottom: 6px;
}
.outil-corps .adresse {
  font-family: var(--titre);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--gris);
  margin-bottom: 14px;
}
.outil.sombre .adresse {
  color: #aab2d8;
}
.outil-corps .actions {
  margin-top: auto;
  padding-top: 12px;
}
.mini-lettres {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mini-lettres span {
  width: 46px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--balise);
  color: var(--encre);
  font: 700 1.9rem/1 var(--titre);
}
.serie {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.serie span {
  width: 34px;
  background: var(--balise);
}
.serie span:nth-child(1) { height: 28px; }
.serie span:nth-child(2) { height: 44px; }
.serie span:nth-child(3) { height: 36px; }
.serie span:nth-child(4) { height: 60px; }
.serie span:nth-child(5) { height: 72px; }
.serie span:nth-child(6) { height: 88px; }
.serie span:nth-child(7) {
  height: 104px;
  background: var(--sceau);
}

@media (max-width: 480px) {
  .mini-lettres { gap: 6px; flex-wrap: nowrap; }
  .mini-lettres span { width: 38px; height: 46px; font-size: 1.6rem; }
  .serie span { width: 28px; }
}

/* Règles */
.regles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid var(--blanc);
}
.regle {
  padding: 28px 28px 8px 0;
}
.regle + .regle {
  padding-left: 28px;
  border-left: 1px solid #3a4687;
}
.regle h3 {
  color: var(--balise);
  margin-bottom: 10px;
}
.regle p {
  font-size: 1rem;
  color: #dfe3f5;
}
@media (max-width: 860px) {
  .regles {
    grid-template-columns: 1fr;
  }
  .regle,
  .regle + .regle {
    padding: 24px 0 4px;
    border-left: 0;
    border-top: 1px solid #3a4687;
  }
  .regle:first-child {
    border-top: 0;
  }
}

/* Appel final */
.final .contenu {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: center;
}
.final h2 {
  max-width: 18ch;
}
@media (max-width: 760px) {
  .final .contenu {
    grid-template-columns: 1fr;
  }
}

/* ── Pages intérieures ──────────────────────────────── */
.page-tete {
  padding: clamp(44px, 7vw, 88px) 0 clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--filet);
}
.page-tete h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: 20px;
  max-width: 16ch;
}

.bloc {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 24px 64px;
  padding: clamp(36px, 5vw, 60px) 0;
  border-top: 2px solid var(--encre);
}
.bloc:first-of-type {
  border-top: 0;
}
.bloc ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
  max-width: var(--mesure);
}
.bloc li {
  margin-bottom: 0.5em;
}
.bloc .aparte {
  font-family: var(--titre);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--gris);
}
@media (max-width: 800px) {
  .bloc {
    grid-template-columns: 1fr;
  }
}

.texte-long {
  padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 8vw, 96px);
}
.texte-long h2 {
  font-size: 1.9rem;
  margin: 2.2em 0 0.5em;
}
.texte-long h2:first-child {
  margin-top: 0;
}

/* Formulaire */
.formulaire {
  display: grid;
  gap: 20px;
  max-width: 640px;
}
.champ label {
  display: block;
  font-family: var(--titre);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.champ .aide {
  display: block;
  font-size: 0.9rem;
  color: var(--gris);
  margin-top: 4px;
}
.champ input,
.champ select,
.champ textarea {
  width: 100%;
  font: inherit;
  color: var(--encre);
  background: var(--blanc);
  border: 2px solid var(--encre);
  border-radius: 2px;
  padding: 12px 14px;
}
.champ textarea {
  min-height: 180px;
  resize: vertical;
}
.champ.piege {
  position: absolute;
  left: -9999px;
}
.consentement {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
}
.consentement input {
  width: 22px;
  height: 22px;
  margin-top: 3px;
  flex: none;
  accent-color: var(--encre);
}
.message {
  padding: 16px 18px;
  border-left: 6px solid var(--encre);
  background: var(--blanc);
  font-weight: 500;
  max-width: 640px;
  margin-bottom: 28px;
}
.message.erreur {
  border-left-color: var(--sceau);
}
.coordonnees dt {
  font-family: var(--titre);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--gris);
}
.coordonnees dd {
  margin: 0 0 18px;
}

/* ── Pied de page ───────────────────────────────────── */
.pied {
  background: var(--encre);
  color: #dfe3f5;
  padding: 48px 0 40px;
  font-size: 0.95rem;
}
.pied .contenu {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
}
.pied .marque {
  color: var(--blanc);
  font-size: 2.2rem;
}
.pied p {
  max-width: 38ch;
  margin-top: 8px;
}
.pied h2 {
  font-size: 1.2rem;
  color: var(--balise);
  margin-bottom: 10px;
}
.pied ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pied li {
  margin-bottom: 6px;
}
.pied small {
  grid-column: 1 / -1;
  border-top: 1px solid #3a4687;
  padding-top: 20px;
  color: #aab2d8;
}
@media (max-width: 700px) {
  .pied .contenu {
    grid-template-columns: 1fr;
  }
}

/* ── Bandeau Eminax (à inclure dans les sous-domaines) ── */
.bandeau-eminax {
  background: var(--encre);
  color: var(--blanc);
  font-family: var(--titre);
  font-weight: 600;
  font-size: 1.05rem;
}
.bandeau-eminax .interieur {
  max-width: var(--page);
  margin-inline: auto;
  padding: 8px var(--gouttiere);
  display: flex;
  gap: 8px 24px;
  flex-wrap: wrap;
  align-items: center;
}
.bandeau-eminax a {
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
}
.bandeau-eminax a:hover,
.bandeau-eminax a[aria-current="true"] {
  border-bottom-color: var(--balise);
}
.bandeau-eminax .nom {
  font-weight: 700;
  font-size: 1.2rem;
  margin-right: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .sortie .ligne {
    animation: none;
  }
  * {
    transition: none !important;
  }
}


/* ═══ Adaptations pour les blocs WordPress ═══════════════════════ */
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block: 0; }
.wp-block-group { box-sizing: border-box; }
.principal { display: block; }
.wp-block-heading { margin-top: 0; }
.wp-block-buttons { gap: 14px; }
.wp-block-list { margin-top: 0; }

/* En-tête */
.entete-droite { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 34px); }
.entete .wp-block-navigation { font-family: var(--titre); font-weight: 600; font-size: 1.2rem; }
.entete .wp-block-navigation a { text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.entete .wp-block-navigation a:hover,
.entete .wp-block-navigation .current-menu-item > a { border-bottom-color: var(--encre); color: var(--encre); }
.entete .wp-block-navigation__responsive-container-open { color: var(--encre); }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--papier); color: var(--encre); font-size: 1.6rem; }
@media (max-width: 600px) { .entete-bouton { display: none; } }
.entete .wp-block-buttons { margin: 0; }
.entete .wp-block-button__link { font-size: 1.15rem; padding: 10px 18px; }

/* Boutons */
.wp-block-button__link { text-decoration: none; transition: background 0.15s, color 0.15s; }
.wp-block-button.is-style-outline > .wp-block-button__link {
  background: transparent; color: var(--encre); border: 2px solid var(--encre);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
  background: var(--encre); color: var(--blanc); border-color: var(--encre);
}
.sur-encre .wp-block-button__link,
.outil.sombre .wp-block-button__link { background: var(--balise); border-color: var(--balise); color: var(--encre); }
.sur-encre .wp-block-button__link:hover,
.outil.sombre .wp-block-button__link:hover { background: var(--blanc); border-color: var(--blanc); color: var(--encre); }
.sur-encre .is-style-outline > .wp-block-button__link { background: transparent; color: var(--blanc); border-color: var(--blanc); }
.sur-encre .is-style-outline > .wp-block-button__link:hover { background: var(--blanc); color: var(--encre); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.actions .wp-block-buttons { margin: 0; }
.heros .actions { margin-top: 32px; }
.bloc-d .wp-block-buttons { margin-top: 24px; }
.final .wp-block-buttons { margin: 0; }

/* Mises en page des compositions */
.sur-encre a, .pied a { color: inherit; }
.section-liste { padding: clamp(36px, 5vw, 64px) 0 clamp(56px, 8vw, 96px); }
ul.offres { list-style: none; margin: 0; padding: 0; border-bottom: 2px solid var(--encre); }
ul.offres > li { margin: 0; }
ul.offres > li .offre { border-top: 2px solid var(--encre); }
.offre .wp-block-post-title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.offre .wp-block-post-title a { text-decoration: none; }
.offre .wp-block-post-excerpt, .offre .wp-block-post-excerpt__excerpt { margin: 0; }
.offre .lien, .offre .lien a { font-family: var(--titre); font-weight: 700; font-size: 1.2rem; white-space: nowrap; margin: 0; }
.offre .wp-block-post-date { margin: 0; }
.offres > .offre p { margin: 0; }
div.offres { border-bottom: 2px solid var(--encre); }
div.offres > .offre:first-child { border-top: 2px solid var(--encre); }
.bloc-g, .bloc-d { min-width: 0; }
.bloc-g .aparte { margin-top: 12px; }
.outil-corps .wp-block-buttons { margin-top: auto; padding-top: 12px; }
.outil-corps > p { max-width: none; }
.bloc-d .mini-lettres, .bloc-d .serie { margin-top: 28px; }
.outil .wp-block-html, .outil-visuel > * { margin: 0; }
.pagination { margin-top: 32px; font-family: var(--titre); font-size: 1.2rem; gap: 18px; }
.article-date { font-family: var(--titre); font-weight: 600; font-size: 1.15rem; color: var(--gris); margin-bottom: 14px; }
.texte-long .wp-block-post-content { max-width: 720px; }
.texte-long .wp-block-post-content > * + * { margin-top: 1em; }
.texte-long .wp-block-post-content h2 { margin: 2.2em 0 0.5em; }

/* Pied de page */
.liste-pied { list-style: none; padding: 0; margin: 0; }
.pied .pied-copyright {
  grid-column: 1 / -1; max-width: none; margin: 0;
  border-top: 1px solid #3a4687; padding-top: 20px; color: #aab2d8; font-size: 0.95rem;
}
.pied .wp-block-group > p { max-width: 38ch; margin-top: 8px; }
.pied .wp-block-group > h2 { margin-bottom: 10px; }

/* Composeur dans l'éditeur */
.editor-styles-wrapper .composeur .sortie { min-height: 6rem; }
.pied .contenu > .pied-copyright { max-width: none; margin-top: 8px; }
