/* ==========================================================================
   City of Glory church – feuille de style principale
   Reprend le design du site v1 (thème Divi) sans dépendre de WordPress.
   ========================================================================== */

/* Police Open Sans (variable, sous-ensemble latin), hébergée localement */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/open-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --color-gold: #b89533;
  --color-gold-light: #ead860;
  --color-text: #666;
  --color-heading: #333;
  --color-bg: #fff;
  --color-bg-soft: #f9f9f9;
  --color-footer: #171717;
  --font-body: "Open Sans", Arial, sans-serif;
  --header-height: 80px;
  --container: 1080px;
  --gutter: 5.5%;
  --radius: 10px;
  --section-padding: 54px;
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  height: auto;
}

a {
  color: var(--color-gold);
  text-decoration: none;
}

a:hover {
  opacity: 0.8;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  padding-bottom: 10px;
  color: var(--color-heading);
  font-weight: 500;
  line-height: 1.1;
}

h1 { font-size: 30px; }
h2 { font-size: 26px; }

p {
  margin: 0 0 1em;
}

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

.icon {
  width: 1em;
  height: 1em;
  flex: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 8px 16px;
  background: #fff;
}

.skip-link:focus {
  top: 8px;
}

.text-center {
  text-align: center;
}

.rounded {
  border-radius: var(--radius);
  overflow: hidden;
}

/* --- Mise en page -------------------------------------------------------- */

.container {
  width: 80%;
  max-width: var(--container);
  margin: 0 auto;
}

.section {
  position: relative;
  padding: var(--section-padding) 0;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--gutter);
  row-gap: 30px;
}

.column > * + * {
  margin-top: 30px;
}

.section-title {
  color: var(--color-gold);
  text-align: center;
}

.section-title a {
  color: inherit;
}

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

.button {
  display: inline-block;
  padding: 0.3em 1em;
  border: 2px solid currentColor;
  border-radius: 3px;
  color: var(--color-gold);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.7;
  transition: background-color 0.3s, border-color 0.3s;
}

.button:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
  border-color: transparent;
}

.button--light {
  color: #fff;
}

.button--light:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-header__logo img {
  width: auto;
  height: 43px;
}

.site-nav ul {
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--color-gold);
  font-size: 14px;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--color-gold);
  font-size: 32px;
  cursor: pointer;
}

.nav-toggle__close,
.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

/* --- Carrousels (accueil et affiches) ------------------------------------ */

.slider {
  position: relative;
}

.slider__track {
  position: relative;
}

/* Diapositives superposées (fondu enchaîné) ; seule la diapositive active
   donne sa hauteur au carrousel. */
.slider__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.slider__slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
}

.slider__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 48px;
  line-height: 0;
  opacity: 0;
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity 0.3s, left 0.3s, right 0.3s;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.slider__arrow--prev { left: -22px; }
.slider__arrow--next { right: -22px; }

.slider:hover .slider__arrow,
.slider__arrow:focus-visible {
  opacity: 1;
}

.slider:hover .slider__arrow--prev,
.slider__arrow--prev:focus-visible { left: 22px; }

.slider:hover .slider__arrow--next,
.slider__arrow--next:focus-visible { right: 22px; }

.slider__dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 0 10px;
}

.slider__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.slider__dot.is-active {
  background: #fff;
}

/* --- Bandeau d'accueil --------------------------------------------------- */

.hero__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(420px, 41vw, 720px);
  padding: 60px 8%;
  background-color: var(--color-gold-light);
  background-position: center;
  background-size: cover;
  text-align: center;
}

.hero__content {
  max-width: 960px;
}

.hero__title {
  padding-bottom: 10px;
  color: #fff;
  font-size: 46px;
  font-weight: 300;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero__title a {
  color: inherit;
}

.hero__text {
  margin: 0 0 20px;
  color: #fff;
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* --- Affiches d'événements ----------------------------------------------- */

.gallery__item {
  margin: 0;
}

.gallery__item a,
.gallery__item img {
  display: block;
  width: 100%;
}

.gallery__item img {
  border-radius: var(--radius);
}

.gallery__item a:hover {
  opacity: 1;
}

.gallery .slider__arrow {
  color: #fff;
}

.event-gallery__empty {
  text-align: center;
}

/* --- Section contact ----------------------------------------------------- */

.section--contact {
  padding-bottom: 0;
  background-color: var(--color-bg-soft);
  isolation: isolate;
}

/* Motif pointillé, puis masque blanc qui ne laisse voir que la forme de droite. */
.section--contact::before,
.section--contact::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  pointer-events: none;
}

.section--contact::before {
  background-image: url("../img/patterns/diamond-dots.svg");
  background-size: 128px 128px;
}

.section--contact::after {
  background-image: url("../img/patterns/section-mask.svg");
  background-position: center;
  background-size: 100% 100%;
}

.section--contact p {
  color: var(--color-gold);
}

.service .section-title {
  padding-bottom: 6px;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-gold);
}

.contact-list li {
  margin-bottom: 1em;
}

.contact-list li,
.contact-list a {
  display: flex;
  align-items: flex-start;
  gap: 0.9em;
}

.contact-list .icon {
  font-size: 1.5em;
}

.contact-list span {
  padding-top: 0.15em;
}

.contact-list small {
  display: block;
  font-size: 1em;
}

/* Apparition progressive de la photo du couple pastoral */
.js .reveal {
  opacity: 0.2;
  transform: translateX(-120px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --- Lieux et cartes ----------------------------------------------------- */

.section--locations {
  padding-top: 20px;
}

.location > * + * {
  margin-top: 12px;
}

.location__address a {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.9em;
}

.location__address .icon {
  font-size: 1.5em;
}

.location__address span {
  padding-top: 0.15em;
}

.location__map {
  width: 100%;
  height: 300px;
  border: 0;
  background: #ddd;
}

/* --- Pages de contenu (mission, 404) ------------------------------------- */

.prose {
  max-width: 550px;
  margin: 0 auto;
  color: var(--color-gold);
}

.prose .section-title {
  padding-bottom: 20px;
}

.prose h2.section-title {
  margin-top: 1.5em;
}

.prose ul {
  margin: 0 0 1.5em;
  padding-left: 1em;
  line-height: 26px;
}

.prose strong {
  font-weight: 700;
}

.spacer {
  height: 1em;
  margin: 0;
  border: 0;
}

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

.site-footer {
  padding: 15px 0;
  background: var(--color-footer);
  color: var(--color-text);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer__copyright {
  margin: 0;
}

.social-links {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-links a {
  display: block;
  color: var(--color-text);
  font-size: 22px;
  line-height: 0;
}

.social-links a:hover {
  color: var(--color-gold);
  opacity: 1;
}

/* --- Visionneuse d'affiches ---------------------------------------------- */

.lightbox {
  max-width: 100vw;
  max-height: 100vh;
  padding: 0;
  border: 0;
  background: none;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.lightbox__image {
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  border-radius: 6px;
}

.lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  padding: 4px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 32px;
  line-height: 0;
  cursor: pointer;
}

/* --- Page de maintenance ------------------------------------------------- */

.page-maintenance {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #222;
  background-position: center;
  background-size: cover;
  color: #fff;
  text-align: center;
}

.maintenance {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.maintenance h1 {
  color: #fff;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 300;
}

.maintenance p {
  font-size: 18px;
  font-weight: 300;
}

.maintenance a {
  color: #fff;
}

.maintenance__logo {
  width: 90px;
  margin-bottom: 20px;
}

.maintenance__diagnostic {
  max-width: 900px;
  margin-top: 24px;
  padding: 12px 16px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffb4a8;
  font-size: 14px;
  text-align: left;
  white-space: pre-wrap;
}

.maintenance__footer {
  padding: 16px;
  font-weight: 300;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1349px) {
  :root {
    --section-padding: 4vw;
  }
}

@media (max-width: 980px) {
  :root {
    --section-padding: 50px;
  }

  .columns {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 10%;
    right: 10%;
    display: none;
    padding: 5%;
    background: #fff;
    border-top: 3px solid var(--color-gold);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 10px 5%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  }

  .hero__title {
    font-size: 32px;
  }

  .section--contact::after {
    background-size: 100% 100%;
  }
}

@media (max-width: 767px) {
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }

  .hero__title {
    font-size: 26px;
  }

  .hero__text {
    font-size: 15px;
  }

  .button {
    font-size: 16px;
  }

  .site-footer__inner {
    flex-direction: column;
  }
}
