/* ==========================================================================
   #RESPONSIVE DESIGN - ADSOLUCE
   Styles adaptatifs pour toutes les tailles d'écran
   ========================================================================== */

/* Afficher le menu principal par défaut */
.main-nav {
  display: flex;
}

/* Cacher le bouton de menu en version desktop */
.mobile-menu-toggle {
  display: none;
}

/* Tablettes et écrans moyens (768px - 992px) */
@media (max-width: 992px) {
  .container {
    padding: 0 30px;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-text h1 {
    font-size: 3rem;
  }
  
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .tech-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  
  /* Projects Section */
  .project-card {
    /* Calcul pour 2 colonnes avec un gap de 30px: (100% - 30px) / 2 */
    flex-basis: calc((100% - 30px) / 2);
    min-width: calc((100% - 30px) / 2);
  }
}

/* Styles pour le menu mobile */
@media (max-width: 768px) {
  /* Header mobile */
  .header .container {
    padding: 12px 20px;
  }
  
  /* Cacher le menu principal en version mobile */
  .main-nav {
    display: none;
  }
  
  /* Afficher le bouton de menu uniquement sur mobile */
  .mobile-menu-toggle {
    display: flex;
    order: 2;
  }
  
  .header-actions {
    order: 2;
    flex-direction: row-reverse;
    gap: 15px;
  }
  
  .header-actions .btn {
    display: none;
  }
  
  .mobile-menu .btn {
    display: inline-block;
  }
  
  /* Hero section */
  .hero {
    padding: 20px 0 60px;
    margin-top: 60px;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-text h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .hero-placeholder {
    width: 200px;
    height: 200px;
    font-size: 1rem;
  }
  
  /* Sections */
  .section {
    padding: 60px 0;
  }
  
  .section-header {
    margin-bottom: 40px;
  }
  
  /* Expertise grid */
  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .expertise-card {
    padding: 30px 25px;
  }
  
  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  /* Tech section */
  .tech-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .tech-item {
    padding: 25px 20px;
    margin-left: 10px;
    margin-right: 10px;
  }
  
  /* Contact */
  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
    font-size: 1.5rem;
    margin-left: 10px;
    margin-right: 10px;
  }

  .contact-item h3 {
    font-size: 1.5rem;
  }
  
  .contact-form {
    padding: 30px 25px;
  }
  
  /* Footer */
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }
  
  .footer-links {
    justify-content: center;
    gap: 20px;
  }
  
  /* Projects Section */
  .projects-grid {
    grid-template-columns: 1fr;
    margin-left: 10px;
    margin-right: 10px;
  }

  .project-card {
    padding: 20px;
  }

  .project-title {
    font-size: 1.5rem;
  }
}

/* Mobiles (480px et moins) */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  /* Header mobile amélioré */
  .header .container {
    padding: 10px 15px;
  }

  .about-description {
    font-size: 1.5rem;
    margin-left: 10px;
    margin-right: 10px;
  }
  
  /* Ajustements spécifiques pour le menu burger sur très petits écrans */
  .mobile-menu-toggle {
    width: 45px !important;
    height: 45px !important;
    background: rgba(255, 178, 0, 0.15) !important;
    border: 1px solid rgba(255, 178, 0, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .mobile-menu-toggle:hover {
    background: rgba(255, 178, 0, 0.25) !important;
    border-color: rgba(255, 178, 0, 0.5) !important;
  }
  
  .mobile-menu-toggle span {
    width: 26px !important;
    height: 4px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  }
  
  /* Hero */
  .hero {
    padding: 100px 0 50px;
    margin-top: 60px;
  }
  
  .hero-text h1 {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    padding: 12px 24px;
  }
  
  .hero-placeholder {
    width: 150px;
    height: 150px;
    font-size: 0.9rem;
  }
  
  /* Sections */
  .section {
    padding: 50px 0;
  }
  
  .section-header h2 {
    font-size: 2.5rem;
    margin-left: 10px;
    margin-right: 10px;
  }
  
  .section-description {
    font-size: 1.5rem;
  }
  
  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .stat-number {
    font-size: 2.2rem;
  }
  
  .stat-label {
    font-size: 1.5rem;
  }
  
  /* Contact */
  .contact-item {
    padding: 15px;
    gap: 15px;
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .contact-form {
    padding: 25px 20px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 12px 15px;
    font-size: 1.5rem;
  }
  
  /* Footer */
  .footer {
    padding: 30px 0 15px;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 15px;
    font-size: 1.5rem;
  }
  
  /* Scroll to top */
  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 1.3rem;
  }

  .footer-tagline {
    font-size: 1.5rem;
  }

  .footer-logo {
    font-size: 3rem;
  }

  .footer-bottom p {
    font-size: 1.5rem;
  }

  .scroll-to-top:hover {
    background-color: var(--highlight);
    color: var(--white);
    transform: translateY(-5px);
  }
}

/* Très petits écrans (360px et moins) */
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }
  
  .hero-text h1 {
    font-size: 1.8rem;
  }
  
  .expertise-card,
  .contact-form {
    padding: 20px 15px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Grands écrans (1200px et plus) */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-text h1 {
    font-size: 4rem;
  }
  
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .expertise-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Écrans desktop moyens (993px - 1199px) */
@media (min-width: 993px) and (max-width: 1199px) {
  .expertise-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mode paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 60px 0 40px;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .mobile-menu {
    padding: 20px;
  }
  
  .mobile-nav-links li {
    margin: 10px 0;
  }
}

/* Animation réduite (préférence utilisateur) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Print styles */
@media print {
  .header,
  .mobile-menu,
  .scroll-to-top,
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .hero {
    margin-top: 0;
    background: none !important;
    color: black !important;
    padding: 20px 0;
  }
  
  .section {
    page-break-inside: avoid;
    padding: 20px 0;
  }
  
  .expertise-card,
  .contact-item {
    border: 1px solid #ccc;
  }
  
  .btn {
    display: none;
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }
}
  
  /* Ajustements de la typographie 
  h1 { font-size: 4.2rem; }
  h2 { font-size: 3.2rem; }
  h3 { font-size: 2.6rem; }
  */

  
  /* Ajustements des espacements */
  .section {
    padding: var(--spacing-xl) 0;
  }


/**
 * Petits écrans (Tablettes en mode portrait)
 * 768px - 991px
 */
@media (max-width: 61.9375em) {
  html {
    font-size: 56%;
  }
  
  .container {
    max-width: var(--container-md);
  }
  
  /* Ajustements de la typographie */
  h1 { font-size: 3.8rem; }
  h2 { font-size: 3.0rem; }
  h3 { font-size: 2.4rem; }
  
  /* Navigation mobile */
  .header {
    padding: var(--spacing-md) 0;
  }
  
  .mobile-menu-toggle {
    display: flex; /* Afficher le bouton menu sur mobile */
  }
  
  .main-nav {
    position: fixed;
    top: 8rem;
    left: 0;
    right: 0;
    background-color: #ffffff;
    box-shadow: var(--shadow-md);
    padding: var(--spacing-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: var(--z-index-dropdown);
  }
  
  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-links {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .nav-link {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
  }
  
  .nav-link:hover {
    background-color: var(--color-gray-50);
  }
  
  /* Ajustements du héros */
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 12rem;
    padding-bottom: 6rem;
  }
  
  .hero-content {
    margin-bottom: var(--spacing-xl);
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  /* Ajustements des cartes */
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
}

/**
 * Très petits écrans (Téléphones en mode paysage)
 * 576px - 767px
 */
@media (max-width: 47.9375em) {
  html {
    font-size: 54%;
  }
  
  /* Ajustements de la typographie */
  h1 { font-size: 3.4rem; }
  h2 { font-size: 2.8rem; }
  h3 { font-size: 2.2rem; }
  
  /* Ajustements des espacements */
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  /* Ajustements du héros */
  .hero {
    padding-top: 10rem;
    padding-bottom: 5rem;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .btn {
    width: 100%;
  }
  
  /* Ajustements des cartes */
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/**
 * Très petits écrans (Téléphones en mode portrait)
 * Jusqu'à 575px
 */
@media (max-width: 35.9375em) {
  html {
    font-size: 52%;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  /* Ajustements de la typographie */
  h1 { font-size: 3.0rem; }
  h2 { font-size: 2.4rem; }
  h3 { font-size: 2.0rem; }
  
  /* Ajustements du header */
  .header {
    padding: var(--spacing-sm) 0;
  }
  
  .logo {
    font-size: 3rem;
  }
  
  /* Ajustements du formulaire */
  .form-row {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  /* Ajustements des boutons */
  .btn {
    padding: 1rem 2rem;
  }
  
  /* Masquer les éléments non essentiels sur mobile */
  .hide-on-mobile {
    display: none !important;
  }
}

/**
 * Mode paysage sur mobile
 */
@media (max-height: 480px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 10rem 0 5rem;
  }
  
  .hero-content {
    margin-bottom: var(--spacing-lg);
  }
  
  .section {
    padding: 5rem 0;
  }
}

/**
 * Préférences de réduction des mouvements
 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/**
 * Mode sombre
 */
@media (prefers-color-scheme: dark) {
  :root {
    --color-gray-900: #f8f9fa;
    --color-gray-800: #e9ecef;
    --color-gray-700: #dee2e6;
    --color-gray-600: #ced4da;
    --color-gray-500: #adb5bd;
    --color-gray-400: #6c757d;
    --color-gray-300: #495057;
    --color-gray-200: #343a40;
    --color-gray-100: #212529;
    --color-gray-50: #1a1a1a;
    --color-primary: #16A8AE;
    --color-primary-light: #1B4B53;
    --color-primary-dark: #0D8287;
  }
  
  body {
    background-color: #121212;
    color: #e0e0e0;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
  }
  
  .card {
    background-color: #1e1e1e;
    border-color: #333;
  }
  
  .btn-outline {
    border-color: #444;
    color: #e0e0e0;
  }
  
  .btn-outline:hover {
    background-color: #333;
    border-color: #555;
  }
}
  
  .nav-links a {
    padding: 12px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .mobile-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 10px;
  }
  
  .mobile-menu-toggle.active {
    color: var(--highlight);
  }
  
  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-bottom: 30px;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .about-content {
    flex-direction: column;
  }
  
  .about-text, .about-image {
    width: 100%;
  }
  
  .about-image {
    margin-top: 40px;
  }


/* Mobiles */
@media (max-width: 768px) {
  /* Taille de police pour la FAQ en mobile */
  .faq-question {
    font-size: 16.64px !important;
  }
  
  .faq-answer {
    font-size: 12.48px !important;
  }
  
  /* Ajustements pour l'image ronde en version mobile */
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    padding-top: 40px;
    min-height: 0px;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-image {
    width: 280px;
    height: 280px;
    margin: 0 auto;
  }
  
  h1 {
    font-size: 3em !important;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .section {
    padding: 20px 0;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 40px;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 1.4rem;
  }
  
  .testimonial-slide {
    padding: 30px 20px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-column:not(:last-child) {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Très petits écrans */
@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1.4rem;
    margin-left: 10px;
    margin-right: 10px;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .btn {
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
  }
  
  .contact-form {
    padding: 20px;
    
  }
  
  .form-group {
    flex-direction: column;
  }
  
  .form-group input,
  .form-group textarea {
    width: 100%;
    margin-right: 0;
  }

  .approach-text {
    font-size: 1.5rem;
  }
.project-desc {
  font-size: 1.4rem;
  }

  .tech-item {
    font-size: 1.5rem;
  }

  .expertise-desc {
    font-size: 1.5rem;
  }

  .section-description-1 {
    font-size: 1.5rem;
  }
}

/* Centrage parfait de la croix dans le bouton mobile-menu-toggle */
.mobile-menu-toggle, .mobile-menu-toggle * {
  box-sizing: border-box;
}

.mobile-menu-toggle {
  /* Le display flex est défini dans les media queries */
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  width: 45px !important;
  height: 45px !important;
}

/* ===== ABOUT PAGE ===== */
@media (max-width: 992px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .about-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .experience-badge {
    right: 0;
    left: 0;
    margin: 0 auto;
    width: 100px;
    height: 100px;
    padding: 1rem;
  }
  
  .experience-badge .years {
    font-size: 2rem;
  }
  
  .experience-badge .text {
    font-size: 0.7rem;
    max-width: 70px;
  }
  
  .values-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .cta-about {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2.5rem;
  }
  
  .page-description {
    font-size: 1.1rem;
  }
  
  .about-text h2 {
    font-size: 2rem;
  }
  
  .about-text h3 {
    font-size: 1.25rem;
  }
  
  .experience-item h4,
  .values-item h4 {
    font-size: 1.3rem;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-content h2 {
    font-size: 2rem;
  }
  
  .cta-content p {
    font-size: 1.1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }
}

/* Styles spécifiques quand le menu est actif (croix) */
.mobile-menu-toggle.active {
  background: rgba(255, 178, 0, 0.25) !important;
  border-color: rgba(255, 178, 0, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}

/* Règles pour le centrage parfait de la croix */
.mobile-menu-toggle.active span:first-child,
.mobile-menu-toggle.active span:nth-child(3) {
  position: absolute !important;
  margin: 0 auto !important;
  left: 0 !important;
  right: 0 !important;
}

/* Réglage fin des proportions des barres de la croix */
.mobile-menu-toggle span {
  width: 26px !important;
  height: 3px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  margin: 2px 0 !important;
}

/* Correction des transformations pour un centrage parfait */
.mobile-menu-toggle.active span:first-child {
  transform: rotate(45deg) !important;
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0 !important;
  transform: scale(0) !important;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) !important;
}
