/* =========================================================================
   ÉGLISE BIBLIQUE FRANCO-ESPAGNOLE "LE PHARE" - Toulouse
   Feuille de style unique / Hoja de estilos única
   -------------------------------------------------------------------------
   Organisation du fichier :
     1. Variables (couleurs, espacements)
     2. Reset & bases
     3. Utilitaires (conteneur, boutons, titres de section)
     4. En-tête & navigation
     5. Hero / diaporama
     6. Sections de contenu
     7. Cartes, galerie, vidéos
     8. Formulaire de contact
     9. Pied de page
    10. Responsive (mobile)
   ========================================================================= */

/* ---------- 1. VARIABLES -------------------------------------------------
   Les "custom properties" CSS : on définit une couleur une seule fois ici
   et on la réutilise partout avec var(--nom). Changer le thème = changer
   ces quelques lignes.                                                     */
:root {
  --navy:        #10243f;   /* bleu profond - fond de l'en-tête et du footer */
  --navy-soft:   #1c3a63;
  --gold:        #d9a441;   /* accent doré - boutons, filets, survols       */
  --gold-dark:   #b9862c;
  --cream:       #fbf9f6;   /* fond clair des sections                       */
  --white:       #ffffff;
  --text:        #23272e;
  --text-soft:   #5b6472;
  --border:      #e6e1d9;

  --max-width:   1140px;
  --radius:      10px;
  --shadow:      0 4px 20px rgba(16, 36, 63, .08);
  --shadow-lg:   0 10px 40px rgba(16, 36, 63, .15);
  --transition:  .25s ease;

  --font-title:  "Georgia", "Times New Roman", serif;
  --font-body:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. RESET & BASES -------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.25; font-weight: 700; }

/* Accessibilité : on garde un contour visible au clavier (touche Tab) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Lien "aller au contenu" pour les lecteurs d'écran */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--gold); color: var(--navy);
  padding: .75rem 1.25rem; z-index: 999; font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- 3. UTILITAIRES ---------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding: 4.5rem 0; }
.section--cream { background: var(--cream); }
.section--navy  { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  text-align: center;
  color: var(--navy);
  margin-bottom: .75rem;
}
.section--navy .section-title { color: var(--white); }

/* Petit filet doré sous les titres */
.section-title::after {
  content: "";
  display: block;
  width: 60px; height: 3px;
  background: var(--gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
  color: var(--text-soft);
  font-size: 1.05rem;
}
.section--navy .section-intro { color: rgba(255,255,255,.75); }

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .85rem 1.9rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn:hover { background: transparent; color: var(--gold); transform: translateY(-2px); }

.btn--outline { background: transparent; color: var(--gold); }
.btn--outline:hover { background: var(--gold); color: var(--navy); }

/* Versets bibliques */
.verse {
  font-family: var(--font-title);
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.6;
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
}
.verse-ref {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- 4. EN-TÊTE & NAVIGATION ------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.nav-brand { display: flex; align-items: center; gap: .75rem; }
.nav-brand img { height: 46px; width: auto; }
.nav-brand-text { color: var(--white); line-height: 1.15; }
.nav-brand-text strong {
  display: block;
  font-family: var(--font-title);
  font-size: 1.05rem;
  letter-spacing: .02em;
}
.nav-brand-text span { font-size: .72rem; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }

.nav-menu { display: flex; align-items: center; gap: 1.75rem; list-style: none; }
.nav-menu a {
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
}
.nav-menu a:hover,
.nav-menu a.is-active { color: var(--white); border-bottom-color: var(--gold); }

/* Sélecteur de langue */
.lang-switch { display: flex; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; overflow: hidden; }
.lang-switch button {
  background: transparent;
  color: rgba(255,255,255,.7);
  border: none;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: .4rem .7rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.lang-switch button:hover { color: var(--white); }
.lang-switch button.is-active { background: var(--gold); color: var(--navy); }

/* Bouton hamburger (visible seulement sur mobile) */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--white); margin: 5px 0;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. HERO / DIAPORAMA ----------------------------------------- */
.hero {
  position: relative;
  height: clamp(420px, 72vh, 640px);
  overflow: hidden;
  background: var(--navy);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
}
.slide.is-active { opacity: 1; }

.slide img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Voile sombre pour que le texte blanc reste lisible sur la photo */
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16,36,63,.55), rgba(16,36,63,.78));
}
.slide-content { position: relative; z-index: 2; color: var(--white); max-width: 820px; }
.slide-content h1, .slide-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  margin-bottom: .75rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.slide-content .verse-ref { margin-bottom: 1.75rem; }

/* Puces de navigation du diaporama */
.slider-dots {
  position: absolute;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: .6rem;
  z-index: 5;
}
.slider-dots button {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}
.slider-dots button.is-active { background: var(--gold); border-color: var(--gold); }

/* Bandeau de titre pour les pages intérieures (plus court que le hero) */
.page-banner {
  background: var(--navy);
  color: var(--white);
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.page-banner h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .5rem; }
.page-banner p { color: rgba(255,255,255,.72); max-width: 640px; margin-inline: auto; }

/* ---------- 6. SECTIONS DE CONTENU -------------------------------------- */
.prose p + p { margin-top: 1.1rem; }
.prose { max-width: 760px; margin-inline: auto; }
.prose h3 { color: var(--navy); margin: 2rem 0 .75rem; font-size: 1.35rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* ---------- 7. CARTES, HORAIRES, GALERIE, VIDÉOS ------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 2rem; margin-bottom: .75rem; }
.card h3 { color: var(--navy); font-size: 1.2rem; margin-bottom: .5rem; }
.card .time {
  display: block;
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--gold-dark);
  font-weight: 700;
  margin: .5rem 0;
}
.card p { color: var(--text-soft); font-size: .95rem; }

/* Galerie photos */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.gallery figure {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 3 / 2;
  background: var(--cream);
}
.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery figure:hover img { transform: scale(1.06); }

/* Vidéos YouTube en ratio 16/9 */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption { margin-top: .6rem; font-size: .95rem; color: var(--text-soft); text-align: center; }

/* Bloc "où nous trouver" */
.map-block { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; align-items: stretch; }
.map-block iframe {
  width: 100%; height: 100%; min-height: 340px;
  border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
}
.info-list { list-style: none; }
.info-list li {
  display: flex; gap: .9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.section--navy .info-list li { border-bottom-color: rgba(255,255,255,.15); }
.info-list li:last-child { border-bottom: none; }
.info-list .label {
  display: block;
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: .15rem;
}
.info-icon { font-size: 1.25rem; line-height: 1.4; }

/* ---------- 8. FORMULAIRE DE CONTACT ------------------------------------ */
.form { max-width: 620px; margin-inline: auto; }
.form-row { margin-bottom: 1.25rem; }
.form label {
  display: block;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--navy); margin-bottom: .4rem;
}
.form input, .form textarea, .form select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color var(--transition);
}
.form input:focus, .form textarea:focus { border-color: var(--gold); }
.form textarea { min-height: 160px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--text-soft); margin-top: 1rem; text-align: center; }

/* Boutons de contact rapide (téléphone / WhatsApp) */
.quick-contact { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2rem; }
.quick-contact .btn { display: inline-flex; align-items: center; gap: .5rem; }

/* ---------- 9. PIED DE PAGE --------------------------------------------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.72); padding: 3.5rem 0 1.5rem; font-size: .93rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.site-footer h4 {
  color: var(--white);
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: var(--gold); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .55rem; }
.footer-bottom {
  padding-top: 1.5rem;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
}

/* ---------- 10. RESPONSIVE ---------------------------------------------- */
@media (max-width: 900px) {
  .two-col, .map-block { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 3rem 0; }

  .nav-toggle { display: block; order: 3; }
  .lang-switch { order: 2; margin-left: auto; }

  /* Le menu se replie sous l'en-tête sur mobile */
  .nav-menu {
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    display: none;
    padding-bottom: .75rem;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a {
    display: block;
    padding: .85rem .25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .nav-menu a:hover, .nav-menu a.is-active { border-bottom-color: rgba(255,255,255,.1); color: var(--gold); }
  .nav { flex-wrap: wrap; padding-block: .5rem; }
  .nav-brand-text strong { font-size: .95rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Respect des préférences système : pas d'animation si l'utilisateur
   a activé "réduire les animations" dans son OS. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
