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

:root {
  --orange: #e8681a;
  --orange-hover: #cf5a12;
  --bordeaux: #820e12;
  --nav-border: #ddd;
  --nav-text: #333;
  --font: "Oswald", sans-serif;
  --container-width: 1200px;
  --drawer-width: 280px;
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  font-family: var(--font);
}

/* ─── CONTENEUR CENTRÉ ────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── TOP BAR ─────────────────────────────────────────── */

.top-bar {
  background-color: var(--orange);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
}

.top-bar__login {
  color: #fff;
  font-size: 13px;
  text-decoration: underline;
}
.top-bar__login:hover {
  color: #ffe0cc;
}

.top-bar__lang {
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.top-bar__caret {
  font-size: 9px;
  vertical-align: middle;
}

/* ─── HEADER MAIN ─────────────────────────────────────── */

header {
  overflow-x: hidden;
}

.header-main {
  position: relative;
  background-color: #fff;
  overflow: hidden;
}

.header-main__photo {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 45%;
  pointer-events: none;
}
.header-main__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 25%);
  mask-image: linear-gradient(to right, transparent 0%, black 25%);
}

.header-main .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.header-main__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.header-main__logo {
  height: 80px;
  width: auto;
  flex-shrink: 0;
}

.header-main__title {
  font-size: clamp(18px, 2.5vw, 38px);
  font-weight: bold;
  color: var(--bordeaux);
  font-family: "Oswald", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  line-height: 1.3;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bordeaux);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-main__search {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}

.header-main__search input[type="search"] {
  width: clamp(120px, 18vw, 235px);
  height: 50px;
  border: none;
  padding: 0 calc(50px / 3);
  font-size: 16px;
  font-family: "Oswald", sans-serif;
  outline: none;
  background: rgba(255, 255, 255, 0.82);
  color: #555;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1;
}
.header-main__search input[type="search"]::placeholder {
  color: #aaa;
}
.header-main__search input[type="search"]:focus {
  background: rgba(255, 255, 255, 0.97);
}

.header-main__search button {
  width: 50px;
  height: 50px;
  min-width: 50px;
  background-color: #ff7b25;
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-main__search button:hover {
  background-color: var(--orange-hover);
}

/* ─── NAVIGATION DESKTOP ──────────────────────────────── */

.main-nav {
  border-top: 1px solid var(--nav-border);
  border-bottom: 1px solid var(--nav-border);
  background-color: #fff;
}
.main-nav .container {
  padding-top: 0;
  padding-bottom: 0;
}

.main-nav__list {
  display: flex;
  list-style: none;
}

.main-nav__list li a {
  display: block;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--nav-text);
  text-decoration: none;
  white-space: nowrap;
}
.main-nav__list li a:hover {
  color: var(--orange);
}

.nav-caret {
  font-size: 8px;
  vertical-align: middle;
  margin-left: 3px;
}

/* ─── DRAWER ──────────────────────────────────────────── */

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.drawer-overlay.is-visible {
  display: block;
}
.drawer-overlay.is-open {
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--drawer-width);
  background: #fff;
  z-index: 101;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.drawer.is-open {
  transform: translateX(0);
}

.drawer__list {
  list-style: none;
  padding-top: 8px;
}
.drawer__item {
  border-bottom: 1px solid var(--nav-border);
}

.drawer__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nav-text);
  text-align: left;
}
.drawer__btn.is-active {
  background-color: var(--orange);
  color: #fff;
}
.drawer__btn.is-active i {
  color: #fff;
}
.drawer__btn i {
  font-size: 14px;
  color: var(--nav-text);
  flex-shrink: 0;
}

/* ─── SECTION ÉQUIPE CMH ──────────────────────────────── */

.team-section {
  background-color: #820e1212; /* La couleur exacte de ta capture */
  max-width: 1300px; /* Limite la largeur de la section à 1300 pixels */
  margin: 0 auto; /* Centre la section (espaces automatiques et égaux sur les côtés) */
  padding: 50px 20px; /* Espace interne (haut/bas 50px, gauche/droite 20px) */
}
.team-section__title {
  color: var(--bordeaux);
  font-family: "Oswald", sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 40px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
}

.team-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-item__icon {
  font-size: 50px;
  color: var(--bordeaux);
  margin-bottom: 15px;
}

.team-item__title {
  color: var(--bordeaux);
  font-family: "Oswald", "Open Sans", sans-serif;
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 10px;
}

.team-item__desc {
  color: #555;
  font-size: 16px;
  line-height: 1.5;
  max-width: 320px; /* Évite que le texte ne s'étire trop sur les grands écrans */
  margin: 0 auto;
}

.team-section__action {
  text-align: right;
  margin-top: 40px;
}

.btn-primary {
  display: inline-block;
  background-color: var(--bordeaux);
  color: #fff;
  padding: 12px 24px;
  font-family: var(--font);
  font-weight: bold;
  text-decoration: none;
  font-size: 15px;
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #630a0d; /* Couleur légèrement plus sombre au survol */
}

/* ─── FOOTER ──────────────────────────────────────────── */

.site-footer {
  background-color: var(--bordeaux);
  color: #fff;
  padding: 60px 0 60px; /* Espace interne haut/bas */
  position: relative;
  font-family: var(--font);
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-family: "Oswald", "Open Sans", sans-serif;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 25px;
  letter-spacing: 0.5px;
}

/* Listes de liens et textes avec icônes */
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.6;
}

.footer-list li i {
  margin-top: 5px; /* Aligne l'icône avec la première ligne de texte */
  width: 16px;
  text-align: center;
  font-size: 14px;
}

.footer-list a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-list a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* Réseaux sociaux */
.footer-socials {
  display: flex;
  gap: 15px;
}

.footer-socials a {
  color: #fff;
  font-size: 24px;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    opacity 0.2s;
}

.footer-socials a:hover {
  transform: translateY(-3px);
  opacity: 0.8;
}

/* Espacements utilitaires */
.footer-space-top {
  margin-top: 20px;
}
.footer-space-top-lg {
  margin-top: 15px;
}

/* ─── COLONNE LOGOS ─── */
.footer-umr,
.footer-usc {
  font-family: "Oswald", "Open Sans", sans-serif;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 15px;
}

.footer-usc {
  margin-top: 25px;
}

.footer-logos-row {
  display: flex;
  align-items: center;
  gap: 15px; /* Espace entre les logos sur une même ligne */
  margin-bottom: 15px; /* Espace entre la première et la deuxième ligne */
}

/* On garde un espace plus grand en dessous de la dernière ligne avant le texte USC */
.footer-logos-row.row-bottom {
  margin-bottom: 25px;
}
/* Taille individuelle des logos pour garder les bonnes proportions */
.logo-ens {
  height: 60px;
  width: auto;
}

.logo-ehess {
  height: 60px;
  width: auto;
}

.logo-cnrs {
  height: 60px;
  width: auto;
  padding: 5px; /* Laisse l'espace blanc autour du cercle CNRS */
}

/* Force un fond blanc sous le logo CNRS (qui est en PNG transparent) pour matcher ta maquette */
.bg-white {
  background-color: #fff;
}

.logo-inrae {
  height: 45px; /* Hauteur ajustée pour correspondre au design */
  width: auto;
  display: block;
}

/* Bouton Scroll Top (Orange) */
.scroll-top {
  position: absolute;
  bottom: 0;
  right: 5%;
  background-color: var(--orange);
  color: #fff;
  border: none;
  width: 45px;
  height: 35px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}
.footer-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.3rem;
  color: #ffffff;
  font-weight: 400;
  margin-bottom: 25px;
  letter-spacing: 0.5px;
  line-height: 1.2em;
  font-style: bold;
}
.scroll-top:hover {
  background-color: var(--orange-hover);
}

/* Harmonisation de l'épaisseur de la police (Oswald) */
.maintenance-box__title,
.team-item__title,
.footer-title,
.footer-umr,
.footer-usc {
  font-weight: 400; /* Applique la même épaisseur partout d'un coup */
}

/* ─── SECTION MAINTENANCE & ALERTE ───────────────────── */

.maintenance-section {
  max-width: 1300px; /* Aligné sur la même largeur que la section équipe */
  margin: 40px auto 20px auto; /* Centré avec de l'espace en haut et en bas */
  padding: 0 20px;
}

.maintenance-box {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--orange); /* Liseré orange à gauche pour attirer l'attention de manière propre */
  border-radius: 4px;
  padding: 35px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.maintenance-box__header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.maintenance-box__icon {
  font-size: 26px;
  color: var(--orange); /* Utilise la variable orange du site */
}

.maintenance-box__title {
  color: var(--bordeaux); /* Utilise le bordeaux officiel */
  font-family: "Oswald", sans-serif;
  font-size: 24px;
  margin: 0;
}

.maintenance-box__content p {
  color: #4a5568;
  font-size: 15.5px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.maintenance-box__content p:strong {
  color: #1a202c;
}

.maintenance-box__content p:last-child {
  margin-bottom: 0;
  font-style: italic;
  color: #718096;
}
/* ═══════════════════════════════════════════════════════
   RESPONSIVE (Tablette & Mobile ≤ 900px)
   ════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Ajustement responsive du bloc maintenance */
  .maintenance-box {
    padding: 20px;
  }
  .maintenance-box__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Responsive du Footer */
  .footer-container {
    grid-template-columns: 1fr; /* Passe tout sur 1 seule colonne */
    gap: 40px; /* Espace vertical entre les 3 blocs empilés */
  }
  /* Responsive de la section équipe */
  .team-grid {
    grid-template-columns: 1fr;
    gap: 50px; /* Espacement plus grand entre les blocs empilés */
  }
  /* 1. Masquer la recherche et la navigation desktop */
  .header-main__search,
  .main-nav {
    display: none;
  }

  /* 2. Top bar : éléments empilés à droite */
  .top-bar .container {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  /* 3. Restructuration en Grille 2x2 pour le header */
  .header-main .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    row-gap: 15px;
    padding-top: 20px;
    padding-bottom: 25px;
    align-items: center;
  }

  /* Permet aux enfants (logo et h1) de se placer directement dans la grille parente */
  .header-main__brand {
    display: contents;
  }

  /* 4. Le titre H1 : à gauche, en bordeaux (#820E12) */
  .header-main__title {
    grid-column: 1;
    grid-row: 1;
    color: var(--bordeaux);
    font-size: clamp(22px, 4vw, 28px);
    white-space: normal;
    margin: 0;
    line-height: 1.1;
  }

  /* 5. Le bouton Burger : en bas à gauche sous le titre, fond bordeaux */
  .nav-toggle {
    display: inline-flex;
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    background-color: var(--bordeaux);
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  /* 6. Le logo CMH : placé à droite, couvrant les deux lignes verticalement */
  .header-main__logo {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: center;
    height: auto;
    max-height: 110px;
    z-index: 2;
  }

  /* Ajustement de l'image de fond pour laisser la place au texte à gauche */
  .header-main__photo {
    width: 65%;
    opacity: 0.9;
  }
}

/* ── Mobile très petit (≤ 480px) : ajustements mineurs ── */
@media (max-width: 480px) {
  .header-main__logo {
    max-height: 75px;
  }
  .nav-toggle {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}
