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

:root {
  --primary: #2c3e50;
  --secondary: #e74c3c;
  --accent: #3498db;
  --light: #f5f5f5;
  --white: #ffffff;
}

body { font-family: 'Arial', sans-serif; background: var(--light); color: #333; }

/* HEADER */
header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 30px 20px;
  text-align: center;
}
header h1 { font-size: 2.2em; margin-bottom: 8px; }
header p { opacity: 0.8; font-size: 1.1em; }

/* NAV */
nav {
  background: var(--primary);
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
nav a {
  color: white;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.9em;
  transition: all 0.3s;
}
nav a:hover, nav a.active { background: var(--secondary); transform: scale(1.05); }

/* MAIN */
main { max-width: 960px; margin: 0 auto; padding: 20px; }

h2 { color: var(--primary); margin: 25px 0 15px; font-size: 1.6em; border-left: 4px solid var(--secondary); padding-left: 12px; }

/* CARDS */
.card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.card:hover { transform: translateY(-3px); }
.card h3 { color: var(--accent); margin-bottom: 8px; }

/* CAROUSEL */
.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}
.carousel-track img {
  min-width: 100%;
  height: 250px;
  object-fit: cover;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2em;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s;
}
.carousel-btn:hover { background: white; }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--white);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s;
}
.dot.active { background: var(--secondary); }

/* GRID GALERIE */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.grid img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.grid img:hover { transform: scale(1.05); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }

/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 80vh; border-radius: 8px; }
.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  color: white;
  font-size: 2em;
  cursor: pointer;
  background: none;
  border: none;
}

/* COMPTEUR */
.counter {
  text-align: center;
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
#count {
  font-size: 4em;
  font-weight: bold;
  color: var(--secondary);
  display: block;
  margin: 10px 0;
}
.btn {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 12px 28px;
  font-size: 1em;
  border-radius: 25px;
  cursor: pointer;
  margin: 5px;
  transition: all 0.3s;
}
.btn:hover { background: #c0392b; transform: scale(1.05); }
.btn.reset { background: #95a5a6; }
.btn.reset:hover { background: #7f8c8d; }

/* ACCORDION */
.accordion { margin: 20px 0; }
.accordion-item { background: var(--white); border-radius: 8px; margin-bottom: 8px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.accordion-header {
  padding: 15px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  color: var(--primary);
  transition: background 0.3s;
}
.accordion-header:hover { background: #f0f4f8; }
.accordion-header .icon { transition: transform 0.3s; font-size: 1.2em; }
.accordion-header.open .icon { transform: rotate(45deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; padding: 0 20px; }
.accordion-body.open { max-height: 200px; padding: 15px 20px; }

/* FOOTER */
footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 25px;
  margin-top: 40px;
}
