/* 
   Améliorations Mobile pour J.J. Elite Reno
   Garde l'identité visuelle avec un look plus moderne et fluide
*/

/* ======= IMPORT POLICE MODERNE ======= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ======= VARIABLES POUR MOBILE ======= */
:root {
  /* Garde vos couleurs existantes */
  --primary-color: #D0201E;
  --secondary-color: #0A1738;
  
  /* Couleur de fond très subtile pour certains éléments seulement */
  --bg-light-gray: #f8f9fa;
  --bg-section-alt: #ffffff;
  
  /* Ombres douces */
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  
  /* Arrondis modernes */
  --radius-soft: 8px;
  --radius-card: 12px;
}

/* ======= CHANGEMENT DE POLICE GLOBALE ======= */
body {
  font-family: 'Poppins', 'Raleway', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Montserrat', sans-serif !important;
  font-weight: 600;
}

/* ======= HEADER MOBILE ÉPURÉ ======= */
@media (max-width: 768px) {
  /* Cache la barre d'info sur mobile */
  .info-bar {
    display: none;
  }
  
  /* Header plus compact et épuré */
  .site-header {
    padding: 1rem 0 !important;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  .site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
  }
  
  /* Logo adapté pour mobile */
  .logo {
    max-width: 120px !important;
    width: auto !important;
  }
  
  .logo img {
    max-height: 50px !important;
    width: auto !important;
    height: auto !important;
  }
  
  /* Container pour hamburger et icône téléphone */
  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  /* Icône téléphone dans le header */
  .header-phone-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    text-decoration: none;
    transition: transform 0.2s ease;
  }
  
  .header-phone-icon:active {
    transform: scale(0.95);
  }
  
  /* Ajustement du menu hamburger */
  .nav-toggle {
    display: flex !important;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
  }
  
  .hamburger span {
    width: 22px;
    height: 2px;
    background-color: var(--secondary-color);
    margin: 3px 0;
  }
  
  /* Ajout des infos contact dans le menu mobile */
  .mobile-menu {
    padding-top: 2rem;
  }
  
  .mobile-contact-info {
    background: var(--bg-light-gray);
    padding: 20px;
    margin: 20px;
    border-radius: var(--radius-card);
    display: block !important;
  }
  
  .mobile-contact-info h4 {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 600;
  }
  
  .mobile-contact-info a {
    display: block;
    padding: 8px 0;
    color: var(--text-color);
    font-size: 14px;
    text-decoration: none;
  }
  
  .mobile-contact-info a i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
  }
  
  .mobile-social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
  }
  
  .mobile-social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    font-size: 16px;
  }
}

/* Desktop - garde l'icône téléphone cachée */
@media (min-width: 769px) {
  .header-phone-icon,
  .mobile-contact-info {
    display: none !important;
  }
}

/* ======= FLUIDITÉ DES SECTIONS ======= */
@media (max-width: 768px) {
  /* Réduction des marges entre sections */
  section {
    padding: 4rem 0 !important;
  }
  
  .services-section,
  .projects-section,
  .about-section,
  .process-section,
  .contact-section {
    padding: 3rem 0 !important;
  }
  
  /* Sections avec fond blanc uniforme pour meilleure lisibilité */
  section {
    background-color: white;
  }
  
  /* Hero avec marge top pour le header fixe */
  .hero {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
  }
  
  /* Ajout de padding-top pour toutes les pages SAUF l'accueil (header fixe) */
  body:not(.home-page) {
    padding-top: 70px;
  }
  
  /* Page headers (titres de pages) avec plus d'espace */
  .page-header {
    margin-top: 0;
    padding-top: 80px !important;
    padding-bottom: 60px !important;
  }
  
  /* Première section après le header */
  main > section:first-child,
  .hero + section,
  section:first-of-type {
    padding-top: 5rem !important;
  }
  
  /* Contact, services, projets, etc. - première section */
  .services-hero,
  .contact-hero,
  .projects-hero,
  .about-hero {
    padding-top: 100px !important;
    min-height: 350px;
  }
  
  /* Ajustement des titres de section */
  .section-header {
    margin-bottom: 2.5rem;
  }
  
  .section-heading {
    font-size: 2.4rem;
    margin-bottom: 1rem;
  }
  
  .section-subheading {
    font-size: 1.4rem;
    font-weight: 500;
  }
  
  .section-description {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    line-height: 1.6;
  }
}

/* ======= CARTES AVEC ARRONDIS ET OMBRES DOUCES ======= */
@media (max-width: 768px) {
  /* Service cards */
  .service-card {
    background: white;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 2.5rem 2rem;
    margin-bottom: 1.5rem;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .service-card:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #ff4444);
    box-shadow: var(--shadow-soft);
  }
  
  /* Project cards */
  .project-card {
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
    transition: transform 0.2s ease;
  }
  
  .project-card:active {
    transform: translateY(-2px);
  }
  
  .project-image {
    border-radius: 0;
  }
  
  .project-info {
    padding: 1.5rem;
  }
  
  /* Contact form */
  .contact-form {
    background: white;
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-card);
  }
  
  /* Process steps */
  .process-step {
    background: white;
    border-radius: var(--radius-card);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-soft);
  }
  
  .step-number {
    background: linear-gradient(135deg, var(--primary-color), #ff4444);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-soft);
  }
}

/* ======= BOUTONS MODERNISÉS ======= */
.btn {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  border-radius: 25px;
  padding: 1.2rem 2.5rem;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .btn {
    padding: 1rem 2rem;
    font-size: 1.4rem;
    border-radius: 22px;
  }
  
  .hero-buttons {
    gap: 1rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #ff4444);
    border: none;
    box-shadow: 0 4px 15px rgba(208, 32, 30, 0.3);
  }
  
  .btn-primary:hover,
  .btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(208, 32, 30, 0.4);
  }
  
  .btn-secondary {
    background: white;
    color: var(--secondary-color);
    border: 2px solid rgba(10, 23, 56, 0.2);
  }
  
  .btn-secondary:hover,
  .btn-secondary:active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
  }
}

/* ======= FORMULAIRES MODERNISÉS ======= */
@media (max-width: 768px) {
  .form-control {
    border-radius: var(--radius-soft);
    border: 1.5px solid #e0e0e0;
    padding: 1rem 1.2rem;
    font-size: 1.4rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
  }
  
  .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(208, 32, 30, 0.1);
  }
  
  .form-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
  }
  
  .form-group {
    margin-bottom: 1.8rem;
  }
}

/* ======= GRILLES OPTIMISÉES ======= */
@media (max-width: 768px) {
  .services-grid,
  .projects-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 15px;
  }
  
  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
  
  .about-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
  
  .about-image {
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
  }
}

/* ======= HERO SECTION AJUSTÉE ======= */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
  }
  
  .hero-content h1 span {
    font-size: 0.85em;
  }
  
  .hero-content p {
    font-size: 1.6rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
  }
}

/* ======= FOOTER MODERNISÉ ======= */
@media (max-width: 768px) {
  .site-footer {
    background: var(--secondary-color) !important;
    padding: 3rem 0 2rem;
  }
  
  .footer-content {
    padding: 0 15px;
  }
  
  .footer-section {
    margin-bottom: 2rem;
  }
  
  .footer-section h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    margin-bottom: 1rem;
  }
  
  .footer-bottom {
    padding: 1.5rem 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.3rem;
    background: rgba(0, 0, 0, 0.2);
  }
}

/* ======= CORRECTION VISIBILITÉ FOOTER ======= */
.site-footer {
  background-color: var(--secondary-color) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.site-footer * {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer h3,
.footer-widget h3 {
  color: white !important;
}

.site-footer p,
.site-footer span,
.footer-widget p {
  color: rgba(255, 255, 255, 0.8) !important;
}

.site-footer a,
.footer-links a,
.contact-item a {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--primary-color) !important;
}

/* Icônes du footer */
.site-footer i,
.contact-item i {
  color: var(--primary-color) !important;
}

/* Footer bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(0, 0, 0, 0.2);
}

.footer-bottom p,
.copyright p {
  color: rgba(255, 255, 255, 0.8) !important;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Social links dans le footer */
.site-footer .social-links a {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
}

.site-footer .social-links a:hover {
  background: var(--primary-color) !important;
  color: white !important;
}

/* ======= ANIMATIONS SUBTILES ======= */
@media (max-width: 768px) {
  /* Entrée douce des sections au scroll */
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Pas d'animations si l'utilisateur préfère */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation: none !important;
      transition: none !important;
    }
  }
}

/* ======= MENU MOBILE AMÉLIORÉ ======= */
@media (max-width: 768px) {
  .mobile-menu {
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-menu ul {
    padding: 1rem 0;
  }
  
  .mobile-menu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  .mobile-menu li:last-child {
    border-bottom: none;
  }
  
  .mobile-menu a {
    padding: 1.2rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    transition: background 0.2s ease;
  }
  
  .mobile-menu a:hover,
  .mobile-menu a:active {
    background: var(--bg-light-gray);
    color: var(--primary-color);
  }
  
  .mobile-menu .btn {
    margin: 1.5rem;
    display: block;
    text-align: center;
    width: calc(100% - 3rem);
  }
}

/* ======= CORRECTIONS SPÉCIFIQUES ======= */
@media (max-width: 768px) {
  /* Empêche le débordement horizontal */
  body {
    overflow-x: hidden;
  }
  
  /* Correction supplémentaire pour les titres de page */
  .page-title,
  .breadcrumb-section,
  .hero-section {
    padding-top: 100px !important;
  }
  
  /* S'assurer que le contenu après le header est visible */
  .content-section:first-child,
  .main-content > *:first-child {
    margin-top: 2rem;
  }
  
  /* Container avec padding approprié */
  .container {
    padding: 0 20px;
  }
  
  /* Images responsives */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Tableaux responsifs */
  table {
    width: 100%;
    overflow-x: auto;
    display: block;
  }
}