/* CSS mis à jour - Version 2024-01-15 16:30 - Cache busting */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #1e293b;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  padding-top: 80px; /* Espace pour la navbar fixe */
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

.home-container, .main-content {
  max-width: 100vw;
  overflow-x: hidden;
}

.card, .welcome-section, img, .skills-grid, .project-item, .timeline-item {
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.content-container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  background-color: transparent;
  overflow-y: auto;
}

.fish {
  position: absolute;
  width: 55px;
  height: auto;
  transform-origin: center center;
  opacity: 1;
  filter: grayscale(0.3);
}

/* Portfolio styles */
.home-container {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.welcome-section {
  text-align: center;
  margin-bottom: 5rem;
  padding: 4rem 2rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  position: relative;
}

.welcome-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.welcome-text {
  flex: 1;
  text-align: left;
}

.welcome-profile {
  flex-shrink: 0;
}

.welcome-profile img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #242222;
  box-shadow: 0 8px 25px rgba(36, 34, 34, 0.3);
  transition: all 0.3s ease;
}

.welcome-profile img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(36, 34, 34, 0.4);
}

.welcome-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #242222, #242222, #242222);
  border-radius: 16px 16px 0 0;
}

.welcome-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: #64748b;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.main-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
  padding: 0;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  position: relative;
  scroll-margin-top: 100px; /* Offset pour la navbar fixe */
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.card-double {
  grid-column: span 2;
  background: #ffffff;
  border-radius: 12px;
  padding: 2.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  position: relative;
  scroll-margin-top: 100px;
}

.card-double:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.card h2 {
  color: #1e293b;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.3;
}

.card h3 {
  color: #374151;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 500;
}

.card p {
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card li {
  color: #64748b;
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-icon {
  font-size: 1.5rem;
  margin-right: 0.5rem;
  transition: all 0.2s ease;
  color: #000000;
}

.card li:hover .skill-icon {
  transform: scale(1.1);
  color: #242222;
}

.card li:hover {
  color: #475569;
}

/* Stylisation des liens */
a {
  color: #242222;
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

a:hover {
  color: #242222;
  border-bottom: 1px solid #242222;
}

a:focus {
  outline: 2px solid #242222;
  outline-offset: 2px;
}

/* Liens dans les cartes */
.card a {
  color: #242222;
  font-weight: 500;
}

.card a:hover {
  color: #242222;
  border-bottom: 1px solid #242222;
}

/* Liens dans les boutons de contact */
.contact-button {
  color: white !important;
  border-bottom: none !important;
}

.contact-button:hover {
  color: white !important;
  border-bottom: none !important;
}

/* Skills section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.skill-category {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.skill-category:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.skill-category h3 {
  color: #1e293b;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Projects section */
.project-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #242222;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.project-item:hover {
  background: #f1f5f9;
}

.project-item:last-child {
  margin-bottom: 0;
}

.project-item h3 {
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: #242222;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Timeline section */
.timeline-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #242222;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.timeline-item:hover {
  background: #f1f5f9;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-date {
  color: #242222;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Services section */
.services-list li {
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.services-list li strong {
  white-space: nowrap; /* Empêche la coupure du label */
}

.services-list li:last-child {
  border-bottom: none;
}

.services-list li:hover {
  padding-left: 0.5rem;
  color: #475569;
}

/* Contact section */
.contact-info {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #242222;
  border: 1px solid #e2e8f0;
}

.contact-info p {
  margin-bottom: 0.75rem;
}

.contact-info strong {
  color: #374151;
}

.contact-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #242222;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.contact-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(36, 34, 34, 0.3);
}

.contact-button:active {
  transform: translateY(0);
}

/* Responsive design */
@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
  }
  
  .card {
    padding: 1.75rem;
  }
  
  .card-double {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .home-container {
    padding: 1.5rem 1rem;
  }

  .welcome-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .welcome-text {
    text-align: center;
  }

  .welcome-profile img {
    width: 140px;
    height: 140px;
  }

  .welcome-section {
    padding: 2.5rem 1rem;
    margin-bottom: 2rem;
  }

  .welcome-section h1 {
    font-size: 2.25rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .main-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .card {
    padding: 1.5rem;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
  }
  
  .card-double {
    grid-column: span 1;
    padding: 1.5rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .skill-category {
    padding: 1rem;
  }

  .contact-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .project-item {
    padding: 1rem;
  }
  
  .timeline-item {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 60px;
  }
  
  .home-container {
    padding: 1rem 0.75rem;
  }

  .welcome-section {
    padding: 2rem 0.75rem;
    margin-bottom: 1.5rem;
  }
  
  .welcome-section h1 {
    font-size: 1.875rem;
  }

  .subtitle {
    font-size: 0.875rem;
  }

  .main-content {
    gap: 1rem;
  }

  .card {
    padding: 1.25rem;
    scroll-margin-top: 70px;
  }
  
  .card-double {
    padding: 1.25rem;
  }

  .card h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  
  .card h3 {
    font-size: 1rem;
  }
  
  .skills-grid {
    gap: 0.75rem;
  }
  
  .skill-category {
    padding: 0.75rem;
  }
  
  .skill-category h3 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
  }
  
  .skill-category ul {
    gap: 0.5rem;
  }
  
  .skill-category li {
    font-size: 0.875rem;
    padding: 0.5rem;
  }
  
  .project-item {
    padding: 0.75rem;
  }
  
  .project-item h3 {
    font-size: 1rem;
  }
  
  .project-item p {
    font-size: 0.875rem;
  }
  
  .tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
  
  .timeline-item {
    padding: 0.75rem;
  }
  
  .timeline-item h3 {
    font-size: 0.875rem;
  }
  
  .timeline-date {
    font-size: 0.75rem;
  }
  
  .contact-info p {
    font-size: 0.875rem;
  }
  
  .contact-button {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 360px) {
  .home-container {
    padding: 0.75rem 0.5rem;
  }
  
  .welcome-section {
    padding: 1.5rem 0.5rem;
  }
  
  .welcome-section h1 {
    font-size: 1.5rem;
  }
  
  .welcome-profile img {
    width: 120px;
    height: 120px;
  }
  
  .card {
    padding: 1rem;
  }
  
  .card h2 {
    font-size: 1rem;
  }
  
  .skill-category li {
    font-size: 0.8rem;
  }
}

/* Styles pour le formulaire de contact */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
}

.contact-form .form-group.full-width {
  grid-column: span 2;
}

.contact-form label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background-color: #f9fafb;
}

/* Amélioration des select en mode clair */
.contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

.contact-form select option {
  padding: 8px 12px;
  background: #ffffff;
  color: #374151;
}

.contact-form select option:checked,
.contact-form select option:hover {
  background: #242222;
  color: #ffffff;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: #242222;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(36, 34, 34, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  grid-column: span 2;
  background: #242222;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.contact-form button:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(36, 34, 34, 0.3);
}

.contact-form button:active {
  transform: translateY(0);
}

/* Style pour les boutons Symfony Form */
.submit-button-container {
  grid-column: span 2;
  position: relative;
  margin-top: 1rem;
}

.contact-form .contact-submit-btn {
  width: 100%;
  background: #242222;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}

.contact-form .contact-submit-btn i {
  font-size: 1.2rem;
}

.contact-form .contact-submit-btn:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(36, 34, 34, 0.3);
}

.contact-form .contact-submit-btn:active {
  transform: translateY(0);
}

/* Fallback pour les autres types de boutons */
.contact-form input[type="submit"],
.contact-form button[type="submit"] {
  grid-column: span 2;
  background: #242222;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
  width: 100%;
}

.contact-form input[type="submit"]:hover,
.contact-form button[type="submit"]:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(36, 34, 34, 0.3);
}

.contact-form input[type="submit"]:active,
.contact-form button[type="submit"]:active {
  transform: translateY(0);
}

/* Responsive pour le formulaire */
@media (max-width: 768px) {
  .contact-form {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-form .form-group.full-width {
    grid-column: span 1;
  }

  .submit-button-container {
    grid-column: span 1;
  }

  .contact-form button {
    grid-column: span 1;
  }

  .card-double {
    grid-column: span 1;
    padding: 1.5rem;
  }
}

/* Styles pour les notifications */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  line-height: 1.4;
}

.notification-success {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

.notification-error {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

.notification-content i {
  font-size: 20px;
  flex-shrink: 0;
}

.notification-content span {
  flex: 1;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Responsive pour les notifications */
@media (max-width: 768px) {
  .notification {
    top: 80px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* Styles pour les erreurs de formulaire Symfony */
.form-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.contact-form .form-group {
  position: relative;
}

.contact-form .form-group ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.contact-form .form-group li {
  color: #dc3545;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  padding: 0.5rem;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

.contact-form .form-group li::before {
  content: "⚠️ ";
  margin-right: 0.5rem;
}

/* Amélioration des champs de formulaire */
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: white;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #242222;
  box-shadow: 0 0 0 3px rgba(36, 34, 34, 0.1);
}

.contact-form input.error,
.contact-form select.error,
.contact-form textarea.error {
  border-color: #dc3545;
  background-color: #fdf2f2;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #374151;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-form label::after {
  content: " *";
  color: #dc3545;
}

.contact-form .form-group:has(input[type="tel"]) label::after,
.contact-form .form-group:has(input#contact_phone) label::after {
  content: "";
}

/* Animation pour les erreurs */
.contact-form .form-group li {
  animation: slideInError 0.3s ease-out;
}

@keyframes slideInError {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Styles pour le rate limiting */
.rate-limit-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rate-limit-warning i {
  font-size: 1.25rem;
}

.rate-limit-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rate-limit-error i {
  font-size: 1.25rem;
}

/* ==========================================
   DARK MODE - Variables CSS et Styles
   ========================================== */

:root {
  /* Couleurs Light Mode */
  --bg-primary: #f8fafc;
  --bg-secondary: #e2e8f0;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.06);
  --accent-color: #242222;
  --accent-hover: rgba(36, 34, 34, 0.1);
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --navbar-border: rgba(226, 232, 240, 0.8);
  --input-bg: #ffffff;
  --input-border: #d1d5db;
  --input-focus: #242222;
  --button-bg: #242222;
  --button-hover: #1a1a1a;
  --button-text: #ffffff;
  --notification-bg: #ffffff;
  --error-color: #ef4444;
  --success-color: #10b981;
}

[data-theme="dark"] {
  /* Couleurs Dark Mode */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --border-hover: #475569;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.2);
  --accent-color: #60a5fa;
  --accent-hover: rgba(96, 165, 250, 0.1);
  --navbar-bg: rgba(0, 0, 0, 0.95);
  --navbar-border: rgba(51, 65, 85, 0.8);
  --input-bg: #334155;
  --input-border: #475569;
  --input-focus: #60a5fa;
  --button-bg: #60a5fa;
  --button-hover: #3b82f6;
  --button-text: #ffffff;
  --notification-bg: #1e293b;
  --error-color: #f87171;
  --success-color: #34d399;
}

/* Application des variables CSS */
body {
  background: linear-gradient(
    180deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
}

.welcome-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px var(--shadow-light), 0 1px 2px var(--shadow-medium);
  transition: all 0.3s ease;
}

.welcome-section h1 {
  color: var(--text-primary);
}

.subtitle {
  color: var(--text-secondary);
}

.card,
.card-double {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px var(--shadow-light), 0 1px 2px var(--shadow-medium);
  transition: all 0.3s ease;
}

.card:hover,
.card-double:hover {
  box-shadow: 0 10px 25px var(--shadow-light), 0 4px 10px var(--shadow-medium);
  border-color: var(--border-hover);
}

.card h2,
.card h3 {
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
}

.card a {
  color: var(--accent-color);
}

.card a:hover {
  color: var(--accent-hover);
}

/* Dark mode pour les formulaires */
.contact-form input,
.contact-form textarea,
.contact-form select {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Amélioration spécifique pour les select en dark mode */
[data-theme="dark"] .contact-form select {
  background: var(--input-bg);
  color: var(--text-primary);
  border: 1px solid var(--input-border);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1f5f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

[data-theme="dark"] .contact-form select option {
  background: var(--input-bg);
  color: var(--text-primary);
  border: none;
  padding: 8px 12px;
}

[data-theme="dark"] .contact-form select option:checked,
[data-theme="dark"] .contact-form select option:hover {
  background: var(--accent-color);
  color: #ffffff;
}

.contact-form label {
  color: var(--text-primary);
}

.contact-form button {
  background: var(--button-bg);
  color: var(--button-text);
  transition: all 0.3s ease;
}

.contact-form button:hover {
  background: var(--button-hover);
}

/* Dark mode pour les notifications */
.notification {
  background: var(--notification-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px var(--shadow-light);
}

/* Dark mode pour les erreurs et succès */
.notification-error {
  background: var(--error-color);
  color: #ffffff;
}

.notification-success {
  background: var(--success-color);
  color: #ffffff;
}

/* Dark mode pour les éléments manquants */
.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.skill-category h3 {
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
}

.project-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.project-item:hover {
  background: var(--bg-secondary);
}

.project-item h3 {
  color: var(--text-primary);
}

.timeline-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.timeline-item:hover {
  background: var(--bg-secondary);
}

.timeline-date {
  color: var(--accent-color);
}

.services-list li {
  border-bottom: 1px solid var(--border-color);
}

.services-list li:hover {
  color: var(--text-secondary);
}

.contact-info {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.contact-info strong {
  color: var(--text-primary);
}

/* Liens coordonnées (contact-info) */
.contact-info a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s;
}
.contact-info a:hover {
  color: #1e40af;
  text-decoration: none;
}

[data-theme="dark"] .contact-info a {
  color: #93c5fd;
}
[data-theme="dark"] .contact-info a:hover {
  color: #60a5fa;
}

/* Dark mode pour les impacts d'eau (rain.js) */
.raindrop {
  background: var(--text-primary);
}

.raindrop::after {
  background: var(--text-primary);
}

/* Dark mode pour les nénuphars */
.lilypad {
  filter: brightness(0.8) contrast(1.2);
}

/* Dark mode pour la section welcome */
[data-theme="dark"] .welcome-section::before {
  background: linear-gradient(90deg, #ffffff, #ffffff, #ffffff);
}

/* Dark mode pour l'image de profil */
[data-theme="dark"] .welcome-profile img {
  border: 6px solid #ffffff;
}
/* Prevention du flash blanc - appliqué immédiatement */
html:not([data-theme]) {
  background: #f8fafc;
}

html[data-theme="dark"] {
  background: #0f172a;
}

/* Animation de transition pour le changement de thème */
* {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Transition plus douce pour le body */
body {
  transition: background 0.2s ease, color 0.2s ease;
}

/* Optimisation pour éviter les transitions sur les animations */
.fish,
.fish * {
  transition: none !important;
}

[data-theme="dark"] .skill-icon,
[data-theme="dark"] .bx {
  color: #fff !important;
  fill: #fff !important;
}

/* Styles spécifiques pour les images d'icônes en dark mode */
[data-theme="dark"] .skill-icon img,
[data-theme="dark"] img.skill-icon {
  filter: invert(1) brightness(1.2) contrast(1.1) !important;
  /* Inverse les couleurs tout en préservant les détails */
}

/* Style spécifique pour Symfony si besoin d'ajustement */
[data-theme="dark"] img.skill-icon[alt="Symfony"] {
  filter: invert(1) brightness(0.9) contrast(1.2) !important;
}

[data-theme="dark"] .contact-button,
[data-theme="dark"] .download-btn {
  background: var(--accent-color);
  color: #fff;
  border: none;
}

[data-theme="dark"] .contact-button:hover,
[data-theme="dark"] .download-btn:hover {
  background: var(--button-hover);
  color: #fff;
}

[data-theme="dark"] .tag {
  background: var(--accent-color);
  color: #fff;
}

[data-theme="dark"] .contact-submit-btn {
  background: var(--accent-color);
  color: #fff;
  border: none;
}
[data-theme="dark"] .contact-submit-btn:hover {
  background: var(--button-hover);
  color: #fff;
}

[data-theme="dark"] .download-btn {
  background: var(--accent-color);
  color: #fff;
  border: none;
}
[data-theme="dark"] .download-btn:hover {
  background: var(--button-hover);
  color: #fff;
}

[data-theme="dark"] button,
[data-theme="dark"] input[type="submit"],
[data-theme="dark"] input[type="button"],
[data-theme="dark"] .btn {
  background: var(--accent-color) !important;
  color: #fff !important;
  border: none !important;
}
[data-theme="dark"] button:hover,
[data-theme="dark"] input[type="submit"]:hover,
[data-theme="dark"] input[type="button"]:hover,
[data-theme="dark"] .btn:hover {
  background: var(--button-hover) !important;
  color: #fff !important;
}

.services-list {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
  padding-left: 0;
  margin-left: 0;
}

.services-list li {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  display: list-item !important;
  line-height: 1.4;
}

.services-list li *,
.services-list li strong,
.services-list li span,
.services-list li a {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  display: inline !important;
}

.card {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (max-width: 480px) {
  .card {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}
