/* Abbaye des Mousquetaires — utilitaires que theme.json ne peut pas exprimer.
   Les couleurs et tailles viennent toujours des variables du thème. */

:root {
  --abbaye-filet: 2px solid var(--wp--preset--color--encre);
}

/* Bande décorative bleu / jaune. À poser en groupe pleine largeur. */
.is-style-guirlande {
  height: 10px;
  padding: 0 !important;
  background: repeating-linear-gradient(
    90deg,
    var(--wp--preset--color--bleu) 0 26px,
    var(--wp--preset--color--jaune) 26px 52px
  );
}

/* Cellule de grille séparée par un filet supérieur (Conseil, Documents). */
.is-style-cellule-filet {
  border-top: var(--abbaye-filet);
  padding-top: var(--wp--preset--spacing--30);
  padding-bottom: var(--wp--preset--spacing--30);
}

/* Cartouches : devise, dates de news. */
.is-style-cartouche-jaune,
.is-style-cartouche-bleu {
  display: inline-block;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.2;
}
.is-style-cartouche-jaune {
  background: var(--wp--preset--color--jaune);
  color: var(--wp--preset--color--encre);
}
.is-style-cartouche-bleu {
  background: var(--wp--preset--color--bleu);
  color: var(--wp--preset--color--blanc);
}

/* Petite étiquette de section. */
.is-style-etiquette {
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--wp--preset--color--encre-douce);
}

/* Liste des reines en pastilles bleues. */
.is-style-pastilles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.is-style-pastilles li {
  background: var(--wp--preset--color--bleu);
  color: var(--wp--preset--color--blanc);
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 700;
}

/* Photographies en noir et blanc. */
.is-style-noir-et-blanc img {
  filter: grayscale(1);
}

/* Marque : le drapeau de l'Abbaye, chargé comme logo du site. */
.wp-block-site-logo img {
  border-radius: 0;
  object-fit: contain;
}

/* Médaillon de rang pour les rois. */
.abbaye-medaillon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--wp--preset--color--jaune);
  color: var(--wp--preset--color--encre);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
}

/* Emplacement d'image en attente (hachures + légende monospace). */
.abbaye-emplacement {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--wp--preset--color--encre-douce);
  background-color: var(--wp--preset--color--papier);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(32, 30, 29, 0.12) 0 2px,
    transparent 2px 9px
  );
  border-bottom: var(--abbaye-filet);
}

/* En-tête : la navigation passe à la ligne plutôt que de se couper. */
.abbaye-entete .wp-block-group {
  flex-wrap: wrap;
}
.abbaye-entete .wp-block-navigation__container {
  flex-wrap: wrap;
}
.abbaye-entete .wp-block-navigation-item__content {
  padding: 12px clamp(9px, 1.1vw, 15px);
}
.abbaye-entete .current-menu-item .wp-block-navigation-item__content {
  background: var(--wp--preset--color--bleu);
  color: var(--wp--preset--color--blanc);
  text-decoration: none;
}

/* Filets forts entre les grandes sections. */
.abbaye-filet-haut { border-top: var(--abbaye-filet); }
.abbaye-filet-bas { border-bottom: var(--abbaye-filet); }

/* Tableaux (rois, conseil des fêtes) : filets, pas de zébrures. */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td,
.wp-block-table th {
  border: 0;
  border-bottom: 2px solid rgba(32, 30, 29, 0.12);
  padding: 13px 0;
  text-align: left;
}
.wp-block-table th { font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }

/* Focus clavier thématisé partout. */
:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--wp--preset--color--bleu);
  outline-offset: 2px;
}

.am-form {
  font-family: Archivo, system-ui, sans-serif;
  color: #201e1d;
  display: grid;
  max-width: 640px;
}
.am-form * { box-sizing: border-box; }

/* --- Champ ------------------------------------------------------------- */

.am-form .am-champ { display: grid; gap: 8px; }

.am-form label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #605d5d;
}

.am-form .am-oblig {
  color: #0C56DA;
  letter-spacing: 0.16em;
}

/* CF7 enveloppe chaque champ dans un <span class="wpcf7-form-control-wrap"> */
.am-form .wpcf7-form-control-wrap { display: block; }

.am-form input[type="text"],
.am-form input[type="email"],
.am-form input[type="tel"],
.am-form textarea {
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: #201e1d;
  background: transparent;
  border: 2px solid #201e1d;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.am-form textarea { resize: vertical; min-height: 180px; }

.am-form input::placeholder,
.am-form textarea::placeholder { color: #9b9897; }

.am-form input:hover,
.am-form textarea:hover { border-color: #0C56DA; }

.am-form input:focus,
.am-form textarea:focus {
  outline: 2px solid #0C56DA;
  outline-offset: 2px;
  border-color: #0C56DA;
}

/* --- Bouton d'envoi ---------------------------------------------------- */

.am-form .am-actions { margin-top: 8px; }

.am-form input[type="submit"],
.am-form .wpcf7-submit {
  font-family: inherit;
  cursor: pointer;
  background: #0C56DA;
  color: #fff;
  border: 2px solid #0C56DA;
  border-radius: 0;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  -webkit-appearance: none;
  appearance: none;
}
.am-form .wpcf7-submit:hover { background: #073C9B; border-color: #073C9B; }
.am-form .wpcf7-submit:focus-visible { outline: 2px solid #DFD000; outline-offset: 3px; }
.am-form .wpcf7-submit:disabled { opacity: 0.45; cursor: not-allowed; }

/* Indicateur d'envoi de CF7 */
.am-form .wpcf7-spinner { margin-left: 14px; }

/* --- Messages de CF7 --------------------------------------------------- */

/* Erreur sous un champ */
.am-form .wpcf7-not-valid-tip {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #b3261e;
}
.am-form .wpcf7-not-valid {
  border-color: #b3261e;
}

/* Bandeau de réponse (succès / erreur / spam) */
.wpcf7 form .wpcf7-response-output {
  font-family: Archivo, system-ui, sans-serif;
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 2px solid #201e1d;
  border-radius: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}
.wpcf7 form.sent .wpcf7-response-output {
  background: #DFD000;
  border-color: #DFD000;
  color: #201e1d;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  background: transparent;
  border-color: #b3261e;
  color: #b3261e;
}
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
  background: transparent;
  border-color: #201e1d;
  color: #201e1d;
}

/* --- Badge reCAPTCHA ---------------------------------------------------
   Décommentez pour masquer le badge Google en bas à droite.
   Si vous le masquez, la mention suivante devient obligatoire près du
   bouton d'envoi :
     Ce site est protégé par reCAPTCHA. La politique de confidentialité
     et les conditions d'utilisation de Google s'appliquent.
   ----------------------------------------------------------------------- */

/*
.grecaptcha-badge { visibility: hidden; }
*/

.am-form .am-mention-recaptcha {
  font-size: 12px;
  line-height: 1.5;
  color: #605d5d;
  max-width: 52ch;
}
.am-form .am-mention-recaptcha a { color: #0C56DA; }
