/* Portfolio moderne avec style sombre */

:root{
  --maxw: 1366px;
  --bg-dark: #000000;
  --bg-card: #0a0a0a;
  --bg-hover: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --accent: #ff6600;
  --accent-hover: #ff8800;
  --accent-light: #ff9933;
  --border: #333333;
  --border-orange: rgba(255, 102, 0, 0.3);
}

*{ 
  box-sizing:border-box; 
  margin: 0;
  padding: 0;
}

html{ 
  scroll-behavior: smooth;
}

html,body{ 
  height:100%; 
}

body{
  background: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(255, 102, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 102, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 102, 0, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  animation: fadeIn 0.6s ease-in-out;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 102, 0, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 102, 0, 0.1) 0%, transparent 40%);
  animation: backgroundPulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}


@keyframes backgroundPulse {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.wrap{
  padding: 16px;
  min-height: calc(100vh - 80px);
  position: relative;
  z-index: 1;
}

.canvas{
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(10, 10, 10, 0.95) 100%);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 0 1px var(--border-orange),
    0 0 40px rgba(255, 102, 0, 0.3),
    inset 0 0 60px rgba(255, 102, 0, 0.05);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  min-height: 600px;
  animation: slideInUp 0.8s ease-out;
  transform-style: preserve-3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}



.canvas::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--accent) 25%,
    var(--accent-hover) 50%,
    var(--accent) 75%,
    transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
  z-index: 10;
  box-shadow: 0 0 20px rgba(255, 102, 0, 0.8);
}

@keyframes shimmer {
  0%, 100% {
    opacity: 0.5;
    transform: translateX(-100%);
  }
  50% {
    opacity: 1;
    transform: translateX(100%);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sidebar Navigation */
.sidebar{
  width: 250px;
  background: linear-gradient(180deg, 
    rgba(10, 10, 10, 0.95) 0%, 
    rgba(26, 26, 26, 0.9) 100%);
  border-right: 2px solid var(--border-orange);
  box-shadow: 
    inset -10px 0 20px rgba(0, 0, 0, 0.5),
    4px 0 15px rgba(255, 102, 0, 0.1);
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideInLeft 0.6s ease-out 0.2s both;
  position: relative;
}

.sidebar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, 
    transparent 0%, 
    var(--accent) 50%, 
    transparent 100%);
  opacity: 0.5;
  animation: sidebarGlow 2s ease-in-out infinite;
}

@keyframes sidebarGlow {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sidebar a{
  display: block;
  padding: 12px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 15px;
  animation: fadeInLeft 0.5s ease-out both;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation décalée pour chaque lien de la sidebar */
.sidebar a:nth-child(1) { animation-delay: 0.3s; }
.sidebar a:nth-child(2) { animation-delay: 0.35s; }
.sidebar a:nth-child(3) { animation-delay: 0.4s; }
.sidebar a:nth-child(4) { animation-delay: 0.45s; }
.sidebar a:nth-child(5) { animation-delay: 0.5s; }
.sidebar a:nth-child(6) { animation-delay: 0.55s; }
.sidebar a:nth-child(7) { animation-delay: 0.6s; }

.sidebar a:hover,
.sidebar a.active{
  background: linear-gradient(90deg, 
    rgba(255, 102, 0, 0.15) 0%, 
    rgba(255, 102, 0, 0.05) 100%);
  color: var(--accent);
  transform: translateX(6px) scale(1.02);
  border-left: 3px solid var(--accent);
  box-shadow: 
    -4px 0 15px rgba(255, 102, 0, 0.3),
    inset 0 0 20px rgba(255, 102, 0, 0.1);
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

/* Contenu principal */
.content{
  flex: 1;
  padding: 40px 60px;
  overflow-y: auto;
  animation: slideInRight 0.6s ease-out 0.3s both;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.content h1{
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--text-primary);
  background: linear-gradient(135deg, 
    var(--text-primary) 0%, 
    var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, 
    var(--accent) 0%, 
    var(--accent-hover) 50%, 
    transparent 100%) 1;
  padding-bottom: 10px;
  width: fit-content;
  text-shadow: 0 0 30px rgba(255, 102, 0, 0.3);
  position: relative;
  animation: fadeInScale 0.8s ease-out 0.4s both;
}

.content h1::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    var(--accent) 0%, 
    var(--accent-hover) 100%);
  animation: underlineExpand 1s ease-out 1s forwards;
  box-shadow: 0 0 15px var(--accent);
}

@keyframes underlineExpand {
  to {
    width: 100%;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.content h2{
  font-size: 1.8em;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--accent);
  animation: fadeIn 0.6s ease-out 0.5s both;
  text-shadow: 
    0 0 10px rgba(255, 102, 0, 0.5),
    0 0 20px rgba(255, 102, 0, 0.3);
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.content h2:hover {
  transform: translateX(5px);
  text-shadow: 
    0 0 15px rgba(255, 102, 0, 0.8),
    0 0 30px rgba(255, 102, 0, 0.5);
}

.content h3{
  font-size: 1.3em;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--text-primary);
  animation: fadeIn 0.5s ease-out 0.7s both;
  transition: all 0.3s ease;
  position: relative;
}

.content h3:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.content p{
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
  animation: fadeIn 0.6s ease-out 0.6s both;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.content p:hover {
  color: var(--text-primary);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
  transform: translateX(3px);
}

.content p:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.content ul, .content ol{
  margin-left: 30px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.content li{
  margin-bottom: 10px;
  line-height: 1.8;
  transition: all 0.3s ease;
  padding-left: 5px;
  border-left: 2px solid transparent;
}

.content li:hover {
  color: var(--text-primary);
  border-left-color: var(--accent);
  padding-left: 15px;
  text-shadow: 0 0 5px rgba(255, 102, 0, 0.3);
}

/* Navigation en haut pour les pages internes */
.top-nav{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 2px solid var(--border-orange);
  background: linear-gradient(180deg, 
    rgba(10, 10, 10, 0.95) 0%, 
    rgba(26, 26, 26, 0.9) 100%);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.5),
    inset 0 -2px 10px rgba(255, 102, 0, 0.1);
  animation: slideDown 0.5s ease-out 0.2s both;
  position: relative;
}

.top-nav::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    var(--accent) 0%, 
    transparent 100%);
  animation: navLineExpand 1.5s ease-out 0.5s forwards;
}

@keyframes navLineExpand {
  to {
    width: 100%;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-nav a{
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.top-nav a:hover{
  background: linear-gradient(135deg, 
    rgba(255, 102, 0, 0.2) 0%, 
    rgba(255, 102, 0, 0.1) 100%);
  color: var(--accent);
  border: 1px solid var(--border-orange);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 15px rgba(255, 102, 0, 0.3),
    inset 0 0 10px rgba(255, 102, 0, 0.1);
  text-shadow: 0 0 8px rgba(255, 102, 0, 0.6);
}


.nav-buttons{
  display: flex;
  gap: 15px;
}

/* Cards pour projets */
.project-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.project-card{
  background: linear-gradient(135deg, 
    var(--bg-hover) 0%, 
    rgba(26, 26, 26, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: fadeInUp 0.6s ease-out both;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 102, 0, 0.15) 50%, 
    transparent 100%);
  transition: left 0.6s ease;
  z-index: 1;
}

.project-card:hover::before {
  left: 100%;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation décalée pour chaque carte */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.project-card:hover{
  transform: translateY(-8px) scale(1.02) rotateX(2deg);
  box-shadow: 
    0 15px 40px rgba(255, 102, 0, 0.4),
    0 0 30px rgba(255, 102, 0, 0.2),
    inset 0 0 30px rgba(255, 102, 0, 0.1);
  border-color: var(--accent);
  background: linear-gradient(135deg, 
    rgba(255, 102, 0, 0.1) 0%, 
    rgba(255, 102, 0, 0.05) 100%);
}

.project-card h3{
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 15px;
}

/* Footer */
.footer{
  opacity:.85;
  font-size: 14px;
  padding: 20px;
  text-align:center;
  border-top: 2px solid var(--border-orange);
  background: linear-gradient(180deg, 
    rgba(10, 10, 10, 0.95) 0%, 
    rgba(0, 0, 0, 0.9) 100%);
  box-shadow: 
    0 -4px 20px rgba(0, 0, 0, 0.5),
    inset 0 2px 10px rgba(255, 102, 0, 0.1);
  animation: fadeIn 0.6s ease-out 0.7s both;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--accent) 50%, 
    transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
}

.footer a{ 
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover{
  color: var(--accent);
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.8);
  transform: scale(1.1);
  display: inline-block;
  transition: all 0.3s ease;
}


.footer .sep{ 
  padding: 0 10px; 
  color: var(--text-secondary);
}

/* Page index */
body.center{
  display:grid;
  place-items:center;
  padding: 24px;
}

body.center a{
  color: var(--accent);
  text-decoration: none;
  font-size: 18px;
}

body.center a:hover{
  color: var(--accent-hover);
}

/* Responsive */
@media (max-width: 768px) {
  .canvas{
    flex-direction: column;
  }
  
  .sidebar{
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-orange);
    padding: 20px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .sidebar a{
    padding: 8px 15px;
    font-size: 14px;
  }
  
  .content{
    padding: 30px 20px;
  }
  
  .content h1{
    font-size: 2em;
  }
  
  .top-nav{
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }
  
  .nav-buttons{
    width: 100%;
    justify-content: space-between;
  }
}

/* Formulaires */
input[type="text"],
input[type="email"],
textarea {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 
    0 0 0 3px rgba(255, 102, 0, 0.2),
    0 0 20px rgba(255, 102, 0, 0.3),
    inset 0 0 10px rgba(255, 102, 0, 0.1);
  background: linear-gradient(135deg, 
    var(--bg-hover) 0%, 
    rgba(26, 26, 26, 0.9) 100%);
  transform: scale(1.02);
}

button[type="submit"] {
  background: var(--accent);
  color: white;
  transition: all 0.3s ease;
}

button[type="submit"]:hover {
  background: linear-gradient(135deg, 
    var(--accent-hover) 0%, 
    var(--accent) 100%);
  box-shadow: 
    0 6px 20px rgba(255, 102, 0, 0.5),
    0 0 30px rgba(255, 102, 0, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
  transform: translateY(-3px) scale(1.05);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

button[type="submit"]:active {
  transform: translateY(-1px) scale(1.02);
}

/* Liens dans le contenu */
.content a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

.content a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Animation pour le contenu des pages internes */
.content > div[style*="padding"] {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Animation pour les listes */
.content ul,
.content ol {
  animation: fadeIn 0.6s ease-out 0.8s both;
}

/* Animation pour les éléments de formulaire */
input[type="text"],
input[type="email"],
textarea {
  animation: fadeIn 0.5s ease-out both;
}

input[type="text"]:nth-of-type(1) { animation-delay: 0.1s; }
input[type="email"]:nth-of-type(1) { animation-delay: 0.2s; }
textarea:nth-of-type(1) { animation-delay: 0.3s; }

button[type="submit"] {
  animation: fadeInScale 0.6s ease-out 0.4s both;
}

/* Organigramme */
.org-chart {
  margin: 40px 0;
  padding: 30px;
  background: var(--bg-hover);
  border-radius: 12px;
  border: 1px solid var(--border);
  animation: fadeIn 0.8s ease-out 0.9s both;
}

.org-level {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.org-box {
  background: linear-gradient(135deg, 
    var(--bg-card) 0%, 
    rgba(26, 26, 26, 0.9) 100%);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  min-width: 200px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.org-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, 
    rgba(255, 102, 0, 0.1) 0%, 
    transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.org-box:hover::before {
  opacity: 1;
}

.org-box:hover {
  border-color: var(--accent);
  box-shadow: 
    0 8px 25px rgba(255, 102, 0, 0.4),
    0 0 30px rgba(255, 102, 0, 0.2),
    inset 0 0 20px rgba(255, 102, 0, 0.1);
  transform: translateY(-5px) scale(1.05);
  background: linear-gradient(135deg, 
    rgba(255, 102, 0, 0.1) 0%, 
    rgba(26, 26, 26, 0.95) 100%);
}

.org-box h4 {
  color: var(--accent);
  font-size: 1.1em;
  margin-bottom: 10px;
  font-weight: 600;
}

.org-box p {
  color: var(--text-secondary);
  font-size: 0.9em;
  line-height: 1.6;
  margin: 0;
}

.org-top .org-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 102, 0, 0.1) 100%);
  border-color: var(--accent);
  min-width: 250px;
}

.org-top .org-box h4 {
  font-size: 1.2em;
}

.org-middle {
  gap: 15px;
}

.org-middle .org-box {
  flex: 1;
  min-width: 180px;
  max-width: 250px;
}

.org-bottom {
  gap: 20px;
  justify-content: flex-start;
  padding: 0 20px;
}

.org-bottom .org-box {
  flex: 0 1 auto;
  min-width: 200px;
  max-width: 300px;
}

.org-right {
  justify-content: flex-end !important;
}

.org-right .org-box {
  margin-left: auto;
  margin-right: 0;
}

.org-left {
  justify-content: flex-start !important;
}

.org-left .org-box {
  margin-left: 0;
  min-width: 250px;
}

.org-bottom-two {
  gap: 20px;
  justify-content: space-between;
  padding: 0 20px;
}

.org-bottom-two .org-box {
  flex: 0 1 calc(50% - 10px);
  min-width: 200px;
  max-width: 300px;
}

.org-bottom-two .org-box:first-child {
  margin-right: auto;
}

.org-bottom-two .org-box:last-child {
  margin-left: auto;
}

.org-stagiaire-box {
  background: linear-gradient(135deg, rgba(255, 102, 0, 0.15) 0%, var(--bg-card) 100%);
  border-color: var(--accent);
  border-width: 3px;
  min-width: 200px;
}

.org-stagiaire-box h4 {
  color: var(--accent-hover);
  font-size: 1.15em;
}

/* Système de connexions pour l'organigramme */
.org-chart {
  position: relative;
  padding: 40px 20px;
  min-height: 600px;
}

.org-level {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin: 30px 0;
  min-height: 100px;
}

.org-box {
  position: relative;
  z-index: 3;
}

/* Suppression des divs org-connector simples - on utilise les pseudo-éléments et les connexions complexes */
.org-connector {
  display: none;
}

/* Éléments de connexion complexes pour la connexion en L inversé */
.org-connector-complex {
  position: relative;
  width: 100%;
  height: 100px;
  margin: -50px auto 0;
  z-index: 1;
  pointer-events: none;
}

.connector-vertical,
.connector-horizontal {
  position: absolute;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

.connector-vertical {
  width: 3px;
}

.connector-horizontal {
  height: 3px;
}

/* Ligne verticale 1 : descend depuis le centre (continue depuis org-middle::after) */
.connector-v1 {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 40px;
}

/* Ligne horizontale 1 : va vers la droite */
.connector-h1 {
  top: 40px;
  left: 50%;
  width: 200px;
  transform: translateX(-50%);
}

/* Ligne verticale 2 : descend depuis la droite */
.connector-v2 {
  top: 40px;
  left: calc(50% + 200px);
  transform: translateX(-50%);
  height: 40px;
}

/* Ligne horizontale 2 : va du centre de la case org-left vers connector-v2 */
.connector-h2 {
  top: 80px;
  left: 20px;
  right: calc(50% + 200px - 1.5px);
  transform: translateX(0);
}

/* ===== CONNEXION 1: Responsable Maintenance → Responsable Méthode Maintenance ===== */
.org-level.org-top {
  position: relative;
}

.org-level.org-top::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 50px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* ===== CONNEXION 2: Responsable Méthode Maintenance → Responsable Maintenance Autom ===== */
.org-level.org-middle {
  position: relative;
}

/* Ligne verticale depuis le centre de Responsable Méthode vers le bas - connectée à la connexion complexe */
.org-level.org-middle::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 50px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* ===== CONNEXION 3: Responsable Maintenance Autom → Les deux cases du niveau 4 ===== */
.org-level.org-bottom {
  position: relative;
  justify-content: flex-start;
  padding-left: 0;
}

/* Ligne verticale depuis la ligne horizontale (connector-h2) vers le haut de la case */
.org-level.org-bottom .org-box.org-left::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent);
  z-index: 2;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* Ligne verticale depuis la case vers le bas */
.org-level.org-bottom .org-box.org-left::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 50px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* Ligne horizontale qui s'étend depuis la case vers les deux cases du niveau 4 */
.org-level.org-bottom::before {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 600px;
  height: 3px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* ===== CONNEXION 4: Les deux cases du niveau 4 → Alternant ===== */
.org-level.org-bottom-two {
  position: relative;
  justify-content: space-between;
  padding: 0 10%;
}

/* Ligne horizontale au-dessus des deux cases */
.org-level.org-bottom-two::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 600px;
  height: 3px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* Ligne verticale depuis la ligne horizontale vers la case de gauche */
.org-level.org-bottom-two .org-box.org-left::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 30px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* Ligne verticale depuis la ligne horizontale vers la case de droite */
.org-level.org-bottom-two .org-box.org-right::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 30px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* Ligne verticale depuis la case de gauche vers le bas */
.org-level.org-bottom-two .org-box.org-left::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 50px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* Ligne verticale depuis la case de droite vers le bas */
.org-level.org-bottom-two .org-box.org-right::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 50px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* ===== CONNEXION 5: Convergence vers Alternant ===== */
.org-level.org-stagiaire {
  position: relative;
  justify-content: center;
}

/* Ligne horizontale de convergence avant l'alternant (connecte les deux lignes verticales) */
.org-level.org-stagiaire::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  max-width: calc(100% - 40px);
  height: 3px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* Ligne verticale depuis la ligne horizontale vers l'alternant */
.org-level.org-stagiaire::after {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 30px;
  background: var(--accent);
  z-index: 1;
  box-shadow: 0 0 5px rgba(255, 102, 0, 0.5);
}

/* Responsive pour l'organigramme */
@media (max-width: 768px) {
  .org-level {
    flex-direction: column;
  }
  
  .org-box {
    width: 100%;
    max-width: 100%;
  }
  
  .org-middle,
  .org-bottom {
    flex-direction: column;
  }
  
  .org-connector {
    height: 20px;
  }
}

/* Mini CV */
.mini-cv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin: 30px 0;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.cv-section {
  background: linear-gradient(135deg, 
    var(--bg-hover) 0%, 
    rgba(26, 26, 26, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.cv-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    var(--accent) 0%, 
    var(--accent-hover) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.cv-section:hover::before {
  transform: scaleX(1);
}

.cv-section:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 10px 30px rgba(255, 102, 0, 0.3),
    0 0 20px rgba(255, 102, 0, 0.2);
  border-color: var(--accent);
}

.cv-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-orange);
}

.cv-header h3 {
  color: var(--accent);
  font-size: 1.2em;
  margin: 0;
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.cv-content {
  color: var(--text-secondary);
  line-height: 1.8;
}

.cv-content p {
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.cv-section:hover .cv-content p {
  color: var(--text-primary);
}

.cv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.skill-tag {
  display: inline-block;
  padding: 6px 15px;
  background: linear-gradient(135deg, 
    rgba(255, 102, 0, 0.15) 0%, 
    rgba(255, 102, 0, 0.05) 100%);
  border: 1px solid var(--border-orange);
  border-radius: 20px;
  color: var(--accent);
  font-size: 0.9em;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(255, 102, 0, 0.3);
}

.skill-tag:hover {
  background: linear-gradient(135deg, 
    rgba(255, 102, 0, 0.25) 0%, 
    rgba(255, 102, 0, 0.15) 100%);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

/* Frise chronologique */
.timeline {
  position: relative;
  padding: 40px 0;
  margin: 40px 0;
  animation: fadeIn 0.8s ease-out 0.4s both;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, 
    var(--accent) 0%, 
    var(--border-orange) 50%, 
    var(--accent) 100%);
  box-shadow: 
    0 0 10px rgba(255, 102, 0, 0.5),
    inset 0 0 10px rgba(255, 102, 0, 0.3);
  animation: timelinePulse 2s ease-in-out infinite;
}

@keyframes timelinePulse {
  0%, 100% {
    box-shadow: 
      0 0 10px rgba(255, 102, 0, 0.5),
      inset 0 0 10px rgba(255, 102, 0, 0.3);
  }
  50% {
    box-shadow: 
      0 0 20px rgba(255, 102, 0, 0.8),
      inset 0 0 20px rgba(255, 102, 0, 0.5);
  }
}

.timeline-item {
  position: relative;
  padding-left: 80px;
  margin-bottom: 50px;
  animation: slideInRight 0.6s ease-out both;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

.timeline-marker {
  position: absolute;
  left: 20px;
  top: 5px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border: 4px solid var(--bg-card);
  border-radius: 50%;
  box-shadow: 
    0 0 0 3px var(--border-orange),
    0 0 20px rgba(255, 102, 0, 0.6),
    inset 0 0 10px rgba(255, 255, 255, 0.2);
  z-index: 2;
  transition: all 0.4s ease;
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.3);
  box-shadow: 
    0 0 0 3px var(--accent),
    0 0 30px rgba(255, 102, 0, 0.8),
    inset 0 0 15px rgba(255, 255, 255, 0.3);
}

.timeline-content {
  background: linear-gradient(135deg, 
    var(--bg-hover) 0%, 
    rgba(26, 26, 26, 0.9) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, 
    var(--accent) 0%, 
    transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.timeline-item:hover .timeline-content::before {
  opacity: 1;
}

.timeline-item:hover .timeline-content {
  transform: translateX(10px);
  box-shadow: 
    0 10px 30px rgba(255, 102, 0, 0.3),
    0 0 20px rgba(255, 102, 0, 0.2);
  border-color: var(--accent);
  background: linear-gradient(135deg, 
    rgba(255, 102, 0, 0.1) 0%, 
    rgba(26, 26, 26, 0.95) 100%);
}

.timeline-date {
  display: inline-block;
  background: linear-gradient(135deg, 
    var(--accent) 0%, 
    var(--accent-hover) 100%);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 15px;
  box-shadow: 
    0 4px 15px rgba(255, 102, 0, 0.4),
    inset 0 0 10px rgba(255, 255, 255, 0.1);
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.timeline-content h3 {
  color: var(--accent);
  font-size: 1.3em;
  margin: 10px 0;
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.timeline-content p {
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.6;
}

.timeline-item:hover .timeline-content p {
  color: var(--text-primary);
}

/* Responsive pour la timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 15px;
  }
  
  .timeline-item {
    padding-left: 50px;
  }
  
  .timeline-marker {
    left: 5px;
    width: 16px;
    height: 16px;
  }
  
  .mini-cv {
    grid-template-columns: 1fr;
  }
}



.content li:hover {
  color: var(--text-primary);
  border-left-color: var(--accent);
  padding-left: 15px;
  text-shadow: 0 0 5px rgba(255, 102, 0, 0.3);
}

/* Effet de focus amélioré */
*:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 20px rgba(255, 102, 0, 0.5);
  border-radius: 4px;
}

/* Réduction des animations pour l'accessibilité */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .parallax-element {
    transform: none !important;
  }
}

/* Nav texte accessible, cachée visuellement */
.sr-nav{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
