/* AMI Association - Stylesheet */
/* Mobile-first, modern, airy design */

:root {
  --primary: #00A3E0;
  --primary-dark: #0082b3;
  --secondary: #C9A227;
  --gold: #D4AF37;
  --brown: #8B6B3D;
  --dark: #2C3E50;
  --light: #F7F9FC;
  --white: #ffffff;
  --gray: #6c757d;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
  --font: 'Poppins', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* Header */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brown);
}
.logo img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
nav a {
  color: var(--dark);
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
nav a:hover, nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--dark);
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
  background: linear-gradient(135deg, rgba(0,163,224,0.75), rgba(139,107,61,0.6)), url('../images/hero-enfants.jpg') center/cover no-repeat;
  padding: 4rem 1.5rem;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.hero p {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  opacity: 0.95;
}
.btn {
  display: inline-block;
  background: var(--secondary);
  color: var(--white);
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.2s, background 0.2s;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--gold); transform: translateY(-2px); color: var(--white); }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }

/* Sections */
section { padding: 4rem 1.2rem; }
.container { max-width: 1100px; margin: 0 auto; }
h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--dark);
}
.subtitle {
  text-align: center;
  color: var(--gray);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--secondary);
  margin: 0.8rem auto 0;
  border-radius: 2px;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}
.card:hover { transform: translateY(-6px); }
.card h3 { color: var(--primary); margin-bottom: 0.6rem; font-size: 1.25rem; }
.card p { color: var(--gray); }

/* Bureau */
.bureau-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}
.member {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.member h4 { margin: 0.5rem 0 0.2rem; }
.member .role { color: var(--primary); font-weight: 600; font-size: 0.95rem; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.8rem;
}
.gallery-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-grid img:hover { transform: scale(1.04); box-shadow: 0 6px 15px rgba(0,0,0,0.15); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
}
.lb-controls {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}
.lb-controls button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
}
.lb-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

/* Forms */
form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
}
.form-group { margin-bottom: 1.2rem; }
label { display: block; margin-bottom: 0.4rem; font-weight: 500; }
input, textarea, select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}
textarea { min-height: 120px; resize: vertical; }
.rib-box {
  background: #f0f8ff;
  border-left: 4px solid var(--primary);
  padding: 1.2rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-family: monospace;
  line-height: 1.8;
}

/* Footer */
footer {
  background: var(--dark);
  color: #eee;
  padding: 2.5rem 1.2rem 1.5rem;
  text-align: center;
}
footer a { color: var(--secondary); }
.footer-links { margin: 1rem 0; display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }

/* Responsive */
@media (min-width: 768px) {
  .hero h1 { font-size: 3.2rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .bureau-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .gallery-grid img { height: 200px; }
  .menu-toggle { display: none; }
}
@media (max-width: 767px) {
  .menu-toggle { display: block; }
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem;
  }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: 0.8rem; }
}
