/* ================================================= */
/* VARIABLES GLOBALES                                */
/* ================================================= */
:root {
  --bg: #111;
  --text: #eee;
  --card: #1b1b1b;
  --accent: #ff8c00;
  --accent-dark: #cc6f00;
  --nav-height: 70px;
  --border-radius: 10px;
  --transition: 0.3s ease;
}

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

html, body {
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ================================================= */
/* NAVIGATION PRINCIPALE                             */
/* ================================================= */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center; /* Centrage des items */
  gap: 1rem;
  z-index: 1000;
  border-bottom: 2px solid var(--accent);
  overflow-x: auto;
  padding: 0 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}

nav::-webkit-scrollbar {
  height: 6px;
}

nav::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

/* Conteneur pour les liens (permet le centrage) */
nav > div {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 0 2rem; /* Espace pour éviter que les liens collent aux bords */
}

nav a {
  color: var(--text);
  font-weight: bold;
  padding: 0.4rem 0.8rem;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

nav a.active {
  background: var(--accent);
  color: #000;
  border-radius: 5px;
  pointer-events: none;
}

/* Bouton burger fixe à droite */
.burger {
  display: none;
  cursor: pointer;
  position: fixed; /* Position fixe pour éviter le scroll */
  right: 1rem;
  top: 0.5rem;
  z-index: 1001;
}

.burger div {
  width: 30px;
  height: 4px;
  margin: 5px;
  background: var(--text);
}


/* ================================================= */
/* HERO                                              */
/* ================================================= */
header.hero {
  margin-top: var(--nav-height);
  height: 350px;
  background: url("../assets/img/hero.jpg") center / cover no-repeat;
}

header.hero.hide-hero {
  display: none !important;
}

/* ================================================= */
/* CONTENEUR PAGE                                    */
/* ================================================= */
.page-container {
  max-width: 1100px;
  margin: calc(var(--nav-height) + 2rem) auto 2rem;
  padding: 0 1rem;
  text-align: center;
}

.page-container h1::after {
  content: "";
  display: block;
  width: 120px;
  height: 3px;
  background: var(--accent);
  margin: 0.8rem auto 2rem;
  border-radius: 2px;
}

/* ================================================= */
/* SOUS-MENUS                                        */
/* ================================================= */
.prestations-menu,
.demos-menu,
.resource-menu,
.history-menu {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0 3rem;
  flex-wrap: wrap;
}

.prestations-menu button,
.demos-menu button,
.resource-menu button,
.history-menu button {
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  border: 1px solid #444;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  position: relative;
  font-weight: bold;
}

.prestations-menu button:hover,
.demos-menu button:hover,
.resource-menu button:hover,
.history-menu button:hover {
  background: var(--accent-dark);
  color: #000;
}

.prestations-menu button.active,
.demos-menu button.active,
.resource-menu button.active,
.history-menu button.active {
  background: var(--accent);
  color: #000;
}

.prestations-menu button.active::after,
.demos-menu button.active::after,
.resource-menu button.active::after,
.history-menu button.active::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: -6px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ================================================= */
/* SECTIONS FILTRÉES                                 */
/* ================================================= */
.prestations-section,
.demos-section,
.resource-section,
.history-section {
  display: none;
}

.prestations-section.active,
.demos-section.active,
.resource-section.active,
.history-section.active {
  display: block;
}

/* ================================================= */
/* PRESTATIONS — CARDS                               */
/* ================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--card);
  border: 1px solid #333;
  border-radius: var(--border-radius);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
}

.card h3 {
  text-align: center;
  margin: 0.8rem;
  font-size: 1.15rem;
}

.card-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem 1rem;
}

.card-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.card-entretien .card-icon {
  filter: invert(19%) sepia(92%) saturate(7480%) hue-rotate(357deg) brightness(95%) contrast(108%);
}

.card-autre .card-icon {
  filter: invert(63%) sepia(88%) saturate(4000%) hue-rotate(5deg) brightness(105%) contrast(103%);
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.card-link {
  align-self: center;
  margin-top: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  font-weight: bold;
  background: var(--accent-dark);
  color: var(--text);
  transition: var(--transition);
}

.card-link:hover {
  background: var(--accent);
  color: #000;
}

/* ================================================= */
/* RESSOURCES — CARDS PROJETS                        */
/* ================================================= */
.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-bottom: 2rem;
}

.project-card {
  background: var(--card);
  border: 1px solid #333;
  border-radius: var(--border-radius);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1rem;
}

.project-card:hover {
  transform: translateY(-4px);
}

/* Suppression du filtre pour conserver les couleurs originales */
.project-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin: 0 auto 1rem;
  /* Plus de filtre pour garder les couleurs d'origine */
}

.project-card h3 {
  text-align: center;
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
}

.project-card p {
  margin: 0;
  color: #ccc;
  font-size: 0.9rem;
  text-align: center;
}

/* ================================================= */
/* VIEWERS — RESSOURCES & DEMOS                      */
/* ================================================= */
.demos-container {
  display: flex;
  gap: 1.2rem;
  min-height: calc(100vh - var(--nav-height) - 6rem);
}

.demos-sidebar {
  width: 300px;
  background: var(--card);
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid #333;
  overflow-y: auto;
}

.viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--border-radius);
  border: 1px solid #333;
  overflow: hidden;
  position: relative;
}

/* ================================================= */
/* BOUTONS PLEIN ÉCRAN (pour demos.html)              */
/* ================================================= */
.fullscreen-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.fullscreen-btn:hover {
  background: var(--accent);
  color: #000;
}

.viewer.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  margin: 0;
  border-radius: 0;
}

.exit-fullscreen-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.exit-fullscreen-btn:hover {
  background: var(--accent);
  color: #000;
}

/* Contenu du viewer */
.demos-section .preview-content,
.resource-section .preview-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.demos-section embed,
.demos-section iframe,
.demos-section video,
.resource-section embed,
.resource-section iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ================================================= */
/* DOCUMENTATION PDF                                 */
/* ================================================= */
.demos-sidebar a,
#doc-list a {
  display: block;
  margin: 0.35rem 0;
  padding: 0.5rem;
  border-radius: 4px;
  transition: var(--transition);
}

.demos-sidebar a:hover,
#doc-list a:hover {
  background: var(--accent-dark);
}

/* ================================================= */
/* HISTOIRE — FRISE                                  */
/* ================================================= */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
  margin: 2.5rem 0;
}

.timeline-item {
  background: var(--card);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.4rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.timeline-item .t-icon {
  font-size: 2.3rem;
}

.timeline-item .t-date {
  font-weight: bold;
  color: var(--accent);
  margin: 0.4rem 0;
}

/* ================================================= */
/* FONDATEUR — PHOTO OVALE                            */
/* ================================================= */
.founder-photo {
  width: 180px;
  height: 220px;
  border-radius: 50% / 60%;
  object-fit: cover;
  border: 3px solid var(--accent);
  filter: grayscale(100%) contrast(1.1);
}

/* ================================================= */
/* ÉQUIPES — CARDS PORTEURS & OPÉRATEURS              */
/* ================================================= */

/* Conteneur principal des équipes */
.team-main-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

/* Carte principale d'un porteur */
.carrier-main-card {
  background: var(--card);
  border-radius: var(--border-radius);
  border: 1px solid #333;
  overflow: hidden;
  transition: transform var(--transition);
}

.carrier-main-card:hover {
  transform: translateY(-4px);
}

/* En-tête de la carte porteur */
.carrier-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: background-color var(--transition);
}

.carrier-header:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.carrier-header.active {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Logo du porteur */
.carrier-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
}

/* Informations du porteur */
.carrier-info {
  flex: 1;
}

.carrier-info h3 {
  margin: 0;
  font-size: 1.3rem;
}

.carrier-description {
  color: #ccc;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.carrier-website {
  color: var(--accent);
  font-weight: bold;
}

/* Conteneur des opérateurs */
.operators-container {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 0 1.5rem 1.5rem;
}

/* Carte d'un opérateur */
.operator-card {
  background: var(--card);
  border-radius: var(--border-radius);
  border: 1px solid #333;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform var(--transition);
}

.operator-card:hover {
  transform: translateY(-4px);
}

/* Photo de l'opérateur avec masque arrondi */
.operator-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid var(--accent);
  filter: grayscale(100%) contrast(1.1);
}

/* Informations de l'opérateur */
.operator-info {
  width: 100%;
}

.operator-info h4 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.operator-role {
  color: #ccc;
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.operator-description {
  color: #aaa;
  font-size: 0.85rem;
}

/* Messages d'erreur et d'absence */
.no-carriers,
.no-operators {
  color: #ccc;
  text-align: center;
  padding: 1rem;
}

.error-message {
  color: #ff6b6b;
  text-align: center;
  padding: 1rem;
}


/* ================================================= */
/* RESPONSIVE                                        */
/* ================================================= */
@media (max-width: 900px) {
  .demos-container {
    flex-direction: column;
    min-height: auto;
  }

  .demos-sidebar {
    width: 100%;
    max-height: 250px;
  }

  .viewer {
    height: 60vh;
  }
}

@media (max-width: 750px) {
  nav {
    justify-content: flex-start;
    padding-left: 1rem;
  }

  nav > a {
    display: none;
  }

  nav.open > a {
    display: block;
    padding: 1rem;
  }

  .burger {
    display: block;
  }

  .card-body {
    flex-direction: column;
    text-align: center;
  }

  .card-content {
    text-align: center;
  }
}
/* ================================================= */
/* RESPONSIVE POUR LES ÉQUIPES                       */
/* ================================================= */
@media (max-width: 750px) {
  .operators-container {
    grid-template-columns: 1fr;
  }

  .carrier-header {
    flex-direction: column;
    text-align: center;
  }

  .carrier-logo {
    margin-bottom: 1rem;
  }
}

/* ================================================= */
/* PLEIN ÉCRAN                                       */
/* ================================================= */
.viewer.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  margin: 0;
  border-radius: 0;
}

.viewer.fullscreen .fullscreen-btn {
  top: 1rem;
  right: 3rem;
}

.exit-fullscreen-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.5);
  color: var(--text);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exit-fullscreen-btn:hover {
  background: var(--accent);
  color: #000;
}
