/* ============================================
   BASE : Réinitialisation et style global
============================================ */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: #fdfdfd;
  color: #222;
}


/* ============================================
   IMAGES : Gestion responsive avec et sans float
============================================ */

/* Image à gauche avec texte qui s’enroule */
img.gauche {
  float: none;
  height: auto;
  max-width: 100%;
  width: auto;
  margin: 1em auto;
  display: block;
}

/* En desktop, on la refait flotter à gauche */
@media screen and (min-width: 768px) {
  img.gauche {
    float: left;
    max-width: min(50%, 100%);
    width: auto;
    margin: 1em 2em 1em 0;
  }
}

/* Image centrée, sans texte enroulé */
img.centered {
  display: block;
  margin: 2em auto;
  max-width: 100%;
  height: auto;
}


/* ============================================
   VIDÉOS ET IFRAME : Responsive & centrées
============================================ */

iframe {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
}

/* Wrapper pour les vidéos 16:9 fluides */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 2em 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}


/* ============================================
   TABLES : scroll horizontal si débordement
============================================ */
table {
  width: 100%;
  overflow-x: auto;
  display: block;
}


/* ============================================
   TYPO & LIENS
============================================ */

/* Classe pour aligner du texte à droite */
.droite {
  text-align: right;
}

/* Liens classiques : bleu sans soulignement sauf au survol */
a, a:visited {
  color: rgb(0,123,231);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}


/* ============================================
   TITRES
============================================ */

/* Trait orange sous les h2 */
h2 {
  border-bottom: 1px solid rgb(255,140,0);
}


/* ============================================
   BARRE SUPÉRIEURE
============================================ */
#topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.title {
  font-size: 1.3em;
  font-weight: 600;
}

.burger {
  display: none;
  font-size: 1.6em;
  cursor: pointer;
}

.lang .drapeau {
  font-size: 1.4em;
  margin-left: 14px;
  text-decoration: none;
}


/* ============================================
   STRUCTURE DE PAGE : conteneur, nav, contenu
============================================ */
#conteneur {
  display: flex;
  flex-direction: row;
  min-height: calc(100vh - 60px); /* Enlève la hauteur du topbar */
}

#navigation {
  background: #ffffff;
  border-right: 1px solid #eee;
  width: 220px;
  padding: 30px 20px;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.03);
}

#navigation a {
  display: block;
  color: #e67e22;
  text-decoration: none;
  margin-bottom: 1.2em;
  font-weight: 500;
  transition: color 0.2s ease;
}

#navigation a:hover {
  color: #cf711f;
}

/* Zone principale */
#corps {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 3rem);
  flex: 1;
}


/* ============================================
   RESPONSIVE : mobile first
============================================ */
@media screen and (max-width: 768px) {
  .burger {
    display: block;
  }

  #conteneur {
    flex-direction: column;
  }

  #navigation {
    display: none;
    width: 100%;
    box-shadow: none;
    border-right: none;
    border-bottom: 1px solid #eee;
  }

  #navigation.active {
    display: block;
  }

  #corps {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: clamp(1rem, 4vw, 3rem);
    flex: 1;
    box-sizing: border-box;
  }
}
