/* =========================================================
   MAISON KYROS — Phase 1 « L'aube de la Maison »
   Feuille de style unique. Mobile d'abord.
   Couleurs relevées sur le dossier de branding (à confirmer par le DA).
   ========================================================= */

/* --- Typographies de la Maison ---------------------------------
   Déposer les fichiers webfont (licence web obligatoire) dans /assets/fonts/ :
   italiana-regular.woff2 (fourni), gotham-book.woff2, gotham-medium.woff2.
   Tant qu'ils sont absents, les polices de secours s'affichent. */
@font-face {
  font-family: "Italiana"; /* titres — licence SIL Open Font License 1.1, usage web libre */
  src: url("../fonts/italiana-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Gotham";
  src: url("../fonts/gotham-book.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Gotham";
  src: url("../fonts/gotham-medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --ivoire: #f4efea;
  --ivoire-2: #ebe3db;
  --charbon: #262323;
  --bordeaux: #492020;
  --vert: #194135;
  --rose: #a6807a;
  --rose-clair: #d9c3bd;

  --f-titre: "Italiana", Georgia, "Times New Roman", serif;
  --f-texte: "Gotham", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --mesure: 34rem;
  --marge: clamp(1.5rem, 6vw, 4rem);
  --espace: clamp(5rem, 14vw, 9rem);
}

*, *::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: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--ivoire);
  color: var(--charbon);
  font-family: var(--f-texte);
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ivoire); color: var(--charbon); padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.surtitre {
  font-family: var(--f-texte);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
}
h1, h2 { font-family: var(--f-titre); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: .01em; }
h1 { font-size: clamp(2.1rem, 7.2vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 5.5vw, 3rem); margin-bottom: 2rem; }

/* --- En-tête (posé sur le ciel de l'image d'ouverture) ---- */
.entete {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem var(--marge);
  color: var(--bordeaux);
}
.entete__logo { width: 88px; }
.entete__lien {
  font-size: .72rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; text-decoration: none;
  padding: .5rem 0; border-bottom: 1px solid rgba(73,32,32,.5);
}

/* --- Ouverture : visuel DA-WEB-01, titre bordeaux dans le ciel --- */
.ouverture {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100svh;
  color: var(--ivoire); text-align: center;
  background: #6e5f58;
}
.ouverture__media, .ouverture__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ouverture__media img { object-fit: cover; object-position: 50% 100%; }
/* Voile très léger pour que le titre ivoire reste lisible sur le manteau et la mer */
.ouverture__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(38,35,35,0) 26%, rgba(38,35,35,.34) 50%, rgba(38,35,35,0) 76%); }
.ouverture__contenu { position: relative; z-index: 1; padding: 0 var(--marge); max-width: 34rem; margin: 0 auto; }
.ouverture h1 {
  font-size: clamp(2rem, 8.4vw, 2.8rem); line-height: 1.12; text-wrap: balance; color: var(--ivoire);
  text-shadow: 0 2px 22px rgba(38,35,35,.45);
}
/* Sous-titre : bande ivoire juste sous l'image */
.ouverture__sous { padding: 3.5rem var(--marge) 0; text-align: center; }
.ouverture__sous p {
  max-width: 34rem; margin: 0 auto; font-family: var(--f-titre); font-size: clamp(1.15rem, 3.6vw, 1.5rem);
  line-height: 1.45; color: var(--bordeaux); text-wrap: balance;
}
.ouverture__suite {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); z-index: 1;
  font-size: .7rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; text-decoration: none; color: var(--ivoire);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  text-shadow: 0 1px 8px rgba(38,35,35,.45);
}
.ouverture__suite::after { content: ""; width: 1px; height: 2.2rem; background: linear-gradient(var(--ivoire), transparent); }

@media (max-width: 899px) { .entete__logo { width: 72px; } .entete { padding-top: .8rem; } }
@media (min-width: 900px) { .entete__logo { width: 104px; } }
/* Écran horizontal : titre ivoire, centré dans la moitié gauche, silhouette à droite */
@media (orientation: landscape) and (min-width: 700px) {
  .ouverture { justify-content: flex-start; min-height: 420px; height: 100vh; max-height: 56.25vw; }
  .ouverture__media img { object-position: 50% 15%; }
  .ouverture__media::after { background: linear-gradient(90deg, rgba(38,35,35,.40) 0%, rgba(38,35,35,.22) 40%, rgba(38,35,35,0) 62%); }
  .ouverture__contenu { width: 50%; max-width: none; margin: 0; padding: 0 3vw 0 var(--marge); }
  .ouverture__contenu h1 { max-width: 19ch; margin: 0 auto; font-size: clamp(2.4rem, 3.7vw, 4.2rem); }
}

/* --- Manifeste -------------------------------------------- */
.manifeste { padding: calc(var(--espace) * .7) var(--marge) var(--espace); }
.manifeste__inner { max-width: var(--mesure); margin: 0 auto; }
.manifeste .surtitre { color: var(--bordeaux); }
.manifeste p { margin: 0 0 1.5rem; font-size: 1.05rem; }
.manifeste p.manifeste__rupture {
  font-family: var(--f-titre); font-size: clamp(1.6rem, 4.6vw, 2.2rem); line-height: 1.3; color: var(--bordeaux);
  margin: 2.5rem 0;
}

/* --- Univers ---------------------------------------------- */
.univers { padding: var(--espace) var(--marge); background: var(--ivoire-2); }
.univers__tete { max-width: var(--mesure); margin: 0 auto 4rem; }
.univers .surtitre { color: var(--vert); }
.univers__tete p { margin: 0; font-size: 1.05rem; }
.reperes { list-style: none; margin: 0 auto; padding: 0; max-width: 72rem; display: grid; gap: 3rem 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .reperes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .reperes { grid-template-columns: repeat(4, 1fr); } }
.repere__visuel { aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 1.25rem; background: var(--rose-clair); }
.repere__visuel img { width: 100%; height: 100%; object-fit: cover; }
/* Lumières de remplacement, une par repère, tant que les visuels du DA ne sont pas intégrés */
.lumiere-aube    { background: linear-gradient(180deg, #3a3a44 0%, #8d7a7c 55%, #e2cfc3 100%); }
.lumiere-matin   { background: linear-gradient(160deg, #f4efea 0%, #e7dcd3 45%, #c9b3a8 100%); }
.lumiere-jour    { background: linear-gradient(200deg, #f7f3ee 0%, #dfe2d6 50%, #8a9b8c 100%); }
.lumiere-golden  { background: linear-gradient(170deg, #f3d9b8 0%, #c9876a 50%, #492020 100%); }
.repere h3 { font-family: var(--f-titre); font-weight: 400; font-size: 1.5rem; margin: 0 0 .5rem; }
.repere p { margin: 0; font-size: .95rem; }

/* --- L'Aube : inscription --------------------------------- */
.aube { padding: var(--espace) var(--marge); background: var(--bordeaux); color: var(--ivoire); }
.aube__inner { max-width: var(--mesure); margin: 0 auto; }
.aube .surtitre { color: var(--rose-clair); }
.aube__texte p { margin: 0 0 1.25rem; color: rgba(244,239,234,.9); }

.formulaire { margin-top: 3rem; }
.champ label { display: block; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; margin-bottom: .75rem; }
.champ input[type="email"] {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ivoire);
  background: transparent; border: 0; border-bottom: 1px solid rgba(244,239,234,.6); border-radius: 0;
  padding: .85rem 0; -webkit-appearance: none; appearance: none;
}
.champ input[type="email"]::placeholder { color: rgba(244,239,234,.5); }
.champ input[aria-invalid="true"] { border-bottom-color: var(--rose-clair); }
.consentement { display: grid; grid-template-columns: 1.25rem 1fr; gap: .9rem; align-items: start; margin-top: 2rem; font-size: .85rem; line-height: 1.6; }
.consentement input { width: 1.1rem; height: 1.1rem; margin: .2rem 0 0; accent-color: var(--rose); }
.consentement__lien { grid-column: 2; font-size: .8rem; }
.bouton {
  display: inline-block; margin-top: 2.25rem; width: 100%;
  font: inherit; font-size: .78rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
  color: var(--bordeaux); background: var(--ivoire); border: 1px solid var(--ivoire);
  padding: 1.15rem 2rem; cursor: pointer; transition: background .25s ease, color .25s ease;
}
@media (min-width: 640px) { .bouton { width: auto; } }
.bouton:hover { background: transparent; color: var(--ivoire); }
.bouton[disabled] { opacity: .7; cursor: progress; }
.erreur { color: var(--rose-clair); font-size: .82rem; margin: .6rem 0 0; min-height: 0; }
.erreur:empty { display: none; }
.mention { margin-top: 1.5rem; font-size: .8rem; color: rgba(244,239,234,.75); }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.merci { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(244,239,234,.3); }
.merci h3 { font-family: var(--f-titre); font-weight: 400; font-size: 2rem; margin: 0 0 1rem; }
.merci p { margin: 0 0 1rem; }
.merci .mention { margin-top: 0; }

/* --- Pied de page ----------------------------------------- */
.pied { background: var(--ivoire); color: var(--charbon); border-top: 1px solid rgba(38,35,35,.1); padding: 4.5rem var(--marge) 2.5rem; text-align: center; font-size: .85rem; }
.pied__logo { width: 150px; margin: 0 auto 1.5rem; }
.pied__signature { font-family: var(--f-titre); font-size: 1.35rem; color: var(--bordeaux); margin: 0 0 2.5rem; }
.pied__contact { margin: 0 0 2rem; }
.pied ul { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.75rem; }
.pied a { text-decoration: none; border-bottom: 1px solid transparent; }
.pied a:hover { border-bottom-color: currentColor; }
.pied__legal { font-size: .75rem; letter-spacing: .06em; color: rgba(38,35,35,.65); }
.pied button.lien { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; border-bottom: 1px solid transparent; }
.pied button.lien:hover { border-bottom-color: currentColor; }

/* --- Pages secondaires (légal, confirmation) -------------- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page__entete { padding: 1.5rem var(--marge); border-bottom: 1px solid rgba(38,35,35,.12); }
.page__entete a { display: inline-block; }
.page__entete img { width: 130px; }
.page__corps { flex: 1; padding: 4rem var(--marge) 6rem; }
.page__corps .contenu { max-width: 42rem; margin: 0 auto; }
.page__corps h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 2.5rem; }
.page__corps h2 { font-size: 1.5rem; margin: 2.75rem 0 1rem; }
.page__corps p, .page__corps li { font-size: .95rem; }
.a-completer { background: #f6e3b4; padding: 0 .25em; font-style: normal; }

.page--sombre { background: var(--bordeaux); color: var(--ivoire); }
.page--sombre .page__entete { border-bottom-color: rgba(244,239,234,.15); }
.page--sombre .page__corps { display: grid; place-items: center; text-align: center; }
.page--sombre .surtitre { color: var(--rose-clair); }
.page--sombre p { max-width: 28rem; margin: 1.5rem auto 0; color: rgba(244,239,234,.9); }
.retour { display: inline-block; margin-top: 3rem; font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: .25rem; }

/* --- Bandeau de consentement ------------------------------ */
.cookies {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50;
  max-width: 30rem; margin-left: auto;
  background: var(--ivoire); color: var(--charbon);
  border: 1px solid rgba(38,35,35,.15); box-shadow: 0 10px 40px rgba(0,0,0,.18);
  padding: 1.5rem; font-size: .82rem; line-height: 1.6;
}
.cookies[hidden] { display: none; }
.cookies p { margin: 0 0 1.1rem; }
.cookies__actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.cookies__actions button {
  flex: 1 1 8rem; font: inherit; font-size: .7rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  padding: .9rem 1rem; cursor: pointer; border: 1px solid var(--charbon); background: transparent; color: var(--charbon);
}
.cookies__actions button.plein { background: var(--charbon); color: var(--ivoire); }
