/* =========================================
   BDE Centrale Méditerranée - Style global
   ========================================= */

/* --- Variables --- */
:root {
  --bleu:    #2a61a8;
  --cyan:    #39bee6;
  --orange:  #ee8015;
  --noir:    #000000;
  --blanc:   #ffffff;
  --gris-clair: #f5f5f5;
  --gris:    #666666;
  --radius:  6px;
  --shadow:  0 2px 12px rgba(0,0,0,0.12);
  --font:    'Montserrat', sans-serif;
  --nav-h:   70px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 15px; line-height: 1.7; color: var(--noir); background: var(--blanc); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bleu); text-decoration: none; transition: color .2s; }
a:hover { color: var(--orange); }
ul { list-style: none; }
h1, h2, h3, h4, h5 { font-family: var(--font); line-height: 1.3; color: var(--bleu); }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; margin-bottom: .8rem; }
h3 { font-size: 1.2rem; margin-bottom: .4rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* --- Topbar --- */
#topbar {
  background: var(--bleu);
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--blanc);
}
#topbar a { color: var(--blanc); display: flex; align-items: center; gap: 6px; }
#topbar a:hover { color: var(--cyan); }
.topbar-left { display: flex; gap: 20px; }
.topbar-right { display: flex; gap: 14px; }
.topbar-right a { font-size: 15px; }

/* --- Header / Navigation --- */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(42, 97, 168, 0.96);
  backdrop-filter: blur(6px);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#header .nav-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#header .logo img { height: 50px; width: auto; }
#header .logo:hover { opacity: .9; }

/* Nav links */
#nav { display: flex; align-items: center; gap: 4px; }
#nav > li { position: relative; }
#nav > li > a {
  display: block;
  padding: 0 14px;
  height: var(--nav-h);
  line-height: var(--nav-h);
  color: var(--blanc);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s;
}
#nav > li > a:hover,
#nav > li.active > a { color: var(--cyan); }

/* Dropdown */
#nav > li.has-dropdown:hover > .dropdown,
#nav > li.has-dropdown:focus-within > .dropdown { display: block; }
.dropdown {
  display: none;
  position: absolute;
  top: calc(var(--nav-h) - 4px);
  left: 0;
  min-width: 220px;
  background: var(--blanc);
  border-top: 3px solid var(--cyan);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
}
.dropdown li a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bleu);
  border-bottom: 1px solid #f0f0f0;
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: var(--bleu); color: var(--blanc); }

/* Hamburger */
#nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--blanc);
  border-radius: var(--radius);
  color: var(--blanc);
  padding: 6px 10px;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

/* --- Mobile nav --- */
@media (max-width: 820px) {
  #nav-toggle { display: block; }
  #nav {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bleu);
    flex-direction: column;
    align-items: stretch;
    padding: 70px 0 20px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    overflow-y: auto;
    gap: 0;
  }
  #nav.open { display: flex; }
  #nav > li > a { height: auto; line-height: 1.4; padding: 14px 20px; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .dropdown { display: block; position: static; border-top: none; box-shadow: none; background: rgba(0,0,0,0.2); border-radius: 0; }
  .dropdown li a { color: var(--blanc); padding: 10px 30px; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 13px; }
  .dropdown li a:hover { background: rgba(255,255,255,0.1); }
  #topbar .topbar-left { display: none; }
}

/* --- Page header --- */
.page-header {
  background: var(--bleu);
  padding: 50px 24px;
  text-align: center;
  color: var(--blanc);
}
.page-header h1 { color: var(--blanc); font-size: 2.4rem; }

/* --- Hero (home) --- */
#hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  color: var(--blanc);
}
#hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
#hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1;
}
#hero .hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 24px;
  max-width: 800px;
}
#hero h1 { color: var(--blanc); font-size: 2.8rem; margin-bottom: .5rem; }
#hero .hero-sub { font-size: 1.1rem; margin-bottom: 2rem; opacity: .9; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-buttons a {
  padding: 10px 24px;
  border: 2px solid var(--blanc);
  border-radius: 30px;
  color: var(--blanc);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.hero-buttons a:hover { background: var(--blanc); color: var(--bleu); }

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

/* --- Section --- */
section.section { padding: 60px 0; }
section.section:nth-child(even) { background: var(--gris-clair); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 2rem; position: relative; display: inline-block; }
.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--orange);
  margin: 8px auto 0;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  transition: background .2s, color .2s, border-color .2s;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.btn-primary:hover { background: var(--cyan); border-color: var(--cyan); color: var(--blanc); }
.btn-outline { background: transparent; color: var(--bleu); border-color: var(--bleu); }
.btn-outline:hover { background: var(--bleu); color: var(--blanc); }

/* --- Cards --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.card-img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 20px; }
.card-body h3 { color: var(--bleu); margin-bottom: .4rem; }
.card-body p { font-size: 14px; color: var(--gris); }

/* --- Photo gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 20px 0;
}
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 1; }
.gallery a img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.05); }

/* --- Commission section --- */
.commission {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  align-items: start;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e0e0e0;
}
.commission:last-child { border-bottom: none; }
.commission:nth-child(even) { direction: rtl; }
.commission:nth-child(even) > * { direction: ltr; }
.commission-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.commission-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.commission-logo { width: 120px; margin-bottom: 16px; }
.commission-contact { margin-top: 12px; font-size: 14px; color: var(--gris); }
.commission-contact a { color: var(--bleu); }

@media (max-width: 700px) {
  .commission { grid-template-columns: 1fr; direction: ltr; }
  .commission:nth-child(even) { direction: ltr; }
}

/* --- Contacts --- */
.contacts-section { margin-bottom: 50px; }
.contacts-section h2 { margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--orange); }
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.contact-card {
  background: var(--gris-clair);
  border-radius: var(--radius);
  padding: 16px 18px;
  border-left: 4px solid var(--bleu);
}
.contact-card h3 { font-size: 1rem; color: var(--noir); margin-bottom: 2px; }
.contact-card .role { font-size: 13px; color: var(--bleu); font-weight: 600; margin-bottom: 6px; }
.contact-card a { font-size: 13px; color: var(--gris); display: block; }
.contact-card a:hover { color: var(--orange); }
.contact-card .phone { font-size: 13px; color: var(--gris); }

/* --- Partners --- */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.partner-card {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}
.partner-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.partner-logo {
  width: 120px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 16px;
}
.partner-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.partner-card p { font-size: 14px; color: var(--gris); }
.partner-code {
  display: inline-block;
  margin-top: 10px;
  background: var(--bleu);
  color: var(--blanc);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* --- Social links --- */
.social-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.social-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  border: 2px solid var(--bleu);
  color: var(--bleu);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.social-links a:hover { background: var(--bleu); color: var(--blanc); }
.social-links a i { font-size: 18px; }

/* --- Two-columns layout --- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
}

/* --- Home sections --- */
.home-section { padding: 60px 0; }
.home-section:nth-child(odd) { background: var(--gris-clair); }
.home-section h2 { font-size: 2rem; margin-bottom: 20px; }

.president-quote {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.9;
  color: #333;
  border-left: 4px solid var(--orange);
  padding-left: 20px;
  margin: 16px 0;
}
.president-name { font-weight: 700; color: var(--bleu); }

/* --- Useful links --- */
.links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.links-grid a {
  padding: 8px 20px;
  border-radius: 30px;
  background: var(--bleu);
  color: var(--blanc);
  font-size: 14px;
  font-weight: 500;
  transition: background .2s;
}
.links-grid a:hover { background: var(--cyan); }

/* --- Logo organigram --- */
.img-responsive { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; }
.img-caption { text-align: center; font-size: 13px; color: var(--gris); margin-top: 6px; }

/* --- Video section --- */
.video-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-wrap video { width: 100%; display: block; }

/* --- Contact form --- */
.contact-form { max-width: 600px; margin: 0 auto; }
.contact-form .field { margin-bottom: 16px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color .2s;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--bleu); }
.contact-form textarea { height: 140px; resize: vertical; }
.contact-form .checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.contact-form .checkbox input { width: auto; margin-top: 3px; }
.contact-form .submit { text-align: right; }

/* --- Info box --- */
.info-box {
  background: var(--gris-clair);
  border-left: 4px solid var(--cyan);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
}
.info-box p { margin: 0; }

/* --- Partenariat contact card --- */
.partner-contact {
  background: var(--gris-clair);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  max-width: 360px;
}
.partner-contact h3 { color: var(--bleu); margin-bottom: 4px; }
.partner-contact .role { color: var(--orange); font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.partner-contact a { display: block; margin: 6px 0; color: var(--bleu); font-size: 14px; }
.partner-contact a:hover { color: var(--orange); }
.partner-contact .phone { font-size: 15px; font-weight: 600; color: var(--noir); }

/* --- Legal page --- */
.legal-section { margin-bottom: 40px; }
.legal-section h2 { font-size: 1.4rem; border-bottom: 2px solid var(--bleu); padding-bottom: 10px; margin-bottom: 16px; }
.legal-section h3 { font-size: 1.1rem; color: var(--noir); margin: 20px 0 8px; }
.address-block { font-size: 14px; color: var(--gris); line-height: 2; }
.credits-list { font-size: 14px; color: var(--gris); line-height: 2; }

/* --- Footer --- */
#footer {
  background: var(--blanc);
  border-top: 1px solid #e0e0e0;
  padding: 20px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--bleu);
}
#footer a { color: var(--bleu); font-weight: 600; }
#footer a:hover { color: var(--orange); }

/* --- Admissibles contact --- */
.admit-contact {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 16px;
}
.admit-contact-card {
  text-align: center;
  background: var(--gris-clair);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 180px;
}
.admit-contact-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 3px solid var(--bleu);
}
.admit-contact-card h4 { font-size: 14px; margin-bottom: 4px; }
.admit-contact-card a { font-size: 13px; color: var(--bleu); display: block; }

/* --- Evenements section header --- */
.event-section { margin-bottom: 60px; }
.event-section h2 { font-size: 2rem; margin-bottom: 6px; border-left: 5px solid var(--orange); padding-left: 16px; }
.event-video { margin-bottom: 30px; }

/* --- Housing section --- */
.housing-list { margin: 10px 0 20px 20px; list-style: disc; }
.housing-list li { margin-bottom: 8px; font-size: 15px; }
.housing-list a { color: var(--bleu); font-weight: 500; }
.housing-list a:hover { color: var(--orange); }

/* --- Responsive helpers --- */
@media (max-width: 600px) {
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
  #hero h1 { font-size: 1.9rem; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .contacts-grid { grid-template-columns: 1fr; }
  .commission-gallery { grid-template-columns: repeat(2, 1fr); }
  .section-title h2 { font-size: 1.6rem; }
}
