/* ========================================
   RESPONSIVE DESIGN - SIMECO.CI
   Optimisé pour tous les types d'écrans
   ======================================== */

/* ===== VARIABLES RESPONSIVE ===== */
:root {
  --mobile-small-breakpoint: 480px;
  --mobile-breakpoint: 650px;
  --tablet-breakpoint: 1024px;
  --laptop-13-breakpoint: 1280px;
  --laptop-14-breakpoint: 1366px;
  --desktop-breakpoint: 1200px;
}

/* ===== BASE RESPONSIVE ===== */
* {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== CONTAINERS RESPONSIVE ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-fluid {
  width: 100%;
  padding: 0 1rem;
}

/* ===== GRID SYSTEM RESPONSIVE ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}

.col {
  flex: 1;
  padding: 0 0.5rem;
}

.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-12 { flex: 0 0 100%; }

/* ===== NAVIGATION RESPONSIVE ===== */
.navbar {
  position: relative;
  z-index: 1000;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-nav {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-nav .nav-item {
  margin: 0.25rem 0;
}

.navbar-nav .nav-link {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* ===== HERO SECTIONS RESPONSIVE ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
    text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* ===== CARDS RESPONSIVE ===== */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.card-text {
  color: #666;
  line-height: 1.6;
}

/* ===== TEAM CARDS RESPONSIVE ===== */
.team-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  text-align: center;
}

.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

/* ===== ORGANIGRAMME RESPONSIVE ===== */
.organigramme-container {
  max-width: 100%;
  overflow-x: auto;
  padding: 2rem 0;
}

.org-level {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
}

.org-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  text-align: center;
  min-width: 200px;
  max-width: 250px;
  transition: all 0.3s ease;
}

.org-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.org-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.org-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

/* ===== FORMS RESPONSIVE ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #080054;
  box-shadow: 0 0 0 3px rgba(8, 0, 84, 0.1);
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #080054, #1a1a7a);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1a1a7a, #080054);
  transform: translateY(-2px);
}

/* ===== SECTIONS RESPONSIVE ===== */
.section {
  padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: #080054;
}

.section-subtitle {
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: 3rem;
  color: #666;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== FOOTER RESPONSIVE ===== */
.footer {
  background: #080054;
  color: white;
  padding: 3rem 0 1rem;
}

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

.footer-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ff9100;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #ff9100;
}

/* ===== MOBILE PETIT (0px - 480px) ===== */
@media (max-width: 480px) {
  /* Masquer la topbar sur très petit mobile */
  .topbar {
    display: none !important;
  }
  
  /* Ajuster le padding du contenu principal */
  main#main-content {
    padding-top: 80px !important;
  }
  
  html {
    font-size: 13px;
  }
  
  .container {
    padding: 0 0.5rem;
    max-width: 100%;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section {
    padding: 1.5rem 0;
  }
  
  .card-body {
    padding: 0.75rem;
  }
}

/* ===== MOBILE (481px - 650px) ===== */
@media (min-width: 481px) and (max-width: 650px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 0.75rem;
    max-width: 100%;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section {
    padding: 2rem 0;
  }
}

/* ===== MENU MOBILE (0px - 767px) — complément styles.css ===== */
@media (max-width: 767px) {
  /* Masquer la topbar (fond noir) sur mobile pour toutes les pages */
  .topbar {
    display: none !important;
  }
  
  /* Ajuster le padding du contenu principal puisque la topbar est masquée */
  main#main-content {
    padding-top: 90px !important;
  }
  
  /* Empêcher le débordement horizontal */
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
  
  /* Container responsive */
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
  }
  
  /* Navigation mobile */
  .navbar-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  
  .navbar-nav.active {
    display: flex;
  }
  
  /* Menu navigation principal */
  .nav-menu {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: 80px 20px 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    gap: 20px;
    z-index: 9999;
    overflow-y: auto;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
  }
  
  .nav-menu.active {
    display: flex !important;
  }
  
  .nav-link:not(.dropdown) {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    box-sizing: border-box;
  }
  
  /* Contact / langues : nav-drawer.css */
  
  .mobile-menu-btn {
    display: block !important;
    position: relative;
    z-index: 10001 !important;
    background: none;
    border: none;
    font-size: 28px;
    color: #080054;
    cursor: pointer;
    padding: 8px 12px;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(8, 0, 84, 0.2);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    min-width: 44px;
    min-height: 44px;
  }
  
  
  .btn {
    width: 100%;
    margin-bottom: 1rem;
    box-sizing: border-box;
  }
  
  .row {
    flex-direction: column;
    margin: 0;
  }
  
  .col {
    flex: 1 1 100%;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
    padding: 0 0.5rem;
    box-sizing: border-box;
  }
  
  .team-photo {
    width: 100px;
    height: 100px;
  }
  
  .org-card {
    min-width: 150px;
    max-width: 200px;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .org-photo {
    width: 60px;
    height: 60px;
  }
  
  /* Images responsive */
  img {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
  }
  
  /* Sections responsive */
  section {
    width: 100%;
    max-width: 100vw;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }
}

/* ===== TABLETTE (651px - 1024px) — menu horizontal (styles.css gère >= 768px) ===== */
@media (min-width: 651px) and (max-width: 1024px) {
  .container {
    max-width: 960px;
    padding: 0 1.5rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .section-title {
    font-size: 2.25rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .team-photo {
    width: 110px;
    height: 110px;
  }
  
  .org-card {
    min-width: 180px;
    max-width: 220px;
  }
  
  .org-photo {
    width: 70px;
    height: 70px;
  }
}

/* ===== DESKTOP (1025px et plus) ===== */
/* ===== LAPTOP 13 POUCES (1025px - 1279px) ===== */
/* Optimisé pour écrans 13 pouces (1280x800, 1440x900) */
@media (min-width: 1025px) and (max-width: 1279px) {
  /* Réduction légère du menu pour meilleure vue */
  .nav-menu {
    gap: 0.75rem;
  }
  
  .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  
  .contact-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
  
  /* Services navigation - toujours alignée horizontalement */
  .services-nav-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  #servicesPrev,
  #servicesNext {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  #servicesPrev i,
  #servicesNext i {
    font-size: 0.875rem;
  }
  .container {
    max-width: 1180px;
    padding: 0 1.25rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  /* Optimisation pour max-w-7xl sur laptops 13 pouces */
  .max-w-7xl {
    max-width: 1200px;
  }
  
  /* Réduction des espacements pour mieux utiliser l'espace */
  .py-16 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .py-20 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
  
  .py-24 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  
  /* Grilles avec espacement optimisé */
  .carousel-container {
    padding: 0 0.75rem;
  }
  
  /* Titres de section légèrement réduits */
  h2.text-3xl {
    font-size: 1.875rem;
  }
  
  h2.text-4xl {
    font-size: 2rem;
  }
  
  h2.text-5xl {
    font-size: 2.25rem;
  }
  
  .team-photo {
    width: 110px;
    height: 110px;
  }
  
  .org-card {
    min-width: 180px;
    max-width: 230px;
  }
  
  .org-photo {
    width: 75px;
    height: 75px;
  }
  
  /* Réduction légère du menu pour meilleure vue internationale */
  .nav-menu {
    gap: 0.75rem;
  }
  
  .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  
  .contact-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
  
  /* Services navigation - toujours alignée horizontalement avec le titre */
  #servicesPrev,
  #servicesNext {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }
  
  #servicesPrev i,
  #servicesNext i {
    font-size: 0.875rem !important;
  }
  
  /* Assurer que les boutons de navigation sont toujours sur la même ligne */
  .flex-row.justify-between.items-center {
    align-items: center !important;
  }
}

/* ===== LAPTOP 14 POUCES (1280px - 1365px) ===== */
/* Optimisé pour écrans 14 pouces (1366x768) et similaires */
@media (min-width: 1280px) and (max-width: 1365px) {
  /* Réduction légère du menu pour meilleure vue */
  .nav-menu {
    gap: 0.875rem;
  }
  
  .nav-link {
    font-size: 0.95rem;
    padding: 0.5rem 0.875rem;
  }
  
  .contact-btn {
    font-size: 0.95rem;
    padding: 0.5rem 1.125rem;
  }
  
  /* Services navigation - toujours alignée horizontalement */
  .services-nav-container {
    display: flex;
    align-items: center;
    gap: 0.875rem;
  }
  
  #servicesPrev,
  #servicesNext {
    width: 2.75rem;
    height: 2.75rem;
  }
  .container {
    max-width: 1200px;
    padding: 0 1.5rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2.25rem;
  }
  
  .section {
    padding: 3.5rem 0;
  }
  
  /* Optimisation pour max-w-7xl sur laptops */
  .max-w-7xl {
    max-width: 1280px;
  }
  
  /* Grilles avec espacement optimisé */
  .carousel-container {
    padding: 0 1rem;
  }
  
  .team-photo {
    width: 120px;
    height: 120px;
  }
  
  .org-card {
    min-width: 200px;
    max-width: 250px;
  }
  
  .org-photo {
    width: 80px;
    height: 80px;
  }
  
  /* Réduction légère du menu pour meilleure vue internationale */
  .nav-menu {
    gap: 0.875rem;
  }
  
  .nav-link {
    font-size: 0.95rem;
    padding: 0.5rem 0.875rem;
  }
  
  .contact-btn {
    font-size: 0.95rem;
    padding: 0.5rem 1.125rem;
  }
  
  /* Services navigation - toujours alignée horizontalement avec le titre */
  #servicesPrev,
  #servicesNext {
    width: 2.75rem !important;
    height: 2.75rem !important;
  }
  
  #servicesPrev i,
  #servicesNext i {
    font-size: 0.9375rem !important;
  }
  
  /* Assurer que les boutons de navigation sont toujours sur la même ligne */
  .flex-row.justify-between.items-center {
    align-items: center !important;
  }
}

/* ===== DESKTOP (1366px et plus) ===== */
@media (min-width: 1366px) {
  .container {
    max-width: 1200px;
    padding: 0 2rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  /* Max-width optimisé pour grands écrans */
  .max-w-7xl {
    max-width: 1280px;
  }
  
  .team-photo {
    width: 120px;
    height: 120px;
  }
  
  .org-card {
    min-width: 200px;
    max-width: 250px;
  }
  
  .org-photo {
    width: 80px;
    height: 80px;
  }
}

/* ===== GRAND DESKTOP / FULL HD (1920px et plus) ===== */
@media (min-width: 1920px) {
  .container {
    max-width: 1400px;
    padding: 0 2.5rem;
  }
  
  .max-w-7xl {
    max-width: 1536px;
  }
  
  .section {
    padding: 5rem 0;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .section-title {
    font-size: 3rem;
  }
}

/* ===== MENU DESKTOP (651px et plus) ===== */
@media (min-width: 651px) {
  .navbar-nav {
    display: flex;
    position: static;
    flex-direction: row;
    background: transparent;
    box-shadow: none;
  }
  
  .btn {
    width: auto;
  }
  
  .row {
    margin: 0 -0.5rem;
  }
  
  .col {
    padding: 0 0.5rem;
  }
}

/* ===== UTILITAIRES RESPONSIVE ===== */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* ===== ANIMATIONS RESPONSIVE ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar,
  .footer,
  .btn,
  .hero {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
    background: white;
  }
  
  .container {
    max-width: none;
    padding: 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ===== ACCESSIBILITÉ ===== */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid #000;
  }
  
  .btn-primary {
    background: #000;
    color: #fff;
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --card-bg: #2a2a2a;
  }
  
  body {
    background-color: var(--bg-color);
    color: var(--text-color);
  }
  
  .card {
    background-color: var(--card-bg);
    color: var(--text-color);
  }
}

/* ===== SECTION CONTACT RESPONSIVE ===== */
/* Mobile First - Section normale sur mobile */
.contact-section-responsive {
  max-width: 100%;
  margin: 0 auto;
}

.contact-center-space {
  left: 0;
  width: 100%;
}

.contact-image-left,
.contact-image-right {
  display: none;
}

/* Desktop - Section contact étendue */
@media (min-width: 651px) {
  .contact-section-responsive {
    max-width: calc(100% + 100px);
    margin-left: -50px;
    margin-right: -50px;
  }
  
  .contact-image-left {
    display: block;
    left: -30px;
    width: calc(50% - 220px);
  }
  
  .contact-image-right {
    display: block;
    right: -30px;
    width: calc(50% - 220px);
  }
  
  .contact-center-space {
    left: calc(50% - 220px);
    width: 440px;
  }
}

/* ===== CARTES DE TÉMOIGNAGES RESPONSIVE ===== */
@media (max-width: 650px) {
  .testimonials-carousel .grid > div[class*="w-"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
  }
  
  /* S'assurer que toutes les cartes de témoignages sont pleine largeur */
  #testimonialsCarousel .grid > div {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Forcer la grille à une seule colonne sur mobile */
  #testimonialsCarousel .grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 651px) {
  .testimonials-carousel .grid > div[class*="w-"] {
    width: auto !important;
  }
}

/* ===== SECTEURS D'ACTIVITÉ RESPONSIVE ===== */
/* Cartes secteur responsive */
.sector-card {
  min-width: 280px !important;
}

@media (max-width: 650px) {
  .sector-card {
    min-width: 260px !important;
  }
  
  .sectors-nav-btn {
    width: 40px;
    height: 40px;
  }
}

/* ===== HERO BUTTONS RESPONSIVE ===== */
@media (max-width: 650px) {
  .hero-buttons-container {
    flex-direction: column;
    padding: 1rem !important;
    gap: 0.5rem;
  }
  
  .hero-button {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem !important;
  }
  
  .hero-separator {
    display: none;
  }
}

/* ===== SERVICES CARDS RESPONSIVE ===== */
@media (max-width: 650px) {
  #servicesTrack > div {
    width: 280px !important;
    height: auto !important;
    min-height: 380px;
  }
}