/* ===== E-SICOM — adaptations mobile (2026-11-17) ===== */
img, video, iframe { max-width: 100%; }
@media (max-width: 768px) {
  body { overflow-x: clip; }
  /* Texte justifié -> aligné à gauche (évite les grands trous entre les mots) */
  p { text-align: inherit; }
  .description { text-align: inherit; }

  /* Titres plus raisonnables */
  h1 { font-size: clamp(1.75rem, 8vw, 2.2rem) !important; line-height: 1.2 !important; }
  .hero-content h1 { font-size: clamp(1.9rem, 8.5vw, 2.3rem) !important; }
  .text-side h2.title, .header-text h2, .valeurs-section h2, section > h2, .container > h2 { font-size: clamp(1.45rem, 6.6vw, 1.85rem) !important; line-height: 1.25 !important; }

  /* Formulaires : champs pleine largeur et en 16px (pas de zoom automatique sur iPhone) */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; max-width: 100%; }
  .contact-card { padding: 26px 18px !important; }
  .contact-card form input:not([type=checkbox]):not([type=radio]), .contact-card form textarea, .contact-card form select { width: 100% !important; box-sizing: border-box; }

  /* Accueil : cartes de services avec marges latérales */
  .expertise-col { padding-left: 16px !important; padding-right: 16px !important; box-sizing: border-box; }
  .sub-grid .card-item { border-radius: 12px; }
  /* Accueil : valeurs en grille 2 x 2 */
  .valeurs-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 22px 14px !important; padding: 26px 14px !important; }
  .valeur-card { width: auto !important; min-width: 0 !important; margin: 0 !important; }
  .valeur-card p { text-align: center !important; }

  /* À propos : photo qui débordait */
  .image-wrapper, .photo-container, .zoom-image { width: 100% !important; max-width: 100% !important; height: auto !important; }
  .container1 { max-width: 100%; box-sizing: border-box; }

  /* Services connexes : bloc Pôle créatif plus large */
  .creative-section { padding: 40px 16px !important; }
  .creative-container { width: 100% !important; max-width: 100% !important; }
  .creative-container .text-content { padding: 26px 20px !important; }

  /* Pied de page */
  footer a { word-break: break-word; }
}
@media (max-width: 380px) {
  .valeurs-grid { gap: 18px 10px !important; }
}

/* ===== Passe 2 (2026-11-18) ===== */
@media (max-width: 768px) {
  /* Mots et liens longs : jamais plus larges que l'écran */
  h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
  main a, section a, .content a, article a { overflow-wrap: anywhere; }
  table { max-width: 100%; }
  td, th { overflow-wrap: break-word; }

  /* Services logistiques : cartes sur une colonne, plus compactes */
  .services-grid { grid-template-columns: 1fr !important; padding: 24px 14px !important; gap: 16px !important; }
  .services-grid .card { width: auto !important; max-width: 100% !important; padding: 22px 20px !important; box-sizing: border-box; }
  .services-grid .card h3 { margin-top: 10px; }

  /* À propos : équipe en 2 colonnes */
  .team-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 14px !important; }
  .team-grid .member-card { width: auto !important; min-width: 0 !important; max-width: none !important; margin: 0 !important; }
  .team-grid .member-card img { width: 100% !important; height: 170px !important; object-fit: cover; object-position: top; }
  .team-grid .member-card h3, .team-grid .member-card h4 { font-size: .9rem !important; }
  .team-grid .member-card p, .team-grid .member-card span { font-size: .78rem !important; }

  /* Bulle WhatsApp : croix de fermeture plus facile à toucher */
  .wa-fermer { min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 360px) {
  h1 { font-size: 1.55rem !important; }
  .team-grid .member-card img { height: 140px !important; }
  .valeurs-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 768px) {
  /* Pages légales : marges réduites */
  .legal-container { padding: 24px 16px !important; box-sizing: border-box; max-width: 100% !important; }
  .legal-container > * { max-width: 100% !important; }
  .title-header { flex-wrap: wrap; gap: 10px; }
  /* Services logistiques : bloc « Pourquoi nous choisir » */
  .features-grid { grid-template-columns: 1fr !important; }
  .feature-item { min-width: 0 !important; width: auto !important; }
  /* Tableaux des articles : défilement interne si besoin */
  .article table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ===== Logo toujours visible sur la ligne du menu (ordinateur) — 2026-11-18 ===== */
.navbar .logo { flex: 0 0 auto !important; }
.navbar .logo img { height: 46px; width: auto !important; max-width: none !important; display: block; }
@media (min-width: 901px) and (max-width: 1280px) {
  .navbar .container { gap: 12px !important; padding-left: 18px !important; padding-right: 18px !important; }
  .navbar .logo img { height: 40px; }
  .nav-links { gap: 0 !important; }
  .nav-links a { padding: 9px 7px !important; font-size: 13px !important; white-space: nowrap; }
  .nav-actions-desktop { gap: 8px !important; }
  .nav-actions-desktop .btn-quote { padding: 9px 14px !important; font-size: 13px !important; white-space: nowrap; }
}
@media (min-width: 901px) and (max-width: 1060px) {
  .navbar .container { gap: 8px !important; padding-left: 12px !important; padding-right: 12px !important; }
  .navbar .logo img { height: 34px; }
  .nav-links a { padding: 9px 5px !important; font-size: 12.5px !important; }
  .nav-actions-desktop .btn-quote i, .nav-actions-desktop .btn-quote .fa-arrow-right { display: none; }
}

/* ===== Animation pro de la barre de menu — 2026-11-18 ===== */
@keyframes esLogoIn { from { opacity: 0; transform: translateX(-16px) scale(.94); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes esFadeDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes esShine { 0% { background-position: 100% 0; } 20%, 100% { background-position: 0% 0; } }
.navbar .logo { position: relative; line-height: 0; }
.navbar .logo img { animation: esLogoIn .8s cubic-bezier(.2,.8,.2,1) both; transition: height .35s ease, transform .35s cubic-bezier(.2,.8,.2,1); transform-origin: left center; }
.navbar .logo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 44%, rgba(255,255,255,.9) 50%, transparent 56%);
  background-size: 260% 100%; background-repeat: no-repeat; background-position: 100% 0;
  -webkit-mask: url(/img/E-SICOM.png) left center / contain no-repeat; mask: url(/img/E-SICOM.png) left center / contain no-repeat;
  animation: esShine 6s ease-in-out 1.3s infinite;
}
.navbar .logo:hover img { transform: scale(1.045); }
@media (min-width: 901px) {
  .nav-links > li { animation: esFadeDown .55s cubic-bezier(.2,.8,.2,1) both; }
  .nav-links > li:nth-child(1) { animation-delay: .15s; } .nav-links > li:nth-child(2) { animation-delay: .21s; }
  .nav-links > li:nth-child(3) { animation-delay: .27s; } .nav-links > li:nth-child(4) { animation-delay: .33s; }
  .nav-links > li:nth-child(5) { animation-delay: .39s; } .nav-links > li:nth-child(6) { animation-delay: .45s; }
  .nav-links > li:nth-child(7) { animation-delay: .51s; } .nav-links > li:nth-child(n+8) { animation-delay: .57s; }
  .nav-actions-desktop { animation: esFadeDown .6s cubic-bezier(.2,.8,.2,1) .6s both; }
  .navbar.is-scrolled .logo img { height: 38px; }
}
@media (max-width: 900px) {
  .menu-toggle { animation: esFadeDown .5s ease .3s both; }
  .navbar.is-scrolled .logo img { transform: scale(.92); }
}
@media (prefers-reduced-motion: reduce) {
  .navbar .logo img, .navbar .logo::after, .nav-links > li, .nav-actions-desktop, .menu-toggle { animation: none !important; }
}
