/* Le Batz'Art à BJ — papier, feutre, pinces à linge. Mobile d'abord, unités fluides. */

@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --papier: #fbf7ef;
  --blanc: #fffdf8;
  --encre: #2a2622;
  --encre-douce: #5b544c;
  --jaune: #f2c230;
  --jaune-clair: #fbe59a;
  --rouge: #d7322a;
  --bois: #c9a26b;
  --manuscrite: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --ronde: "Nunito", "Segoe UI", system-ui, sans-serif;
  --trait: 2px solid var(--encre);
  --ombre: 3px 4px 0 rgba(42, 38, 34, 0.15);
  /* bords « tracés à la main » : deux rayons différents par coin */
  --coins: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --coins-doux: 18px 6px 16px 8px / 8px 14px 6px 18px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ronde);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  color: var(--encre);
  background:
    radial-gradient(circle at 1px 1px, rgba(42, 38, 34, 0.06) 1px, transparent 0) 0 0 / 22px 22px,
    var(--papier);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rouge); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--encre); }
/* contour encre (14:1 sur le papier) : le jaune plein ne contrastait qu'à 1,57:1,
   sous le seuil de 3:1 du SC 1.4.11. Le halo jaune clair garde l'accent. */
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; box-shadow: 0 0 0 6px var(--jaune-clair); }

.conteneur { width: min(100% - 2rem, 62rem); margin-inline: auto; }

h1, h2, .polaroid figcaption, .merci-titre, .ecriteau dt, .signature {
  font-family: var(--manuscrite);
  font-weight: 700;
  line-height: 1.1;
}
h1 { font-size: clamp(2.6rem, 2rem + 3vw, 4.5rem); margin: 0.5rem 0 0; }
h2 {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  margin: 0 0 1rem;
  display: inline-block;
  padding-inline: 0.2em;
  /* surligné au stabilo jaune */
  background: linear-gradient(transparent 62%, var(--jaune-clair) 62%, var(--jaune-clair) 92%, transparent 92%);
}

/* En-tête */
.entete { text-align: center; padding-block: clamp(2rem, 5vw, 4rem) 1rem; }
.logo {
  width: clamp(9rem, 30vw, 14rem);
  margin-inline: auto;
  border-radius: 50%;
  box-shadow: 0 6px 0 -2px rgba(42, 38, 34, 0.12);
  transform: rotate(-4deg);
}
.sous-titre { margin: 0.25rem 0 0; color: var(--encre-douce); font-size: 1.1em; }

/* Sections */
main > section { padding-block: clamp(2rem, 4vw, 3.5rem); }
main > section + section { border-top: 3px dashed rgba(42, 38, 34, 0.18); }
.presentation p { max-width: 62ch; } /* largeur de lecture : au-delà de ~65 caractères, l'œil se fatigue (règle confirmée avec Rémi le 2026-09-16) */
.horaires { list-style: none; padding: 0; margin: 0; }
.horaires li + li { margin-top: 0.15rem; }

/* Galerie : des polaroids suspendus à un fil à linge, qu'on fait défiler — au doigt, à la
   molette, au clavier, ou par les flèches qu'ajoute le script de la page. BJ en met autant qu'elle veut (une
   trentaine) : 3 cartes visibles sur ordinateur, 2 sur tablette, une et demie sur téléphone
   pour qu'on devine la suite. Peu de cartes : elles sont centrées et les flèches disparaissent. */
.creations { container-type: inline-size; }
.fil {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "bande bande bande" "prec compteur suiv";
  align-items: center;
  gap: 0.25rem 0.75rem;
  margin-top: 1rem;
}
.galerie {
  --ecart: clamp(1.25rem, 3vw, 2rem);
  grid-area: bande;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 1.75rem 0.5rem 1.25rem; /* place pour les pinces, l'inclinaison et l'ombre */
  display: flex;
  justify-content: safe center;
  gap: var(--ecart);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.5rem;
  scrollbar-width: thin;
  --bout: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24' preserveAspectRatio='none'><path d='M0,3 C9,4 19,8 26,14 C30,18 32,21 33,23' fill='none' stroke-linecap='round' vector-effect='non-scaling-stroke' stroke='%237d5f3a' stroke-width='2.2'/><path d='M0,3 C9,4 19,8 26,14 C30,18 32,21 33,23' fill='none' stroke-linecap='round' vector-effect='non-scaling-stroke' stroke='%23ecd6a8' stroke-width='1' stroke-dasharray='2 5'/></svg>");
}
.galerie > li { flex: 0 0 66%; scroll-snap-align: start; position: relative; }
/* la ficelle, faite main : chaque carte tend son bout jusqu'à la pince de la suivante ; il pend
   un peu entre les deux, passe derrière les photos (z-index des polaroids) et varie d'une carte à
   l'autre pour ne pas faire copier-coller. vector-effect garde un trait égal une fois étiré. */
.galerie > li::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -1.05rem;
  left: 50%;
  width: calc(100% + var(--ecart));
  height: 1.3rem;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'><path d='M0,3 C22,9 60,20 97,21 C133,22 171,12 200,3' fill='none' stroke-linecap='round' vector-effect='non-scaling-stroke' stroke='%237d5f3a' stroke-width='2.2'/><path d='M0,3 C22,9 60,20 97,21 C133,22 171,12 200,3' fill='none' stroke-linecap='round' vector-effect='non-scaling-stroke' stroke='%23ecd6a8' stroke-width='1' stroke-dasharray='2 5'/></svg>") 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}
.galerie > li:nth-child(3n+2)::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'><path d='M0,3 C30,12 74,21 104,20 C136,19 173,11 200,3' fill='none' stroke-linecap='round' vector-effect='non-scaling-stroke' stroke='%237d5f3a' stroke-width='2.2'/><path d='M0,3 C30,12 74,21 104,20 C136,19 173,11 200,3' fill='none' stroke-linecap='round' vector-effect='non-scaling-stroke' stroke='%23ecd6a8' stroke-width='1' stroke-dasharray='2 5'/></svg>"); }
.galerie > li:nth-child(3n)::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'><path d='M0,3 C25,10 64,18 99,19 C130,20 168,13 200,3' fill='none' stroke-linecap='round' vector-effect='non-scaling-stroke' stroke='%237d5f3a' stroke-width='2.2'/><path d='M0,3 C25,10 64,18 99,19 C130,20 168,13 200,3' fill='none' stroke-linecap='round' vector-effect='non-scaling-stroke' stroke='%23ecd6a8' stroke-width='1' stroke-dasharray='2 5'/></svg>"); }
/* aux deux extrémités d'un fil, un bout de ficelle qui pend, plutôt qu'une pince qui tient le vide */
.galerie > li:last-child::before { width: 2.4rem; background-image: var(--bout); }
.galerie > li:first-child::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -1.05rem;
  right: 50%;
  width: 2.4rem;
  height: 1.3rem;
  background: var(--bout) 0 0 / 100% 100% no-repeat;
  transform: scaleX(-1);
  pointer-events: none;
}
@container (min-width: 32.5rem) {
  .galerie > li { flex-basis: calc((100% - var(--ecart)) / 2); }
}
@container (min-width: 50rem) {
  .fil { grid-template-areas: "prec bande suiv" ". compteur ."; }
  .galerie > li { flex-basis: calc((100% - 2 * var(--ecart)) / 3); }
  /* deux fils de trois : des pages de six, 1-2-3 en haut, 4-5-6 en bas. Le script place chaque
     carte (gridColumn / gridRow) et compte les colonnes (--colonnes) ; sans lui, un seul fil. */
  .fil.pilote .galerie {
    display: grid;
    grid-template-columns: repeat(var(--colonnes, 3), calc((100% - 2 * var(--ecart)) / 3));
    grid-template-rows: auto;
    grid-auto-rows: auto;
    column-gap: var(--ecart);
    row-gap: 2.75rem;
  }
  /* sur deux fils, chaque fil a ses propres bouts (classes posées par le script) */
  .fil.pilote .galerie > li.bout::before { width: 2.4rem; background-image: var(--bout); }
  .fil.pilote .galerie > li.debut::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: -1.05rem;
    right: 50%;
    width: 2.4rem;
    height: 1.3rem;
    background: var(--bout) 0 0 / 100% 100% no-repeat;
    transform: scaleX(-1);
    pointer-events: none;
  }
}
.fil-prec { grid-area: prec; }
.fil-suiv { grid-area: suiv; }
.fil-fleche {
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  padding: 0 0 0.15rem;
  background: var(--blanc);
  color: var(--encre);
  border: var(--trait);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--encre);
  cursor: pointer;
}
.fil-fleche[hidden] { display: none; }
/* la barre de défilement n'est masquée que si le script a posé flèches et compteur : sans
   lui, elle reste le seul repère d'un visiteur à la souris */
.fil.pilote .galerie { scrollbar-width: none; }
.fil.pilote .galerie::-webkit-scrollbar { display: none; }
.fil-fleche:disabled { opacity: 0.3; cursor: default; box-shadow: none; }
.fil-compteur { grid-area: compteur; margin: 0; text-align: center; font-family: var(--manuscrite); font-size: 1.35rem; color: var(--encre-douce); }
.polaroid {
  margin: 0;
  position: relative;
  background: var(--blanc);
  border: var(--trait);
  border-radius: var(--coins-doux);
  padding: 0.75rem 0.75rem 0.9rem;
  box-shadow: var(--ombre);
  transform: rotate(var(--inclinaison, 0deg));
  transition: transform 0.2s ease;
  z-index: 1; /* au-dessus de la ficelle */
}
.polaroid:hover { transform: rotate(0deg) scale(1.02); }
.galerie li:nth-child(odd) .polaroid { --inclinaison: -1.5deg; }
.galerie li:nth-child(even) .polaroid { --inclinaison: 1.2deg; }
.galerie li:nth-child(3n) .polaroid { --inclinaison: 0.6deg; }
/* la pince : deux planchettes de bois */
.polaroid::before, .polaroid::after {
  content: "";
  position: absolute;
  top: -1.1rem;
  width: 0.55rem;
  height: 2.4rem;
  background: var(--bois);
  border: 1.5px solid var(--encre);
  border-radius: 3px;
}
.polaroid::before { left: calc(50% - 0.65rem); }
.polaroid::after { left: calc(50% + 0.1rem); }
.polaroid img { aspect-ratio: 1; object-fit: cover; border-radius: 4px; width: 100%; }
/* deux lignes réservées : une légende qui passe à la ligne ne fait plus pendre
   son polaroid plus bas que ses voisins de la même rangée */
.polaroid figcaption { font-size: 1.45rem; margin-top: 0.6rem; text-align: center; min-height: calc(2 * 1.1em); }

/* Écriteau des infos pratiques, à rayures rouges */
.ecriteau {
  max-width: 34rem;
  background: var(--blanc);
  border: var(--trait);
  border-radius: var(--coins-doux);
  overflow: hidden;
  box-shadow: var(--ombre);
}
.ecriteau-bande {
  height: 1.4rem;
  background: repeating-linear-gradient(90deg, var(--rouge) 0 0.7rem, var(--blanc) 0.7rem 1.4rem);
  border-bottom: var(--trait);
}
.ecriteau dl {
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  align-items: baseline;
}
.ecriteau dt { font-size: 1.6rem; color: var(--rouge); }
.ecriteau dd { margin: 0; }

/* Formulaire */
.contact-intro { max-width: 50ch; }
form#contact { max-width: 34rem; display: grid; gap: 1.1rem; }
.champ { display: grid; gap: 0.3rem; }
label { font-weight: 700; }
input, textarea {
  font: inherit;
  color: inherit;
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--blanc);
  border: var(--trait);
  border-radius: var(--coins);
}
textarea { resize: vertical; min-height: 9rem; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bouton {
  justify-self: start;
  font: inherit;
  font-weight: 800;
  font-size: 1.1em;
  padding: 0.75rem 1.8rem;
  background: var(--jaune);
  color: var(--encre);
  border: var(--trait);
  border-radius: var(--coins);
  box-shadow: 3px 3px 0 var(--encre);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.bouton:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--encre); }
.bouton:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--encre); }
.bouton:disabled { opacity: 0.6; cursor: wait; transform: none; box-shadow: 3px 3px 0 var(--encre); }
/* le bouton porte déjà une ombre portée : on la cumule avec le halo de focus
   au lieu de la remplacer, sinon il perd son relief pile quand on le vise */
.bouton:focus-visible { box-shadow: 3px 3px 0 var(--encre), 0 0 0 6px var(--jaune-clair); }
.retour { margin: 0; color: var(--rouge); font-weight: 700; }

/* Merci */
.merci {
  max-width: 34rem;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--blanc);
  border: var(--trait);
  border-radius: var(--coins-doux);
  box-shadow: var(--ombre);
}
.merci-titre { font-size: 3rem; margin: 0.5rem 0 0; color: var(--rouge); }
.merci p:last-child { margin-bottom: 0; }
.abeille { width: min(100%, 18rem); height: auto; margin-inline: auto; display: block; }
.abeille .trajet { stroke-dasharray: 6 8; animation: vol 3s linear infinite; }
@keyframes vol { to { stroke-dashoffset: -28; } }

/* Pied */
.pied {
  padding-block: 2rem 3rem;
  color: var(--encre-douce);
  font-size: 0.9em;
  border-top: 3px dashed rgba(42, 38, 34, 0.18);
}
.mentions { max-width: 78ch; margin-top: 0; }
.signature { font-size: 1.6rem; color: var(--encre); margin: 0.5rem 0 0; }

/* Petits mots manuscrits dans la marge de droite, que le texte calé à gauche laisse vide. Grand écran
   seulement : sur téléphone il n'y a pas de marge, ils disparaissent (choix de Rémi, 2026-09-19).
   Décoratifs (aria-hidden) : ils redisent ce que la page dit déjà. */
.mot-main, .fleche-mot { display: none; }
@media (min-width: 64rem) {
  .presentation, .infos, .contact { position: relative; }
  .mot-main {
    display: block;
    position: absolute;
    right: 1rem;
    width: 15rem;
    margin: 0;
    font-family: var(--manuscrite);
    font-size: 1.85rem;
    line-height: 1.1;
    color: var(--encre-douce);
    text-align: center;
    transform: rotate(var(--penche, -4deg));
    pointer-events: none;
  }
  /* Chaque flèche part de son mot et mène à ce dont il parle (le paragraphe des créations, les horaires,
     la case du message). Au-delà de 64rem le conteneur fait exactement 62rem : la géométrie est fixe,
     d'où un dessin en coordonnées de section (1 unité = 1px à 16px de base, tout suit la taille du texte).
     Le tracé en pointillés reprend le vol de l'abeille du logo. */
  .fleche-mot {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 62rem;
    height: auto;
    overflow: visible;
    pointer-events: none;
    fill: none;
    stroke: var(--encre-douce);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .fleche-mot .trace { stroke-dasharray: 5 6; }
  .mot-presentation { top: 5.5rem; --penche: -4deg; }
  .mot-infos { top: 10.5rem; --penche: 3deg; }
  .mot-contact { top: 25rem; --penche: -3deg; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .abeille .trajet { animation: none; }
  .polaroid, .bouton { transition: none; }
}

/* Pendant la construction : la page publique d'attente, et le bandeau de l'aperçu privé */
.construction { text-align: center; padding-block: 2.5rem 5rem; }
.construction-titre {
  font-family: var(--manuscrite);
  font-weight: 700;
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  color: var(--rouge);
  margin: 0 0 0.5rem;
}
.acces-reserve { color: var(--encre-douce); font-size: 0.9rem; }
.bandeau-apercu {
  margin: 0;
  padding: 0.45rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  background: var(--encre);
  color: var(--papier);
}
