/* ==========================================================================
   DokiDoki, splash screen
   ========================================================================== */

@font-face {
  font-family: "Ashcroft";
  src: url("03_Fonts/01_Ashcroft/Ashcroft-Bold.woff2") format("woff2"),
       url("03_Fonts/01_Ashcroft/Ashcroft-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ashcroft";
  src: url("03_Fonts/01_Ashcroft/Ashcroft-Regular.woff2") format("woff2"),
       url("03_Fonts/01_Ashcroft/Ashcroft-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("03_Fonts/02_Geist Mono/GeistMono-VariableFont_wght.woff2") format("woff2"),
       url("03_Fonts/02_Geist Mono/GeistMono-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #fff;
  --font-display: "Ashcroft", "Arial Black", Impact, sans-serif;
  --font-mono: "Geist Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Valeurs issues de la maquette (frame 1512 × 982) */
  --dove-w: 302px;            /* boîte 273px + marge du recadrage */
  --dove-offset-x: -9.5px;
  --dove-offset-y: 6px;
  --title-size: 40px;
  --title-gap: 12px;
  --footer-pad: 16px;
}

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

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: #2d8ee0;
  color: var(--white);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

.screen {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Fond
   -------------------------------------------------------------------------- */

.sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

.sky__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.sky__grain {
  position: absolute;
  inset: 0;
  background-image: url("assets/texture1.png"), url("assets/texture2.png");
  background-size: 1194px 834px;
  background-position: 0 0;
  background-repeat: repeat;
  mix-blend-mode: screen;
  opacity: .2;
  pointer-events: none;
}

.sky__shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 259px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .1) 100%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Colombe + accroche
   -------------------------------------------------------------------------- */

.hero {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--dove-w);
  transform: translate(calc(-50% + var(--dove-offset-x)), calc(-50% + var(--dove-offset-y)));
}

.hero__dove {
  width: var(--dove-w);
  aspect-ratio: 332 / 420;
}

.hero__dove img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero__title {
  position: absolute;
  left: calc(100% + var(--title-gap));
  top: calc(50% + 12px);
  transform: translateY(-50%);
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--title-size);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--white);
}

.hero__title span {
  display: block;
}

/* --------------------------------------------------------------------------
   Barre basse
   -------------------------------------------------------------------------- */

.footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding: 0 var(--footer-pad) var(--footer-pad);
  gap: 16px;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer__logo {
  display: block;
  width: 143px;
  height: 43px;
  justify-self: start;
  margin-bottom: -1px;
}

.footer__logo img {
  display: block;
  width: 143px;
  height: 43px;
}

.footer__mail {
  justify-self: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  line-height: normal;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 0 4px rgba(0, 0, 0, .12);
  padding-bottom: 10px;
}

.footer__tagline {
  justify-self: end;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: normal;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
  margin-bottom: -5px;
}

.footer__tagline span {
  display: block;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Écrans moyens : le titre ne tient plus à droite → on le passe sous la colombe */
@media (max-width: 1080px) {
  :root {
    --dove-offset-x: 0px;
    --dove-offset-y: 0px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    transform: translate(-50%, -50%);
    gap: 24px;
  }

  .hero__title {
    position: static;
    transform: none;
    text-align: center;
  }
}

/* Tablettes / petits écrans */
@media (max-width: 768px) {
  :root {
    --dove-w: 240px;
    --title-size: 32px;
  }

  .footer {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "mail mail"
      "logo tagline";
    row-gap: 20px;
  }

  .footer__mail {
    grid-area: mail;
    padding-bottom: 0;
    font-size: 16px;
  }

  .footer__logo { grid-area: logo; }

  .footer__tagline {
    grid-area: tagline;
    font-size: 16px;
  }
}

/* Mobiles */
@media (max-width: 480px) {
  :root {
    --dove-w: 200px;
    --title-size: 28px;
    --dove-offset-y: -40px;
  }

  .hero {
    transform: translate(-50%, calc(-50% + var(--dove-offset-y)));
    gap: 20px;
  }

  .footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "tagline"
      "mail"
      "logo";
    justify-items: center;
    row-gap: 18px;
    padding-bottom: 20px;
  }

  .footer__logo {
    justify-self: center;
    width: 120px;
    height: 36px;
    margin: 0;
  }

  .footer__logo img {
    width: 120px;
    height: 36px;
  }

  .footer__mail {
    font-size: 14px;
  }

  .footer__tagline {
    justify-self: center;
    text-align: center;
    font-size: 15px;
    margin: 0;
  }
}

/* Écrans très bas (mobile paysage) : colombe et titre côte à côte */
@media (max-height: 520px) and (max-width: 1080px) {
  :root {
    --dove-w: 140px;
    --title-size: 24px;
    --dove-offset-y: -24px;
  }
  .hero {
    flex-direction: row;
    gap: 16px;
    transform: translate(-50%, calc(-50% + var(--dove-offset-y)));
  }
  .hero__title { text-align: left; }
  .footer__mail { padding-bottom: 6px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__dove {
    animation: float 6s ease-in-out infinite;
  }
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
  }
}
