/* AFA — styles. Couleurs et polices : uniquement via assets/css/tokens.css. */

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

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  font-kerning: normal;
  overflow-wrap: break-word;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.15;
}

p {
  margin: 0;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

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

address {
  font-style: normal;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 1024px) {
  .container {
    max-width: calc(var(--container) + 2 * var(--gutter-desktop));
    padding-inline: var(--gutter-desktop);
  }
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 0.75rem;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  min-height: var(--header-h);
}

.logo {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--navy-dark);
  text-decoration: none;
}

.logo__dot {
  color: var(--blue);
}

/* ---------- Hero ---------- */

/* Mobile (< 768 px) : la photo seule en 16:9, le texte en dessous sur fond blanc. */
.hero__media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--navy-dark);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-focus-mobile);
}

.hero__content {
  padding-block: 2rem 0.5rem;
}

.hero__title {
  max-width: 22ch;
  color: var(--navy-dark);
  font-size: clamp(1.625rem, 1.1rem + 2.6vw, 2.25rem);
  letter-spacing: -0.01em;
}

.hero__lead {
  max-width: 60ch;
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.55;
}

/*
 * Page d'attente : annonce du site complet. Même couleur que le paragraphe, jamais plus grande ;
 * distinguée par un filet court couleur du point du logo et des capitales espacées.
 */
.hero__annonce {
  max-width: 60ch;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__annonce::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-bottom: 24px;
  background: var(--blue);
}

/*
 * À partir de 768 px : photo en 16:9 plafonnée à 85vh, texte superposé sur un voile uniforme.
 * Le cadrage vertical (--hero-focus-desktop) garde le bas de la photo, l'eau et le pont, visible.
 */
@media (min-width: 768px) {
  .hero {
    position: relative;
    display: grid;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 85vh;
    overflow: hidden;
    background: var(--navy-dark);
    color: var(--white);
  }

  .hero__media,
  .hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .hero__media img {
    object-position: var(--hero-focus-desktop);
  }

  /* Voile sombre léger et uniforme, jamais un dégradé. */
  .hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--veil);
  }

  /* Tablette : le bloc se cale en bas à droite, sur l'eau, à l'écart du pont et des façades. */
  .hero__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    align-self: end;
    padding-block: 1.25rem;
    text-shadow: var(--text-shadow-hero);
  }

  .hero__content > * {
    width: min(60%, 34rem);
  }

  .hero__lead,
  .hero__annonce {
    max-width: 60ch;
  }

  .hero__title {
    max-width: none;
    color: inherit;
    font-size: 2.9vw;
  }

  .hero__lead {
    margin-top: 0.625rem;
    font-size: 0.9375rem;
    line-height: 1.45;
  }

  .hero__annonce {
    margin-top: 1rem;
    font-size: 0.8125rem;
  }

  /* Sur la photo, le filet prend la couleur du texte : le bleu du logo n'y atteint pas 3:1. */
  .hero__annonce::before {
    background: currentColor;
  }
}

/*
 * À partir de 1024 px : le bloc monte dans le ciel, au-dessus des façades éclairées.
 * Tailles en vw : le bloc grandit avec la photo et reste dans la même zone de l'image.
 */
@media (min-width: 1024px) {
  .hero__content {
    display: block;
    align-self: start;
    padding-block: 64px 0;
  }

  .hero__content > * {
    width: auto;
  }

  .hero__title {
    max-width: 68vw;
    font-size: 2.4vw;
  }

  .hero__lead {
    margin-top: 0.9vw;
    font-size: max(1rem, 1.15vw);
    line-height: 1.55;
  }

  .hero__annonce {
    margin-top: 1.25rem;
    font-size: max(0.875rem, 0.95vw);
  }
}

/* ---------- Contact ---------- */

.contact {
  padding-block: 4rem;
  scroll-margin-top: var(--header-h);
}

.contact__titre {
  color: var(--navy-dark);
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);
}

.contact__intro {
  max-width: 44rem;
  margin-top: 1rem;
  font-size: 1.125rem;
}

.contact__grille {
  display: grid;
  gap: 2rem;
  margin: 2.5rem 0 0;
  padding: 0;
}

.contact__bloc {
  padding-top: 1rem;
  border-top: 2px solid var(--navy);
}

.contact__label {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.contact__valeur {
  font-size: 1.125rem;
}

.contact__valeur a {
  color: var(--navy);
}

@media (min-width: 768px) {
  .contact {
    padding-block: 5.5rem;
  }

  .contact__grille {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

.site-footer {
  background: var(--navy-dark);
  color: var(--white);
  font-size: 0.9375rem;
}

.site-footer__inner {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.5rem;
}

.site-footer__coord,
.site-footer__liens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__liens {
  padding-top: 1.5rem;
  border-top: 1px solid var(--navy);
}

@media (min-width: 1024px) {
  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .site-footer__liens {
    padding-top: 0;
    border-top: 0;
  }
}

/* ---------- Page de texte (mentions légales) ---------- */

.page-texte {
  padding-block: 3.5rem 5rem;
}

.page-texte__corps {
  max-width: 44rem;
}

.page-texte h1 {
  color: var(--navy-dark);
  font-size: clamp(1.875rem, 1.5rem + 1.5vw, 2.75rem);
}

.page-texte h2 {
  margin-top: 2.5rem;
  color: var(--navy-dark);
  font-size: 1.25rem;
}

.page-texte p,
.page-texte address {
  margin-top: 0.75rem;
}

.page-texte a {
  color: var(--navy);
}

.page-texte__retour {
  margin-top: 3rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
