/* ==========================================================
   EBV – Feuille de style principale (refonte clean & aérée)
   ========================================================== */

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

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  color: #0f172a;
  background: #f9fafb;
  line-height: 1.6;
}

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

/* ---------- CONTAINER ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- TOPBAR ---------- */
.topbar {
  position: sticky;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  z-index: 10;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  text-decoration: none;
  color: #0f172a;
}

.brand img {
  height: 34px;
}

.brand span {
  font-weight: 600;
  color: #475569;
}

/* ---------- MENU ---------- */
.menu-wrap {
  position: relative;
}

.menu-btn {
  background: #16a34a;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.menu-btn:hover {
  background: #15803d;
}

.menu-dropdown {
  position: absolute;
  right: 0;
  top: 115%;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  display: none;
  overflow: hidden;
}

.menu-wrap.open .menu-dropdown {
  display: block;
}

.menu-dropdown a {
  display: block;
  padding: 12px 16px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}

.menu-dropdown a:hover {
  background: #f1f5f9;
}

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(135deg, #e8fff0, #ecf7ff);
  padding: 56px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.1rem;
  margin-bottom: 0.5rem;
}

.hero p {
  color: #475569;
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 48px 0;
}

.section.alt {
  background: #f8fafc;
}

/* ---------- GRILLE ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

/* ---------- CARTES GÉNÉRIQUES ---------- */
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

/* Padding interne sans toucher aux images */
.card > *:not(img) {
  padding-left: 22px;
  padding-right: 22px;
}

.card h3 {
  margin: 1.1rem 0 0.5rem;
  font-size: 1.15rem;
}

.card p {
  margin: 0.5rem 0;
}

.card .meta {
  font-size: 0.95rem;
  color: #475569;
}

.event-price {
  margin: 0.5rem 0 1.2rem;
  font-weight: 800;
  color: #16a34a;
}

/* ---------- IMAGES ---------- */
.event-img,
.album-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #e5e7eb;
}

/* ---------- BOUTONS ---------- */
.btn {
  display: inline-block;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  background: #16a34a;
  color: #ffffff;
  transition: background 0.2s ease;
}

.btn:hover {
  background: #0d8a38;
}

.btn.secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn.small {
  font-size: 0.85rem;
  padding: 8px 14px;
}

/* ---------- FOOTER ---------- */
.footer {
  background: #0b1220;
  color: #cbd5e1;
  padding: 32px 0;
  text-align: center;
}

/* ---------- ADMIN ---------- */
.admin-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 28px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.admin-container h1,
.admin-container h2,
.admin-container h3 {
  margin-bottom: 14px;
}

.admin-container input,
.admin-container select,
.admin-container textarea,
.admin-container input[type=file] {
  width: 100%;
  max-width: 480px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  margin-bottom: 14px;
}

/* ---------- ALBUMS ---------- */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.album-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.album-card img {
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}

/* ---------- ACTIONS ---------- */
.actions {
  margin-top: 12px;
}

.actions a {
  display: inline-block;
  margin: 4px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  color: #ffffff;
  background: #16a34a;
  text-decoration: none;
}

.actions a.delete {
  background: #b91c1c;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .nav {
    flex-direction: column;
    gap: 10px;
    height: auto;
    padding: 12px 0;
  }

  .menu-btn {
    width: 100%;
  }

  .menu-dropdown {
    position: static;
    width: 100%;
    margin-top: 6px;
  }

  .grid {
    gap: 22px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 14px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .section {
    padding: 28px 0;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .album-card img {
    height: 160px;
  }
}

@media (max-width: 400px) {
  html {
    font-size: 15px;
  }

  .brand span {
    display: none;
  }

  .menu-btn {
    font-size: 0.9rem;
  }
}

/* ==========================================================
   CORRECTION ESPACEMENT CARTES – PAGE ACCUEIL EBV
   (force padding interne, sans casser le layout)
   ========================================================== */

/* Cartes événements page accueil */
.event-card,
.event,
.card {
  padding-bottom: 14px;
}

/* Tout le contenu texte à l’intérieur des cartes */
.event-card > *:not(img),
.event > *:not(img),
.card > *:not(img) {
  padding-left: 20px;
  padding-right: 20px;
}

/* Paragraphes plus respirants */
.event-card p,
.event p,
.card p {
  margin: 0.6rem 0;
  line-height: 1.6;
}

/* Titre mieux détaché */
.event-card h3,
.event h3,
.card h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================
   FIX RÉEL – CARTES PAGE ACCUEIL EBV
   (ciblage structurel, pas par classe)
   ========================================================== */

/* Chaque carte = enfant direct de .grid */
.grid > div {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

/* Padding pour tout le contenu sauf l’image */
.grid > div > *:not(img) {
  padding-left: 20px;
  padding-right: 20px;
}

/* Espacement vertical */
.grid > div > h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.grid > div > p {
  margin: 0.6rem 0;
  line-height: 1.6;
}

/* Espace en bas de carte */
.grid > div::after {
  content: "";
  display: block;
  height: 14px;
}
