/* ==========================================================================
   Repair Cafe Gembloux — feuille de style unique
   Organisation : 1. Variables  2. Base  3. Composants  4. Sections  5. Mobile
   ========================================================================== */

/* 1. VARIABLES ============================================================ */

:root {
  /* Indigo profond du logo — fonds sombres (heros, pied), pastille de marque.
     C'est la couleur de reference : tout le reste est accorde dessus. */
  --profond: #170462;

  /* Neutres — legerement violaces pour s'accorder a l'indigo, jamais de gris pur */
  --encre: #221d33;
  --encre-douce: #322b45;
  --corps: #3a3540;
  --attenue: #5a5366;
  --papier: #faf8fb;
  --creme: #f0eef5;
  --filet: #e2dfea;
  --filet-ferme: #d2cedd;

  /* Indigo d'action — actions, agenda, liens. Meme famille que --profond
     mais plus clair et moins sature, pour rester lisible en texte courant. */
  --bleu: #3b2d8f;
  --bleu-fonce: #2a1f6b;
  --bleu-pale: #eeecf8;
  --bleu-filet: #d6d1ec;
  --bleu-clair: #a9a2e8;

  /* Rouge — securite uniquement. Garde sa force : c'est un signal, pas un accent. */
  --rouge: #b03a2e;
  --rouge-profond: #7d2820;
  --rouge-pale: #fbeceb;
  --rouge-filet: #ebc6c2;

  /* Vert — RepairVelo uniquement */
  --vert: #2f6b52;
  --vert-profond: #235140;
  --vert-pale: #e7f2ed;

  /* Ambre — encarts "sur rendez-vous" */
  --ambre-fond: #fdf6e9;
  --ambre-filet: #e6d3ab;
  --ambre-texte: #6b4c12;

  --largeur-max: 1180px;
  --rayon: 10px;
  --ombre-carte: 0 1px 2px rgba(34, 29, 51, .06), 0 4px 12px rgba(34, 29, 51, .05);
}

/* 2. BASE ================================================================= */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--corps);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--encre);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--bleu); }
a:hover { color: var(--bleu-fonce); }

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

/* Accessibilite : contour visible seulement au clavier */
:focus-visible {
  outline: 3px solid var(--bleu);
  outline-offset: 2px;
  border-radius: 4px;
}

.conteneur {
  width: 100%;
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 72px 0; }

/* Lien d'evitement pour lecteurs d'ecran / navigation clavier */
.saut-contenu {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bleu);
  color: #fff;
  padding: 12px 20px;
  z-index: 200;
}
.saut-contenu:focus { left: 8px; top: 8px; }

/* 3. COMPOSANTS =========================================================== */

/* --- Etiquette (petit label au-dessus des titres) --- */
.etiquette {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bleu);
  margin-bottom: 10px;
}
.etiquette--rouge { color: var(--rouge); }
.etiquette--vert  { color: var(--vert); }

/* --- Boutons --- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 2px solid transparent;
  border-radius: var(--rayon);
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease,
              color .15s ease, transform .08s ease;
}
.bouton:active { transform: translateY(1px); }

.bouton--bleu { background: var(--bleu); color: #fff; }
.bouton--bleu:hover { background: var(--bleu-fonce); color: #fff; }

.bouton--vert {
  background: transparent;
  border-color: var(--vert);
  color: var(--vert-profond);
}
.bouton--vert:hover { background: var(--vert); color: #fff; }

.bouton--contour {
  background: transparent;
  border-color: var(--filet-ferme);
  color: var(--encre);
}
.bouton--contour:hover { border-color: var(--encre); }

/* --- Cartes --- */
.carte {
  background: #fff;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  padding: 22px;
  box-shadow: var(--ombre-carte);
}

/* --- Encart a puce (information importante mais pas dangereuse) --- */
.encart {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--bleu-filet);
  border-radius: var(--rayon);
  padding: 16px 18px;
  font-size: .95rem;
}
.encart::before {
  content: "";
  flex: 0 0 9px;
  height: 9px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--bleu);
}
.encart--ambre { background: var(--ambre-fond); border-color: var(--ambre-filet); color: var(--ambre-texte); }
.encart--ambre::before { background: var(--ambre-texte); }

/* 4. SECTIONS ============================================================= */

/* --- En-tete --- */
.entete {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 251, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--filet);
}
.entete__interieur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.marque { text-decoration: none; }
.marque__nom {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--encre);
  letter-spacing: -0.02em;
}
.marque__baseline {
  display: block;
  font-size: .8rem;
  color: var(--attenue);
}

.nav { display: flex; align-items: center; gap: 26px; }
.nav__lien {
  color: var(--encre-douce);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 600;
}
.nav__lien:hover { color: var(--bleu); }

.burger {
  display: none;
  background: none;
  border: 1px solid var(--filet-ferme);
  border-radius: 8px;
  padding: 9px 11px;
  cursor: pointer;
}
.burger__trait {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--encre);
  border-radius: 2px;
}
.burger__trait + .burger__trait { margin-top: 4px; }

/* --- Heros --- */
.heros {
  background: var(--profond);
  color: var(--creme);
  padding: 76px 0 84px;
}
.heros__grille {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 48px;
  align-items: center;
}
.heros h1 { color: #fff; margin-bottom: .35em; }
.heros__accroche {
  font-size: 1.22rem;
  color: var(--creme);
  margin-bottom: .6em;
}
.heros__detail { color: #c4bde4; font-size: 1rem; }
.heros__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
/* La photo est enveloppee dans <picture> pour servir le WebP quand c'est
   possible : c'est donc <picture> qui occupe la case de la grille. */
.heros__media { display: block; }
.heros__photo {
  min-height: 420px;
  max-height: 480px;
  border-radius: var(--rayon);
  object-fit: cover;
  width: 100%;
  height: 100%;
  background: #2a1f6b;   /* le temps que la photo arrive */
}
.heros .bouton--contour { border-color: #6b5fa8; color: var(--creme); }
.heros .bouton--contour:hover { border-color: var(--creme); }

/* --- Agenda --- */
.agenda { background: var(--bleu-pale); border-top: 1px solid var(--bleu-filet); border-bottom: 1px solid var(--bleu-filet); }
.agenda__date {
  font-size: clamp(1.5rem, 3.6vw, 2.15rem);
  font-weight: 800;
  color: var(--encre);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.agenda__lieu { color: var(--corps); margin-bottom: 26px; }
.agenda__suivantes {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--bleu-filet);
  font-size: .95rem;
  color: var(--attenue);
}

/* --- RepairVelo --- */
.velo { background: var(--vert-pale); }

/* --- Réemploi / Cyréo --- */
.cyreo { background: var(--vert-pale); }
.cyreo__note { color: var(--attenue); font-size: .93rem; margin-top: 4px; }
.velo__date { font-weight: 750; color: var(--encre); font-size: 1.1rem; margin-bottom: 8px; }

/* --- Ateliers --- */
.ateliers__grille {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.atelier__icone {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--bleu-pale);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 1.05rem;
}
.atelier h3 { margin-bottom: 6px; }
.atelier p { font-size: .9rem; color: var(--attenue); }

/* --- Securite (ce que nous ne reparons pas) --- */
.securite {
  background: var(--rouge-pale);
  border-top: 2px solid var(--rouge);
}
.securite h2 { color: var(--rouge-profond); }
.securite__grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.securite__carte { border-color: var(--rouge-filet); }
.securite__carte h3 { color: var(--rouge-profond); }
.securite__carte p { font-size: .95rem; }
.securite__ailleurs {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rouge-filet);
  font-size: .9rem;
  color: var(--attenue);
}
.securite__liste {
  margin: .5em 0 0;
  padding-left: 1.2em;
}
.securite__liste li + li { margin-top: .3em; }

/* --- RepairBox --- */
/* Bandeau photo : toute la largeur du conteneur, ratio 16:9 conserve (aucun
   recadrage), coins arrondis comme le heros. */
.box__media { display: block; margin: 22px 0 4px; }
.box__photo {
  width: 100%;
  height: auto;
  border-radius: var(--rayon);
  background: #e7e2d9;   /* le temps que la photo arrive */
}
.box__etapes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.etape__numero {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95rem;
  font-weight: 700;
  color: var(--bleu);
  margin-bottom: 8px;
}
.citation {
  border-left: 3px solid var(--filet-ferme);
  padding: 4px 0 4px 20px;
  color: var(--encre-douce);
  font-size: 1.02rem;
}

/* --- Reparateurs professionnels --- */
.reparateurs__grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.reparateur__adresse { color: var(--attenue); font-size: .93rem; }
.reparateur__contacts {
  list-style: none;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--filet);
  font-size: .93rem;
}
.reparateur__contacts li + li { margin-top: 4px; }
.reparateurs__appel { margin-top: 24px; font-size: .95rem; color: var(--attenue); }

/* --- Infos pratiques --- */
.infos__grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

/* --- Plan d'acces (affiche dans la section agenda) --- */
.plan { margin-top: 26px; }
.plan__cadre {
  border: 1px solid var(--bleu-filet);
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre-carte);
  background: var(--creme);
}
.plan__cadre iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}
.plan__legende {
  margin: 10px 0 26px;
  font-size: .9rem;
  color: var(--attenue);
}
.plan__legende a { font-weight: 600; }

/* --- Benevoles --- */
.benevoles__carte { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }

/* --- Remerciements (le lieu qui nous accueille) --- */
.merci { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.merci__logo { display: block; flex-shrink: 0; }
.merci__logo img { width: 190px; height: auto; }

/* --- Pied de page --- */
.pied {
  background: var(--profond);
  color: var(--creme);
  padding: 56px 0 32px;
}
/* Le logo porte le meme indigo que le fond du pied : ses bords s'y fondent,
   inutile de l'encadrer. */
.pied__logo {
  width: 120px;
  height: auto;
  margin-bottom: 16px;
}
.pied a { color: var(--bleu-clair); }
.pied a:hover { color: #fff; }
.pied__grille {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #3a2d7a;
}
.pied h3 { color: #fff; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.pied__liste { list-style: none; margin: 0; padding: 0; }
.pied__liste li { margin-bottom: 8px; }
.pied__bas {
  padding-top: 24px;
  font-size: .87rem;
  color: #9b94a8;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* 5. MOBILE =============================================================== */
/* Le mobile est la reference, pas une adaptation : la photo passe au-dessus
   du titre et les grilles se reduisent. */

@media (max-width: 900px) {
  body { font-size: 16px; }
  section { padding: 56px 0; }
  .conteneur { padding: 0 20px; }

  /* Marque : nom plus compact pour laisser la place au burger */
  .marque__nom { font-size: 1rem; }

  /* Navigation repliable */
  .burger { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--papier);
    border-bottom: 1px solid var(--filet);
    padding: 8px 20px 20px;
  }
  .nav.est-ouvert { display: flex; }
  .nav__lien { padding: 13px 0; border-bottom: 1px solid var(--filet); }
  .nav .bouton { margin-top: 14px; }

  /* Heros : photo AU-DESSUS du texte */
  .heros { padding: 40px 0 56px; }
  .heros__grille { grid-template-columns: 1fr; gap: 28px; }
  .heros__media { order: -1; }              /* la photo passe au-dessus du titre */
  .heros__photo { min-height: 240px; max-height: 300px; }
  .heros__actions .bouton { flex: 1 1 100%; }

  .ateliers__grille { grid-template-columns: repeat(2, 1fr); }
  .securite__grille,
  .box__etapes,
  .benevoles__carte { grid-template-columns: 1fr; }
  .merci { grid-template-columns: 1fr; gap: 20px; }
  .plan__cadre iframe { height: 280px; }
  .pied__grille { grid-template-columns: 1fr; gap: 28px; }
}

/* Tres petits ecrans : la baseline passe a la trappe, le nom seul suffit */
@media (max-width: 380px) {
  .marque__baseline { display: none; }
}

/* Respect des preferences systeme pour les animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Impression : le visiteur imprime surtout l'agenda */
@media print {
  .entete, .pied, .heros__actions, .burger { display: none; }
  body { background: #fff; }
  .agenda { background: #fff; }
}
