 :root {
     /* Couleurs de base - Thème clair */
     --bg-color: #ffffff;
     --bg-secondary: #f8fafc;
     --bg-tertiary: #f1f5f9;

     --text-color: #1e293b;
     --text-secondary: #475569;
     --text-muted: #64748b;
     --text-disabled: #94a3b8;

     --primary-color: #3b82f6;
     --primary-hover: #2563eb;
     --primary-light: #dbeafe;
     --primary-text: #ffffff;

     --accent-color: #06b6d4;
     --accent-hover: #0891b2;

     --success-color: #10b981;
     --warning-color: #f59e0b;
     --error-color: #ef4444;
     --info-color: #8b5cf6;

     --border-color: #e2e8f0;
     --border-focus: #3b82f6;
     --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
     --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
     --shadow-large: 0 10px 15px rgba(0, 0, 0, 0.1);

     /* Transitions */
     --transition-fast: 150ms ease-in-out;
     --transition-normal: 250ms ease-in-out;
     --transition-slow: 350ms ease-in-out;

     /* Rayons de bordure */
     --radius-sm: 0.375rem;
     --radius-md: 0.5rem;
     --radius-lg: 0.75rem;
     --radius-xl: 1rem;
 }

 /* Thème sombre */
 [data-theme="dark"] {
     --bg-color: #020617;
     --bg-secondary: #0f172a;
     --bg-tertiary: #1e293b;

     --text-color: #f8fafc;
     --text-secondary: #cbd5e1;
     --text-muted: #94a3b8;
     --text-disabled: #64748b;

     --primary-color: #60a5fa;
     --primary-hover: #3b82f6;
     --primary-light: #1e3a8a;
     --primary-text: #1e293b;

     --accent-color: #22d3ee;
     --accent-hover: #06b6d4;

     --success-color: #34d399;
     --warning-color: #fbbf24;
     --error-color: #f87171;
     --info-color: #a78bfa;

     --border-color: #334155;
     --border-focus: #60a5fa;
     --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.3);
     --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.3);
     --shadow-large: 0 10px 15px rgba(0, 0, 0, 0.4);
 }

 /* Préférences système */
 @media (prefers-color-scheme: dark) {
     :root:not([data-theme]) {
         --bg-color: #020617;
         --bg-secondary: #0f172a;
         --bg-tertiary: #1e293b;
         --text-color: #f8fafc;
         --text-secondary: #cbd5e1;
         --text-muted: #94a3b8;
         --primary-color: #60a5fa;
         --primary-hover: #3b82f6;
         --primary-text: #1e293b;
         --border-color: #334155;
         --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.3);
         --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.3);
     }
 }

 /* Styles globaux */
 * {
     box-sizing: border-box;
 }

 html {
     scroll-behavior: smooth;
     scroll-padding-top: 80px;
 }

 body {
     background-color: var(--bg-color);
     color: var(--text-color);
     font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
     overflow-x: hidden;
     transition: all var(--transition-normal);
     line-height: 1.6;
 }

 /* Navbar personnalisée */
 .navbar-custom {
     background-color: var(--bg-secondary) !important;
     backdrop-filter: blur(10px);
     border-bottom: 1px solid var(--border-color);
     box-shadow: var(--shadow-light);
     transition: all var(--transition-normal);
 }

 .navbar-brand {
     font-weight: 600;
     color: var(--text-color) !important;
     font-size: 1.25rem;
 }

 /* Navigation links */
 .navbar-nav .nav-link {
     color: var(--text-secondary) !important;
     font-weight: 500;
     padding: 0.5rem 1rem !important;
     margin: 0 0.25rem;
     border-radius: var(--radius-md);
     transition: all var(--transition-fast);
     position: relative;
 }

 .navbar-nav .nav-link:hover {
     color: var(--primary-color) !important;
     background-color: var(--primary-light);
     transform: translateY(-1px);
 }

 .navbar-nav .nav-link::after {
     content: '';
     position: absolute;
     bottom: 0;
     left: 50%;
     width: 0;
     height: 2px;
     background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
     transition: all var(--transition-fast);
     transform: translateX(-50%);
 }

 .navbar-nav .nav-link:hover::after {
     width: 80%;
 }

 /* Navbar toggler personnalisé */
 .navbar-toggler {
     border: none;
     padding: 0.25rem 0.5rem;
     border-radius: var(--radius-md);
     background: var(--bg-tertiary);
     transition: all var(--transition-fast);
 }

 .navbar-toggler:hover {
     background: var(--primary-light);
     transform: scale(1.05);
 }

 .navbar-toggler:focus {
     box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
 }

 .navbar-toggler-icon {
     background-image: none;
     width: 1.2em;
     height: 1.2em;
     position: relative;
 }

 .navbar-toggler-icon::before {
     content: '☰';
     position: absolute;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     font-size: 1.2em;
     color: var(--text-color);
     transition: all var(--transition-fast);
 }

 .navbar-toggler:hover .navbar-toggler-icon::before {
     color: var(--primary-color);
 }

 /* Responsive navbar */
 @media (max-width: 991px) {
     .navbar-collapse {
         background: var(--bg-secondary);
         border-radius: var(--radius-lg);
         margin-top: 1rem;
         padding: 1rem;
         box-shadow: var(--shadow-medium);
         border: 1px solid var(--border-color);
     }

     .navbar-nav {
         gap: 0.5rem;
     }

     .navbar-nav .nav-link {
         text-align: center;
         padding: 0.75rem 1rem !important;
         border-radius: var(--radius-md);
     }

     .navbar-nav .nav-link:hover {
         background-color: var(--primary-color);
         color: var(--primary-text) !important;
     }
 }

 /* Switch de thème moderne */
 .theme-toggle {
     background: var(--bg-tertiary);
     border: 2px solid var(--border-color);
     border-radius: var(--radius-xl);
     padding: 0;
     cursor: pointer;
     transition: all var(--transition-normal);
     position: relative;
     width: 60px;
     height: 32px;
     display: flex;
     align-items: center;
     overflow: hidden;
 }

 .theme-toggle:hover {
     border-color: var(--primary-color);
     box-shadow: var(--shadow-medium);
 }

 .theme-toggle::before {
     content: '';
     position: absolute;
     top: 2px;
     left: 2px;
     width: 24px;
     height: 24px;
     border-radius: 50%;
     background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
     transition: transform var(--transition-normal);
     box-shadow: var(--shadow-light);
 }

 [data-theme="dark"] .theme-toggle::before {
     transform: translateX(28px);
 }

 .theme-toggle-icon {
     position: absolute;
     font-size: 14px;
     transition: all var(--transition-normal);
     z-index: 1;
 }

 .theme-toggle-icon.sun {
     left: 8px;
     opacity: 1;
 }

 .theme-toggle-icon.moon {
     right: 8px;
     opacity: 0.5;
 }

 [data-theme="dark"] .theme-toggle-icon.sun {
     opacity: 0.5;
 }

 [data-theme="dark"] .theme-toggle-icon.moon {
     opacity: 1;
 }

 /* Section Hero améliorée */
 .hero-bg {
     background:
         linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%),
         linear-gradient(120deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
     min-height: 100vh;
     position: relative;
     overflow: hidden;
 }

 .hero-bg::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background:
         radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
         radial-gradient(circle at 80% 20%, rgba(147, 51, 234, 0.1) 0%, transparent 50%);
     z-index: 1;
 }

 .hero-content {
     position: relative;
     z-index: 2;
 }

 .hero-title {
     background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
     font-weight: 700;
 }

 /* Boutons améliorés */
 .btn-modern {
     border-radius: var(--radius-lg);
     font-weight: 500;
     padding: 0.75rem 2rem;
     transition: all var(--transition-fast);
     position: relative;
     overflow: hidden;
 }

 .btn-modern::before {
     content: '';
     position: absolute;
     top: 0;
     left: -100%;
     width: 100%;
     height: 100%;
     background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
     transition: left 0.5s;
 }

 .btn-modern:hover::before {
     left: 100%;
 }

 .btn-primary-modern {
     background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
     color: var(--primary-text);
     border: none;
     box-shadow: var(--shadow-medium);
 }

 .btn-primary-modern:hover {
     transform: translateY(-2px);
     box-shadow: var(--shadow-large);
 }

 .btn-outline-modern {
     background: transparent;
     color: var(--text-color);
     border: 2px solid var(--border-color);
     backdrop-filter: blur(10px);
 }

 .btn-outline-modern:hover {
     background: var(--bg-secondary);
     border-color: var(--primary-color);
     color: var(--primary-color);
 }

 /* Cards modernes */
 .card-modern {
     background: var(--bg-secondary);
     border: 1px solid var(--border-color);
     border-radius: var(--radius-xl);
     box-shadow: var(--shadow-light);
     transition: all var(--transition-normal);
     overflow: hidden;
 }

 .card-modern:hover {
     transform: translateY(-5px);
     box-shadow: var(--shadow-large);
 }

 /* Carousel personnalisé */
 .carousel-modern .carousel-inner {
     border-radius: var(--radius-xl);
     overflow: hidden;
 }

 .carousel-modern .carousel-control-prev,
 .carousel-modern .carousel-control-next {
     background: var(--bg-secondary);
     width: 50px;
     height: 50px;
     border-radius: 50%;
     top: 50%;
     transform: translateY(-50%);
     opacity: 0.8;
     transition: all var(--transition-fast);
 }

 .carousel-modern .carousel-control-prev {
     left: 20px;
 }

 .carousel-modern .carousel-control-next {
     right: 20px;
 }

 .carousel-modern .carousel-control-prev:hover,
 .carousel-modern .carousel-control-next:hover {
     opacity: 1;
     transform: translateY(-50%) scale(1.1);
 }

 /* Formulaires */
 .form-modern .form-control {
     background: var(--bg-secondary);
     border: 2px solid var(--border-color);
     border-radius: var(--radius-lg);
     color: var(--text-color);
     padding: 1rem;
     transition: all var(--transition-fast);
 }

 .form-modern .form-control:focus {
     border-color: var(--border-focus);
     box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
     outline: none;
 }

 .form-modern .form-label {
     color: var(--text-secondary);
     font-weight: 500;
     margin-bottom: 0.5rem;
 }

 /* Footer */
 .footer-modern {
     background: var(--bg-secondary);
     border-top: 1px solid var(--border-color);
     color: var(--text-muted);
 }

 /* Animations */
 @keyframes fadeInUp {
     from {
         opacity: 0;
         transform: translateY(30px);
     }

     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 .fade-in-up {
     animation: fadeInUp 0.6s ease-out forwards;
 }

 /* Toast personnalisé */
 .toast-modern {
     background: var(--bg-secondary);
     border: 1px solid var(--border-color);
     color: var(--text-color);
     border-radius: var(--radius-lg);
     box-shadow: var(--shadow-large);
 }

 /* Responsive */
 @media (max-width: 768px) {
     .hero-bg {
         background-attachment: scroll;
     }

     .btn-modern {
         padding: 0.625rem 1.5rem;
     }

     .theme-toggle {
         width: 50px;
         height: 28px;
     }

     .theme-toggle::before {
         width: 20px;
         height: 20px;
     }

     [data-theme="dark"] .theme-toggle::before {
         transform: translateX(22px);
     }
 }

 /* Offcanvas personnalisé */
 .offcanvas-modern {
     background: var(--bg-secondary);
     border-left: 1px solid var(--border-color);
 }

 .offcanvas-modern .nav-link {
     color: var(--text-color);
     padding: 1rem 0;
     border-bottom: 1px solid var(--border-color);
     transition: all var(--transition-fast);
 }

 .offcanvas-modern .nav-link:hover {
     color: var(--primary-color);
     padding-left: 1rem;
 }

 /* Photo de profil dans About - Effet Hover */
 .about-photo {
     position: relative;
     display: inline-block;
 }

 .profile-img-container {
     position: relative;
     width: 280px;
     height: 280px;
     border-radius: 50%;
     overflow: hidden;
     border: 6px solid var(--primary-color);
     box-shadow: var(--shadow-large);
     transition: all var(--transition-normal);
     cursor: pointer;
 }

 .profile-img-container:hover {
     transform: scale(1.05);
     box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
     border-color: var(--accent-color);
 }

 .profile-img {
     width: 100%;
     height: 100%;
     object-fit: cover;
     position: absolute;
     top: 0;
     left: 0;
     transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
 }

 .profile-img-normal {
     opacity: 1;
     transform: scale(1);
     z-index: 2;
 }

 .profile-img-hover {
     opacity: 0;
     transform: scale(1.1);
     z-index: 1;
 }

 .profile-img-container:hover .profile-img-normal {
     opacity: 0;
     transform: scale(0.9);
 }

 .profile-img-container:hover .profile-img-hover {
     opacity: 1;
     transform: scale(1);
 }

 /* Effet de transition avec overlay */
 .profile-img-container::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
     opacity: 0;
     z-index: 3;
     transition: opacity 0.3s ease;
     pointer-events: none;
 }

 .profile-img-container:hover::before {
     opacity: 0.1;
 }

 .about-photo::before {
     content: '';
     position: absolute;
     top: -20px;
     right: -20px;
     width: 100px;
     height: 100px;
     background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
     border-radius: 50%;
     opacity: 0.3;
     z-index: 1;
     animation: float 3s ease-in-out infinite;
 }

 .about-photo::after {
     content: '';
     position: absolute;
     bottom: -15px;
     left: -15px;
     width: 80px;
     height: 80px;
     background: linear-gradient(135deg, var(--success-color), var(--warning-color));
     border-radius: 50%;
     opacity: 0.4;
     z-index: 1;
     animation: float 3s ease-in-out infinite reverse;
 }

 /* Animation des éléments décoratifs au hover */
 .about-photo:hover::before {
     animation-duration: 1s;
     transform: scale(1.2);
 }

 .about-photo:hover::after {
     animation-duration: 1s;
     transform: scale(1.3);
 }

 @keyframes float {

     0%,
     100% {
         transform: translateY(0px);
     }

     50% {
         transform: translateY(-10px);
     }
 }

 [data-theme="dark"] .profile-img-container {
     border-color: var(--primary-color);
 }

 [data-theme="dark"] .profile-img-container:hover {
     border-color: var(--accent-color);
 }

 /* Boutons de projets */
 .project-buttons {
     margin-top: 1rem;
     display: flex;
     gap: 0.75rem;
     flex-wrap: wrap;
 }

 .project-buttons .btn {
     display: inline-flex;
     align-items: center;
     gap: 0.5rem;
     font-size: 0.875rem;
     padding: 0.625rem 1.25rem;
     min-width: auto;
     white-space: nowrap;
 }

 .project-buttons .btn span {
     font-size: 1rem;
     transition: transform var(--transition-fast);
 }

 .project-buttons .btn:hover span {
     transform: scale(1.1);
 }

 /* Animation spéciale pour le bouton GitHub */
 .project-buttons .btn-outline-modern:hover span {
     transform: rotate(360deg) scale(1.1);
     transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
 }

 /* Responsive pour les boutons de projet */
 @media (max-width: 576px) {
     .project-buttons {
         justify-content: center;
         margin-top: 1.5rem;
     }

     .project-buttons .btn {
         flex: 1;
         min-width: 120px;
         justify-content: center;
     }
 }

 /* Responsive pour la photo */
 @media (max-width: 991px) {
     .profile-img-container {
         width: 200px;
         height: 200px;
         margin-bottom: 2rem;
     }

     .about-photo::before,
     .about-photo::after {
         display: none;
     }
 }

 /* Skills Section */
 .skill-card {
     transition: all var(--transition-normal);
     border: 2px solid transparent;
 }

 .skill-card:hover {
     border-color: var(--primary-color);
     background: var(--bg-color);
 }

 .skill-icon {
     padding: 1rem;
     border-radius: 50%;
     background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
     width: 80px;
     height: 80px;
     margin: 0 auto;
     display: flex;
     align-items: center;
     justify-content: center;
     box-shadow: var(--shadow-medium);
 }

 .skill-bar {
     height: 4px;
     background: var(--border-color);
     border-radius: var(--radius-sm);
     overflow: hidden;
 }

 .skill-progress {
     height: 100%;
     background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
     border-radius: var(--radius-sm);
     transition: width 2s ease-in-out;
     animation: skillLoad 2s ease-in-out;
 }

 @keyframes skillLoad {
     from {
         width: 0% !important;
     }
 }

 /* Section spacing */
 .section-modern {
     padding: 5rem 0;
 }

 .section-title {
     color: var(--text-color);
     font-weight: 600;
     margin-bottom: 3rem;
     position: relative;
 }

 .section-title::after {
     content: '';
     position: absolute;
     bottom: -10px;
     left: 50%;
     transform: translateX(-50%);
     width: 60px;
     height: 3px;
     background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
     border-radius: var(--radius-sm);
 }

 /* Sélecteur de langue */
 .lang-select {
     background: var(--bg-secondary);
     border: 2px solid var(--border-color);
     color: var(--text-color);
     border-radius: var(--radius-md);
     padding: 0.5rem;
     transition: all var(--transition-fast);
 }

 .lang-select:focus {
     border-color: var(--border-focus);
     outline: none;
     box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
 }