/* Centre d'aide Magog – Le Cœur sur la main
   Direction « Affichette » : blanc, charbon, rouge du cœur, jaune d'affiche. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --rouge: #C21E17;        /* cœur du logo, assombri pour le contraste (6:1 sur blanc) */
  --rouge-fonce: #9A150F;
  --charbon: #2A2B2F;      /* mains du logo */
  --charbon-doux: #45464C;
  --blanc: #FFFFFF;
  --gris: #F3F2EF;
  --jaune: #FFD84D;        /* l'affichette */
  --ruban: rgba(206, 196, 170, 0.78);

  --police-texte: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
  --police-titre: "Bricolage Grotesque", "Arial Black", "Segoe UI", sans-serif;

  --gouttiere: 16px;
  --largeur: 72rem;
  --hauteur-entete: 4.5rem;
  --rayon: 8px;
}

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

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

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

@media (prefers-reduced-motion: no-preference) {
  html:focus-within { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--blanc);
  color: var(--charbon);
  font-family: var(--police-texte);
  font-size: 1.25rem;       /* 20 px */
  line-height: 1.55;
  overflow-wrap: break-word;
}

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

h1, h2, h3 { margin: 0; color: var(--charbon); }

h1, h2 {
  font-family: var(--police-titre);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: clamp(2.125rem, 1.5rem + 3.4vw, 4rem); }
h2 { font-size: clamp(2rem, 1.6rem + 2vw, 2.875rem); }

h3 {
  font-family: var(--police-texte);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.25;
}

p { margin: 0 0 0.85em; max-width: 38rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--rouge); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { color: var(--rouge-fonce); text-decoration-thickness: 3px; }

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

.conteneur {
  width: 100%;
  max-width: var(--largeur);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.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;
}

.evitement {
  position: absolute;
  left: var(--gouttiere);
  top: -10rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--charbon);
  color: var(--blanc);
  font-weight: 700;
}
.evitement:focus { top: 0.5rem; color: var(--blanc); }

main:focus { outline: none; }

[id] { scroll-margin-top: calc(var(--hauteur-entete) + 1rem); }

.icone {
  width: 1.4em;
  height: 1.4em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Boutons ---------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.5rem;
  padding: 0.75rem 1.4rem;
  border: 3px solid var(--charbon);
  border-radius: var(--rayon);
  font-family: var(--police-texte);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.bouton--plein {
  background: var(--rouge);
  border-color: var(--rouge);
  color: var(--blanc);
}
.bouton--plein:hover { background: var(--rouge-fonce); border-color: var(--rouge-fonce); color: var(--blanc); }

.bouton--contour {
  background: var(--blanc);
  color: var(--charbon);
}
.bouton--contour:hover { background: var(--charbon); color: var(--blanc); }

/* ---------- En-tête ---------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blanc);
  border-bottom: 3px solid var(--charbon);
}

.entete__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--hauteur-entete);
  padding-block: 0.5rem;
}

.marque {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: var(--charbon);
  text-decoration: none;
}
.marque:hover { color: var(--charbon); }

.marque__logo { width: 2.75rem; height: 2.75rem; }

.marque__texte { display: flex; flex-direction: column; min-width: 0; }

.marque__nom {
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.1;
}

.marque__lieu {
  display: none;
  font-size: 1.125rem;
  line-height: 1.2;
}

.bouton-tel {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  min-height: 3rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--rayon);
  background: var(--rouge);
  color: var(--blanc);
  font-size: 1.125rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}
.bouton-tel:hover { background: var(--rouge-fonce); color: var(--blanc); }
.bouton-tel .icone { width: 1.2em; height: 1.2em; }

.entete__nav { display: none; }

.entete__nav ul {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entete__nav a {
  color: var(--charbon);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.entete__nav a:hover { color: var(--rouge); text-decoration: underline; }

@media (min-width: 30em) {
  .marque__lieu { display: block; }
  .marque__nom { font-size: 1.25rem; }
  .marque__logo { width: 3.25rem; height: 3.25rem; }
}

@media (min-width: 72em) {
  .entete__nav { display: block; }
}

/* ---------- Accueil + affichette ---------- */

.ouverture {
  display: grid;
  gap: 2.5rem;
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

.accueil h1 { max-width: 15ch; }

.accueil__intro {
  margin-top: 1rem;
  font-size: 1.3125rem;
}

.accueil__boutons {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

@media (min-width: 30em) {
  .accueil__boutons { grid-template-columns: repeat(2, max-content); }
}

/* L'affichette : la feuille jaune collée sur la porte */
.affichette {
  position: relative;
  padding: 2rem 1.25rem 1.5rem;
  background: var(--jaune);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(42, 43, 47, 0.15), 0 10px 22px -14px rgba(42, 43, 47, 0.55);
}

.affichette::before,
.affichette::after {
  content: "";
  position: absolute;
  top: -0.85rem;
  width: 6rem;
  height: 1.7rem;
  background: var(--ruban);
}
.affichette::before { left: 1.25rem; transform: rotate(-5deg); }
.affichette::after { right: 1.25rem; transform: rotate(4deg); }

.affichette h2 { font-size: clamp(2rem, 1.7rem + 1.4vw, 2.5rem); }

.affichette__heures {
  margin: 0.5rem 0 1.25rem;
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
  line-height: 1.1;
}

.semaine {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  text-align: center;
}

.semaine__jour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  position: relative;
}

.semaine__abrev {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 3.4rem;
  aspect-ratio: 1;
  border: 3px solid var(--charbon);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1;
}

.est-ouvert .semaine__abrev {
  background: var(--charbon);
  color: var(--blanc);
}

.est-ferme .semaine__abrev {
  border-style: dashed;
  background: transparent;
  font-weight: 400;
}

.semaine__etat {
  font-size: 1.125rem;
  line-height: 1.1;
}

/* Petit écran : le mot ne tient pas sous chaque jour.
   On montre un symbole; le mot reste lu par les lecteurs d'écran. */
@media (max-width: 29.99em) {
  .semaine__etat {
    font-size: 0;
    line-height: 0;
  }
  .semaine__etat::before {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
  }
  .est-ouvert .semaine__etat::before { content: "✓" / ""; }
  .est-ferme .semaine__etat::before { content: "✕" / ""; }
}

.semaine__jour.est-aujourdhui::after {
  content: "aujourd'hui";
  display: block;
  margin-top: 0.1rem;
  padding: 0 0.3rem;
  border-radius: 3px;
  background: var(--charbon);
  color: var(--jaune);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

/* L'étiquette « aujourd'hui » déborde sur les jours voisins : on la centre */
.semaine__jour.est-aujourdhui { z-index: 1; }

.semaine__jour.est-aujourdhui .semaine__abrev {
  box-shadow: 0 0 0 3px var(--jaune), 0 0 0 6px var(--rouge);
}

.affichette__jours { font-weight: 700; margin-top: 1rem; }

.affichette__liste {
  display: grid;
  gap: 0.9rem;
  margin: 1.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 3px solid var(--charbon);
  list-style: none;
}

.affichette__liste li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.affichette__liste .icone { margin-top: 0.1em; }

.affichette a { color: var(--charbon); font-weight: 700; }
.affichette a:hover { color: var(--charbon); text-decoration-thickness: 3px; }

@media (min-width: 60em) {
  .ouverture {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 4rem;
    padding-top: 3.5rem;
    padding-bottom: 5rem;
  }
  .accueil h1 { max-width: 13ch; }
  .affichette {
    padding: 2.5rem 2.25rem 2rem;
    transform: rotate(-0.6deg);
  }
}

/* ---------- Sections ---------- */

.section { padding-block: 3.5rem; }
.section--gris { background: var(--gris); }

.section__intro {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  font-size: 1.3125rem;
}

@media (min-width: 60em) {
  .section { padding-block: 5rem; }
}

/* Services */
.cartes {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.carte {
  padding: 1.5rem 1.25rem;
  background: var(--blanc);
  border: 3px solid var(--charbon);
  border-radius: var(--rayon);
}

.carte h3 { margin: 0.75rem 0 0.5rem; }

.carte__icone {
  width: 3.25rem;
  height: 3.25rem;
  fill: none;
  stroke: var(--charbon);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.carte__icone .accent { stroke: var(--rouge); }

.carte a { font-weight: 700; }

/* La 4e carte s'adresse aux donateurs : on la distingue */
.carte--don {
  background: var(--charbon);
  border-color: var(--charbon);
  color: var(--blanc);
}
.carte--don h3 { color: var(--blanc); }
.carte--don .carte__icone { stroke: var(--blanc); }
.carte--don .carte__icone .accent { stroke: var(--jaune); }
.carte--don a { color: var(--jaune); }
.carte--don a:hover { color: var(--blanc); }

@media (min-width: 40em) {
  .cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}

/* Nous trouver */
.trouver {
  display: grid;
  gap: 2rem;
}

.trouver__adresse {
  margin: 1.25rem 0 0.75rem;
  font-style: normal;
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.625rem;
  line-height: 1.25;
}

.trouver__boutons {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  max-width: 26rem;
}

.trouver__carte iframe {
  display: block;
  width: 100%;
  height: 22rem;
  border: 3px solid var(--charbon);
  border-radius: var(--rayon);
  background: var(--gris);
}

@media (min-width: 60em) {
  .trouver {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 3.5rem;
    align-items: start;
  }
  .trouver__infos { grid-column: 1; grid-row: 1; }
  .trouver__photo { grid-column: 1; grid-row: 2; }
  .trouver__carte { grid-column: 2; grid-row: 1 / span 2; }
  .trouver__carte iframe { height: 34rem; }
}

/* Donner */
.dons {
  display: grid;
  gap: 0;
  border-top: 3px solid var(--charbon);
}

.don {
  padding: 1.75rem 0;
  border-bottom: 3px solid var(--charbon);
}

.don h3 {
  margin-bottom: 0.6rem;
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  line-height: 1.15;
}

.don__contact {
  margin-top: 2rem;
  padding: 1.5rem 1.25rem;
  background: var(--blanc);
  border: 3px solid var(--charbon);
  border-radius: var(--rayon);
}

.don__contact-texte {
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.2;
}

.don__actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* Le courriel est long : on le laisse passer à la ligne sur petit écran */
.don__actions .bouton { overflow-wrap: anywhere; }

@media (min-width: 48em) {
  .don__actions { grid-template-columns: repeat(2, max-content); }
}

@media (min-width: 60em) {
  .dons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    border-top: 0;
  }
  .don {
    padding: 1.75rem 0 0;
    border-top: 3px solid var(--charbon);
    border-bottom: 0;
  }
  .don__contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 2rem;
    margin-top: 3rem;
    padding: 1.75rem 2rem;
  }
  .don__contact .don__actions { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}

/* Qui sommes-nous */
.qui {
  display: grid;
  gap: 2.5rem;
}

.qui h2 { margin-bottom: 1.25rem; }

.souvenir {
  margin-top: 2rem;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-left: 6px solid var(--rouge);
  background: var(--gris);
}

.souvenir p {
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.3;
}

@media (min-width: 60em) {
  .qui {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 4rem;
    align-items: center;
  }
}

/* ---------- Photos (emplacements réservés) ---------- */

.photo { margin: 0; }

.photo img {
  width: 100%;
  border-radius: var(--rayon);
  object-fit: cover;
}

.photo--large { margin-top: 3rem; }
.photo--large img { aspect-ratio: 16 / 9; }
.qui__photo img { aspect-ratio: 1; }

.photo__vide { display: none; }

.photo.est-absente img { display: none; }

.photo.est-absente .photo__vide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  min-height: 12rem;
  padding: 1.5rem;
  border: 3px dashed var(--charbon-doux);
  border-radius: var(--rayon);
  background: var(--gris);
  color: var(--charbon-doux);
  text-align: center;
  font-size: 1.125rem;
}

.section--gris .photo.est-absente .photo__vide { background: var(--blanc); }

.photo--large.est-absente .photo__vide { aspect-ratio: 16 / 9; min-height: 0; }
.qui__photo.est-absente .photo__vide { aspect-ratio: 1; min-height: 0; }

.photo__vide code { font-size: 1.125rem; }

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

.pied {
  background: var(--charbon);
  color: var(--blanc);
  padding-top: 3.5rem;
}

.pied a { color: var(--blanc); }
.pied a:hover { color: var(--jaune); }
.pied :focus-visible { outline-color: var(--jaune); }

.pied__grille {
  display: grid;
  gap: 2.5rem;
}

.pied__titre {
  margin-bottom: 0.75rem;
  color: var(--blanc);
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.pied__urgence ul {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pied__urgence li {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
}

.pied__urgence a {
  display: inline-block;
  padding: 0.15rem 0;
  font-family: var(--police-titre);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--jaune);
  text-decoration: none;
}
.pied__urgence a:hover { color: var(--blanc); text-decoration: underline; }

.pied__bas {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 1.125rem;
}

@media (min-width: 48em) {
  .pied__grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 60em) {
  .pied__grille { grid-template-columns: 1.2fr 1fr 1.3fr; gap: 3rem; }
}

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

@media print {
  .entete { position: static; }
  .bouton-tel, .trouver__carte, .photo, .accueil__boutons, .don__actions { display: none; }
  .affichette { box-shadow: none; transform: none; border: 3px solid #000; }
  .affichette::before, .affichette::after { display: none; }
  body { font-size: 14pt; }
}

.nobr { white-space: nowrap; }

.don__courriel {
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
}
