/* ============================================
   LUMINA ELECTRIC - OPTIMISATIONS MOBILE
   CSS dédié pour améliorer l'expérience smartphone
   ============================================ */

/* === VARIABLES MOBILE === */
:root {
  --mobile-padding: 1rem;
  --mobile-section-spacing: 3rem;
  --mobile-touch-target: 44px; /* Taille minimale recommandée pour touch */
}

/* === OPTIMISATIONS GLOBALES MOBILE === */
@media (max-width: 768px) {
  
  /* Prévenir le scroll horizontal */
  html {
    overflow-x: hidden;
    font-size: 15px; /* Légèrement plus petit pour mieux utiliser l'espace */
  }
  
  body {
    overflow-x: hidden; /* Éviter le scroll horizontal */
    max-width: 100vw;
  }
  
  /* Tous les éléments doivent respecter la largeur */
  * {
    max-width: 100%;
  }
  
  section,
  .container,
  .hero,
  .page-header {
    overflow-x: hidden;
    max-width: 100vw;
  }
  
  /* Espacement des sections réduit */
  section {
    padding: var(--mobile-section-spacing) 0;
  }
  
  .container {
    padding-left: var(--mobile-padding);
    padding-right: var(--mobile-padding);
  }
  
  /* Tous les enfants directs de container doivent respecter la largeur */
  .container > * {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Éléments centrés avec max-width */
  .container > div[style*="max-width"],
  section > div[style*="max-width"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Titres mobile */
  h1 {
    font-size: 2rem !important;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 1.75rem !important;
    line-height: 1.3;
  }
  
  h3 {
    font-size: 1.35rem !important;
  }
  
  h4 {
    font-size: 1.15rem !important;
  }
  
  /* Paragraphes mobile */
  p {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  /* === MASQUER LA TOP-BAR MAIS GARDER LES LANGUES === */
  
  .top-bar {
    display: none !important; /* Masque la barre supérieure */
  }
  
  /* Mais on force l'affichage du lang-switcher UNIQUEMENT sur mobile dans le header */
  .header .lang-switcher {
    display: flex !important; /* Force affichage sur mobile */
  }
  
  /* === HEADER & NAVIGATION MOBILE === */
  .header {
    position: sticky;
    top: 0;
    z-index: 1001;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: hidden !important; /* Force pas de débordement */
    max-width: 100vw !important;
  }
  
  /* Forcer tous les enfants du header à respecter la largeur */
  .header * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .header-container {
    padding: 0.5rem var(--mobile-padding);
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 0.5rem;
  }
  
  /* Logo en premier (gauche) */
  .logo {
    grid-column: 1;
    grid-row: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }
  
  .logo img {
    height: 45px !important;
    max-width: 140px;
    object-fit: contain;
  }
  
  /* Sélecteur de langues dans le header (entre logo et hamburger) */
  .lang-switcher {
    grid-column: 3;
    grid-row: 1;
    display: flex !important;
    gap: 0.25rem;
    margin: 0;
    align-items: center;
  }
  
  .lang-switcher button {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.75rem !important;
    min-width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--neutral-100);
    color: var(--neutral-700);
    border: 1px solid var(--neutral-300);
    font-weight: 600;
    transition: all 0.2s ease;
  }
  
  .lang-switcher button.active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary);
  }
  
  .lang-switcher button:hover {
    background: var(--neutral-200);
  }
  
  .lang-switcher button.active:hover {
    background: var(--primary-dark) !important;
  }
  
  /* Menu hamburger en dernier (droite) */
  .mobile-menu-toggle {
    grid-column: 4;
    grid-row: 1;
    display: flex !important;
    padding: 0.5rem;
    min-width: var(--mobile-touch-target);
    min-height: var(--mobile-touch-target);
    justify-content: center;
    align-items: center;
    z-index: 1002;
  }
  
  /* Navigation principale masquée sauf menu mobile */
  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none; /* Masque la nav desktop */
  }
  
  /* Menu mobile full-screen */
  .nav-menu {
    position: fixed !important;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-md) 0;
    max-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: none;
    border-top: 1px solid var(--neutral-200);
  }
  
  .nav-menu.active {
    max-height: calc(100vh - 60px) !important;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.1);
  }
  
  /* Add CTA buttons to mobile menu */
  .nav-menu li:last-child {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--neutral-200);
  }
  
  /* Fixed CTA bar at bottom (optionnel) */
  .mobile-fixed-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem var(--mobile-padding);
    background: var(--white);
    border-top: 1px solid var(--neutral-200);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    z-index: 998;
    display: flex;
    gap: 0.5rem;
  }
  
  .mobile-fixed-cta .btn {
    flex: 1;
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
  }
  
  /* Bouton d'appel flottant */
  .floating-call-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
  }
  
  .floating-call-btn:hover,
  .floating-call-btn:active {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
  }
  
  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--neutral-100);
  }
  
  /* === NAVIGATION MOBILE === */
  .nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
  }
  
  .nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
  }
  
  .nav-link {
    position: relative;
    padding: var(--space-sm) 0;
    font-size: var(--text-lg) !important; /* Plus grand pour mobile */
    font-weight: var(--font-semibold) !important; /* Plus épais */
    color: #1a1a1a !important; /* Noir profond sur fond blanc */
    text-decoration: none;
    transition: color var(--transition-fast);
    min-height: var(--mobile-touch-target);
    display: flex;
    align-items: center;
    text-shadow: none; /* Pas d'ombre */
  }
  
  .nav-link:hover,
  .nav-link.active {
    color: var(--primary) !important;
    font-weight: var(--font-bold) !important;
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
  }
  
  .nav-link:hover::after,
  .nav-link.active::after {
    width: 100%;
  }
  
  /* Top bar mobile */
  .top-bar {
    font-size: 0.8125rem;
    padding: 0.375rem 0;
    min-height: auto;
  }
  
  .top-bar-container {
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }
  
  .top-bar-info {
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .top-bar-item {
    white-space: nowrap;
    font-size: 0.8125rem;
  }
  
  .top-bar-item i {
    font-size: 0.875rem;
  }
  
  /* Lang switcher mobile */
  .lang-switcher {
    padding: 0.25rem 0.5rem;
    gap: 0.25rem;
    flex-shrink: 0;
  }
  
  .lang-switcher button {
    padding: 0.3125rem 0.5rem;
    font-size: 0.8125rem;
    min-width: 32px;
    min-height: 32px;
    font-weight: 600;
  }
  
  /* === HERO SECTIONS MOBILE === */
  .hero {
    min-height: auto !important;
    padding: 2.5rem var(--mobile-padding) !important;
  }
  
  .hero-content {
    text-align: center;
    max-width: 100%;
  }
  
  .hero h1 {
    font-size: 1.875rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero p,
  .hero-lead {
    font-size: 1rem !important;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: #ffffff !important; /* Blanc éclatant */
    opacity: 1.0 !important;
  }
  
  /* FORCER LES TEXTES DU HERO À ÊTRE BLANCS (sauf boutons) */
  .hero h1,
  .hero h2,
  .hero p.hero-lead,
  .hero-content > p,
  .hero-content > div > p {
    color: #ffffff !important;
    opacity: 1.0 !important;
  }
  
  /* EXCEPTION CRITIQUE : Bouton blanc = texte/icône BLEU */
  .hero .btn-white,
  .hero a.btn-white,
  .hero .btn-white.btn-lg {
    color: #0047AB !important;
    background: #ffffff !important;
  }
  
  /* Icône téléphone BLEU dans bouton blanc */
  .hero .btn-white i,
  .hero .btn-white .fas,
  .hero a.btn-white i,
  .hero a.btn-white .fas {
    color: #0047AB !important;
  }
  
  /* Hover : texte + icône bleu foncé */
  .hero .btn-white:hover,
  .hero a.btn-white:hover {
    color: #003380 !important;
  }
  
  .hero .btn-white:hover i,
  .hero a.btn-white:hover i,
  .hero .btn-white:hover .fas,
  .hero a.btn-white:hover .fas {
    color: #003380 !important;
  }
  
  /* Page header (pages de services) */
  .page-header {
    padding: 2rem var(--mobile-padding) !important;
    min-height: auto;
  }
  
  /* Masquer le fil d'Ariane (breadcrumb) sur mobile pour gagner de l'espace */
  .page-header nav {
    display: none !important;
  }
  
  .page-header h1 {
    font-size: 1.75rem !important;
    line-height: 1.2;
    margin-bottom: 0.875rem;
  }
  
  .page-header .lead {
    font-size: 1rem !important;
    line-height: 1.5;
    opacity: 1.0 !important; /* Contraste maximal sur mobile */
    color: #ffffff !important; /* Blanc éclatant */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2); /* Ombre légère pour améliorer la lisibilité */
  }
  
  /* Cibler aussi directement les paragraphes dans page-header */
  .page-header p {
    color: #ffffff !important;
    opacity: 1.0 !important;
  }
  
  /* FORCER TOUS LES TEXTES DANS PAGE-HEADER À ÊTRE BLANCS */
  .page-header,
  .page-header *,
  .page-header h1,
  .page-header h2,
  .page-header h3,
  .page-header p,
  .page-header span,
  .page-header div {
    color: #ffffff !important; /* Blanc éclatant sur TOUT */
    opacity: 1.0 !important;
  }
  
  /* === BOUTONS MOBILE === */
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    min-height: var(--mobile-touch-target);
    justify-content: center;
    white-space: nowrap;
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  /* Boutons en pleine largeur dans le contenu */
  section .btn,
  .card .btn,
  .cta-card .btn,
  .hero .btn {
    width: 100%;
  }
  
  .btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
  }
  
  .btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Header CTA buttons - special mobile treatment */
  .header-cta {
    display: flex !important;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
  }
  
  .header-cta .btn {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    white-space: nowrap;
    min-width: auto !important;
    width: auto !important;
    border-radius: var(--radius-md);
  }
  
  .header-cta .btn i {
    font-size: 0.875rem;
    margin-right: 0.25rem;
  }
  
  /* Masquer le texte "Appeler" et "Devis gratuit" sur très petits écrans */
  @media (max-width: 360px) {
    .header-cta .btn span:not(.icon) {
      display: none;
    }
    .header-cta .btn {
      padding: 0.5rem !important;
      min-width: 40px;
    }
  }
  
  /* Groupe de boutons mobile */
  .btn-group,
  .hero-buttons,
  .cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1rem;
  }
  
  .btn-group .btn,
  .hero-buttons .btn,
  .cta-buttons .btn {
    width: 100%;
    margin: 0;
  }
  
  /* Liens standards */
  a:not(.btn) {
    text-decoration: underline;
    color: var(--primary);
    transition: color 0.2s ease;
  }
  
  a:not(.btn):hover,
  a:not(.btn):active {
    color: var(--primary-dark);
  }
  
  /* === CARTES MOBILE === */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .service-card {
    padding: 1.5rem;
    text-align: left;
  }
  
  .service-card-icon {
    margin: 0 0 1rem 0;
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }
  
  .service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
  }
  
  .service-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
  
  .service-card ul {
    margin: 1rem 0;
  }
  
  .service-card ul li {
    font-size: 0.9375rem;
    padding: 0.5rem 0;
    padding-left: 1.75rem;
  }
  
  /* Section titles on service pages */
  section > .container > h2:first-child,
  section h2.mb-xl {
    font-size: 1.5rem !important;
    line-height: 1.3;
    margin-bottom: 1.5rem !important;
    padding: 0 var(--mobile-padding);
    text-align: center;
  }
  
  /* === GRILLES MOBILE === */
  .grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  
  .trust-badges {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  
  .trust-badge {
    padding: 1rem;
  }
  
  /* === CARTES (CARDS) MOBILE === */
  .card {
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .card-body {
    padding: 1.25rem var(--mobile-padding);
  }
  
  .card h3 {
    font-size: 1.25rem !important;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  
  .card p {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
  
  .card .btn {
    width: 100%;
    margin-top: 1rem;
  }
  
  /* Service cards avec icônes */
  .service-card,
  .card[class*="service"] {
    padding: 1.25rem;
  }
  
  .service-card .icon,
  .card .icon {
    width: 56px !important;
    height: 56px !important;
    margin-bottom: 1rem;
  }
  
  .service-card .icon i,
  .card .icon i {
    font-size: 1.5rem;
  }
  
  /* === FORMULAIRES MOBILE === */
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  .form-control {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
  }
  
  textarea.form-control {
    min-height: 150px;
  }
  
  .form-check {
    align-items: flex-start;
  }
  
  .form-check input {
    margin-top: 0.25rem;
    min-width: 20px;
    min-height: 20px;
  }
  
  .form-check label {
    font-size: 0.9375rem;
  }
  
  /* === FAQ MOBILE === */
  .faq-category {
    margin-bottom: 2rem;
  }
  
  .faq-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
  
  .faq-category-header i {
    font-size: 1.5rem;
  }
  
  .faq-category-header h2 {
    font-size: 1.5rem;
  }
  
  .faq-item {
    margin-bottom: 0.75rem;
  }
  
  .faq-question {
    padding: 1rem;
    font-size: 1rem;
    gap: 0.75rem;
  }
  
  .faq-question span {
    flex: 1;
    text-align: left;
    line-height: 1.4;
  }
  
  .faq-question i {
    flex-shrink: 0;
    font-size: 1rem;
  }
  
  .faq-answer {
    padding: 0 1rem;
  }
  
  .faq-item.active .faq-answer {
    padding: 0 1rem 1rem;
  }
  
  .category-link {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    width: 100%;
    justify-content: center;
  }
  
  /* === PORTFOLIO / RÉALISATIONS MOBILE === */
  .project-card {
    margin-bottom: 1.5rem;
  }
  
  .project-image {
    height: auto !important;
    min-height: 200px;
    max-height: 300px;
  }
  
  .project-content {
    padding: 1.5rem;
  }
  
  .project-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .project-tag {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
  }
  
  .project-section {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .project-section h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }
  
  /* Filtres de tags mobile */
  .filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
  }
  
  .filter-tag {
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    min-height: var(--mobile-touch-target);
  }
  
  /* === TABLEAUX MOBILE === */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  
  thead {
    display: none; /* Masquer les en-têtes sur mobile */
  }
  
  tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--white);
  }
  
  tbody td {
    display: block;
    text-align: left !important;
    padding: 0.5rem 0;
    border: none;
  }
  
  tbody td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
  }
  
  /* === FOOTER MOBILE === */
  .footer {
    padding: 2.5rem 0 1.5rem;
  }
  
  .footer-main {
    grid-template-columns: 1fr !important;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }
  
  .footer-about {
    max-width: 100%;
  }
  
  .footer-logo img {
    height: 100px !important;
  }
  
  .footer-col {
    width: 100%;
  }
  
  .footer-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  
  .footer-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .footer-links li a {
    display: block;
    padding: 0.5rem 0;
    font-size: 1rem;
  }
  
  .footer-contact-item {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .footer-legal {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  /* === SECTIONS SPÉCIFIQUES MOBILE === */
  
  /* Section avec fond */
  .section-bg {
    background-size: cover;
    background-position: center;
    background-attachment: scroll !important; /* Éviter fixed sur mobile */
  }
  
  /* CTA Cards (comme la carte rouge urgence) - CORRECTION DÉBORDEMENT */
  .cta-card,
  .urgence-card,
  .emergency-card,
  div[style*="background: linear-gradient"][style*="color: white"],
  div[style*="background: linear-gradient"][style*="color:#fff"],
  div[style*="background:linear-gradient"][style*="color:white"] {
    margin-left: var(--mobile-padding) !important;
    margin-right: var(--mobile-padding) !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    padding: 1.5rem 1rem !important;
    border-radius: var(--radius-md) !important;
    text-align: center !important;
    box-sizing: border-box !important;
    max-width: calc(100vw - 2 * var(--mobile-padding)) !important;
  }
  
  .cta-card h2,
  .urgence-card h2,
  .emergency-card h2 {
    font-size: 1.5rem !important;
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  .cta-card p,
  .urgence-card p,
  .emergency-card p {
    font-size: 1rem !important;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }
  
  .cta-card .btn,
  .urgence-card .btn,
  .emergency-card .btn {
    font-size: 1.125rem !important;
    padding: 1rem 1.5rem;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  
  /* Info boxes (bleu pâle) - CORRECTION DÉBORDEMENT */
  div[style*="background:var(--primary-pale)"],
  div[style*="background: var(--primary-pale)"],
  .info-box {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    padding: 1.5rem var(--mobile-padding) !important;
    border-radius: var(--radius-md) !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
  
  .info-box h2 {
    font-size: 1.375rem !important;
    line-height: 1.3;
    margin-bottom: 0.875rem;
  }
  
  .info-box p {
    font-size: 1rem !important;
    line-height: 1.6;
  }
  
  /* Section "Quand" avec icônes - CORRECTION DÉBORDEMENT */
  div[style*="background:var(--neutral-100)"],
  div[style*="background: var(--neutral-100)"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    padding: 1.5rem var(--mobile-padding) !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
  
  /* Items avec icônes (flex layout) */
  div[style*="display:flex"][style*="align-items:flex-start"] {
    padding: 1rem !important;
    margin-bottom: 0.875rem !important;
  }
  
  div[style*="display:flex"][style*="align-items:flex-start"] i {
    font-size: 1.375rem !important;
    margin-top: 0.125rem !important;
  }
  
  div[style*="display:flex"][style*="align-items:flex-start"] strong {
    font-size: 1rem !important;
    display: block;
    margin-bottom: 0.375rem;
  }
  
  div[style*="display:flex"][style*="align-items:flex-start"] p {
    font-size: 0.9375rem !important;
    line-height: 1.5;
  }
  
  /* Stats / Chiffres */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  
  .stat-item {
    padding: 1.5rem;
    text-align: center;
  }
  
  .stat-number {
    font-size: 2.5rem !important;
  }
  
  .stat-label {
    font-size: 1rem;
  }
  
  /* === CORRECTION GLOBALE DES ÉLÉMENTS INLINE-STYLE QUI DÉBORDENT === */
  
  /* Tous les éléments avec max-width défini en inline */
  section div[style*="max-width"],
  .container div[style*="max-width"] {
    max-width: calc(100% - 2 * var(--mobile-padding)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Divs avec padding inline dans les sections */
  section > div[style*="padding"],
  .container > div[style*="padding"] {
    padding-left: var(--mobile-padding) !important;
    padding-right: var(--mobile-padding) !important;
  }
  
  /* Tous les gradients (cartes rouge urgence) */
  section div[style*="background: linear-gradient"],
  section div[style*="background:linear-gradient"],
  .container div[style*="background: linear-gradient"],
  .container div[style*="background:linear-gradient"] {
    margin-left: var(--mobile-padding) !important;
    margin-right: var(--mobile-padding) !important;
    padding-left: var(--mobile-padding) !important;
    padding-right: var(--mobile-padding) !important;
    box-sizing: border-box !important;
    max-width: calc(100vw - 2 * var(--mobile-padding)) !important;
  }
  
  /* Breadcrumb mobile */
  .breadcrumb {
    font-size: 0.8125rem;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
    line-height: 1.4;
  }
  
  .breadcrumb a,
  .breadcrumb span {
    opacity: 1;
    font-weight: 500;
  }
  
  /* Alertes mobile */
  .alert {
    padding: 1rem;
    font-size: 0.9375rem;
  }
  
  /* Badges mobile */
  .badge {
    font-size: 0.8125rem;
    padding: 0.3125rem 0.75rem;
  }
  
  /* === UTILITAIRES MOBILE === */
  
  /* Masquer sur mobile */
  .hide-mobile {
    display: none !important;
  }
  
  /* Afficher uniquement sur mobile */
  .show-mobile {
    display: block !important;
  }
  
  /* Texte centré sur mobile */
  .mobile-center {
    text-align: center !important;
  }
  
  /* Stack vertical sur mobile */
  .mobile-stack {
    flex-direction: column !important;
  }
  
  /* Pleine largeur sur mobile */
  .mobile-full {
    width: 100% !important;
  }
  
  /* === IMAGES & MÉDIAS MOBILE === */
  img {
    max-width: 100%;
    height: auto;
  }
  
  .img-placeholder {
    min-height: 200px;
  }
  
  video {
    max-width: 100%;
    height: auto !important;
  }
  
  /* === ANIMATIONS RÉDUITES POUR MOBILE === */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  
  /* === AMÉLIORATIONS TACTILES === */
  
  /* Zone tactile minimale */
  a, button, input[type="submit"], input[type="button"], .clickable {
    min-height: var(--mobile-touch-target);
    min-width: var(--mobile-touch-target);
  }
  
  /* Retour visuel au touch */
  button:active, a:active, .btn:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
  
  /* Empêcher le zoom sur les inputs */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important; /* Évite le zoom automatique sur iOS */
  }
  
  /* Améliorer le scroll */
  body, .nav-menu, .modal {
    -webkit-overflow-scrolling: touch;
  }
  
  /* === CORRECTION BARRE DE NAVIGATION HORIZONTALE === */
  
  /* SOLUTION 1 : Masquer complètement les barres de nav horizontales avec scroll (RECOMMANDÉ) */
  .horizontal-nav,
  .tabs-nav,
  .category-nav,
  nav[style*="overflow-x"],
  div[style*="overflow-x: auto"],
  div[style*="overflow-x:auto"],
  .quick-links {
    display: none !important; /* Masque les barres de scroll horizontal */
  }
  
  /* SOLUTION 2 ALTERNATIVE : Adapter la barre horizontale (si vous préférez la garder) */
  /* Décommenter cette section si vous voulez garder la barre de navigation */
  /*
  .horizontal-nav,
  .tabs-nav,
  .category-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    gap: 0.5rem !important;
    padding: 0.5rem var(--mobile-padding) !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .horizontal-nav::-webkit-scrollbar,
  .tabs-nav::-webkit-scrollbar,
  .category-nav::-webkit-scrollbar {
    height: 4px !important;
  }
  
  .horizontal-nav::-webkit-scrollbar-thumb,
  .tabs-nav::-webkit-scrollbar-thumb,
  .category-nav::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2) !important;
    border-radius: 2px !important;
  }
  
  .horizontal-nav a,
  .tabs-nav a,
  .category-nav a {
    white-space: nowrap !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    border-radius: var(--radius-md) !important;
    background: var(--neutral-100) !important;
    color: var(--neutral-700) !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
  }
  
  .horizontal-nav a.active,
  .tabs-nav a.active,
  .category-nav a.active {
    background: var(--primary) !important;
    color: white !important;
  }
  */
}

/* === OPTIMISATIONS POUR TRÈS PETITS ÉCRANS === */
@media (max-width: 375px) {
  :root {
    --mobile-padding: 0.875rem;
  }
  
  h1 {
    font-size: 1.75rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  .logo img {
    height: 40px !important;
    max-width: 120px !important;
  }
  
  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  .hero {
    padding: 2rem var(--mobile-padding) !important;
  }
  
  .top-bar-item span {
    display: none; /* Sur très petits écrans, masquer le texte, garder juste les icônes */
  }
  
  .lang-switcher button {
    min-width: 28px;
    padding: 0.25rem 0.375rem;
    font-size: 0.75rem;
  }
}

/* === OPTIMISATIONS TABLETTE === */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .footer-main {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* === FIX POUR IPHONE NOTCH === */
@supports (padding: max(0px)) {
  .header-container,
  .top-bar-container,
  .container,
  .footer-container {
    padding-left: max(var(--mobile-padding), env(safe-area-inset-left));
    padding-right: max(var(--mobile-padding), env(safe-area-inset-right));
  }
}
