/* === Montmirail Informatique - Style Refonte UX/UI === */

:root {
  /* Palette moderne et chaleureuse */
  --primary: #0b5394;
  --primary-light: #1a73e8;
  --primary-dark: #084178;
  --accent: #ff9500;
  --accent-hover: #ff8000;
  --success: #34a853;
  --warning: #fbbc04;
  --text: #1f1f1f;
  --text-muted: #5f6368;
  --surface: #ffffff;
  --surface-alt: #f8f9fa;
  --border: #e8eaed;
  
  /* Ombres modernes - design system cohérent */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-hover: 0 12px 32px rgba(0,0,0,0.15);
  
  /* Espacements cohérents */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 72px;
  
  /* Transitions fluides */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Rayons de bordure */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Reset moderne */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typographie hiérarchisée */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container responsive */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Navigation sticky moderne avec glassmorphism */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px) saturate(180%);
  background: rgba(11, 83, 148, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-base);
}

.nav.scrolled {
  background: rgba(11, 83, 148, 0.95);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 12px var(--space-md);
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  transition: transform var(--transition-base);
}

.nav-brand:hover {
  transform: scale(1.02);
}

.nav-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  position: relative;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-base);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
  border-radius: 2px;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.is-active,
.nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.18);
}

.nav-links a.is-active::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Hero moderne avec animations */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0b5394 0%, #1a73e8 100%);
  color: #fff;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1518770660439-4636190af475?q=80&w=1600&auto=format&fit=crop') center/cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 149, 0, 0.15) 0%, transparent 50%);
  z-index: 1;
}

.hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 83, 148, 0.85) 0%, rgba(26, 115, 232, 0.75) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero .brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero .brand img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-base);
}

.hero .brand img:hover {
  transform: scale(1.05) rotate(2deg);
}

.hero h1 {
  margin: 0 0 var(--space-sm);
  font-weight: 800;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.15);
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero p.tagline {
  margin: 0 auto var(--space-lg);
  font-size: 1.15rem;
  opacity: 0.95;
  max-width: 600px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Badges de confiance dans le hero */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin: var(--space-lg) 0;
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-base);
}

.badge:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.badge-icon {
  font-size: 1.2rem;
}

/* CTA double - primaire et secondaire */
.hero-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Système de boutons moderne avec effet ripple */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.5s ease;
}

.button:hover::before {
  transform: scale(2);
}

.button-primary {
  background: var(--accent);
  color: #000;
}

.button-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  border: 2px solid #fff;
  box-shadow: none;
}

.button-secondary:hover {
  background: #fff;
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button-emergency {
  background: #dc2626;
  color: #fff;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(220, 38, 38, 0);
  }
}

.button-emergency:hover {
  background: #b91c1c;
  transform: scale(1.05);
  animation: none;
}

/* Barre d'urgence sticky intelligente */
.emergency-bar {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  z-index: 90;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  transition: bottom var(--transition-slow);
}

.emergency-bar.visible {
  bottom: 0;
}

.emergency-bar span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
}

.emergency-bar .btn-emergency {
  background: #fff;
  color: #dc2626;
  padding: 10px 24px;
  border-radius: 100px;
  font-weight: 700;
  transition: all var(--transition-base);
  text-decoration: none;
}

.emergency-bar .btn-emergency:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

/* Sections */
section {
  padding: var(--space-xl) 0;
}

section.alt {
  background: var(--surface-alt);
}

h2.section-title {
  color: var(--primary);
  margin: 0 0 var(--space-lg);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  text-align: center;
  position: relative;
  padding-bottom: var(--space-md);
}

h2.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary-light) 100%);
  border-radius: 2px;
}

/* Grid system moderne */
.grid {
  display: grid;
  gap: var(--space-md);
}

.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Cards modernes avec microinteractions */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.card:hover::before {
  transform: scaleX(1);
}

.card.center {
  text-align: center;
}

.card h3 {
  color: var(--primary);
  margin: var(--space-sm) 0;
  font-size: 1.35rem;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card ul li {
  padding: var(--space-xs) 0;
  padding-left: var(--space-lg);
  position: relative;
  color: var(--text-muted);
}

.card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Card service avec icône moderne */
.card-service {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  cursor: pointer;
}

.card-service:hover {
  border-color: var(--primary-light);
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.card-service .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: all var(--transition-base);
}

.card-service:hover .icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 24px rgba(11, 83, 148, 0.3);
}

/* Bloc urgence amélioré */
.urgent {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
  border: 2px solid #ffc107;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
  margin: var(--space-lg) 0;
}

.urgent strong {
  color: #7a5a00;
  font-size: 1.1rem;
}

.urgent a {
  background: #7a5a00;
  color: #fff;
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 700;
  transition: all var(--transition-base);
  text-decoration: none;
}

.urgent a:hover {
  background: #5a4000;
  transform: scale(1.05);
}

/* Section preuve sociale */
.social-proof {
  background: var(--surface);
  padding: var(--space-xl) 0;
  text-align: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.stat-item {
  padding: var(--space-md);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Avis clients */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.testimonial {
  background: var(--surface);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.testimonial:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.testimonial-text {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
}

.testimonial-info {
  text-align: left;
}

.testimonial-name {
  font-weight: 700;
  color: var(--text);
}

.testimonial-role {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.testimonial-stars {
  color: #ffc107;
  font-size: 0.9rem;
  margin-top: 2px;
}

/* Formulaire moderne */
form {
  max-width: 600px;
}

label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-base);
  background: var(--surface);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: var(--space-xs);
  cursor: pointer;
}

/* Footer moderne */
footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: var(--space-lg) 0;
}

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

.footer-section h4 {
  margin-bottom: var(--space-md);
  color: var(--accent);
}

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

.footer-section ul li {
  margin-bottom: var(--space-xs);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--transition-fast);
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Bouton d'appel flottant (mobile) */
.call-float {
  position: fixed;
  right: var(--space-md);
  bottom: var(--space-md);
  z-index: 80;
  display: none;
}

.call-float a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 1.8rem;
  box-shadow: 0 8px 24px rgba(255, 149, 0, 0.4);
  transition: all var(--transition-base);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.call-float a:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(255, 149, 0, 0.5);
  animation: none;
}

/* Responsive design */
@media (max-width: 820px) {
  :root {
    --space-lg: 36px;
    --space-xl: 48px;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: rgba(11, 83, 148, 0.97);
    backdrop-filter: blur(12px);
    padding: var(--space-md);
    display: none;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }
  
  .nav.open .nav-links {
    display: flex;
  }
  
  .nav-links a {
    width: 100%;
    text-align: center;
  }
  
  .hero {
    min-height: 500px;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .button {
    width: 100%;
    max-width: 300px;
  }
  
  .trust-badges {
    flex-direction: column;
    align-items: center;
  }
  
  .emergency-bar {
    flex-direction: column;
    text-align: center;
  }
  
  .call-float {
    display: block;
  }
  
  .cols-3 {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .hero .brand {
    flex-direction: column;
  }
  
  h2.section-title {
    font-size: 1.5rem;
  }
  
  .card {
    padding: var(--space-md);
  }
}

/* Animations d'entrée pour les éléments */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Utilitaires */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mb-sm { margin-bottom: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Accessibilité */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Mode sombre (préparation future) */
@media (prefers-color-scheme: dark) {
  /* À implémenter si besoin */
}