/* ═══════════════════════════════════════════════════════
   ACCUEIL.CSS — pages d'accueil des 3 régions
   (romandie, alemanique, italienne /accueil.html).
   En-tête et pied de page : voir css/layout.css (chargé après).
   Polices : Alegreya + Alegreya Sans (Google Fonts, dans le HTML).
   ═══════════════════════════════════════════════════════ */

:root {
  --bure: #3b281c;        /* brun de la bure : titres, sections sombres */
  --encre: #241912;       /* texte principal, pied de page */
  --molasse: #eceadf;     /* fond : pierre de molasse fribourgeoise */
  --trait: #d3cebc;       /* filets et séparateurs */
  --texte-doux: #4a3b30;  /* paragraphes */
  --gris-brun: #5e4e42;   /* infos secondaires */
  --ocre: #d5a25c;        /* ocre de la marque (décors, cadre du vitrail) */
  --ocre-clair: #e7c48f;  /* ocre lisible sur fond sombre */
  --lin: #f1e9da;         /* texte sur fond brun */
  --vitrail: #1b5a62;     /* bleu-vert des vitraux : boutons, liens */
  --vitrail-fonce: #123f45;

  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --sans: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;

  --marge: clamp(20px, 6.6vw, 96px);
  --section-y: clamp(72px, 9vw, 120px);
  --largeur-max: 1440px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  padding-top: var(--ofs-header-h, 88px); /* place pour l'en-tête fixe */
  font-family: var(--serif);
  color: var(--encre);
  background: var(--molasse);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--vitrail);
}

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

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

h1,
h2,
h3 {
  font-weight: 500;
  color: var(--bure);
  text-wrap: balance;
}

/* ───── Accessibilité ───── */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--bure);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* ───── Boutons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s;
}

.btn-primary {
  background: var(--vitrail);
  color: #fff;
}

.btn-primary:hover {
  background: var(--vitrail-fonce);
  color: #fff;
}

.btn-light {
  background: #f4f2ea;
  color: var(--vitrail-fonce);
}

.btn-light:hover {
  background: #fff;
  color: var(--vitrail-fonce);
}

.link-plain {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--bure);
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.link-plain:hover {
  color: var(--encre);
  text-decoration-thickness: 2px;
}

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
.hero {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 72px var(--marge) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(48px, 6.6vw, 96px);
  align-items: end;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 96px;
}

.hero h1 {
  font-size: clamp(44px, 5.4vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.01em;
  max-width: 15ch;
}

.hero p {
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.55;
  color: var(--texte-doux);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

/* La fenêtre en arc : cadre ocre + vitrail arrondi en plein cintre */
.hero-window {
  aspect-ratio: 520 / 688;
  padding: 14px 14px 0;
  border: 1.5px solid var(--ocre);
  border-bottom: none;
  border-radius: 999px 999px 0 0;
}

.hero-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 999px 999px 0 0;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
    gap: 40px;
  }

  .hero-text {
    padding-bottom: 0;
    gap: 24px;
  }

  .hero-window {
    width: 100%;
    max-width: 420px;
    padding: 10px 10px 0;
  }
}

/* ═══════════════════════════════════════════════════════
   BANDEAU D'ANNONCE
   ═══════════════════════════════════════════════════════ */
.announce {
  background: var(--bure);
  color: var(--lin);
  padding: 30px var(--marge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 48px;
}

.announce p {
  font-size: clamp(20px, 1.8vw, 24px);
  font-style: italic;
  line-height: 1.4;
  max-width: 60ch;
}

.announce a {
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--ocre-clair);
  text-underline-offset: 5px;
}

.announce a:hover {
  color: #fff;
}

@media (max-width: 820px) {
  .announce {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════ */
.section {
  padding: var(--section-y) var(--marge);
}

.section > * {
  max-width: calc(var(--largeur-max) - 2 * 96px);
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-size: clamp(36px, 3.8vw, 54px);
  line-height: 1.08;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 16px 96px;
  align-items: end;
  margin-bottom: 56px;
}

.section-head p {
  font-size: 20px;
  line-height: 1.55;
  color: var(--texte-doux);
}

@media (max-width: 820px) {
  .section-head {
    grid-template-columns: 1fr;
    margin-bottom: 40px;
  }

  .section-head p {
    font-size: 19px;
  }
}

/* ───── Fraternités ───── */
.cantons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

.canton img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 999px 999px 0 0 / 140px 140px 0 0;
}

.canton h3 {
  font-size: 32px;
  margin: 20px 0 8px;
}

.canton ul {
  list-style: none;
  font-size: 20px;
}

.canton li {
  border-top: 1px solid var(--trait);
}

.canton li a {
  display: block;
  padding: 12px 0;
  color: var(--encre);
  text-decoration: none;
}

.canton li a:hover {
  color: var(--vitrail);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.jeunesse {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  margin-top: 80px;
  background: var(--vitrail);
  color: #f4f2ea;
}

.jeunesse img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
}

.jeunesse-text {
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.jeunesse h3 {
  color: inherit;
  font-size: clamp(30px, 2.9vw, 42px);
  line-height: 1.1;
}

.jeunesse p {
  font-size: clamp(19px, 1.5vw, 21px);
  line-height: 1.55;
  max-width: 34em;
}

@media (max-width: 1080px) {
  .cantons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 32px;
  }
}

@media (max-width: 820px) {
  .jeunesse {
    grid-template-columns: 1fr;
    margin-left: calc(-1 * var(--marge));
    margin-right: calc(-1 * var(--marge));
    margin-top: 56px;
  }

  .jeunesse img {
    min-height: 0;
    height: 250px;
  }

  .jeunesse-text {
    padding: 32px var(--marge) 40px;
  }
}

@media (max-width: 560px) {
  .cantons {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .canton img {
    height: 190px;
  }

  .canton h3 {
    font-size: 28px;
    margin-top: 16px;
  }

  .canton ul {
    font-size: 19px;
  }
}

/* ───── Comment se passe une rencontre ───── */
.rencontres {
  background: var(--bure);
  color: var(--lin);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px 112px;
}

.rencontres > * {
  margin: 0;
  max-width: none;
}

/* Centre le contenu des deux colonnes sur les grands écrans */
@media (min-width: 1441px) {
  .rencontres {
    padding-left: calc((100vw - var(--largeur-max)) / 2 + 96px);
    padding-right: calc((100vw - var(--largeur-max)) / 2 + 96px);
  }
}

.rencontres h2 {
  color: inherit;
}

.rencontres-text {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.rencontres-text p {
  font-size: clamp(19px, 1.5vw, 21px);
  line-height: 1.65;
  max-width: 36em;
}

.cordelette {
  width: 240px;
  height: 28px;
  color: var(--ocre);
}

.rencontres-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
}

.citation {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.citation blockquote {
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1.2;
  font-style: italic;
  color: var(--ocre-clair);
}

.citation figcaption,
.reperes dd {
  font-family: var(--sans);
  font-size: 16px;
  color: #cdbfa9;
}

.citation figcaption {
  font-size: 17px;
}

.reperes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.reperes > div {
  border-top: 1px solid #6e5646;
  padding-top: 16px;
}

.reperes dt {
  font-size: 24px;
  font-weight: 500;
}

.reperes dd {
  margin-top: 6px;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .rencontres {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .cordelette {
    width: 200px;
    height: 24px;
  }

  .reperes {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .reperes dt {
    font-size: 22px;
  }
}

/* ───── Agenda des événements ───── */
.agenda {
  list-style: none;
  border-bottom: 1px solid #c9c3ae;
}

.agenda:empty {
  display: none;
}

.agenda-item {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 200px;
  gap: 48px;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid #c9c3ae;
  color: var(--encre);
  text-decoration: none;
}

.agenda-date,
.agenda-infos {
  display: flex;
  flex-direction: column;
}

.agenda-jour {
  font-size: 56px;
  line-height: 1;
  font-weight: 500;
  color: var(--bure);
}

.agenda-mois {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--gris-brun);
}

.agenda-infos {
  gap: 8px;
}

.agenda-titre {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 500;
}

.agenda-lieu {
  font-family: var(--sans);
  font-size: 18px;
  color: var(--gris-brun);
}

.agenda-img {
  width: 200px;
  height: 220px;
  object-fit: cover;
  border-radius: 100px 100px 0 0;
}

.agenda-item:hover .agenda-titre {
  color: var(--vitrail);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

@media (max-width: 1080px) {
  .agenda-item {
    grid-template-columns: 200px minmax(0, 1fr) 160px;
    gap: 32px;
  }

  .agenda-jour {
    font-size: 46px;
  }

  .agenda-titre {
    font-size: 28px;
  }

  .agenda-img {
    width: 160px;
    height: 180px;
    border-radius: 80px 80px 0 0;
  }
}

@media (max-width: 680px) {
  .agenda-item {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
      "img date"
      "img infos";
    gap: 6px 18px;
    align-items: start;
    padding: 24px 0;
  }

  .agenda-img {
    grid-area: img;
    width: 96px;
    height: 120px;
    border-radius: 48px 48px 0 0;
  }

  .agenda-date {
    grid-area: date;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 6px;
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 700;
    color: var(--gris-brun);
  }

  .agenda-jour,
  .agenda-mois {
    font: inherit;
    color: inherit;
    margin: 0;
  }

  .agenda-infos {
    grid-area: infos;
    gap: 6px;
  }

  .agenda-titre {
    font-size: 24px;
  }

  .agenda-lieu {
    font-size: 16px;
  }
}

/* Les ancres (#fraternites, #evenements) ne passent pas sous l'en-tête collant */
section[id] {
  scroll-margin-top: calc(var(--ofs-header-h, 88px) + 16px);
}

/* ═══════════════════════════════════════════════════════
   VARIANTES PAR RÉGION
   ═══════════════════════════════════════════════════════ */

/* Deux localités seulement (Suisse italienne) : cartes plus larges */
.cantons.cantons-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cantons-2 .canton img,
.cantons-2 .canton-photo-a-venir {
  height: 280px;
}

/* Arc de couleur en attendant une vraie photo */
.canton-photo-a-venir {
  height: 240px;
  border-radius: 999px 999px 0 0 / 140px 140px 0 0;
  background: #b9c6b8;
}

.canton-photo-a-venir.ton-ocre {
  background: #d9c29a;
}

@media (max-width: 560px) {
  .cantons.cantons-2 {
    grid-template-columns: 1fr;
  }

  .cantons-2 .canton img,
  .cantons-2 .canton-photo-a-venir,
  .canton-photo-a-venir {
    height: 190px;
  }
}

/* Agenda vide */
.agenda-vide {
  padding: 32px 0;
  border-top: 1px solid #c9c3ae;
  font-size: 21px;
  font-style: italic;
  color: var(--gris-brun);
}

/* ───── Regionalrat (Deutschschweiz) ───── */
.conseil {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px 96px;
  align-items: start;
}

.conseil figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.conseil figcaption {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--gris-brun);
}

.conseil-intro {
  font-size: 20px;
  line-height: 1.55;
  color: var(--texte-doux);
  margin-bottom: 20px;
}

.conseil-liste {
  list-style: none;
  border-bottom: 1px solid var(--trait);
}

.conseil-liste li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
  border-top: 1px solid var(--trait);
}

.conseil-nom {
  font-size: 23px;
  font-weight: 500;
  color: var(--bure);
}

.conseil-role {
  font-family: var(--sans);
  font-size: 17px;
  color: var(--gris-brun);
}

.conseil-note {
  margin: 20px 0 28px;
  font-size: 19px;
  font-style: italic;
  color: var(--texte-doux);
}

@media (max-width: 900px) {
  .conseil {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════
   VIDÉO DE PRÉSENTATION (masquée tant que le fichier manque)
   ═══════════════════════════════════════════════════════ */
.video-presentation {
  background: var(--encre);
  color: var(--lin);
  padding: clamp(56px, 7vw, 96px) var(--marge);
}

.video-presentation[hidden] {
  display: none;
}

.video-inner {
  max-width: calc(var(--largeur-max) - 2 * 96px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.video-presentation h2 {
  color: inherit;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.1;
}

.video-cadre {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-cadre video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: clamp(72px, 9vw, 112px);
  height: clamp(72px, 9vw, 112px);
  border: 2px solid var(--ocre-clair);
  border-radius: 999px;
  background: rgba(36, 25, 18, 0.72);
  color: var(--ocre-clair);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.video-play[hidden] {
  display: none;
}

.video-play svg {
  width: 44%;
  height: 44%;
  margin-left: 6%;
}

.video-play:hover {
  background: var(--bure);
  transform: scale(1.05);
}

.video-play:focus-visible {
  outline: 3px solid var(--ocre-clair);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .video-play {
    transition: none;
  }

  .video-play:hover {
    transform: none;
  }
}

@media (max-width: 560px) {
  .video-presentation {
    padding-left: 0;
    padding-right: 0;
  }

  .video-presentation h2 {
    padding: 0 var(--marge);
  }
}

/* Sections masquées (ex. fraternités vides) */
section[hidden] {
  display: none;
}
