/* ================================================
   CSS - Résidence Espace Commun - Art Nouveau
   ================================================ */

/* --- Polices Google Art Nouveau --- */
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+French+Canon:ital@0;1&display=swap');

/* --- Variables de couleurs Art Nouveau --- */
:root {
  --gold: #c9a66b;
  --ivory: #f8f4e3;
  --dark-green: #2b3a33;
  --overlay-opacity: 0.4;
}

/* --- Reset & Base --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'IM Fell French Canon', serif;
  color: var(--dark-green);
}

/* ================================================
   SLIDESHOW BACKGROUND
   Fond fixe avec diaporama d'images (transition fluide)
   ================================================ */
.slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  /* Transition douce entre images (2s) */
  transition: background-image 2s ease-in-out;
  z-index: -2;
}

/* Voile blanc semi-transparent sur le slideshow
   Crée une ambiance douce et lisible */
.slideshow .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, var(--overlay-opacity));
  z-index: -1;
}

/* ================================================
   MENU NAVIGATION ART NOUVEAU
   Barre fixe en haut, style festonné
   ================================================ */
.menu-art-nouveau {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(248, 244, 227, 0.85);
  padding: 10px 25px;
  border: 2px solid var(--gold);
  border-radius: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.menu-art-nouveau ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

.menu-art-nouveau li a {
  text-decoration: none;
  font-size: 1.1rem;
  color: var(--dark-green);
  position: relative;
  padding: 5px 10px;
  transition: color 0.3s;
  cursor: pointer;
}

/* Lignes décoratives Art Nouveau au survol (dessus/dessous) */
.menu-art-nouveau li a::before,
.menu-art-nouveau li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: width 0.3s ease;
}

.menu-art-nouveau li a::before { top: 0; left: 0; }
.menu-art-nouveau li a::after  { bottom: 0; right: 0; }

.menu-art-nouveau li a:hover {
  color: var(--gold);
}

.menu-art-nouveau li a:hover::before,
.menu-art-nouveau li a:hover::after {
  width: 100%;
}

/* ================================================
   ZONE CONTENU PRINCIPAL
   Contenu par-dessus le slideshow
   ================================================ */
.content {
  position: relative;
  z-index: 1;
  padding: 120px 20px 80px;
  text-align: center;
  min-height: 100vh;
}

.content h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  color: var(--gold);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
}

/* ================================================
   BOUTON ACCÈS AU FORUM
   Style Art Nouveau avec effet hover
   ================================================ */
.btn-forum {
  display: inline-block;
  margin: 30px auto 45px;
  padding: 14px 35px;
  font-family: 'IM Fell French Canon', serif;
  font-size: 1.2rem;
  color: var(--ivory);
  background: var(--dark-green);
  border: 2px solid var(--gold);
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-forum:hover {
  background: var(--gold);
  color: var(--dark-green);
}

/* ================================================
   SECTIONS COMMUNES
   Styles partagés par Annonces et Calendrier
   ================================================ */
section {
  max-width: 750px;
  margin: 0 auto 60px;
  padding: 30px 25px;
  background: rgba(248, 244, 227, 0.88);
  border: 2px solid var(--gold);
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

section h2 {
  font-size: 2rem;
  color: var(--dark-green);
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}

/* ================================================
   SECTION ANNONCES
   Cartes de petites annonces (titre + texte)
   ================================================ */
#announcements-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

/* Carte individuelle d'annonce */
.announcement-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--gold);
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.announcement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(201, 166, 107, 0.3);
}

.announcement-card h3 {
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.announcement-card p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--dark-green);
}

/* ================================================
   SECTION CALENDRIER AGENDA
   Liste chronologique d'événements
   ================================================ */
#events-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

/* Sous-titre de séparation passé/futur */
.events-category {
  font-size: 1rem;
  color: var(--gold);
  margin: 15px 0 10px;
  padding-left: 5px;
  font-style: italic;
}

/* Item d'événement (une ligne date + texte) */
.event-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 15px 15px 15px 20px;
  background: rgba(255, 255, 255, 0.5);
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  transition: background 0.2s;
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Date de l'événement (à gauche, dorée) */
.event-date {
  min-width: 150px;
  font-size: 1rem;
  color: var(--gold);
  font-weight: bold;
  flex-shrink: 0;
}

/* Commentaire de l'événement (à droite) */
.event-comment {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--dark-green);
}

/* --- Événements passés (estompés) --- */
.event-item.past {
  opacity: 0.55;
  border-left-color: #a89060; /* or plus léger */
}

.event-item.past .event-date {
  color: #a89060;
}

/* ================================================
   MESSAGE D'ERREUR
   Affiché si les JSON ne chargent pas
   ================================================ */
.error-msg {
  color: #8b4513;
  font-size: 1.1rem;
  font-style: italic;
  padding: 15px;
  background: rgba(255, 230, 200, 0.6);
  border: 1px dashed var(--gold);
  border-radius: 10px;
  text-align: center;
}