/* Base Reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
}
:root { --brand-orange:#fe7236; --brand-blue:#49a8eb; --brand-black:#000000; --bg:#fafafa; --text:#111111; --muted:#666666; --border:#eeeeee; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; color: var(--text); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; display: block; }

/* Layout */
.container { width: 100%; max-width: 1300px; margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section h2 { font-size: 28px; margin: 0 0 16px; color: var(--brand-black); }
.section h3 { font-size: 20px; margin: 24px 0 12px; color: var(--brand-black); }
.lead { 
  font-size: 18px;
  color: #333;
  background: #e6f5fd; color: #0b3c59; border: 1px solid #bfe7fb; padding: 20px; border-radius: 20px;
}

/* Header / Navbar */
.header { position: sticky; top: 0; z-index: 1000; background: #ffffffcc; backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.navbar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--brand-black); text-decoration: none; }
.brand img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }

.nav { display: flex; align-items: center; gap: 12px; }
.nav a { text-decoration: none; color: var(--brand-black); padding: 8px 10px; border-radius: 6px; font-weight: 500; }
.nav a:hover { background: #f2fbff; }
.nav-link { text-decoration: none; color: var(--brand-black); padding: 8px 10px; border-radius: 6px; font-weight: 500; transition: all 0.2s ease; }
.nav-link:hover { background: #f2fbff; }
.nav-link.active { background: var(--brand-blue); color: #fff; }
.nav-link.active:hover { background: #3a97d8; }
.button { padding: 10px 14px; border-radius: 8px; border: 1px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; background-color: #e7edf3; }
.button.primary { background: var(--brand-blue); color: #fff; }
.button.primary:hover { background: #3a97d8; }
.button.danger { background: var(--brand-orange); color: #fff; }
.button.danger:hover { background: #e56228; }

/* Burger */
.burger { display: none; width: 40px; height: 40px; border: 1px solid #e5e7eb; border-radius: 8px; align-items: center; justify-content: center; background: #fff; }
.burger span { width: 20px; height: 2px; background: var(--brand-black); position: relative; display: block; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: var(--brand-black); }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }

/* Hero - Style par défaut pour toutes les pages */
.hero { 
  padding: 64px 0 40px; 
  background: linear-gradient(180deg, #fff, #f7fbfe); 
  border-bottom: 1px solid var(--border);
}

.hero h1 { 
  margin: 0 0 12px; 
  font-size: 34px; 
  color: var(--brand-black);
}

.hero p { 
  margin: 0 0 20px; 
  color: #333;
}

.hero-actions { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap;
}

/* Hero spécial pour la page d'accueil uniquement */
body:has(.hero-background) .hero,
.hero.has-background { 
  position: relative;
  padding: 120px 0 80px; 
  background: linear-gradient(180deg, #fff, #f7fbfe); 
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  min-height: 500px;
  display: flex;
  align-items: center;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(73, 168, 235, 0.8), rgba(254, 114, 54, 0.8));
  z-index: 2;
}

body:has(.hero-background) .hero .container,
.hero.has-background .container {
  position: relative;
  z-index: 3;
  text-align: center;
  color: #fff;
}

body:has(.hero-background) .hero h1,
.hero.has-background h1 { 
  margin: 0 0 12px; 
  font-size: 42px; 
  color: #fff; 
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  font-weight: 700;
}

body:has(.hero-background) .hero p,
.hero.has-background p { 
  margin: 0 0 20px; 
  color: #fff; 
  font-size: 18px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

body:has(.hero-background) .hero .lead,
.hero.has-background .lead {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  text-shadow: none;
}

body:has(.hero-background) .hero-actions,
.hero.has-background .hero-actions { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap;
  justify-content: center;
}

body:has(.hero-background) .hero .badge,
.hero.has-background .badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

/* Grids */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.card-body { padding: 16px; }
.card-title { font-size: 18px; margin: 0 0 6px; color: var(--brand-black); }
.card-sub { font-size: 14px; color: #555; margin: 0 0 10px; }
.card-actions { padding: 0 16px 16px; }

/* Lists */
.list { margin: 0; padding-left: 18px; }
.list li { margin: 6px 0; }

/* Footer */
.footer { padding: 28px 0; border-top: 1px solid var(--border); color: #444; background: #fff; }
.footer .meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Utilities */
.muted { color: var(--muted); }
.center { text-align: center; }
.badge { display: inline-block; background: #e6f5fd; color: #0b3c59; border: 1px solid #bfe7fb; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.spacer { height: 16px; }

/* Responsive */
@media (max-width: 900px) {
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1285px) {
  .nav { position: fixed; inset: 64px 0 auto 0; background: #fff; padding: 12px 16px 20px; border-bottom: 1px solid var(--border); display: none; flex-direction: column; align-items: stretch; gap: 6px; }
  .nav.open { display: flex; }
  .burger { display: inline-flex; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  
  /* Hero responsive - uniquement pour la page d'accueil */
  body:has(.hero-background) .hero,
  .hero.has-background {
    padding: 80px 0 60px;
    min-height: 400px;
  }
  
  body:has(.hero-background) .hero h1,
  .hero.has-background h1 {
    font-size: 28px;
  }
  
  body:has(.hero-background) .hero p,
  .hero.has-background p {
    font-size: 16px;
  }
  
  body:has(.hero-background) .hero-actions,
  .hero.has-background .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  body:has(.hero-background) .hero-actions .button,
  .hero.has-background .hero-actions .button {
    width: 100%;
    max-width: 280px;
  }
}

/* Réseau - Structure du Réseau */
.structure { padding: 56px 0; background: #fff; border-top: 1px solid var(--border); }
.structure .intro { max-width: 850px; }
.structure h2 { font-size: 28px; margin: 0 0 16px; color: var(--brand-black); }
.roles { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.role { background: #ffffff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; transition: transform .15s ease, box-shadow .15s ease; }
.role:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.role .title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-black); }
.role .title .dot { width: 10px; height: 10px; border-radius: 999px; background: var(--brand-blue); border: 2px solid #cfe9f9; }
.role p { margin: 8px 0 0; color: #333; }
.structure .highlight { background: #fff7f3; border: 1px solid #ffd9c8; color: #6a2b10; padding: 16px; border-radius: 12px; }
.structure .badge-mono { display: inline-block; background: #121212; color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .2px; }
@media (max-width: 900px) { .roles { grid-template-columns: 1fr; } }

/* Org chart */
.org { padding: 56px 0; }
.org h1 { margin: 0 0 16px; color: var(--brand-black); }
.org-tree { --gap: 24px; display: grid; gap: var(--gap); }
.org-level { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; position: relative; }
.org-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; width: 220px; overflow: hidden; text-align: center; transition: transform .15s ease, box-shadow .15s ease; }
.org-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
.org-card img { width: 100%; height: 140px; object-fit: cover; background: #f2f6f9; }
.org-card .body { padding: 12px; }
.org-card .name { font-weight: 700; color: var(--brand-black); margin: 0 0 4px; }
.org-card .role { font-size: 13px; color: #555; }
/* connectors */
.org-level.connect:before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; background: linear-gradient(to right, transparent 0, transparent 49%, var(--brand-blue) 49%, var(--brand-blue) 51%, transparent 51%, transparent 100%); opacity: .35; }
.org-line { width: 2px; height: 24px; background: var(--brand-blue); margin: 0 auto; opacity: .35; }

@media (max-width: 680px) { .org-card { width: 100%; max-width: 360px; } }

/* Partner logos */
.logo-box { display: flex; align-items: center; justify-content: center; padding: 12px; background: #f7fbfe; border-bottom: 1px solid var(--border); }
.logo-box img { max-width: 100%; max-height: 56px; object-fit: contain; }

/* Gallery */
.gallery { padding: 56px 0; }
.gallery h1 { margin: 0 0 16px; color: var(--brand-black); }
.gallery-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.gallery-item { position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .overlay { position: absolute; inset: 0; background: linear-gradient(transparent, rgba(0,0,0,0.7)); display: flex; align-items: flex-end; padding: 16px; opacity: 0; transition: opacity .3s ease; }
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item .title { color: #fff; font-weight: 600; margin: 0; }
.gallery-item .subtitle { color: #ccc; font-size: 14px; margin: 4px 0 0; }

@media (max-width: 680px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
  .gallery-item { aspect-ratio: 3/2; }
}

/* Content Alternate Sections */
.content-alternate {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
  padding: 32px 0;
}

.content-alternate:last-child {
  margin-bottom: 0;
}

.content-alternate.reverse {
  direction: rtl;
}

.content-alternate.reverse > * {
  direction: ltr;
}

.content-image {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-image:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.section-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.content-image:hover .section-image {
  transform: scale(1.05);
}

.content-text {
  padding: 0 16px;
}

.content-text h2 {
  font-size: 32px;
  margin: 0 0 20px;
  color: var(--brand-black);
  position: relative;
}

.content-text h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-orange));
  border-radius: 2px;
}

.content-text p {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  margin: 0 0 16px;
}

.content-text ul {
  margin: 16px 0;
  padding-left: 20px;
}

.content-text li {
  margin: 8px 0;
  line-height: 1.6;
  color: #444;
}

.content-text strong {
  color: var(--brand-black);
  font-weight: 600;
}

/* Responsive for Content Alternate */
@media (max-width: 900px) {
  .content-alternate {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 48px;
  }
  
  .content-alternate.reverse {
    direction: ltr;
  }
  
  .content-text {
    padding: 0;
    order: 1;
  }
  
  .content-image {
    order: 2;
  }
  
  .content-text h2 {
    font-size: 28px;
  }
  
  .section-image {
    height: 250px;
  }
}

@media (max-width: 680px) {
  .content-alternate {
    gap: 24px;
    margin-bottom: 40px;
    padding: 20px 0;
  }
  
  .content-text h2 {
    font-size: 24px;
    margin: 0 0 16px;
  }
  
  .content-text p {
    font-size: 15px;
  }
  
  .section-image {
    height: 200px;
  }
  
  .content-image {
    border-radius: 12px;
  }
}


.footer {
  background: #f8f9fa;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h3 {
  color: var(--brand-blue, #007bff);
  margin-bottom: 20px;
  font-size: 1.2em;
  border-bottom: 2px solid var(--brand-blue, #007bff);
  padding-bottom: 8px;
}

.contact-info, .opening-hours, .quick-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item, .hours-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.contact-icon {
  font-size: 1.2em;
  color: var(--brand-blue, #007bff);
  min-width: 24px;
}

.day {
  font-weight: 600;
  min-width: 120px;
}

.time {
  color: #666;
}

.hours-item.highlight {
  background: #e8f4fd;
  padding: 10px;
  border-radius: 6px;
  border-left: 4px solid var(--brand-blue, #007bff);
}

.hours-item.highlight .time {
  color: var(--brand-blue, #007bff);
  font-weight: 600;
}

.quick-links a {
  color: #666;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.3s;
}

.quick-links a:hover {
  color: var(--brand-blue, #007bff);
}

.footer-bottom {
  border-top: 1px solid #dee2e6;
  padding-top: 20px;
}

.footer-bottom .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-bottom .meta {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}