
/* ==================== ORGANIGRAMME STYLES ==================== */

/* Appliquer les styles de base depuis index.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: #f0f0f0;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Fond particules cosmiques */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background: transparent;
}

/* Header styles cohérents avec index.css */
header {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  padding: 20px;
  position: relative;
  z-index: 10;
}

header h1 {
  color: #ffcc33;
  font-size: 2.8rem;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(255, 204, 51, 0.5);
}

header p {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 15px;
}

header nav {
  margin-top: 15px;
}

.btn {
  display: inline-block;
  background: #ff6b6b;
  color: white;
  padding: 10px 25px;
  text-decoration: none;
  border-radius: 25px;
  margin: 5px;
  transition: 0.3s;
  font-weight: bold;
  position: relative;
  z-index: 10;
}

.btn:hover {
  background: #ee5a52;
  transform: scale(1.05);
}

.btn.active {
  background: #ffcc33;
  color: #2d3436;
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(255, 204, 51, 0.6);
  font-weight: bold;
}

.language-selector {
  margin-bottom: 15px;
  position: relative;
  z-index: 10;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid #ffcc33;
  padding: 8px 20px;
  margin: 0 5px;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
  font-weight: bold;
  position: relative;
  z-index: 10;
}

.lang-btn:hover {
  background: rgba(255, 204, 51, 0.3);
}

.lang-btn.active {
  background: #ffcc33;
  color: #2d3436;
}

/* Main container */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

/* Footer styles cohérents */
footer {
  background: rgba(0, 0, 0, 0.9);
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
  position: relative;
  z-index: 10;
}

.footer-tagline {
  color: #ffcc33;
  font-style: italic;
  font-size: 0.95rem;
  margin-top: 10px;
}

/* Hero Section - CORRIGÉ : Centrage */
.hero-hierarchy {
  text-align: center;
  margin-bottom: 60px;
  padding: 60px 40px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  border: 2px solid rgba(255, 204, 51, 0.3);
  box-shadow: 0 20px 60px rgba(255, 204, 51, 0.2);
  position: relative;
  z-index: 2;
}

.hero-hierarchy h1 {
  font-size: 3.5rem;
  color: #ffcc33;
  margin-bottom: 20px;
  text-shadow: 0 0 30px rgba(255, 204, 51, 0.3);
  animation: glow 2s infinite alternate;
}

@keyframes glow {
  from { text-shadow: 0 0 10px rgba(255, 107, 107, 0.5); }
  to { text-shadow: 0 0 30px rgba(255, 204, 51, 0.8); }
}

.hero-subtitle {
  font-size: 1.4rem;
  color: #ccc;
  margin-bottom: 30px;
}

/* Container de l'organigramme - CORRIGÉ : Centrage */
.orgchart-container {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 25px;
  margin-bottom: 60px;
  border: 2px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
  position: relative;
  z-index: 2;
  overflow: auto;
}

/* Container principal de l'organigramme - CORRIGÉ : Centrage */
/* Container de l'organigramme - CENTRÉ PARFAITEMENT */
#hierarchyContainer {
  width: 100%;
  height: 75vh;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

/* FORCER le centrage ABSOLU de l'organigramme Google */
#hierarchyContainer > div {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
}

.google-visualization-orgchart-table {
  margin: 0 auto !important;
  transform: none !important;
  left: 0 !important;
  position: relative !important;
}

/* Container principal qui contient le chart */
.google-visualization-orgchart-space {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

/* Forcer le centrage de toute la structure */
.google-visualization-orgchart-space > table {
  margin: 0 auto !important;
}

/* Styles pour l'organigramme - CORRIGÉ : Centrage et alignement */
.orgchart {
  background: transparent !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.orgchart > ul {
  text-align: center !important;
  margin: 0 auto !important;
}

.orgchart ul {
  text-align: center !important;
  display: flex !important;
  justify-content: center !important;
}

.orgchart li {
  text-align: center !important;
}

/* Nodes de l'organigramme - CORRIGÉ : Style cohérent */
.orgchart .node {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)) !important;
  border: 2px solid #ffcc33 !important;
  border-radius: 15px !important;
  color: #ffcc33 !important;
  padding: 0 !important;
  margin: 10px !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.3s ease !important;
  text-align: center !important;
  min-width: 180px !important;
}

.orgchart .node:hover {
  transform: translateY(-5px) scale(1.05) !important;
  box-shadow: 0 10px 25px rgba(255, 204, 51, 0.4) !important;
  border-color: #ff6b6b !important;
}

/* Titres des nodes - CORRIGÉ : Centrage */
.orgchart .node .title {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%) !important;
  color: white !important;
  font-weight: bold !important;
  font-size: 1.1rem !important;
  padding: 12px 20px !important;
  border-radius: 12px 12px 0 0 !important;
  text-align: center !important;
  border-bottom: 2px solid #ffcc33 !important;
}

/* Contenu des nodes - CORRIGÉ : Centrage */
.orgchart .node .content {
  border: none !important;
  color: #f0f0f0 !important;
  padding: 15px 20px !important;
  font-size: 0.95rem !important;
  text-align: center !important;
  line-height: 1.5 !important;
  background: transparent !important;
}

/* Lignes de connexion */
.orgchart .lines .downline {
  background-color: #ffcc33 !important;
  margin: 0 auto !important;
}

.orgchart .lines .rightline, 
.orgchart .lines .leftline {
  border-color: #ffcc33 !important;
}

/* Section des statistiques */
.stats-section {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 50px 40px;
  border-radius: 25px;
  margin-bottom: 60px;
  border: 2px solid rgba(255, 111, 0, 0.3);
  box-shadow: 0 20px 60px rgba(255, 111, 0, 0.2);
  position: relative;
  z-index: 2;
}

.stats-section h2 {
  color: #ff6f00;
  font-size: 2.3rem;
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 0 0 20px rgba(255, 111, 0, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 30px 20px;
  border-radius: 20px;
  text-align: center;
  transition: 0.3s;
  border: 2px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-10px);
  border-color: #ff6f00;
  box-shadow: 0 15px 40px rgba(255, 111, 0, 0.3);
}

.stat-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
}

.stat-card h3 {
  color: #ffcc33;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ff6f00;
  margin-bottom: 5px;
}

.stat-label {
  color: #ccc;
  font-size: 1rem;
}

/* Section des rôles */
.roles-section {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  padding: 50px 40px;
  border-radius: 25px;
  margin-bottom: 60px;
  border: 2px solid rgba(118, 75, 162, 0.3);
  box-shadow: 0 20px 60px rgba(118, 75, 162, 0.2);
  position: relative;
  z-index: 2;
}

.roles-section h2 {
  color: #764ba2;
  font-size: 2.3rem;
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 0 0 20px rgba(118, 75, 162, 0.3);
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.role-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 35px 25px;
  border-radius: 20px;
  text-align: center;
  transition: 0.3s;
  border: 2px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.role-card:hover {
  transform: translateY(-10px);
  border-color: #764ba2;
  box-shadow: 0 15px 40px rgba(118, 75, 162, 0.3);
}

.role-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 20px;
}

.role-card h3 {
  color: #ffcc33;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.role-card p {
  color: #f0f0f0;
  line-height: 1.7;
  font-size: 1.05rem;
  margin-bottom: 20px;
}

.role-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nodeGrow {
  0% { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.hero-hierarchy,
.orgchart-container,
.stats-section,
.roles-section {
  animation: fadeInUp 0.8s ease-out;
}

/* Délais d'animation pour effet cascade */
.orgchart-container { animation-delay: 0.1s; }
.stats-section { animation-delay: 0.2s; }
.roles-section { animation-delay: 0.3s; }

/* Effet de brillance sur les cartes */
.stat-card::before,
.role-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: 0.5s;
}

.stat-card:hover::before,
.role-card:hover::before {
  left: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-hierarchy h1 {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .orgchart-container {
    padding: 20px;
  }
  
  #hierarchyContainer {
    min-height: 400px;
  }
  
  .orgchart .node {
    min-width: 150px !important;
  }
  
  .orgchart .node .title {
    font-size: 1rem !important;
    padding: 10px 15px !important;
  }
  
  .orgchart .node .content {
    padding: 10px 15px !important;
    font-size: 0.9rem !important;
  }
  
  .stats-grid,
  .roles-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-hierarchy {
    padding: 40px 20px;
  }
  
  .hero-hierarchy h1 {
    font-size: 2rem;
  }
  
  .orgchart-container {
    padding: 15px;
  }
  
  #hierarchyContainer {
    min-height: 300px;
  }
  
  .orgchart .node {
    min-width: 120px !important;
    margin: 5px !important;
  }
  
  .stats-section,
  .roles-section {
    padding: 30px 20px;
  }
}

/* Correction spécifique pour le centrage de l'organigramme */
.orgchart-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.orgchart-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.orgchart-container::-webkit-scrollbar-thumb {
  background: #ffcc33;
  border-radius: 4px;
}

.orgchart-container::-webkit-scrollbar-thumb:hover {
  background: #ff6b6b;
}


/* Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #ff6b6b, #ffcc33);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #ffcc33, #ff6b6b);
}

/* Bouton Retour en haut - Version Chat */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff6b6b, #ffcc33);
  color: #2d3436;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 25px rgba(255, 107, 107, 0.5);
  transition: all 0.3s ease;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 35px rgba(255, 204, 51, 0.7);
  background: linear-gradient(135deg, #ffcc33, #ff6b6b);
}

.back-to-top:hover::after {
  content: "🐱";
  position: absolute;
  font-size: 20px;
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

.back-to-top.show {
  display: flex;
  animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
/* ==================== FIN ORGANIGRAMME STYLES ==================== */
