/* KW Security - Styles des pages segments (Particuliers, Professionnels, Services) */

/* ============================================================ */
/* HERO SEGMENT (couleur dégradée selon Particulier ou Pro)     */
/* ============================================================ */

.segment-hero {
  background: linear-gradient(115deg, var(--bleu-deep) 0%, var(--bleu) 60%, var(--bleu-light) 100%);
  color: var(--blanc);
  padding: 90px 5% 80px;
  position: relative;
  overflow: hidden;
}
.segment-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 80px;
  pointer-events: none;
}
.segment-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}

.segment-hero-text .breadcrumb {
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}
.segment-hero-text .breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.segment-hero-text .breadcrumb a:hover { color: var(--alert-light); }
.segment-hero-text .breadcrumb .current { color: var(--alert-light); font-weight: 600; }

.segment-hero-text .eyebrow {
  color: var(--alert-light);
  margin-bottom: 16px;
}
.segment-hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: var(--blanc);
}
.segment-hero-text h1 em {
  font-style: italic;
  color: var(--alert-light);
  font-weight: 600;
}
.segment-hero-text p.lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  margin-bottom: 30px;
}
.segment-hero-text .hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Carte chiffres clés à droite du hero */
.segment-hero-stats {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 32px 28px;
  backdrop-filter: blur(10px);
  border-top: 3px solid var(--alert);
}
.segment-hero-stats h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--alert-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.segment-hero-stats ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.segment-hero-stats li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.segment-hero-stats li:last-child { border-bottom: none; padding-bottom: 0; }
.segment-hero-stats li svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--alert-light);
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 2px;
}
.segment-hero-stats li strong {
  display: block;
  color: var(--blanc);
  font-size: 0.93rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.segment-hero-stats li span {
  color: rgba(255,255,255,0.75);
  font-size: 0.83rem;
  line-height: 1.5;
}

/* ============================================================ */
/* INTRO SEGMENT (sous le hero)                                 */
/* ============================================================ */

.segment-intro {
  background: var(--blanc);
  padding: 70px 5% 50px;
}
.segment-intro-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.segment-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--bleu);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.segment-intro h2 em { font-style: italic; color: var(--alert); }
.segment-intro p {
  color: var(--gris-700);
  line-height: 1.75;
  font-size: 1.05rem;
  margin-bottom: 14px;
}

/* ============================================================ */
/* QUICK NAV (ancres vers les sections de cas)                  */
/* ============================================================ */

.segment-quicknav {
  background: var(--blanc);
  padding: 30px 5%;
  border-bottom: 1px solid var(--gris-300);
  position: sticky;
  top: 80px;
  z-index: 50;
}
.segment-quicknav-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.quicknav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bleu-pale);
  border: 1px solid var(--gris-300);
  border-radius: 6px;
  text-decoration: none;
  color: var(--bleu);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.2s;
}
.quicknav-item:hover {
  background: var(--bleu);
  color: var(--blanc);
  border-color: var(--bleu);
  transform: translateY(-2px);
}
.quicknav-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================ */
/* CAS SECTIONS (les blocs Maison, Commerce, etc.)              */
/* ============================================================ */

.cas-section {
  padding: 80px 5%;
  scroll-margin-top: 160px; /* pour les ancres avec nav sticky */
}
.cas-section:nth-child(odd) { background: var(--blanc); }
.cas-section:nth-child(even) { background: var(--bleu-pale); }

.cas-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* Inversion 1 cas sur 2 pour casser la monotonie */
.cas-section:nth-child(even) .cas-grid {
  direction: rtl;
}
.cas-section:nth-child(even) .cas-grid > * {
  direction: ltr;
}

.cas-text {
  position: sticky;
  top: 180px;
}
.cas-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--alert);
  font-weight: 600;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 12px;
}
.cas-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--bleu);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.cas-text h2 em { font-style: italic; color: var(--alert); }
.cas-text p.lead {
  font-size: 1.05rem;
  color: var(--gris-700);
  line-height: 1.7;
  margin-bottom: 22px;
}
.cas-text > p {
  color: var(--gris-700);
  line-height: 1.75;
  margin-bottom: 14px;
}

/* Liste enjeux/risques */
.cas-enjeux {
  list-style: none;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cas-enjeux li {
  padding-left: 28px;
  position: relative;
  color: var(--gris-700);
  line-height: 1.6;
}
.cas-enjeux li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 14px;
  background: var(--alert);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bleu-pale);
}

.cas-section:nth-child(odd) .cas-enjeux li::before {
  box-shadow: 0 0 0 4px var(--bleu-pale);
}
.cas-section:nth-child(even) .cas-enjeux li::before {
  box-shadow: 0 0 0 4px var(--blanc);
}

/* Visuel à droite */
.cas-visual {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Bloc solution recommandée */
.cas-solution {
  background: var(--blanc);
  border: 1px solid var(--gris-300);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 8px 20px rgba(0, 58, 112, 0.06);
  border-top: 3px solid var(--bleu);
}
.cas-section:nth-child(even) .cas-solution {
  background: var(--blanc);
}
.cas-solution h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bleu);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gris-300);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cas-solution h3 svg {
  width: 20px;
  height: 20px;
  color: var(--bleu);
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cas-solution-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cas-solution-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--gris-100);
  font-size: 0.93rem;
  color: var(--gris-700);
}
.cas-solution-list li:last-child { border-bottom: none; }
.cas-solution-list li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--alert);
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 2px;
}
.cas-solution-list li strong {
  color: var(--bleu);
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
  font-size: 0.95rem;
}

/* Bloc scénario fictif */
.cas-scenario {
  background: linear-gradient(135deg, var(--bleu-deep) 0%, var(--bleu) 100%);
  color: var(--blanc);
  border-radius: 8px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.cas-scenario::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--alert);
}
.cas-scenario .eyebrow {
  color: var(--alert-light);
  margin-bottom: 12px;
  display: block;
}
.cas-scenario h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
  color: var(--blanc);
}
.cas-scenario p {
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
  font-size: 0.93rem;
  margin-bottom: 16px;
}
.cas-scenario p:last-child { margin-bottom: 0; }
.cas-scenario-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.cas-scenario-stat {
  text-align: center;
}
.cas-scenario-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--alert-light);
  font-weight: 700;
  margin-bottom: 4px;
}
.cas-scenario-stat span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Indicateur de prix */
.cas-prix {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bleu-pale);
  border-radius: 6px;
  margin-top: 20px;
  border-left: 3px solid var(--alert);
}
.cas-section:nth-child(even) .cas-prix {
  background: var(--blanc);
}
.cas-prix-label {
  font-size: 0.75rem;
  color: var(--gris-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 2px;
  display: block;
}
.cas-prix-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bleu);
  font-style: italic;
}

/* ============================================================ */
/* PAGE INDEX SERVICES (Nos solutions)                          */
/* ============================================================ */

.services-grid-page {
  padding: 80px 5%;
  background: var(--blanc);
}
.services-grid-page-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.service-grid-card {
  display: flex;
  flex-direction: column;
  background: var(--bleu-pale);
  border: 1px solid var(--gris-300);
  border-radius: 8px;
  padding: 32px 28px;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 4px solid var(--alert);
}
.service-grid-card:hover {
  background: var(--bleu);
  border-color: var(--bleu);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 58, 112, 0.18);
}
.service-grid-card:hover * { color: var(--blanc) !important; }
.service-grid-card:hover .service-grid-card-icon {
  background: var(--alert) !important;
}
.service-grid-card:hover .service-grid-card-icon svg {
  color: var(--blanc);
}

.service-grid-card-icon {
  width: 56px;
  height: 56px;
  background: var(--bleu);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: background 0.3s;
}
.service-grid-card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--blanc);
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-grid-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--bleu);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.service-grid-card p {
  color: var(--gris-700);
  line-height: 1.6;
  font-size: 0.93rem;
  margin-bottom: 18px;
  flex: 1;
}
.service-grid-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bleu);
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--alert);
  padding-bottom: 4px;
  align-self: flex-start;
  transition: gap 0.25s;
}
.service-grid-card:hover .service-grid-card-link {
  gap: 14px;
  color: var(--blanc);
  border-color: var(--blanc);
}

/* ============================================================ */
/* CTA fin de page (déjà dans page-internal.css)                */
/* ============================================================ */

/* ============================================================ */
/* RESPONSIVE                                                   */
/* ============================================================ */

@media (max-width: 1024px) {
  .segment-quicknav {
    position: static; /* pas sticky sur tablette/mobile */
    overflow-x: auto;
  }
  .segment-quicknav-inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 8px;
  }
  .quicknav-item {
    flex-shrink: 0;
  }
}

@media (max-width: 900px) {
  .segment-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .segment-hero-text .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .cas-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .cas-section:nth-child(even) .cas-grid {
    direction: ltr;
  }
  .cas-text {
    position: static;
  }
}

@media (max-width: 600px) {
  .cas-section { padding: 50px 5%; }
  .segment-hero { padding: 60px 5% 50px; }
  .segment-intro { padding: 50px 5% 30px; }
  .cas-scenario-stats { grid-template-columns: 1fr; gap: 12px; }
  .cas-scenario-stat { text-align: left; display: flex; gap: 12px; align-items: baseline; }
  .cas-scenario-stat strong { font-size: 1.1rem; }
}

/* ============================================================ */
/* FOOTER 5 COLONNES (override du main.css)                    */
/* ============================================================ */
@media (min-width: 1025px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1.2fr 1fr 1fr !important;
    gap: 36px !important;
  }
}
@media (min-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1.4fr 1fr 1fr !important;
    gap: 40px !important;
  }
}

/* Sur écran moyen, on tasse à 3 colonnes (1ère grosse, puis 2 cols x 2 lignes) */
@media (max-width: 1024px) and (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 30px !important;
  }
}

/* Sur mobile, tout en 1 colonne */
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

.footer-col h4 {
  margin-bottom: 14px;
}

/* ============================================================ */
/* NOUVEAU LOGO IMAGE + TEXTE (override des anciennes règles)   */
/* ============================================================ */

/* Le lien .logo lui-même : on remet le gap pour espacer logo et texte */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  height: auto;
  gap: 12px !important;
}

/* L'image du logo dans le nav (header desktop) — un peu plus gros */
.nav .logo-img {
  height: 52px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* Logo dans le menu mobile (en haut de la sidebar) */
.mobile-menu-header .logo-img {
  height: 44px;
  width: auto;
  max-width: 50px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* Logo dans le footer — couleurs originales (pas de filtre) */
.logo-footer {
  margin-bottom: 16px;
}
.logo-footer .logo-img {
  height: 56px;
  width: auto;
  max-width: 64px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  /* Pas de filtre : on garde les couleurs originales du PNG */
}

/* Bloc texte à côté du logo : réactivé */
.logo-text {
  display: flex !important;
  flex-direction: column;
  line-height: 1.15;
}

/* Style nom + baseline dans le nav et menu mobile (fond blanc) */
.nav .logo-name,
.mobile-menu-header .logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--bleu);
  letter-spacing: 0.02em;
}
.nav .logo-tag,
.mobile-menu-header .logo-tag {
  font-size: 0.72rem;
  color: var(--gris-700);
  margin-top: 2px;
}

/* Style nom + baseline dans le footer (fond bleu foncé) */
.logo-footer .logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--blanc);
  letter-spacing: 0.02em;
}
.logo-footer .logo-tag {
  font-size: 0.75rem;
  color: var(--alert-light);
  margin-top: 2px;
}

/* Sur écran moyen, on réduit légèrement */
@media (max-width: 768px) {
  .nav .logo-img {
    height: 44px;
    max-width: 50px;
  }
  .nav .logo-name {
    font-size: 0.95rem;
  }
  .nav .logo-tag {
    font-size: 0.68rem;
  }
}

/* Sur très petit écran, masquer la baseline pour gagner de la place */
@media (max-width: 480px) {
  .nav .logo-tag {
    display: none;
  }
  .nav .logo-img {
    height: 40px;
    max-width: 46px;
  }
}

/* Cacher l'ancien .logo-mark s'il reste du code résiduel */
.logo-mark {
  display: none !important;
}

/* ============================================================ */
/* SVG illustratif zone d'intervention                          */
/* ============================================================ */
.zone-svg-illu {
  width: 100%;
  height: auto;
  display: block;
  max-width: 600px;
  margin: 0 auto;
}
