/* ==========================================================================
   DIGITAL DEVSOLUTIONS - DESIGN SYSTEM & STYLESHEET (COMPLETE)
   ========================================================================== */

/* 1. VARIABLES GLOBALES */
:root {
  --primary: #0a0f1d;            /* Bleu nuit très profond */
  --primary-light: #151e36;      /* Bleu foncé élégant pour dropdowns & cartes */
  --accent: #2563eb;             /* Bleu royal vif */
  --accent-hover: #1d4ed8;       /* Bleu royal foncé au survol */
  --accent-glow: rgba(37, 99, 235, 0.35); /* Effet lumineux au survol */
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  
  --text-main: #0f172a;          /* Slate foncé pour lisibilité optimale */
  --text-muted: #64748b;         /* Slate moyen pour textes secondaires */
  --bg-main: #f8fafc;            /* Gris très clair dépouillé */
  --bg-card: #ffffff;            /* Blanc pur */
  --border-color: #e2e8f0;       /* Bordure discrète */
  --border-focus: #93c5fd;        /* Bordure active (focus) */
  
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 20px 30px -10px rgba(37, 99, 235, 0.18);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 3. NAVIGATION RESPONSIVE & GLASSMORPHISM */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
}

.nav-brand {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.nav-brand span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Toggle Menu Mobile */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger-icon {
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  position: relative;
  display: block;
  transition: var(--transition);
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  transition: var(--transition);
}

.hamburger-icon::before { top: -7px; }
.hamburger-icon::after { top: 7px; }

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 0.6rem 1.1rem;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
}

.btn-devis {
  background: var(--accent-gradient);
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: var(--transition);
}

.btn-devis:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* Dropdown Menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background-color: var(--primary-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  padding: 0.5rem;
  list-style: none;
}

.has-dropdown:hover .dropdown-menu {
  display: block;
  animation: fadeIn 0.25s ease;
}

.dropdown-menu a {
  display: block;
  padding: 0.65rem 1rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dropdown-menu a:hover {
  color: #ffffff;
  background-color: var(--accent);
}

/* 4. CONTENU PRINCIPAL */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.hero-section {
  text-align: center;
  max-width: 820px;
  margin: 1rem auto 4rem;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* 5. SECTEURS D'ACTIVITÉ (AVEC IMAGES & ANIMATIONS) */
.sectors-section {
  margin-bottom: 4rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.header-line {
  width: 60px;
  height: 4px;
  background: var(--accent-gradient);
  margin: 0 auto;
  border-radius: 2px;
}

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.sector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.sector-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow-hover);
}

.sector-img-wrapper {
  height: 160px;
  width: 100%;
  overflow: hidden;
  position: relative;
  background-color: #e2e8f0;
}

.sector-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.sector-card:hover .sector-img-wrapper img {
  transform: scale(1.08);
}

.sector-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  padding: 1.2rem;
  text-align: center;
  margin: 0;
}

/* 6. FORMULAIRE DE DEVIS */
.devis-section {
  max-width: 850px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.devis-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.form-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: #f8fafc;
  transition: var(--transition);
  box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
}

/* Checkboxes Services */
.services-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #f8fafc;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.checkbox-card:hover {
  border-color: var(--accent);
  background-color: #f0f6ff;
  transform: translateY(-1px);
}

.checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-label {
  font-size: 0.92rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
}

.other-service-input {
  margin-top: 10px;
  display: none;
}

.other-service-input.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.btn-submit-devis {
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 15px 30px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--accent-glow);
  margin-top: 10px;
}

.btn-submit-devis:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.4);
}

.btn-submit-devis:active {
  transform: translateY(0);
}

/* Carte Contact Direct */
.info-contact-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.info-contact-text h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 4px;
}

.info-contact-text p {
  font-size: 0.9rem;
  color: #1e3a8a;
  margin: 0;
}

.info-contact-btn {
  background-color: #1e40af;
  color: #ffffff;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 3px 10px rgba(30, 64, 175, 0.2);
}

.info-contact-btn:hover {
  background-color: #1e3a8a;
  transform: translateY(-1px);
}

/* 7. SERVICES & CARDS */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow-hover);
}

.card-img-wrapper {
  height: 200px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .card-img-wrapper img {
  transform: scale(1.08);
}

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.card-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* 8. FOOTER DE CONTACT */
.contact-bar {
  background-color: var(--primary);
  color: #ffffff;
  padding: 2.5rem 1.5rem;
  margin-top: 5rem;
  border-top: 4px solid var(--accent);
}

.contact-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.contact-item a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.contact-item a:hover {
  color: #60a5fa;
}

/* 9. MODAL DE CONFIRMATION */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 29, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-icon {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 22px rgba(34, 197, 94, 0.35);
}

.modal-icon svg {
  width: 34px;
  height: 34px;
}

.modal-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.modal-text {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 24px;
}

.modal-btn {
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.modal-btn:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.modal-btn:active {
  transform: scale(0.98);
}

/* 10. MEDIA QUERIES & ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 992px) {
  .hero-title {
    font-size: 2.3rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle-label {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 75px;
    left: 0;
    width: 100%;
    background-color: var(--primary);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem;
    gap: 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }

  .nav-toggle:checked ~ .nav-menu {
    max-height: 600px;
    transition: max-height 0.4s ease-in-out;
  }

  .dropdown-menu {
    position: static;
    display: block;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    border: none;
    margin-left: 1rem;
    margin-top: 0.25rem;
  }

  .devis-section {
    padding: 24px 18px;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .contact-container {
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .modal-card {
    padding: 28px 20px;
    border-radius: 16px;
  }

  .modal-title {
    font-size: 1.25rem;
  }
}