/* ===============================
   CHARTE GRAPHIQUE
   Lycée Joséphine Baker
   =============================== */

/* ----- Palette officielle ----- */
:root {
  --bleu-nuit:     #1C2A48;
  --or:            #D4AF37;
  --rouge-profond: #8B1E3F;
  --blanc:         #FFFFFF;
  --gris-clair:    #F4F4F4;
  --max-width:     1100px;
}

/* ----- Polices ----- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Montserrat:wght@400;600;700&family=Open+Sans:wght@300;400;600;700&display=swap');

/* ----- Reset & base ----- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Open Sans", sans-serif;
  background-color: var(--gris-clair);
  color: var(--bleu-nuit);
  line-height: 1.6;
}

/* ====== HEADER ====== */
header {
  background-color: var(--blanc);
}

/* ----- Bloc institutionnel ----- */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  border-bottom: 4px solid var(--or);
}

.header-left h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  color: var(--bleu-nuit);
}

.header-left .subtext {
  margin: 4px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rouge-profond);
  letter-spacing: 0.03em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo-region {
  height: 80px;
  object-fit: contain;
}

.logo-academie {
  height: 75px;
  object-fit: contain;
}

/* ----- Navigation principale ----- */
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bleu-nuit);
  padding: 0 30px;
}

.nav-menu {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  color: var(--blanc);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 16px 14px;
  display: block;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus,
.nav-menu a.active {
  color: var(--or);
  outline: none;
}

/* Sous-menus */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bleu-nuit);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  min-width: 230px;
  border-top: 3px solid var(--or);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  z-index: 1000;
}

.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {
  display: block;
}

/* Sous-sous-menus */
.submenu-right {
  top: 0;
  left: 100%;
  border-top: none;
  border-left: 3px solid var(--or);
}

.submenu a {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 400;
  white-space: nowrap;
}

.submenu a:hover,
.submenu a:focus {
  background-color: var(--or);
  color: var(--bleu-nuit);
}

/* ----- Logo ENT ----- */
.nav-right a {
  display: flex;
  align-items: center;
}

.ent-logo {
  height: 28px;
  object-fit: contain;
  background-color: var(--blanc);
  border-radius: 4px;
  padding: 3px 6px;
}

/* ====== HERO IMAGE ====== */
.hero-image {
  width: 90%;
  height: 400px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ====== CONTENU PRINCIPAL ====== */
main {
  max-width: var(--max-width);
  margin: 40px auto;
  padding: 0 20px;
}

section {
  background: var(--blanc);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 40px;
  margin-bottom: 24px;
}

section h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  color: var(--bleu-nuit);
  border-left: 5px solid var(--or);
  padding-left: 14px;
  margin-top: 0;
}

section p {
  font-size: 1.05rem;
  color: #333;
}

/* ====== FOOTER ====== */
footer {
  background-color: var(--bleu-nuit);
  color: var(--blanc);
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

footer p {
  margin: 0;
}

/* ====== PAGE SPÉCIALITÉS ====== */

.page-title {
  background: linear-gradient(135deg, var(--bleu-nuit) 0%, #1C2A48 100%);
  padding: 50px 40px;
  text-align: center;
  border-bottom: 4px solid var(--or);
}

.page-title h2 {
  font-family: "Playfair Display", serif;
  color: var(--blanc);
  font-size: 2.2rem;
  margin: 0 0 10px;
  border: none;
  padding: 0;
}

.page-title p {
  color: var(--or);
  font-size: 1rem;
  margin: 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Grille de boutons */
.specialites-wrapper {
  max-width: var(--max-width);
  margin: 50px auto 0;
  padding: 0 20px;
}

.specialites-wrapper h3 {
  font-family: "Playfair Display", serif;
  color: var(--bleu-nuit);
  font-size: 1.3rem;
  border-left: 5px solid var(--or);
  padding-left: 14px;
  margin: 0 0 28px;
}

.specialites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 50px;
}

.btn-specialite {
  background-color: var(--blanc);
  border: 2px solid var(--bleu-nuit);
  color: var(--bleu-nuit);
  font-family: "Open Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 16px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.btn-specialite:hover {
  background-color: var(--bleu-nuit);
  color: var(--blanc);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(28,42,72,0.18);
}

.btn-specialite.active {
  background-color: var(--bleu-nuit);
  color: var(--or);
  border-color: var(--or);
  box-shadow: 0 6px 18px rgba(28,42,72,0.22);
}

/* Carrousel */
.carousel-section {
  max-width: var(--max-width);
  margin: 0 auto 60px;
  padding: 0 20px;
}

.carousel-container {
  background: var(--blanc);
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(28,42,72,0.12);
  overflow: hidden;
  display: none;
}

.carousel-container.visible {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.carousel-header {
  background: var(--bleu-nuit);
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.carousel-header h3 {
  font-family: "Playfair Display", serif;
  color: var(--or);
  font-size: 1.6rem;
  margin: 0;
}

.carousel-header .tag {
  background: var(--or);
  color: var(--bleu-nuit);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slide {
  display: none;
  padding: 40px;
  animation: slideIn 0.3s ease;
}

.slide.active {
  display: block;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.slide-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--or);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.slide h4 {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  color: var(--bleu-nuit);
  margin: 0 0 16px;
}

.slide p {
  font-size: 1rem;
  color: #444;
  line-height: 1.8;
  margin: 0;
}

.slide ul {
  padding-left: 20px;
  color: #444;
  line-height: 2;
  font-size: 1rem;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.carousel-btn {
  background: var(--bleu-nuit);
  color: var(--blanc);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: var(--or);
  color: var(--bleu-nuit);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.dot.active {
  background: var(--bleu-nuit);
  transform: scale(1.3);
}

.carousel-counter {
  font-size: 0.85rem;
  font-weight: 600;
  color: #999;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .top-header {
    padding: 12px 20px;
  }

  .header-left h1 {
    font-size: 1.3rem;
  }

  .header-right {
    display: none;
  }

  .main-nav {
    padding: 0 10px;
  }

  .nav-menu a {
    padding: 14px 8px;
    font-size: 0.85rem;
  }

  .hero-image {
    height: 220px;
    width: 100%;
  }

  section {
    padding: 24px 20px;
  }

  .page-title h2 { font-size: 1.6rem; }

  .carousel-header {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }

  .slide { padding: 24px 20px; }

  .carousel-controls { padding: 16px 20px; }

  .specialites-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ====== PAGE LYCÉE EN CHIFFRES ====== */

.stats-intro {
  background: var(--gris-clair);
  border-left: 4px solid var(--or);
  border-radius: 6px;
  padding: 18px 22px;
  font-size: 0.95rem;
  color: #444;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 26px;
}

.stat-card {
  background: var(--blanc);
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(28,42,72,0.06);
  padding: 26px 22px;
  text-align: center;
}

.stat-card.stat-card-solo {
  max-width: 380px;
  margin: 26px auto 0;
}

.stat-card h4 {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  color: var(--bleu-nuit);
  margin: 0 0 20px;
}

.stat-compare {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.stat-year {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stat-year .year-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-year .year-value {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 2.1rem;
  color: var(--bleu-nuit);
}

.stat-arrow {
  font-size: 1.3rem;
  margin-top: 22px;
  color: #999;
}

.stat-arrow.up { color: var(--or); }
.stat-arrow.down { color: var(--rouge-profond); }

.stat-badge {
  display: inline-block;
  background: var(--or);
  color: var(--bleu-nuit);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.stat-detail {
  font-size: 0.85rem;
  color: #888;
  margin: 16px 0 0;
}

.data-table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 18px;
}

.data-table th {
  background: var(--bleu-nuit);
  color: var(--blanc);
  font-weight: 600;
  text-align: left;
  padding: 12px 14px;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eee;
}

.data-table tbody tr:nth-child(even) {
  background: var(--gris-clair);
}

.data-table .va-cell {
  font-weight: 700;
  color: var(--bleu-nuit);
}

.source-note {
  font-size: 0.8rem;
  color: #999;
  font-style: italic;
  text-align: right;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .stat-year .year-value { font-size: 1.7rem; }
  .stat-compare { gap: 10px; }
  .stat-card { padding: 22px 16px; }
}

/* ====== PAGE PROGRAMMES D'EXCELLENCE ====== */

.program-block h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  color: var(--bleu-nuit);
  margin: 0;
}

.program-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 22px;
}

.info-tag {
  background: var(--or);
  color: var(--bleu-nuit);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.program-block h4 {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  color: var(--bleu-nuit);
  border-left: 3px solid var(--or);
  padding-left: 12px;
  margin: 30px 0 16px;
}

.program-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.program-list li {
  position: relative;
  padding-left: 22px;
  color: #333;
  font-size: 1rem;
}

.program-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 9px;
  background: var(--or);
  border-radius: 2px;
}

.program-timeline {
  margin: 0;
}

.timeline-step {
  position: relative;
  display: flex;
  gap: 18px;
  padding-bottom: 28px;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--gris-clair);
}

.timeline-step:last-child::before {
  display: none;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bleu-nuit);
  color: var(--or);
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline-content h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bleu-nuit);
  margin: 4px 0 6px;
}

.timeline-content p {
  margin: 0;
  font-size: 0.95rem;
  color: #444;
}

.program-results {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 4px;
}

.result-chip {
  background: var(--bleu-nuit);
  color: var(--blanc);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .timeline-step { gap: 14px; }
  .timeline-marker { width: 28px; height: 28px; font-size: 0.85rem; }
}

a[href="mentions_legales.html"] {
  color: white;
}

a[href="mentions_legales.html"]:visited,
a[href="mentions_legales.html"]:hover,
a[href="mentions_legales.html"]:active {
  color: white;
}