/* ==========================================================================
   STANDARDELUXE — feuille de style principale
   Papier / encre. Typographie Mamertus Serif.
   ========================================================================== */

/* --- Fontes ------------------------------------------------------------- */

@font-face {
  font-family: "Mamertus Serif";
  src: url("../fonts/MamertusSerif-Regular.woff2") format("woff2"),
       url("../fonts/MamertusSerif-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mamertus Serif";
  src: url("../fonts/MamertusSerif-Bold.woff2") format("woff2"),
       url("../fonts/MamertusSerif-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Jetons -------------------------------------------------------------- */

:root {
  /* Papier et encre */
  --paper:        #f4f1ea;
  --paper-deep:   #e9e4d9;
  --paper-card:   #fbf9f5;
  --ink:          #16150f;
  --ink-soft:     #4a463a;
  --ink-faint:    #645e52; /* contraste AA (≥ 4.5) sur les trois fonds papier */
  --rule:         #16150f;
  --accent:       #a83a1a; /* contraste AA sur papier, carte et fond accentué */
  --accent-soft:  #f0ded6;
  --focus:        #1f5fd0;

  /* Typographie */
  --font-display: "Mamertus Serif", "Iowan Old Style", "Palatino Linotype",
                  Palatino, Georgia, "Times New Roman", serif;
  --font-text:    "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
                  "Times New Roman", serif;

  /* Rythme */
  --measure: 34rem;
  --gap:     clamp(1.25rem, 3vw, 2.5rem);
  --pad-x:   clamp(1.25rem, 5vw, 4rem);
  --border:  2px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #14130f;
    --paper-deep:  #0d0c09;
    --paper-card:  #1c1a15;
    --ink:         #f2eee3;
    --ink-soft:    #c3bcab;
    --ink-faint:   #8d8676;
    --rule:        #f2eee3;
    --accent:      #e8794f;
    --accent-soft: #33231c;
    --focus:       #7fb0ff;
  }
}

:root[data-theme="dark"] {
  --paper:       #14130f;
  --paper-deep:  #0d0c09;
  --paper-card:  #1c1a15;
  --ink:         #f2eee3;
  --ink-soft:    #c3bcab;
  --ink-faint:   #8d8676;
  --rule:        #f2eee3;
  --accent:      #e8794f;
  --accent-soft: #33231c;
  --focus:       #7fb0ff;
}

/* --- Base ---------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: clamp(1.0625rem, 0.5vw + 0.95rem, 1.1875rem);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

:where(a) {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Typographie --------------------------------------------------------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

/* Accroche courte : Mamertus assume bien deux ou trois mots par ligne. */
.tagline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  line-height: 1.35;
  max-width: 26ch;
  margin: 0;
}

/* Chapô : Mamertus est une grasse large, illisible sur plusieurs lignes.
   On repasse au sérif de labeur, simplement plus grand. */
.lead {
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  line-height: 1.5;
  max-width: 38ch;
  color: var(--ink-soft);
}

/* --- Mise en page -------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

main { flex: 1 0 auto; }

.section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.section + .section {
  border-top: var(--border) solid var(--rule);
}

/* --- En-tête / navigation ------------------------------------------------ */

.masthead {
  border-bottom: var(--border) solid var(--rule);
  background: var(--paper);
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem var(--gap);
  padding-block: 1rem;
}

.nav {
  flex: 1 1 auto;
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem clamp(0.9rem, 2.5vw, 2rem);
}

.nav__link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.35rem 0;
  display: inline-block;
  border-bottom: var(--border) solid transparent;
}

.nav__link:hover { border-bottom-color: var(--accent); }

.nav__link[aria-current="page"] {
  border-bottom-color: var(--rule);
}

/* Sélecteur de langues */

.langs {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.langs__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.langs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
}

/* Ce sont de vrais liens vers /fr/, /de/, … et non des boutons :
   chaque langue a sa propre URL, partageable et indexable. */
.langs__btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-bottom: var(--border) solid transparent;
  color: var(--ink-soft);
  padding: 0.15rem 0.1rem;
}

.langs__btn:hover { color: var(--ink); border-bottom-color: var(--ink-faint); }

.langs__btn[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* --- Bandeau « en ce moment » -------------------------------------------- */

/* Encre sur fond accentué : la même paire que .notice, déjà vérifiée. */
.bandeau {
  background: var(--accent-soft);
  border-bottom: var(--border) solid var(--rule);
  padding-block: 0.85rem;
}

.bandeau p { max-width: none; margin: 0; }

.bandeau__label {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

/* --- Titre de page ------------------------------------------------------- */

.pagehead {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: var(--border) solid var(--rule);
}

.pagehead__title { margin-bottom: 0.25em; }

.pagehead__intro {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0;
}

/* --- Version à écouter (FALC) -------------------------------------------- */

/* Le lecteur est celui du navigateur : pas de couleur à nous, donc pas de
   contraste à recalculer. */
.ecoute {
  margin-top: 1.5rem;
  max-width: var(--measure);
}

.ecoute__label {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.ecoute__lecteur {
  display: block;
  width: 100%;
}

.ecoute__aide {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
}

/* --- Liste de liens « par ici » (page 404) ------------------------------- */

.suite {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Accueil : bloc titre ------------------------------------------------ */

.hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
}

.hero__title {
  font-size: clamp(2.75rem, 11vw, 8rem);
  margin-bottom: 0.15em;
  line-height: 0.95;
}

.hero__grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 46rem) {
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; }
}

.hero__figure {
  border: var(--border) solid var(--rule);
  background: var(--paper-card);
  padding: 0.6rem;
}

.hero__figure figcaption {
  font-size: 0.85rem;
  color: var(--ink-faint);
  padding-top: 0.5rem;
  font-style: italic;
}

/* Image de remplacement dessinée */
.placeholder {
  aspect-ratio: 4 / 3;
  width: 100%;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 11px,
      color-mix(in srgb, var(--ink) 7%, transparent) 11px 12px
    ),
    var(--paper-deep);
  color: var(--ink-faint);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
}

/* --- Blocs de contenu ---------------------------------------------------- */

.stack > * + * { margin-top: 1.1em; }

.grid-2 {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 46rem) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.block {
  border: var(--border) solid var(--rule);
  background: var(--paper-card);
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.block > h3 { margin-top: 0; }

.block--accent {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* --- Programme / calendrier ---------------------------------------------- */

.agenda {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: var(--border) solid var(--rule);
}

.agenda__item {
  display: grid;
  gap: 0.15rem 1.5rem;
  grid-template-columns: 1fr;
  padding-block: 1.1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
}

@media (min-width: 40rem) {
  .agenda__item { grid-template-columns: 9rem 1fr; }
}

.agenda__date {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.agenda__title { font-weight: 700; }

.agenda__meta {
  color: var(--ink-faint);
  font-size: 0.92rem;
}

.agenda__photo {
  margin-top: 0.75rem;
  max-width: min(100%, 28rem);
  border: var(--border) solid var(--rule);
}

/* --- Fiches intervenants ------------------------------------------------- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 34rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 60rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  border: var(--border) solid var(--rule);
  background: var(--paper-card);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.card:hover,
.card:focus-visible { border-color: var(--accent); }

.card__media { border-bottom: var(--border) solid var(--rule); }

.card__media .placeholder { aspect-ratio: 1 / 1; }

.card__body {
  padding: clamp(1rem, 2vw, 1.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card__name { margin: 0; }

.card__role {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
}

.card__text { font-size: 0.98rem; margin: 0; }

.card__when {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
  border-top: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
}

/* --- Galerie d'images (fiche atelier) ------------------------------------ */

.galerie {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 40rem) {
  .galerie { grid-template-columns: repeat(3, 1fr); }
}

.galerie li {
  aspect-ratio: 4 / 3;
  border: var(--border) solid var(--rule);
  overflow: hidden;
}

.galerie img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Légende des pictogrammes (accessibilité) ---------------------------- */

.pictos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 46rem) {
  .pictos { grid-template-columns: repeat(3, 1fr); }
}

.picto {
  border: var(--border) solid var(--rule);
  background: var(--paper-card);
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.picto__icon {
  width: 2.5rem;
  height: 2.5rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 0.85rem;
}

.picto__title { margin: 0 0 0.35em; }

.picto__desc {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin: 0;
}

/* --- Formulaires --------------------------------------------------------- */

.form { max-width: 38rem; }

.field { margin-bottom: 1.5rem; }

.field__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.field__hint {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-text);
}

/* Message d'erreur sous un libellé. Pas de couleur propre : l'encre suffit,
   et le mot « Erreur » le dit sans dépendre de la couleur. */
.field__error {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.field__input,
.field__textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper-card);
  border: none;
  border-bottom: var(--border) solid var(--rule);
  padding: 0.6rem 0.5rem;
  border-radius: 0;
}

.field__textarea {
  border: var(--border) solid var(--rule);
  min-height: 9rem;
  resize: vertical;
}

.field__input:hover,
.field__textarea:hover { background: var(--paper-deep); }

/* Cases à cocher — dessinées comme sur le croquis */

.options {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.option {
  border: var(--border) solid var(--rule);
  background: var(--paper-card);
}

.option__label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: start;
  padding: clamp(0.9rem, 2vw, 1.25rem);
  cursor: pointer;
}

.option__box {
  appearance: none;
  -webkit-appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.15rem 0 0;
  border: var(--border) solid var(--rule);
  background: var(--paper);
  display: grid;
  place-content: center;
  cursor: pointer;
  flex: none;
}

.option__box::after {
  content: "";
  width: 0.85rem;
  height: 0.5rem;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg) scale(0);
  transition: transform 120ms ease-out;
}

.option__box:checked::after { transform: rotate(-45deg) scale(1); }

.option__box:checked { background: var(--accent-soft); }

.option:has(.option__box:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.2rem;
}

.option__desc {
  font-size: 0.96rem;
  color: var(--ink-soft);
  display: block;
}

.option__price {
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
}

.option__pay {
  padding: clamp(0.9rem, 2vw, 1.25rem);
  border-top: var(--border) solid var(--rule);
}

/* --- Boutons ------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.7rem 2.5rem;
  border: var(--border) solid var(--rule);
  background: var(--paper-card);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease-out, color 120ms ease-out;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--go { padding-inline: 3.5rem; }

/* Lien encadré « PAR ICI » */
.parici {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: var(--border) solid var(--rule);
  padding: 0.45rem 1.1rem;
  text-decoration: none;
  background: var(--paper-card);
}

.parici:hover { background: var(--ink); color: var(--paper); }
.parici:hover .mark { fill: var(--paper); }

.mark {
  width: 1em;
  height: 1em;
  fill: var(--accent);
  flex: none;
}

/* --- Retour de formulaire ------------------------------------------------ */

.notice {
  border: var(--border) solid var(--accent);
  background: var(--accent-soft);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}

.notice[hidden] { display: none; }

/* --- Pied de page -------------------------------------------------------- */

.footer {
  border-top: var(--border) solid var(--rule);
  background: var(--paper-deep);
  padding-block: clamp(2rem, 4vw, 3rem);
  font-size: 0.95rem;
}

.footer__grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 46rem) {
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
}

.footer h3 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-bottom: 0.75rem;
}

.footer p { margin-bottom: 0.4rem; }

.footer__note {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  color: var(--ink-faint);
  font-size: 0.85rem;
}

/* --- Impression ---------------------------------------------------------- */

@media print {
  .langs, .skip-link, .btn, .parici, .ecoute { display: none; }
  body { background: #fff; color: #000; }
}
