/* ==========================================================================
   Espace Colette — feuille de styles
   Polices auto-hébergées (licence SIL OFL, voir assets/fonts/LICENSE-*.txt) :
   - Tinos italique          → remplace Times Italic
   - Source Sans 3           → remplace Myriad Pro
   - Libre Franklin          → remplace Franklin Gothic Book
   ========================================================================== */

@font-face {
  font-family: "Tinos";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/tinos-latin-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/libre-franklin-latin-400-normal.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   Variables
   -------------------------------------------------------------------------- */

:root {
  --noir: #000;
  --encre: #141414;
  --blanc: #fff;
  --papier: #e2ddd9;     /* teinte de fond de l'aquarelle */
  --rouge: #a8181e;      /* rouge des affiches (#d2232a) assombri : contraste ≥ 4,5:1 sur l'aquarelle */
  --cyan: #007db3;       /* cyan des affiches (#00aeef) assombri pour un contraste lisible sur blanc */
  --gris: #6b6b6b;

  --serif: "Tinos", "Times New Roman", Times, serif;
  --sans: "Source Sans 3", "Myriad Pro", "Segoe UI", Arial, sans-serif;
  --franklin: "Libre Franklin", "Franklin Gothic Book", Arial, sans-serif;

  --gouttiere: clamp(1rem, 4vw, 3rem);
}

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

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

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

body {
  margin: 0;
  background: var(--blanc);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
p,
ul {
  margin: 0;
  font-weight: 400;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

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

/* --------------------------------------------------------------------------
   En-tête : logo, horaire, adresse
   Mobile : empilé et centré (affiche verticale)
   Bureau : bandeau noir sur une ligne (affiche horizontale)
   -------------------------------------------------------------------------- */

.entete {
  background: var(--noir);
  color: var(--blanc);
}

.entete__contenu {
  display: grid;
  justify-items: center;
  gap: clamp(1.75rem, 6vw, 2.5rem);
  max-width: 1500px;
  margin-inline: auto;
  padding: clamp(2.5rem, 10vw, 4rem) var(--gouttiere) clamp(2.25rem, 9vw, 3.5rem);
  text-align: center;
}

.entete__logo img {
  width: min(78vw, 420px);
}

.entete__infos {
  display: grid;
  gap: 0.9rem;
}

.horaire {
  font-size: clamp(1.9rem, 8.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
}

.horaire__jour,
.horaire__heures {
  display: block;
}

.adresse {
  font-style: normal;
  font-size: clamp(1.05rem, 4.2vw, 1.3rem);
  line-height: 1.35;
}

.adresse a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(255 255 255 / 0.35);
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.2s;
}

.adresse a:hover {
  text-decoration-color: currentColor;
}

.adresse__rue,
.adresse__ville {
  display: block;
}

.adresse__virgule {
  display: none;
}

.entete__bienvenue {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  line-height: 1.1;
}

/* Tablette : logo à gauche, infos à droite */
@media (min-width: 720px) {
  .entete__contenu {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo infos"
      "logo bienvenue";
    align-items: center;
    column-gap: clamp(2rem, 5vw, 4rem);
    row-gap: 1rem;
    padding-block: 2rem;
  }

  .entete__logo {
    grid-area: logo;
  }

  .entete__logo img {
    width: clamp(220px, 30vw, 300px);
  }

  .entete__infos {
    grid-area: infos;
    gap: 0.4rem;
  }

  .entete__bienvenue {
    grid-area: bienvenue;
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  }

  .horaire {
    font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  }

  .adresse {
    font-size: clamp(1rem, 2vw, 1.2rem);
  }
}

/* Bureau : logo | horaire + adresse | « On vous attend ! » */
@media (min-width: 1200px) {
  .entete__contenu {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo infos bienvenue";
    max-width: 1640px;
    column-gap: clamp(1.5rem, 2.5vw, 3.5rem);
    padding-block: clamp(1.25rem, 1.6vw, 2rem);
  }

  .entete__logo img {
    width: clamp(190px, 13.5vw, 270px);
  }

  .horaire {
    font-size: clamp(2rem, 2.55vw, 3.25rem);
    line-height: 1.15;
  }

  .horaire__heures,
  .adresse__ville {
    white-space: nowrap;
  }

  .horaire__jour,
  .horaire__heures {
    display: inline;
  }

  .adresse {
    font-size: clamp(1.05rem, 1.25vw, 1.6rem);
  }

  .adresse__rue,
  .adresse__ville {
    display: inline;
  }

  .adresse__virgule {
    display: inline;
  }

  .entete__bienvenue {
    font-size: clamp(1.75rem, 2vw, 2.6rem);
    white-space: nowrap;
  }
}

/* --------------------------------------------------------------------------
   Introduction sur fond aquarelle
   Un voile blanc pâlit l'aquarelle sous le texte : le contraste reste
   ≥ 4,5:1 (texte noir et mots en rouge) sur toutes les largeurs d'écran.
   -------------------------------------------------------------------------- */

.intro {
  padding: clamp(3.5rem, 14vw, 5rem) var(--gouttiere);
  background-color: var(--papier);
  background-image:
    linear-gradient(rgb(255 255 255 / 0.45), rgb(255 255 255 / 0.45)),
    url("../images/aquarelle-portrait.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.intro__texte {
  max-width: 34ch;
  margin-inline: auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 6.6vw, 2.15rem);
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}

.accent {
  color: var(--rouge);
}

@media (min-width: 720px) {
  .intro {
    padding-block: clamp(3rem, 6vw, 4.5rem);
    background-image:
      linear-gradient(rgb(255 255 255 / 0.45), rgb(255 255 255 / 0.45)),
      url("../images/aquarelle-paysage.webp");
  }

  .intro__texte {
    max-width: 48ch;
    font-size: clamp(1.6rem, 3vw, 2rem);
  }
}

/* Grand écran : les trois lignes de l'affiche horizontale.
   Le texte s'étire sur la largeur : voile plus clair au centre, aquarelle vive sur les bords. */
@media (min-width: 1400px) {
  .intro {
    background-image:
      linear-gradient(90deg, rgb(255 255 255 / 0.15), rgb(255 255 255 / 0.7) 13%, rgb(255 255 255 / 0.7) 87%, rgb(255 255 255 / 0.15)),
      url("../images/aquarelle-paysage.webp");
  }

  .intro__texte {
    max-width: none;
    font-size: clamp(1.75rem, 1.85vw, 2.4rem);
    line-height: 1.25;
  }

  .intro__texte .ligne {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   Galerie photo
   Mobile : carrousel à balayer (scroll-snap, sans JavaScript)
   Bureau : bandeau de cinq photos, comme l'affiche horizontale
   -------------------------------------------------------------------------- */

.galerie__liste {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem var(--gouttiere) 1rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gouttiere);
  scrollbar-width: thin;
}

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

.galerie__indice {
  padding: 0 var(--gouttiere) 0.25rem;
  color: #4a4a4a;
  font-size: 1rem;
  text-align: center;
}

.galerie__indice::before,
.galerie__indice::after {
  content: "←";
  margin-inline: 0.5em;
}

.galerie__indice::after {
  content: "→";
}

/* Largeur limitée aussi par la hauteur d'écran : la photo reste entière
   quand le téléphone est tenu à l'horizontale */
.galerie__item {
  flex: 0 0 min(72vw, 340px, 48vh);
  flex: 0 0 min(72vw, 340px, 48svh);
  scroll-snap-align: center;
}

/* La porte ouvre le carrousel, comme la couverture de l'affiche verticale */
.galerie__item--porte {
  order: -1;
}

.galerie__item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--papier);
}

@media (min-width: 900px) {
  .galerie__liste {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 4px 0 0;
    overflow: visible;
  }

  .galerie__item--porte {
    order: 0;
  }

  .galerie__item img {
    aspect-ratio: 10 / 17;
  }

  .galerie__indice {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Pied de page : Facebook et courriel
   -------------------------------------------------------------------------- */

.pied {
  padding: clamp(1.75rem, 3vw, 2.5rem) var(--gouttiere) 2rem;
  text-align: center;
}

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  list-style: none;
  font-family: var(--franklin);
  font-size: clamp(1.25rem, 5.4vw, 1.75rem);
  line-height: 1.25;
}

.contact a {
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.contact__facebook {
  color: var(--cyan);
}

.pied__mentions {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  color: var(--gris);
  font-size: 0.9375rem;
}

.insecable {
  white-space: nowrap;
}

@media (min-width: 900px) {
  .contact {
    flex-direction: row;
    justify-content: center;
    gap: 0;
    font-size: clamp(1.6rem, 2.3vw, 2.75rem);
  }

  .contact li + li::before {
    content: "•";
    content: "•" / "";
    display: inline-block;
    margin-inline: 0.65em;
    font-size: 0.6em;
    vertical-align: 0.25em;
  }
}

/* --------------------------------------------------------------------------
   Accessibilité : préférences d'affichage du visiteur
   -------------------------------------------------------------------------- */

/* « Augmenter le contraste » (iOS, macOS, Windows) : fond uni, liens soulignés */
@media (prefers-contrast: more) {
  .intro {
    background-image: none;
    background-color: var(--blanc);
  }

  .adresse a {
    text-decoration-color: currentColor;
  }

  .contact a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
  }

  .galerie__indice {
    color: var(--encre);
  }
}

/* Thèmes à contraste élevé de Windows : le logo blanc garde son fond noir */
@media (forced-colors: active) {
  .entete__logo {
    forced-color-adjust: none;
    padding: 0.75rem;
    background-color: #000;
  }
}

/* --------------------------------------------------------------------------
   Impression
   -------------------------------------------------------------------------- */

@media print {
  .entete {
    background: none;
    color: var(--noir);
  }

  .entete__logo img {
    filter: invert(1);
  }

  .intro {
    background: none;
  }

  .galerie {
    display: none;
  }
}
