/* ==========================================================================
   Lumière de Lorraine n° 36 · Orient d'Arlon
   Feuille de style principale
   ========================================================================== */

/* ---------- Polices (hébergées sur le site, aucun appel externe) ---------- */
@font-face {
  font-family: "Marcellus";
  src: url("../fonts/marcellus-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Jetons ---------- */
:root {
  /* Couleurs tirées du pavé et du blason */
  --nuit: #000000;          /* le noir du pavé */
  --pave: #ecebe6;          /* le blanc du pavé : texte courant */
  --pave-doux: rgba(236, 235, 230, 0.74);
  --pave-trait: rgba(236, 235, 230, 0.16);
  --or: #e3b23c;            /* bordure du blason */
  --or-vif: #f2cf6b;
  --azur: #2f5fc8;          /* burelé du blason */
  --ciel: #9fd0f2;          /* banderole de la devise */
  --succes: #93c96b;        /* d'après l'équerre verte, éclairci pour le fond noir */
  --erreur: #f29b8f;

  --f-titre: "Marcellus", "Trajan Pro", Georgia, serif;
  --f-texte: "EB Garamond", Garamond, "Times New Roman", serif;

  --header-h: 4rem;
  --largeur: 72rem;
  --marge: clamp(1.25rem, 4vw, 2.5rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--nuit);
  color: var(--pave);
  font-family: var(--f-texte);
  font-size: clamp(1.125rem, 1.02rem + 0.35vw, 1.3125rem);
  line-height: 1.6;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--f-titre);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--or); text-underline-offset: 0.18em; }
a:hover { color: var(--or-vif); }

::selection { background: var(--or); color: var(--nuit); }

:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--or);
  color: var(--nuit);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Boutons et liens ---------- */
.button {
  display: inline-block;
  padding: 0.75em 1.6em;
  border: 1px solid var(--or);
  border-radius: 2px;
  background: var(--or);
  color: var(--nuit);
  font-family: var(--f-texte);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.button:hover { background: var(--or-vif); border-color: var(--or-vif); color: var(--nuit); }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: 0.6; cursor: progress; }

.link-quiet {
  color: var(--pave-doux);
  text-decoration: underline;
  text-decoration-color: var(--pave-trait);
}
.link-quiet:hover { color: var(--pave); text-decoration-color: currentColor; }

/* ---------- En-tête ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(0, 0, 0, 0.9);
  border-bottom-color: var(--pave-trait);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 var(--marge);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--pave);
  font-family: var(--f-titre);
  font-size: 1.125rem;
  text-decoration: none;
  transition: opacity 0.3s;
}
.brand img { width: 2.25rem; height: auto; }
.brand:hover { color: var(--or-vif); }
/* Le nom n'apparaît dans l'en-tête qu'une fois le grand titre dépassé */
.site-header:not(.is-scrolled):not(.is-open) .brand { opacity: 0; pointer-events: none; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  color: var(--pave);
  font-size: 1.0625rem;
  text-decoration: none;
}
.site-nav a:hover { color: var(--or-vif); }
.site-nav__cta {
  padding: 0.3em 0.95em;
  border: 1px solid var(--or);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  padding: 0.35em 0.9em;
  border: 1px solid var(--pave-trait);
  border-radius: 2px;
  background: transparent;
  color: var(--pave);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 47.99em) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    background: var(--nuit);
    border-bottom: 1px solid var(--pave-trait);
  }
  .site-header.is-open .site-nav { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--marge) 1.25rem;
  }
  .site-nav li a {
    display: block;
    padding: 0.8rem 0;
    font-size: 1.25rem;
    border-bottom: 1px solid var(--pave-trait);
  }
  .site-nav li:last-child a { border-bottom: 0; }
  .site-nav__cta { border: 0; padding: 0.8rem 0; color: var(--or) !important; }
}

/* ---------- Ouverture (hero) ---------- */
.hero {
  --logo-h: clamp(8rem, 23vh, 14rem);
  --sol: clamp(12rem, 40vh, 24rem); /* hauteur réservée au pavé sous le texte */
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: calc(var(--header-h) + clamp(0.5rem, 4vh, 3rem)) var(--marge) var(--sol);
  overflow: hidden;
  text-align: center;
}

/* Le pavé mosaïque surgit de l'obscurité, au bas de l'écran */
.hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--sol) + 6rem);
  z-index: -2;
  background: url("../img/pav_mosaique.webp") center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 45%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 45%, #000 84%, transparent 100%);
}

.hero__content {
  position: relative;
  display: grid;
  justify-items: center;
  max-width: 44rem;
}

/* La lumière qui se lève derrière le blason : l'unique animation de la page */
.hero__light {
  position: absolute;
  top: calc(var(--logo-h) / 2);
  left: 50%;
  z-index: -1;
  width: min(120vw, 52rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side,
              rgba(242, 207, 107, 0.34) 0%,
              rgba(227, 178, 60, 0.13) 42%,
              rgba(227, 178, 60, 0) 72%);
  pointer-events: none;
  animation: lever 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__logo {
  height: var(--logo-h);
  width: auto;
  filter: drop-shadow(0 0.6rem 2.2rem rgba(0, 0, 0, 0.6));
  animation: apparaitre 1.6s 0.5s ease-out both;
}

.hero__title {
  margin-top: clamp(1rem, 3vh, 1.75rem);
  font-size: clamp(2.5rem, 1.4rem + 4.6vw, 4.5rem);
  letter-spacing: 0.02em;
  color: var(--pave);
  text-shadow: 0 0 2.5rem rgba(242, 207, 107, 0.25);
  animation: apparaitre 1.4s 1s ease-out both;
}

.hero__subtitle {
  margin: 0.5rem 0 0;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  font-style: italic;
  animation: apparaitre 1.2s 1.4s ease-out both;
}

.hero__subtitle,
.hero__obedience,
.hero__actions .link-quiet {
  text-shadow: 0 0 0.75rem #000, 0 0 1.5rem #000;
}

.hero__obedience {
  margin: 0.25rem 0 0;
  color: rgba(236, 235, 230, 0.86);
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
  animation: apparaitre 1.2s 1.4s ease-out both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.75rem;
  margin-top: clamp(1.25rem, 4vh, 2.25rem);
  animation: apparaitre 1.2s 1.7s ease-out both;
}

@keyframes lever {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes apparaitre {
  from { opacity: 0; filter: blur(6px); }
  to   { opacity: 1; filter: blur(0); }
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6.5rem) var(--marge);
}

/* EB Garamond remplace « u » par « v » en latin : on garde l'orthographe usuelle */
:lang(la) { font-feature-settings: "locl" 0; }

.section h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.75rem);
}

.section__head {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.section__head h2 { margin-bottom: 1.25rem; }
.section__head p { color: var(--pave-doux); }

.prose { max-width: 36em; }
.prose p { color: var(--pave-doux); }
.prose .lead {
  color: var(--pave);
  font-size: 1.2em;
  line-height: 1.5;
}

@media (min-width: 56em) {
  .section--split {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: start;
  }
}
.section--split h2 { margin-bottom: 1.5rem; }

/* ---------- Devise ---------- */
.motto {
  padding: clamp(4rem, 9vw, 7rem) var(--marge);
  text-align: center;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(227, 178, 60, 0.09), transparent 70%);
  border-block: 1px solid var(--pave-trait);
}
.motto blockquote { margin: 0; }
.motto blockquote p {
  margin: 0;
  font-family: var(--f-titre);
  font-size: clamp(2.4rem, 1rem + 6vw, 5.25rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
  color: var(--or);
  text-shadow: 0 0 3rem rgba(227, 178, 60, 0.3);
}
.motto__translation {
  max-width: 32em;
  margin: 1.5rem auto 0;
  color: var(--pave-doux);
  font-style: italic;
}

/* ---------- Principes : un pavé mosaïque de tuiles claires et sombres ---------- */
.mosaic {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mosaic > li {
  /* tuile sombre par défaut */
  --tuile-fond: var(--nuit);
  --tuile-texte: var(--pave-doux);
  --tuile-titre: var(--or);
  --tuile-bord: var(--pave-trait);
  padding: clamp(2rem, 4.5vw, 3.75rem);
  background: var(--tuile-fond);
  color: var(--tuile-texte);
  box-shadow: inset 0 0 0 1px var(--tuile-bord);
}
.mosaic > li:nth-child(odd) {
  --tuile-fond: var(--pave);
  --tuile-texte: rgba(0, 0, 0, 0.8);
  --tuile-titre: var(--azur);
  --tuile-bord: transparent;
}
@media (min-width: 45em) {
  .mosaic { grid-template-columns: 1fr 1fr; }
  .mosaic > li { min-height: 17rem; }
  /* en damier sur deux colonnes : 1 et 4 claires, 2 et 3 sombres */
  .mosaic > li:nth-child(3) {
    --tuile-fond: var(--nuit);
    --tuile-texte: var(--pave-doux);
    --tuile-titre: var(--or);
    --tuile-bord: var(--pave-trait);
  }
  .mosaic > li:nth-child(4) {
    --tuile-fond: var(--pave);
    --tuile-texte: rgba(0, 0, 0, 0.8);
    --tuile-titre: var(--azur);
    --tuile-bord: transparent;
  }
}
.mosaic h3 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.65rem);
  color: var(--tuile-titre);
}
.mosaic p { max-width: 30em; }

/* ---------- Étapes pour nous rejoindre ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem clamp(1.5rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}
@media (min-width: 38em) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 62em) { .steps { grid-template-columns: repeat(4, 1fr); } }

.steps li {
  counter-increment: etape;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(227, 178, 60, 0.45);
}
.steps li::before {
  content: counter(etape, upper-roman);
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--f-titre);
  font-size: 2rem;
  line-height: 1;
  color: var(--or);
}
.steps h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}
.steps p { color: var(--pave-doux); }

/* ---------- Contact ---------- */
@media (min-width: 62em) {
  .section--contact {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
  }
}
.contact__intro { max-width: 34em; margin-bottom: 2.5rem; }
.contact__intro h2 { margin-bottom: 1.25rem; }
.contact__intro p { color: var(--pave-doux); }
.contact__privacy {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--pave-trait);
  font-size: 0.9em;
}

/* Le formulaire porte sur son flanc le burelé bleu et blanc du blason */
.contact-form {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  padding-left: calc(clamp(1.5rem, 4vw, 2.75rem) + 0.75rem);
  background: rgba(236, 235, 230, 0.035);
  border: 1px solid var(--pave-trait);
}
.contact-form::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 0.625rem;
  background: repeating-linear-gradient(to bottom, var(--azur) 0 0.875rem, var(--pave) 0.875rem 1.75rem);
}
@media (min-width: 40em) {
  .contact-form { grid-template-columns: 1fr 1fr; }
  .field--full,
  .turnstile,
  .form-actions,
  .contact-form noscript { grid-column: 1 / -1; }
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}
.field__optional { color: var(--pave-doux); font-style: italic; }

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(236, 235, 230, 0.3);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--pave);
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--or);
  box-shadow: 0 0 0 3px rgba(227, 178, 60, 0.3);
}
.field [aria-invalid="true"] { border-color: var(--erreur); }

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--or) 50%),
    linear-gradient(135deg, var(--or) 50%, transparent 50%);
  background-position: calc(100% - 1.2rem) 55%, calc(100% - 0.85rem) 55%;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  cursor: pointer;
}
.field select:invalid { color: var(--pave-doux); }
.field select option { background: var(--nuit); color: var(--pave); }

.field--check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.25rem 0.7rem;
}
.field--check input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.3rem 0 0;
  accent-color: var(--or);
  cursor: pointer;
}
.field--check label { margin: 0; font-size: 0.98rem; color: var(--pave-doux); cursor: pointer; }
.field--check .field__error { grid-column: 2; }

.field__error {
  margin: 0.35rem 0 0;
  color: var(--erreur);
  font-size: 0.95rem;
}

/* Champ piège : hors écran pour les humains */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile:empty { display: none; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.25rem;
}
.form-status { margin: 0; font-size: 1rem; }
.form-status:empty { display: none; }
.form-status--success { color: var(--succes); }
.form-status--error { color: var(--erreur); }
.form-status--pending { color: var(--pave-doux); font-style: italic; }

/* ---------- Pied de page ---------- */
.site-footer {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  padding: 4rem var(--marge) 3rem;
  border-top: 1px solid var(--pave-trait);
  color: var(--pave-doux);
  font-size: 1rem;
  text-align: center;
}
.site-footer p { margin: 0; }
.site-footer img { width: 4.5rem; margin-bottom: 1rem; }
.site-footer__name {
  font-family: var(--f-titre);
  font-size: 1.15rem;
  color: var(--pave);
}
.site-footer__links { margin-top: 1rem !important; }
.site-footer__links a { color: var(--pave-doux); }
.site-footer__links a:hover { color: var(--or-vif); }
.site-footer__copy { margin-top: 0.35rem !important; font-size: 0.9rem; }

/* ---------- Page des mentions légales ---------- */
.legal {
  max-width: 44rem;
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(2.5rem, 7vw, 4.5rem)) var(--marge) clamp(4rem, 8vw, 6rem);
}
.legal h1 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.25rem); }
.legal__maj { margin-top: 0.75rem; color: var(--pave-doux); font-style: italic; }

.legal__sommaire {
  margin: 2.25rem 0 0;
  padding: 1.25rem 0;
  border-block: 1px solid var(--pave-trait);
}
.legal__sommaire ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal__sommaire a { color: var(--pave); text-decoration-color: var(--pave-trait); }
.legal__sommaire a:hover { color: var(--or-vif); }

.legal section { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.legal h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.55rem, 1.25rem + 1vw, 2rem);
}
.legal h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.2rem;
  color: var(--or);
}
.legal p,
.legal li { color: var(--pave-doux); }
.legal strong { color: var(--pave); font-weight: 600; }
.legal section ul { padding-left: 1.2rem; }
.legal section li + li { margin-top: 0.6rem; }
.legal code { font-family: inherit; font-style: italic; }

.legal__fiche {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem 1.5rem;
  margin: 0 0 1em;
}
.legal__fiche dt { color: var(--pave); }
.legal__fiche dd { margin: 0 0 0.75rem; color: var(--pave-doux); }
@media (min-width: 40em) {
  .legal__fiche { grid-template-columns: 13rem 1fr; }
  .legal__fiche dd { margin-bottom: 0.4rem; }
}

.legal__retour { margin-top: 3.5rem; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
