/* Variables globales */
:root {
  /* Couleurs principales */

 
  --primary-color:rgb(82, 124, 223) ;
  --primary-dark: #075985;
  --secondary-color: #0891b2bb;
  --text-color: #0f172a;
  --text-light: #64748b;
  --background: #ffffff;
  --background-alt: #f0f9ff;
  --border-color: #e0f2fe;
  --success-color: #0ea5e9;
  --error-color: #dc2626;

  /* Dark Mode Colors */

  --dark-background: #0c1618;
  --dark-background-alt: #164e63;
  --dark-text-color: #f0f9ff;
  --dark-text-light: #94a3b8;
  --dark-border-color: #0e7490;

  
  /* Typographie */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Transitions */
  --transition: all 0.3s ease;
  
  /* Espacement */
  --section-padding: 5rem 0;
  --container-padding: 0 1.5rem;
}

/* Reset et base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  line-height: 1.6;
  
  overflow-x: hidden;
  transition: var(--transition);
}


body.dark-mode {
  color: var(--dark-text-color);
  background-color: var(--dark-background);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
  width: 100%;
}

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

a:hover {
  color: var(--primary-color);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.75rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

/* Écran de chargement */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s;
}

.dark-mode .loader-container {
  background-color: var(--dark-background);
}

.loader-content {
  text-align: center;
}

.loader-content h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: rgb(22, 22, 20);
}

.dots {
  display: inline-block;
  animation: dots 2.5s infinite;
}

.loader-progress {
  width: 300px;
  height: 8px;
  background-color: rgb(3, 131, 252);
  border-radius: 4px;
  overflow: hidden;
}

.dark-mode .loader-progress {
  background-color: var(--dark-border-color);
}

.progress-bar {
  height: 100%;
  width: 0;
  background-color: var(--primary-color);
  border-radius: 4px;
  animation: progress 2s ease-in-out forwards;
}

/* Animations pour le loader */
@keyframes dots {
  0%, 20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%, 100% {
    content: "...";
  }
}

@keyframes progress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* En-tête */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  padding: 1rem 0;
}

header.scrolled {
  padding: 0.75rem 0;
  background-color: rgba(255, 255, 255, 0.98);
}

.dark-mode header {
  background-color: rgba(18, 18, 18, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.dark-mode header.scrolled {
  background-color: rgba(18, 18, 18, 0.98);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--text-color);
}

.dark-mode .logo a {
  color: var(--dark-text-color);
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggles {
  display: flex;
  align-items: center;
  gap: 1rem;
}


.theme-toggle {
  width: 48px;
  height: 24px;
  background-color: var(--border-color);
  border-radius: 12px;
  position: relative;
  transition: var(--transition);
}

.dark-mode .theme-toggle {
  background-color: var(--primary-color);
}

.theme-toggle i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--text-color);
}

.theme-toggle .fa-moon {
  left: 6px;
}

.theme-toggle .fa-sun {
  right: 6px;
  color: var(--dark-text-color);
}

.dark-mode .theme-toggle .fa-moon {
  color: var(--dark-text-color);
}

.dark-mode .theme-toggle .fa-sun {
  color: var(--dark-text-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
}

.bar {
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  transition: var(--transition);
}

.dark-mode .bar {
  background-color: var(--dark-text-color);
}

/* Hero section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 60px;
  background-color: var(--background);
  position: relative;
  overflow: hidden;
}

.dark-mode .hero {
  background-color: var(--dark-background);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 80%;
  height: 200%;
  background: linear-gradient(45deg, rgba(175, 164, 183, 0.361), rgba(83, 79, 77, 0.926));
  border-radius: 50%;
  z-index: 0;
}

.hero-content {
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: 1rem;
}

.highlight {
  color: var(--primary-color);
}

.typing-text {
  font-size: 2rem;
  font-weight: 700;
  height: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  position: relative;
}

.typing-text::after {
  content: '';
  position: absolute;
  right: -8px;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

.dark-mode .hero-description {
  color: var(--dark-text-light);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::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:hover::before {
  left: 100%;
}

.btn.primary{
  text-align: center;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn.primary {
  background-color: var(--primary-color);
  color: white;
}

.btn.primary:hover {
  background-color: var(--primary-dark);
}

.btn.secondary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn.secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn i {
  margin-right: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background-alt);
  color: var(--text-color);
  transition: var(--transition);
  font-size: 1.25rem;
}

.dark-mode .social-links a {
  background-color: var(--dark-background-alt);
  color: var(--dark-text-color);
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* Sections communes */
section {
  padding: var(--section-padding);
}

section:nth-child(even) {
  background-color: var(--background-alt);
}

.dark-mode section:nth-child(even) {
  background-color: var(--dark-background-alt);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 700px;
  margin: -2rem auto 3rem;
}

.dark-mode .section-subtitle {
  color: var(--dark-text-light);
}

/* Section À propos */
.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  position: relative;
}

.image-container {
  position: relative;
  z-index: 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dark-mode .image-container {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-image::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 10px;
  top: 20px;
  left: 20px;
  z-index: 0;
}

.about-text h3 {
  margin-bottom: 1.5rem;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.detail i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.detail h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.detail p {
  color: var(--text-light);
  margin-bottom: 0;
}

.dark-mode .detail p {
  color: var(--dark-text-light);
}

/* Section Compétences */
.skills-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.skills-text h3{
  margin-bottom: 1.5rem;
}
.skill-item{
  margin-bottom: 1.5rem;
}
.skill-info{
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.dark-mode .progress-bar {
  background-color: var(--dark-border-color);
}

.progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 4px;
  transition: width 1s ease;
}
.progress-html{
  height: 100%;
  background-color: rgb(255, 103, 2);
  border-radius: 10px;
  transition: width 1s ease;
  width: 85%
}
.progress-css{
  height: 100%;
  background-color: rgb(0, 255, 55);
  border-radius: 4px;
  transition: width 1s ease;
  width: 55%
}
.progress-js{
  height: 100%;
  background-color: rgb(255, 136, 0);
  border-radius: 4px;
  transition: width 1s ease;
  width: 30%
}

.progress-ux{
  height: 100%;
  background-color: rgb(5, 44, 153);
  border-radius: 4px;
  transition: width 1s ease;
  width: 70%
}
.progress-python{
  height: 100%;
  background-color: rgb(156, 121, 6);
  border-radius: 4px;
  transition: width 1s ease;
  width: 36.80%
}
.progress-c{
  height: 100%;
  background-color: rgb(121, 224, 190);
  border-radius: 4px;
  transition: width 1s ease;
  width: 6.12%
}

.progress-php{
  height: 100%;
  background-color: rgb(18, 10, 134);
  border-radius: 4px;
  transition: width 1s ease;
  width: 10.12%
}
.progress-mql{
  height: 100%;
  background-color: rgb(18, 10, 134);
  border-radius: 4px;
  transition: width 1s ease;
  width: 10.12%
}


.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background-color: var(--background);
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  border-radius: 12px;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.skill-card:hover::before {
  transform: scaleX(1);
}

.dark-mode .skill-card {
  background-color: var(--dark-background-alt);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dark-mode .skill-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.skill-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.skill-card h4 {
  margin-bottom: 0;
}

/* Section Projets & Projets Futurs */
.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  gap: 0.75rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  background-color: var(--background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.dark-mode .filter-btn {
  background-color: var(--dark-background);
  color: var(--dark-text-color);
  border-color: var(--dark-border-color);
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--background);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
}

.dark-mode .project-card {
  background-color: var(--dark-background-alt);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  border-color: var(--dark-border-color);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-color);
}

.dark-mode .project-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.project-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-img img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  margin-bottom: 0.75rem;
}

.project-content p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.dark-mode .project-content p {
  color: var(--dark-text-light);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.project-tags span {
  padding: 0.25rem 0.75rem;
  background-color: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.dark-mode .project-tags span {
  background-color: rgba(74, 108, 247, 0.2);
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

/* Section Témoignages */
.testimonial-slider {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonial-container {
  position: relative;
  overflow: hidden;
  height: 300px;
}

.testimonial {
  position: absolute;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease;
  padding: 1.5rem;
  background-color: var(--background);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dark-mode .testimonial {
  background-color: var(--dark-background-alt);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.testimonial.active {
  opacity: 1;
  visibility: visible;
}

.testimonial-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 0 2rem;
}

.testimonial-text i {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.testimonial-text i.fa-quote-left {
  position: absolute;
  top: 0;
  left: 0;
}

.testimonial-text i.fa-quote-right {
  position: absolute;
  bottom: 0;
  right: 0;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.testimonial-author img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
}

.testimonial-author h4 {
  margin-bottom: 0.25rem;
}

.testimonial-author p {
  color: var(--text-light);
  margin-bottom: 0;
  font-size: 0.875rem;
}

.dark-mode .testimonial-author p {
  color: var(--dark-text-light);
}

.testimonial-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.prev-btn,
.next-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: var(--transition);
}

.dark-mode .prev-btn,
.dark-mode .next-btn {
  background-color: var(--dark-background-alt);
  border: 1px solid var(--dark-border-color);
  color: var(--dark-text-color);
}

.prev-btn:hover,
.next-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.testimonial-dots {
  display: flex;
  gap: 0.5rem;
  margin: 0 1rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.dark-mode .dot {
  background-color: var(--dark-border-color);
}

.dot.active {
  background-color: var(--primary-color);
  transform: scale(1.2);
}

/* Section Contact */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
}

.contact-info h3,
.contact-form h3 {
  margin-bottom: 1.5rem;
}

.contact-details {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item i {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.contact-item h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.contact-item p {
  color: var(--text-light);
  margin-bottom: 0;
}

.dark-mode .contact-item p {
  color: var(--dark-text-light);
}

.contact-social {
  display: flex;
  gap: 1rem;
}

.contact-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--background-alt);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.25rem;
}

.dark-mode .contact-social a {
  background-color: var(--dark-background-alt);
  color: var(--dark-text-color);
}

.contact-social a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.form-group {
  position: relative;
  margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background-color: var(--background-alt);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  font-size: 1rem;
  transition: var(--transition);
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
  background-color: var(--dark-background-alt);
  border-color: var(--dark-border-color);
  color: var(--dark-text-color);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group label {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  background-color: transparent;
  color: var(--text-light);
  transition: var(--transition);
  pointer-events: none;
}

.dark-mode .form-group label {
  color: var(--dark-text-light);
}

.form-group textarea + label {
  top: 1rem;
  transform: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 0.75rem;
  font-size: 0.75rem;
  padding: 0 0.5rem;
  background-color: var(--background-alt);
  color: var(--primary-color);
}

.dark-mode .form-group input:focus + label,
.dark-mode .form-group textarea:focus + label,
.dark-mode .form-group input:not(:placeholder-shown) + label,
.dark-mode .form-group textarea:not(:placeholder-shown) + label {
  background-color: var(--dark-background-alt);
  color: var(--primary-color);
}

/* Footer */
footer {
  background-color: var(--background-alt);
  padding: 4rem 0 0;
  position: relative;
}

.dark-mode footer {
  background-color: var(--dark-background-alt);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-logo a {
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--text-color);
}

.dark-mode .footer-logo a {
  color: var(--dark-text-color);
}

.footer-logo span {
  color: var(--primary-color);
}

.footer-logo p {
  color: var(--text-light);
  margin-top: 0.5rem;
}

.dark-mode .footer-logo p {
  color: var(--dark-text-light);
}

.footer-links h3,
.footer-newsletter h3 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-newsletter p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.dark-mode .footer-newsletter p {
  color: var(--dark-text-light);
}

.footer-newsletter form {
  display: flex;
  overflow: hidden;
  border-radius: 4px;
}

.footer-newsletter input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-right: none;
  font-size: 0.875rem;
  color: var(--text-color);
}

.dark-mode .footer-newsletter input {
  background-color: var(--dark-background);
  border-color: var(--dark-border-color);
  color: var(--dark-text-color);
}

.footer-newsletter button {
  padding: 0 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.footer-newsletter button:hover {
  background-color: var(--primary-dark);
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
}

.dark-mode .footer-bottom {
  border-color: var(--dark-border-color);
}

#scrollToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
}

#scrollToTop.active {
  opacity: 1;
  visibility: visible;
}

#scrollToTop:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
}

/* Animation sur les sections */
.fade-in {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .about-content,
  .skills-content,
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .about-image::before {
    display: none;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  header .container {
    padding: 0 1rem;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--background);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: var(--transition);
    z-index: 99;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1);
  }
  
  .dark-mode .nav-links {
    background-color: var(--dark-background);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.3);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .hamburger {
    display: flex;
    z-index: 100;
  }
  
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .about-details {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
  
  .nav-toggles {
    gap: 0.5rem;
  }
  
  .language-toggle {
    margin-right: 0.5rem;
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonial-container {
    height: 350px;
  }
}

/* Section Template */

main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  min-height: 100vh;
  background: linear-gradient((23deg, #3a8ce3a6, rgba(94, 56, 232, 0.667)));
}

/* Content */
.content {
  padding-left: 120px;
  color: #080908;
}
.dark-mode .content {
  padding-left: 120px;
  color: white;
}

.content h1 {
  font-family: "Dancing Script", cursive;
  font-size: clamp(2.5rem, 4vw, 6rem);
  font-weight: 700;
  background: -webkit-linear-gradient(0deg, #f5f6f6, #2b8aefd8d8);
  background-clip : text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 36px;
  padding-left: 10px;
}

.description {
  font-size: 18px;
  line-height: 1.6;
  padding-right: 100px;
  opacity: 5;
  transition: opacity 0.5s ease-in-out;
  min-height: 120px;
}

.description.fade-out {
  opacity: 1;
}

.current-pastry {
  font-size: clamp(1rem, 4vw, 1.4rem);
  font-weight: 600;
  color: #598fdf;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btnn {
  background-color: #343d57;
  background-image: linear-gradient(-180deg, #3962dc, #3335a8);
  font-size: clamp(0.8rem, 8vw, 0.9rem);
  font-weight: 600;
  color: #fff;
  width: max-content;
  outline: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 10px 20px;
  margin-top: 26px;
  text-align: center;
  transform: scale(1);
  transition: all 0.2s ease-in;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  justify-content: center;
  text-align: center;
  align-items: center;
}

.btnn:hover {
  box-shadow: 0 4px 10px rgba(71, 153, 173, 0.731)1;
  transform: scale(0.98);
}

/* Stacked Cards */
.stack {
  position: relative;
}

.card {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  width: 350px;
  height: 500px;
  border-radius: 2rem;
  box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.25),
      0 15px 20px 0 rgba(0, 0, 0, 0.125);
  transition: transform 0.6s;
  user-select: none;
  cursor: pointer;
}

.card img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.card:nth-last-child(n + 5) {
  --x: calc(-50% + 90px);
  transform: translate(var(--x), -50%) scale(0.85);
  box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.01);
}

.card:nth-last-child(4) {
  --x: calc(-50% + 60px);
  transform: translate(var(--x), -50%) scale(0.9);
}

.card:nth-last-child(3) {
  --x: calc(-50% + 30px);
  transform: translate(var(--x), -50%) scale(0.95);
}

.card:nth-last-child(2) {
  --x: calc(-50%);
  transform: translate(var(--x), -50%) scale(1);
}

.card:nth-last-child(1) {
  --x: calc(-50% - 30px);
  transform: translate(var(--x), -50%) scale(1.05);
}

.card:nth-last-child(1) img {
  box-shadow: 0 1px 5px 5px rgb(58, 4, 255)
}

.swap {
  animation: swap 1.3s ease-out forwards;
}

@keyframes swap {
  30% {
      transform: translate(calc(var(--x) - 250px), -50%) scale(0.85) rotate(-5deg)
          rotateY(65deg);
  }
  100% {
      transform: translate(calc(var(--x) - 30px), -50%) scale(0.5);
      z-index: -1;
  }
}

/* Media queries for keyframes */
@media (max-width: 1200px) {
  @keyframes swap {
      30% {
          transform: translate(calc(var(--x) - 200px), -50%) scale(0.85)
              rotate(-5deg) rotateY(65deg);
      }

      100% {
          transform: translate(calc(var(--x) - 30px), -50%) scale(0.5);
          z-index: -1;
      }
  }

  .content {
      padding-left: 80px;
  }

  .description {
      padding-right: 40px;
  }

  .card {
      width: 250px;
      height: 380px;
  }
}

@media (max-width: 1050px) {
  @keyframes swap {
      30% {
          transform: translate(calc(var(--x) - 150px), -50%) scale(0.85)
              rotate(-5deg) rotateY(65deg);
      }

      100% {
          transform: translate(calc(var(--x) - 30px), -50%) scale(0.5);
          z-index: -1;
      }
  }

  .content {
      padding-left: 60px;
  }

  .description {
      line-height: 1.5;
  }

  .card {
      width: 220px;
      height: 350px;
  }
}

@media (max-width: 990px) {
  .description {
      padding-right: 0;
  }

  .card {
      width: 200px;
      height: 300px;
  }
}

@media (max-width: 950px) {
  main {
      grid-template-columns: 1fr;
      grid-template-rows: 4fr 3fr;
      grid-template-areas:
          "stacked"
          "content";
  }

  .content {
      grid-area: content;
      text-align: center;
      padding: 0 90px;
  }

  .btn {
      margin-bottom: 30px;
  }

  .stack {
      grid-area: stacked;
  }
}

@media (max-width: 650px) {
  main {
      grid-template-rows: 1fr 1fr;
  }

  .content {
      padding: 0 50px;
  }

  .content h1 {
      padding-left: 0;
  }

  .btn {
      padding: 8px 16px;
  }

  .card {
      width: 180px;
      height: 260px;
  }
}



/* ===== MEDIA QUERIES POUR LA RESPONSIVITÉ ===== */

/* Tablettes et écrans moyens */
@media (max-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .typing-text {
    font-size: 1.75rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .about-details {
    grid-template-columns: 1fr;
  }
  
  .skills-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* Tablettes petites et mobiles larges */
@media (max-width: 768px) {
  /* Navigation mobile */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--background);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: var(--transition);
    z-index: 999;
  }
  
  .dark-mode .nav-links {
    background-color: var(--dark-background);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .hamburger {
    display: flex;
    z-index: 1000;
  }
  
  .hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Empêcher le scroll quand le menu est ouvert */
  body.menu-open {
    overflow: hidden;
  }
  
  /* Hero section mobile */
  .hero {
    height: auto;
    min-height: 100vh;
    padding: 120px 0 60px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .typing-text {
    font-size: 1.5rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 250px;
  }
  
  /* Sections */
  section {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
  
  /* About section mobile */
  .about-image::before {
    top: 10px;
    left: 10px;
  }
  
  /* Skills mobile */
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
  }
  
  .skill-card {
    padding: 1rem;
  }
  
  .skill-card i {
    font-size: 2rem;
  }
  
  /* Projects mobile */
  .projects-filter {
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Testimonials mobile */
  .testimonial {
    padding: 1rem;
    height: auto;
    min-height: 250px;
  }
  
  .testimonial-text {
    padding: 0 1rem;
  }
  
  /* Contact form mobile */
  .contact-form {
    grid-template-columns: 1fr;
  }
  
  /* Footer mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-section h3 {
    margin-bottom: 1rem;
  }
  
  .newsletter-form {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .newsletter-form input {
    width: 100%;
  }
}

/* Mobiles petits */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .typing-text {
    font-size: 1.25rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .skill-card {
    padding: 0.75rem;
  }
  
  .skill-card h4 {
    font-size: 0.875rem;
  }
  
  .project-content {
    padding: 1rem;
  }
  
  .project-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn.small {
    width: 100%;
  }
  
  .testimonial-author {
    flex-direction: column;
    text-align: center;
  }
  
  .testimonial-author img {
    width: 50px;
    height: 50px;
  }
}

/* Très petits écrans */
@media (max-width: 320px) {
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .typing-text {
    font-size: 1.1rem;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .loader-progress {
    width: 250px;
  }
}

/* Améliorations pour les écrans tactiles */
@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .skill-card:hover,
  .project-card:hover {
    transform: none;
  }
  
  .btn:active {
    transform: scale(0.98);
  }
  
  .skill-card:active,
  .project-card:active {
    transform: translateY(-2px);
  }
}

/* Mode paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    height: auto;
    min-height: 100vh;
    padding: 100px 0 40px;
  }
  
  .hero-content {
    max-width: 600px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .typing-text {
    font-size: 1.25rem;
  }
}

/* Optimisations pour les performances sur mobile */
@media (max-width: 768px) {
  * {
    -webkit-tap-highlight-color: transparent;
  }
  
  .hero::before {
    display: none; /* Masquer les éléments décoratifs sur mobile pour les performances */
  }
  
  .skill-card::before,
  .skill-card::after {
    display: none; /* Masquer les pseudo-éléments complexes sur mobile */
  }
}

