/* 4 Fondations — donnezunsens.org */
:root {
  --teal: #9bc1c1;
  --orange: #f9ba54;
  --navy: #1f2c5a;
  --green: #19ba97;
  --blue: #2ea3f2;
  --text: #666;
  --grey: #dbdbdb;
  --grey-2: #e3e3e3;
  --ph: #e8ecef;
  --head: "Poppins", system-ui, sans-serif;
  --body: "Montserrat", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 500 15px/1.75 var(--body); color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--head); font-weight: 500; line-height: 1.2; color: var(--navy); margin: 0 0 .6em; }
p { margin: 0 0 1.1em; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { text-decoration: none; }
.brand .logo { width: 170px; }
.nav { display: flex; align-items: center; gap: 22px; font-weight: 600; font-size: 14px; }
.nav a { text-decoration: none; color: var(--blue); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.nav .btn-donne { background: var(--green); color: #f4f4f4; padding: 10px 26px; border-radius: 30px; transition: filter .2s; }
.nav .btn-donne:hover { filter: brightness(1.08); }

/* Emplacements photo (en attendant les images) */
.ph { margin: 0; background: var(--ph); position: relative; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.missing img { display: none; }
.ph.missing::after {
  content: "Photo à venir · " attr(data-label);
  position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center;
  font-size: 13px; color: #8a96a3; background: repeating-linear-gradient(45deg, #e8ecef 0 14px, #eef1f4 14px 28px);
}
.logo-missing { font-family: var(--head); font-size: 26px; color: var(--navy); }
.logo-missing.brand-text { font-size: 22px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* Illustration d’entête : pleine largeur */
.intro-art { padding: 24px 0 28px; }
.ph-art { width: 100%; aspect-ratio: 10 / 3; background: transparent; }
.ph-art img { object-fit: contain; }

/* Bandeaux titre */
.rule { width: min(72%, 780px); border: 0; border-top: 2px solid rgba(255,255,255,.85); margin: 0 auto 30px; }
.big-title + .rule { margin: 30px auto 0; }
.big-title { color: #fff; text-align: center; font-size: clamp(34px, 6.4vw, 72px); line-height: 1.15; max-width: 16ch; margin: 0 auto; }
.band-teal {
  padding: 110px 0 120px;
  background: linear-gradient(rgba(31,44,90,.45), rgba(31,44,90,.55)), url("/assets/img/fond-unissent.webp") center / cover, var(--teal);
}

/* Vidéos */
.videos { padding: 70px 0; }
.videos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.videos h2 { font-size: clamp(24px, 3vw, 34px); text-align: center; color: #222; }
.video { position: relative; aspect-ratio: 16 / 9; background: #111; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt { display: block; overflow: hidden; cursor: pointer; }
.yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .3s; opacity: .92; }
.yt:hover img { transform: scale(1.03); opacity: 1; }
.yt .play { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; transform: translate(-50%, -50%); background: #ff0000; border-radius: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.35); transition: transform .2s; }
.yt .play::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 18px; border-color: transparent transparent transparent #fff; }
.yt:hover .play { transform: translate(-50%, -50%) scale(1.08); }

/* Donnez pour le parcours d’une vie */
.parcours {
  padding: 110px 0 120px;
  background: linear-gradient(rgba(0,0,0,.58), rgba(0,0,0,.49)), url("/assets/img/fond-donnez.webp") center / cover, #4a4f55;
}

/* Fondations */
.fondation { padding: 80px 0; }
.fondation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.found-logo { margin: 0 0 32px; display: flex; justify-content: center; }
.found-logo img { width: auto; max-width: 100%; height: auto; }
.logo-cegep img { width: 420px; }
.logo-hopital img { height: 150px; }
.logo-centraide img { height: 140px; }
.logo-pallia img { height: 200px; }
.fondation ul { padding-left: 1.2em; margin: 0; }
.fondation li { margin-bottom: .35em; }
.fondation li ul { margin-top: .35em; list-style: circle; }
.f-hopital { background: var(--orange); color: #3b3020; }
.f-pallia { background: var(--navy); color: #e9ecf4; }
.f-pallia .logo-missing { color: #fff; }

/* Carrousels */
.slider { position: relative; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.track::-webkit-scrollbar { display: none; }
.track > .ph { flex: 0 0 100%; aspect-ratio: 4 / 3; scroll-snap-align: start; }
.slider .arrow {
  position: absolute; top: calc(50% - 22px); transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.85); color: #333; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.slider .prev { left: 10px; }
.slider .next { right: 10px; }
.dots { display: flex; justify-content: center; gap: 8px; padding-top: 14px; }
.dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.25); cursor: pointer; }
.dots button[aria-current="true"] { background: #333; }
.f-pallia .dots button { background: rgba(255,255,255,.35); }
.f-pallia .dots button[aria-current="true"] { background: #fff; }

/* Découvrez comment donner */
.comment { padding: 80px 0; }
.section-title { text-align: center; font-size: clamp(30px, 4vw, 40px); margin-bottom: 40px; }
.section-title.dark { color: #000; }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.ways h3 { font-size: 23px; text-align: center; margin: 0; padding: 26px 18px; border-top: 3px solid var(--teal); }

/* Contact */
.contact { padding: 70px 0 90px; }
.contact-lead { text-align: center; max-width: 620px; margin: -16px auto 36px; }
.contact-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 860px; margin-inline: auto; }
.contact-card { background: #f4f5f7; border-top: 4px solid var(--teal); padding: 22px 20px 24px; display: flex; flex-direction: column; }
.contact-card:nth-child(2) { border-top-color: var(--orange); }
.contact-card:nth-child(3) { border-top-color: var(--green); }
.contact-card:nth-child(4) { border-top-color: var(--navy); }
.contact-card p { margin: 0; }
.contact-card .org { font-family: var(--head); color: var(--navy); font-size: 17px; line-height: 1.3; margin-bottom: 10px; }
.contact-card .name { font-weight: 600; color: #444; font-size: 14px; margin-bottom: 14px; }
.contact-card .mail { margin-top: auto; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }

/* Pied de page */
.site-footer { background: var(--grey); }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 24px; padding: 56px 0; }
.footer-logo { text-decoration: none; }
.footer-logo img { width: 190px; }
.trousse { font-size: 22px; text-align: center; line-height: 1.3; }
.socials { display: flex; justify-content: flex-end; gap: 14px; }
.socials svg { width: 40px; height: 40px; display: block; }
.footer-bottom { background: #222; color: rgba(255,255,255,.6); font-size: 13px; padding: 16px 0; }

/* Page À propos */
.page-hero {
  padding: 90px 0 70px;
  background: linear-gradient(rgba(255,255,255,.68), rgba(255,255,255,.93)), url("/assets/img/fond-a-propos.webp") center / cover;
}
.page-hero h1 { font-size: clamp(36px, 5vw, 56px); color: #222; margin: 0; }
.person { padding: 70px 0; }
.person.alt { background: var(--grey-2); }
.person-grid { display: grid; grid-template-columns: 1fr 1.25fr 1.25fr; gap: 40px; align-items: start; }
.person-org { max-height: 90px; width: auto; margin-bottom: 24px; }
.ph-portrait { aspect-ratio: 4 / 5; }
.person-bio h2 { font-size: 24px; margin-bottom: .2em; }
.role { color: #888; font-size: 14px; }
.person-bio a { word-break: break-word; }
.person-quote { margin: 0; font-size: 14px; }
.person-quote h3 { font-size: 22px; }
.person-quote footer { font-weight: 600; color: var(--navy); margin-bottom: 1em; }

/* Page 404 */
.simple { padding: 110px 0; text-align: center; }
.simple h1 { font-size: clamp(30px, 4vw, 44px); }
.btn-home { display: inline-block; margin-top: 10px; background: var(--green); color: #fff; padding: 12px 28px; border-radius: 30px; text-decoration: none; font-weight: 600; }

/* Mobile */
@media (max-width: 860px) {
  .videos-grid, .fondation-grid, .ways { grid-template-columns: 1fr; }
  .fondation-grid .slider { order: -1; }
  .person-grid { grid-template-columns: 1fr; }
  .person-media { max-width: 360px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .socials { justify-content: center; }
  .band-teal { padding: 70px 0 80px; }
  .logo-cegep img { width: 320px; }
  .logo-hopital img { height: 120px; }
  .logo-centraide img { height: 110px; }
  .logo-pallia img { height: 160px; }
  .parcours { padding: 80px 0 90px; }
  .fondation, .comment, .videos, .person { padding: 56px 0; }
}
@media (max-width: 560px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .brand .logo { width: 118px; }
  .nav { gap: 14px; font-size: 13px; }
  .nav .btn-donne { padding: 9px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html, .track { scroll-behavior: auto; }
}

/* Logo Pallia-Vie lisible sur fond marine */
.f-pallia .found-logo img { background: #fff; padding: 16px 20px; border-radius: 12px; box-sizing: content-box; }

/* Webdiffusion (bandeau + fenêtre modale) */
.btn-pill { display: inline-block; background: var(--green); color: #fff; padding: 12px 28px; border-radius: 30px; text-decoration: none; font-weight: 600; font-size: 15px; transition: filter .2s; }
.btn-pill:hover { filter: brightness(1.08); }
.btn-ghost { display: inline-block; background: transparent; color: var(--navy); border: 2px solid var(--navy); padding: 10px 24px; border-radius: 30px; text-decoration: none; font: 600 14px/1.4 var(--body); cursor: pointer; overflow-wrap: anywhere; }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.webdiff-kicker { font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 600; color: var(--green); margin: 0 0 6px; }

.webdiff { background: #f4f5f7; border-bottom: 4px solid var(--orange); padding: 40px 0; }
.webdiff-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.webdiff-date { width: 96px; height: 96px; border-radius: 16px; background: var(--navy); color: #fff; display: grid; place-content: center; text-align: center; font: 600 15px/1 var(--head); text-transform: uppercase; }
.webdiff-date span { display: block; font-size: 40px; line-height: 1; margin-bottom: 4px; }
.webdiff h2 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: .4em; }
.webdiff-text p:last-child { margin: 0; }
.webdiff-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }

.modal { width: min(640px, 100% - 32px); max-height: calc(100% - 32px); padding: 40px 36px 32px; border: 0; border-radius: 16px; color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow-y: auto; }
.modal::backdrop { background: rgba(31,44,90,.6); }
.modal h2 { font-size: clamp(22px, 3vw, 28px); }
.modal-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 30px; line-height: 1; color: #555; cursor: pointer; border-radius: 50%; }
.modal-close:hover { background: #eee; }
.modal-quote { font-family: var(--head); font-size: 18px; color: var(--navy); border-left: 3px solid var(--orange); padding-left: 14px; }
.specs { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--grey); }
.specs h3 { font-size: 18px; }
.specs dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 18px; font-size: 14px; }
.specs dt { font-weight: 700; color: #444; }
.specs dd { margin: 0; }

@media (max-width: 860px) {
  .webdiff-inner { grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
  .webdiff-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .webdiff-date { width: 76px; height: 76px; }
  .webdiff-date span { font-size: 32px; }
}
@media (max-width: 480px) {
  .modal { padding: 36px 20px 24px; }
  .webdiff-actions > * { flex: 1 1 100%; }
}

/* Bouton flottant de la webdiffusion */
.webdiff-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px 12px 16px; border: 0; border-radius: 40px;
  background: var(--navy); color: #fff; font: 600 15px/1.2 var(--body); cursor: pointer;
  box-shadow: 0 8px 24px rgba(31,44,90,.35); transition: transform .2s, background .2s;
  animation: fab-in .4s ease-out both;
}
.webdiff-fab:hover { background: var(--green); transform: translateY(-2px); }
.webdiff-fab:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.webdiff-fab svg { width: 24px; height: 24px; flex: none; }
.webdiff-fab small { display: block; font-size: 12px; font-weight: 500; opacity: .8; text-align: left; }
@keyframes fab-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 480px) {
  .webdiff-fab { right: 14px; bottom: 14px; padding: 10px 16px 10px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .webdiff-fab { animation: none; transition: none; } }
