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

/* ===================== BASE ===================== */
main {
  flex: 1;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #ffffff;
  color: #1a1a1a;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

html {
  scroll-behavior: smooth;
}

/* ===================== HEADER ===================== */
.header {
  background-color: #ffffff;
  padding: 1rem 5%;
  text-align: center;
  min-height: 220px;
  z-index: 10010;
  position: relative;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 600;
}

.header p {
  margin-top: 0.5rem;
  color: #666;
}

/* ===================== MENU PRINCIPAL ===================== */
.menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-top: 10px;
}

.menu a {
  text-decoration: none;
  color: #1a1a1a;
  padding: 0.5rem 1rem;
  display: block;
  position: relative;
  border-radius: 6px;
}

.menu a:hover {
  text-decoration: underline;
}

/* Important: conteneur des sous-menus */
.menu-item {
  position: relative;
}

/* ===================== SUBMENU (NIVEAU 1) ===================== */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.5rem 0;
  min-width: 200px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  z-index: 1000;
}

/* afficher le submenu au hover du parent */
.menu-item:hover > .submenu {
  display: block;
}

/* liens dans submenu */
.submenu a {
  padding: 0.4rem 1rem;
  white-space: nowrap;
}

.submenu a:hover {
  background-color: #f5f5f5;
  color: #0077cc;
  text-decoration: none;
}

/* ===================== SUBMENU (NIVEAU 2) ===================== */
/* Quand un menu-item se trouve DANS un submenu, son submenu doit s'ouvrir à droite */
.submenu .menu-item > .submenu {
  top: 0;
  left: 100%;
}

/* Pour éviter que le menu soit coupé */
.submenu {
  overflow: visible;
}

/* ===================== CONTENU PRINCIPAL ===================== */

/* Container général pour centrer tout le contenu */
.container {
  max-width: 90%;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Sections */
.bloc {
  margin-bottom: 3rem;
  width: 100%;
  text-align: center;
}

.section {
  margin-bottom: 3rem;
  width: 100%;
}

.Titre {
  text-align: center;
  width: 100%;
}

.Titre h1 {
  width: 100%;
  max-width: 100%;
  text-align: center;
  padding: 1.5rem 0;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  background-color: #ffffff;
}

.section h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #eaeaea;
  padding-bottom: 0.5rem;
}

.project p {
  text-align: center;
}

/* ===================== BOUTON CV ===================== */
.btn-cv {
  background-color: #ffffff;
  color: #1a1a1a;
  border: 1px solid #ddd;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-cv:hover {
  background-color: #f5f5f5;
}

/* ===================== PROJETS ===================== */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  width: 100%;
}

.project {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  width: 100%;
}

/* ===================== Équipements (ligne de boutons) ===================== */
.equipment-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  width: 100%;
}

.equipment-btn {
  padding: 1.2rem;
  border-radius: 16px;
  border: 1px solid #ccc;
  background-color: #fafafa;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.equipment-btn:hover {
  background-color: #f0f0f0;
}

.equipment-btn.active {
  border-color: #0077cc;
  color: #0077cc;
  background-color: #f5faff;
}

/* ===================== Zone texte sous les cartes ===================== */
.equipment-content {
  margin-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
  padding-top: 1.2rem;
  width: 100%;
}

.equipment-text {
  display: none;
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

.equipment-text.active {
  display: block;
}

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .equipment-menu {
    grid-template-columns: repeat(2, 1fr);
  }

  .menu {
    gap: 10px;
    flex-wrap: wrap;
  }
}

@media (max-width: 500px) {
  .equipment-menu {
    grid-template-columns: 1fr;
  }
}

/* ===================== COMPÉTENCES ===================== */
.skills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  width: 100%;
}

.skills li {
  background-color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid #ddd;
}

/* ===================== FOOTER ===================== */
footer {
  position: relative;
  z-index: 10001;
  background: #333;
  color: white;
  text-align: center;
  padding: 20px 5%;
}

footer ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

footer a {
  color: white;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ===================== BANDEAU FIXE ===================== */
.bottom-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #333;
  color: #666;
  text-align: center;
  padding: 0.25rem 0;
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  cursor: pointer;
  transition: background-color 0.3s;
  pointer-events: auto;
}

.bottom-banner:hover {
  background-color: #333;
}