/* ==========================================================================
   Template A — « Éditorial » : page pleine sur la photo
   - photo intacte ; seul le bloc de texte repose sur un fond légèrement assombri
   - coin blanc « À paraître / Novembre 2027 » en haut à gauche
   - titre en haut, vers le centre ; bloc compact à gauche ; crédits en bas
   Palette provisoire (à remplacer par les couleurs du livret) :
     --principale : #1F3A4D  bleu ardoise
     --accent     : #9C5A1E  ocre lichen
     --neutre     : #F5F0E8  sable clair
   Polices du livret : Cormorant Garamond (titre), Georgia (sous-titre), Cambria (texte)
   avec Gelasio / Caladea (Google Fonts) en remplacement là où Georgia / Cambria manquent
   ========================================================================== */

/* ---------- Polices hébergées sur le site (assets/fonts, licence SIL OFL 1.1), jeu latin ---------- */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/cormorant-garamond-600.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans"; /* police variable : un seul fichier pour 400 et 800 */
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/open-sans.woff2") format("woff2");
}
/* Gelasio et Caladea ne servent que si Georgia ou Cambria manquent (Android, iPhone…) */
@font-face {
  font-family: "Gelasio";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/gelasio-700-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Caladea";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/caladea-400.woff2") format("woff2");
}
@font-face {
  font-family: "Caladea";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/caladea-400-italic.woff2") format("woff2");
}

:root {
  --principale: #1F3A4D;
  --accent: #9C5A1E;
  --neutre: #F5F0E8;
  --texte: #1C1C1C;
  --blanc: #FFFFFF;
  --focus: #F3C892;                      /* ocre clair : visible sur la photo */
  --voile: rgba(12, 22, 30, 0.55);       /* fond du bloc de texte uniquement */
  --ombre: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 14px rgba(0, 0, 0, 0.45); /* titre sur la photo */
  --coin: 10rem;                         /* taille du coin (mobile) */
  --jaune: #E79A30;                      /* jaune-orangé du flyer A5 */
  --bandeau-police: "Open Sans", "Segoe UI", Arial, sans-serif; /* typo épaisse du coin, comme le flyer */
  --bande-haut: 2.75rem;                 /* bandes blanches du flyer (mobile) */
  --bande-bas: 2.5rem;
  --marge-droite: 1rem;                  /* bord droit commun au titre et aux bandes */

  --titre: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sous-titre: Georgia, Gelasio, "Times New Roman", serif;
  --corps: Cambria, Caladea, Georgia, serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--blanc);
  color: var(--blanc);
  font-family: var(--corps);
  font-size: 1rem;
  line-height: 1.45;
}

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

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

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

/* ---------- Mise en page : bande blanche / photo / bande blanche, comme le flyer ---------- */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.band {
  display: flex;
  justify-content: flex-end;
  padding: 0 var(--marge-droite);
  background: var(--blanc);
  color: #4A4A4A;
  font-family: var(--bandeau-police);
  font-size: 0.7rem; /* sur 320 px, le texte du haut reste à droite du coin */
}
.band p { margin: 0; }
.band a { color: var(--principale); }
.band a:hover { color: var(--accent); }
.band :focus-visible { outline-color: var(--accent); }
.band__publication { font-size: calc(1em + 2pt); }
/* Mobile : une ligne par élément, alignées à droite */
.band--bottom p { display: flex; flex-direction: column; align-items: flex-end; padding: 0.4rem 0; }
.band__sep { display: none; }
.band__contact { font-size: calc(1em + 2pt); font-weight: 600; white-space: nowrap; } /* adresse lisible et copiable : le lien mailto ne fait rien sans logiciel de messagerie */ /* 2 points de plus que les liens, décalé de 1 cm vers la gauche */

.band--top {
  min-height: var(--bande-haut);
  align-items: flex-end;   /* texte posé sur la photo, comme le flyer */
  padding-bottom: 0.35rem;
}
.band--bottom {
  min-height: var(--bande-bas);
  align-items: center;
}

.scene {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: var(--principale); /* si la photo ne charge pas */
}

/* ---------- Photo (non retouchée) ---------- */

.bg,
.bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.bg { z-index: -1; }
.bg img {
  object-fit: cover;
  object-position: 62% 50%; /* mobile : ciel et arbre */
}

/* ---------- Coin blanc « À paraître » ---------- */

.corner {
  --t: var(--coin);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: var(--t);
  height: var(--t);
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  /* tout le coin est blanc jusqu'au bas du bandeau */
  background: linear-gradient(135deg, var(--jaune) 38%, transparent 38%);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}
.corner > span {
  position: absolute;
  top: calc(var(--t) * 0.1925); /* texte centré sur la diagonale du coin */
  right: calc(var(--t) * -0.2625); /* bandeau assez long pour atteindre le bord gauche (sinon encoche en bas à gauche) */
  width: calc(var(--t) * 1.8);
  padding: 0.5em 0;
  transform: rotate(-45deg);
  background: var(--jaune);
  color: var(--blanc);
  font-family: var(--bandeau-police);
  font-weight: 800;
  font-size: calc(var(--t) * 0.1);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  text-transform: uppercase;
}
.corner__date {
  display: block;
  font-size: 1em;
  letter-spacing: 0.01em;
}

/* ---------- Titre ---------- */

.head {
  padding-top: calc(var(--coin) * 0.62 - var(--bande-haut)); /* dégage le coin */
  text-align: right;
  text-shadow: var(--ombre);
}

.head h1 {
  margin: 0;
  font-family: var(--titre);
  font-weight: 600;
  font-size: min(clamp(5rem, 8vw + 1vh, 10rem), 13vw); /* 13vw : la phrase, 1,5× plus large que le titre, tient sur une ligne en mobile */
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.head__subtitle {
  display: block;
  margin-top: -0.3em; /* collée au titre */
  font-family: var(--sous-titre);
  font-weight: 700;
  font-style: italic; /* gras italique, comme le flyer */
  font-size: 0.265em; /* 3 pt de moins qu'avant (31,8 pt sur un écran de 1920 px) ; reste plus large que le titre */
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

/* ---------- Bloc compact sur fond assombri ---------- */

.panel {
  padding: 1em 1.1em;
  background: var(--voile);
  border-radius: 3px;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.intro__lead {
  margin: 0;
  font-size: 1.15em;
  font-style: italic;
  line-height: 1.3;
}
.intro__price { margin: 0.3em 0 0; font-size: 1.05em; }
.intro__price strong { font-weight: 400; color: var(--focus); }

.signup {
  margin-top: 0.8em;
  padding-top: 0.8em;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.signup__lead {
  margin: 0 0 0.5em;
  font-family: var(--corps);
  font-weight: 400;
  font-size: 1.05em;
}

.form { display: grid; gap: 0.6em; }
.form[hidden] { display: none; } /* masqué après une inscription réussie */
.form__piege { display: none; } /* champ anti-robots de Brevo */

.field--email input {
  width: 100%;
  padding: 0.5em 0.6em;
  border: 0;
  border-radius: 2px;
  background: var(--blanc);
  color: var(--texte);
  font: inherit;
}
.field--email input::placeholder { color: #6B6B6B; }

.field--check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5em;
  align-items: start;
}
.field--check input {
  width: 1.1em;
  font-size: inherit; /* 1.1em = taille du texte, pas celle par défaut des cases */
  height: 1.1em;
  margin: 0.15em 0 0;
  accent-color: var(--principale);
}
.field--check label { font-size: 0.875em; line-height: 1.35; }

.button {
  justify-self: start;
  padding: 0.5em 1.5em;
  border: 0;
  border-radius: 2px;
  background: var(--neutre);
  color: var(--principale);
  font-family: var(--corps);
  font-size: 1.05em;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.button:hover { background: var(--focus); }
.button:disabled { opacity: 0.6; cursor: wait; }

.form__message { margin: 0; font-weight: bold; }
.form__message--erreur { color: #FFD7D0; }

.rgpd {
  margin: 0.6em 0 0;
  font-size: 0.8125em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- Crédit photo, en bas à gauche de la photo (flyer) ---------- */

.credit {
  margin: auto 0 0;
  font-size: 1rem; /* 12 pt */
  font-style: italic;
  text-shadow: var(--ombre);
}

/* ---------- Grands écrans : disposition du croquis ---------- */

@media (min-width: 56.25em) {
  /* coin : 2× l'ancien bandeau, réduit selon la hauteur pour ne pas toucher le bloc */
  :root {
    --coin: clamp(15rem, 100vh - 25rem, 30rem);
    --bande-haut: clamp(3rem, 7vh, 5rem);
    --bande-bas: clamp(2.5rem, 6vh, 4rem);
    --marge-droite: clamp(1.5rem, 4vw, 4rem);
  }

  .bg img { object-position: 50% 50%; }

  .page { height: 100vh; height: 100dvh; }

  .band { font-size: 0.95rem; }
  .band--bottom p { display: block; padding: 0; } /* tout sur une ligne */
  .band__sep { display: inline; }
  .band__publication { margin-right: 1cm; }

  /* Titre et phrase justifiés à droite (croquis) : la phrase, plus large, déborde à gauche du titre */
  .head {
    position: absolute;
    top: clamp(0.5rem, 2vh, 2rem);
    right: var(--marge-droite); /* même bord droit que la bande du haut */
    padding-top: 0;
    text-align: right;
  }

  /* Bloc compact à gauche */
  .panel {
    position: absolute;
    left: 13vw;
    top: calc(min(35vh, 100vh - 28rem) - var(--bande-haut)); /* un peu plus bas ; reste au-dessus du crédit sur les écrans peu hauts */
    font-size: 1.1rem; /* bloc agrandi de 10 % (toutes ses tailles sont en em) */
    width: 34rem; /* assez large pour « Pour être informé de la parution, laissez votre adresse mail : » sur une ligne */
    padding: 1em 1.2em;
  }

  .credit {
    position: absolute;
    left: clamp(1.5rem, 3vw, 3rem);
    bottom: 0.6rem;
  }
}
