/* Harmonisé sur la couleur primaire #334155 (favicon) — outils/design_harmoniser.py */
/* ==========================================================================
   Constructions métalliques — direction « Acier »
   Ardoise #334155, zinc #94a3b8, rouge minium #5579ad (accent).
   Police système condensée en capitales (Arial Narrow / Segoe UI Semibold).
   Header ardoise à liseré rouge, logo à droite, nav à gauche.
   Tiroir ardoise. Footer zinc clair en une rangée. Fiche d'inscription en
   carte à bord ardoise épais, arguments en bandeau au-dessus du formulaire.
   Animations : liseré rouge qui s'étire, élévation au survol.
   ========================================================================== */

/* --- Header desktop -------------------------------------------------- */

header.site-header.hdr-minimal {
  background: #334155;
  position: relative;
  overflow: hidden;
}

/* Le bord bas rouge est porté par ce pseudo-élément : il s'étire de 0 à
   pleine largeur à l'affichage, au lieu d'un simple trait fixe. */
header.site-header.hdr-minimal::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: #5579ad;
  transform: scaleX(1);
  transform-origin: left;
  animation: cm-liftline 0.9s ease-out both;
}

@keyframes cm-liftline {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

header.site-header.hdr-minimal .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 15px;
}

/* Logo à droite, navigation à gauche : on réordonne les trois enfants. */
header.site-header.hdr-minimal .header-inner .nav-desktop { order: 1; }
header.site-header.hdr-minimal .header-inner .hamburger { order: 2; }
header.site-header.hdr-minimal .header-inner .brand { order: 3; }

header.site-header.hdr-minimal .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: "Arial Narrow", "Segoe UI Semibold", "Segoe UI", Arial, sans-serif;
}

header.site-header.hdr-minimal .brand-logo {
  border-radius: 3px;
}

/* display posé uniquement au-dessus de 861 px : en dessous, le gabarit
   masque déjà .nav-desktop pour laisser place au tiroir. */
@media (min-width: 861px) {
  header.site-header.hdr-minimal .nav-desktop {
    display: flex;
    align-items: center;
    gap: 26px;
  }
}

header.site-header.hdr-minimal .nav-link {
  position: relative;
  color: #cbd4e1;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: "Arial Narrow", "Segoe UI Semibold", Arial, sans-serif;
  padding-block: 6px;
}

/* Liseré rouge qui s'étire au survol, sous chaque lien de navigation. */
header.site-header.hdr-minimal .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #5579ad;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

header.site-header.hdr-minimal .nav-link:hover,
header.site-header.hdr-minimal .nav-link:focus-visible {
  color: #fff;
}

header.site-header.hdr-minimal .nav-link:hover::after,
header.site-header.hdr-minimal .nav-link:focus-visible::after {
  transform: scaleX(1);
}

header.site-header.hdr-minimal .nav-sep {
  width: 1px;
  height: 20px;
  background: rgba(148, 163, 184, 0.4);
}

header.site-header.hdr-minimal .dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #cbd4e1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding-block: 6px;
}

header.site-header.hdr-minimal .dropdown-trigger:hover {
  color: #fff;
}

header.site-header.hdr-minimal .dropdown-arrow {
  width: 13px;
  height: 13px;
}

/* Largeur/position/affichage du panneau volontairement non touchés :
   c'est le mécanisme d'ouverture du menu. */
header.site-header.hdr-minimal .dropdown-panel {
  background: #334155;
  border: 1px solid #475569;
  border-top: 3px solid #5579ad;
  padding: 10px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

header.site-header.hdr-minimal .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 2px;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease, background-color 0.2s ease;
}

header.site-header.hdr-minimal .dropdown-item:hover,
header.site-header.hdr-minimal .dropdown-item:focus-visible {
  background: rgba(148, 163, 184, 0.14);
  transform: translateY(-2px);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
}

header.site-header.hdr-minimal .dropdown-item-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

header.site-header.hdr-minimal .dropdown-item-keyword {
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.85rem;
}

header.site-header.hdr-minimal .dropdown-item-sub {
  color: #cbd4e1;
  font-size: 0.72rem;
}

/* Bouton « Connexion » / « Dashboard » côté visiteur connecté : sobre,
   dans la même famille typographique que le reste de la nav. */
header.site-header.hdr-minimal .btn.btn-outline,
header.site-header.hdr-minimal .btn.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 0.78rem;
  font-family: "Arial Narrow", "Segoe UI Semibold", Arial, sans-serif;
  color: #cbd4e1;
  transition: color 0.2s ease, border-color 0.2s ease;
}

header.site-header.hdr-minimal .btn.btn-outline {
  background: transparent;
  border: 1px solid rgba(203, 212, 225, 0.5);
  border-radius: 0;
}

header.site-header.hdr-minimal .btn.btn-ghost {
  background: none;
  border: none;
}

header.site-header.hdr-minimal .btn.btn-outline:hover,
header.site-header.hdr-minimal .btn.btn-outline:focus-visible,
header.site-header.hdr-minimal .btn.btn-ghost:hover,
header.site-header.hdr-minimal .btn.btn-ghost:focus-visible {
  color: #fff;
  border-color: #fff;
}

/* Bouton rouge rectangulaire, commun au header et au formulaire. */
header.site-header.hdr-minimal .btn.btn-primary,
.ie-wrap .quote-lead-actions .btn.btn-primary {
  display: inline-flex;
  align-items: center;
  background: #5579ad;
  color: #fff;
  border: none;
  border-radius: 0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-family: "Arial Narrow", "Segoe UI Semibold", Arial, sans-serif;
  transition: transform 0.2s ease, filter 0.2s ease, background-color 0.2s ease;
}

header.site-header.hdr-minimal .btn.btn-primary {
  min-height: 44px;
  padding: 10px 22px;
  font-size: 0.8rem;
}

header.site-header.hdr-minimal .btn.btn-primary:hover,
header.site-header.hdr-minimal .btn.btn-primary:focus-visible,
.ie-wrap .quote-lead-actions .btn.btn-primary:hover,
.ie-wrap .quote-lead-actions .btn.btn-primary:focus-visible {
  background: #456490;
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 14px rgba(85, 121, 173, 0.45));
}

/* Hamburger rouge, cible tactile carrée. Le display (masqué sur desktop,
   affiché sous 860 px) appartient au gabarit : on ne le touche pas. */
header.site-header.hdr-minimal .hamburger {
  width: 44px;
  height: 44px;
  background: #5579ad;
  color: #fff;
  border: none;
  border-radius: 2px;
}

/* --- Barre + tiroir mobile -------------------------------------------- */

.mobile-overlay {
  background: rgba(15, 22, 32, 0.6);
}

.mobile-drawer {
  background: #334155;
  color: #e2e8f0;
}

.mobile-drawer .mobile-close {
  width: 40px;
  height: 40px;
  background: rgba(148, 163, 184, 0.15);
  border: none;
  border-radius: 2px;
  color: #f8fafc;
}

.mobile-drawer .mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 20px;
  color: #cbd4e1;
  text-decoration: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  font-family: "Segoe UI", Arial, sans-serif;
}

.mobile-drawer .mobile-nav-link:hover,
.mobile-drawer .mobile-nav-link:active {
  background: rgba(148, 163, 184, 0.12);
  color: #fff;
}

.mobile-drawer .mobile-section-title {
  padding: 18px 20px 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  color: #c0cee1;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.mobile-drawer .mobile-auth {
  padding: 20px;
}

/* Deux boutons côte à côte (Connexion / Ajouter mon entreprise) : le
   gabarit les répartit déjà en deux parts égales (flex:1). */
.mobile-drawer .mobile-auth .btn.btn-primary,
.mobile-drawer .mobile-auth .btn.btn-outline {
  min-height: 48px;
  border-radius: 0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 0.78rem;
}

.mobile-drawer .mobile-auth .btn.btn-primary {
  background: #5579ad;
  color: #fff;
  border: none;
}

.mobile-drawer .mobile-auth .btn.btn-outline {
  background: transparent;
  border: 1px solid rgba(203, 212, 225, 0.5);
  color: #cbd4e1;
}

/* --- Footer : marque, liens et bas de page en une rangée -------------- */

footer.site-footer.ftr-rich {
  background: #eef1f5;
  color: #475569;
  border-top: 4px solid #5579ad;
}

footer.site-footer.ftr-rich .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 26px;
}

footer.site-footer.ftr-rich .ftr-rich-top {
  order: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

footer.site-footer.ftr-rich .ftr-rich-top .brand-logo {
  width: 30px;
  height: 30px;
}

footer.site-footer.ftr-rich .footer-brand {
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 1rem;
  font-family: "Arial Narrow", "Segoe UI Semibold", Arial, sans-serif;
}

footer.site-footer.ftr-rich .footer-tagline {
  display: none;
}

footer.site-footer.ftr-rich .ftr-rich-grid {
  order: 2;
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
}

/* Colonne vide (réservée au futur canton) : masquée plutôt que laissée béante. */
footer.site-footer.ftr-rich .ftr-rich-grid > div:has(.footer-links:empty) {
  display: none;
}

footer.site-footer.ftr-rich .ftr-rich-grid > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

footer.site-footer.ftr-rich .footer-heading {
  color: #456490;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

footer.site-footer.ftr-rich .footer-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px 14px;
}

footer.site-footer.ftr-rich .footer-links a {
  position: relative;
  color: #475569;
  text-decoration: none;
  font-size: 0.82rem;
}

footer.site-footer.ftr-rich .footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: #5579ad;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

footer.site-footer.ftr-rich .footer-links a:hover,
footer.site-footer.ftr-rich .footer-links a:focus-visible {
  color: #456490;
}

footer.site-footer.ftr-rich .footer-links a:hover::after,
footer.site-footer.ftr-rich .footer-links a:focus-visible::after {
  transform: scaleX(1);
}

footer.site-footer.ftr-rich .footer-bottom {
  order: 3;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

footer.site-footer.ftr-rich .footer-copy {
  color: #475569;
  font-size: 0.78rem;
}

footer.site-footer.ftr-rich .footer-bottom-links a {
  color: #456490;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
}

@media (max-width: 700px) {
  footer.site-footer.ftr-rich .container {
    flex-direction: column;
    align-items: flex-start;
  }
  footer.site-footer.ftr-rich .ftr-rich-top,
  footer.site-footer.ftr-rich .ftr-rich-grid,
  footer.site-footer.ftr-rich .footer-bottom {
    width: 100%;
  }
  footer.site-footer.ftr-rich .ftr-rich-grid {
    justify-content: flex-start;
  }
  footer.site-footer.ftr-rich .footer-tagline {
    display: block;
    margin-top: 6px;
    color: #475569;
    font-size: 0.82rem;
  }
}

/* --- Page « Ajouter mon entreprise » ----------------------------------- */

.ie-wrap .page-header h1 {
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: "Arial Narrow", "Segoe UI Semibold", Arial, sans-serif;
}

.ie-wrap .page-header p {
  color: #475569;
}

/* Arguments en bandeau au-dessus du formulaire (ordre visuel inversé). */
.ie-wrap .ie-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ie-wrap .ie-side {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.ie-wrap .ie-card {
  order: 2;
}

.ie-wrap .ie-why {
  flex: 1 1 260px;
  background: #eef1f5;
  border: 1px solid #cbd4e1;
  border-left: 4px solid #5579ad;
  border-radius: 2px;
  padding: 20px 22px;
  transition: transform 0.2s ease, filter 0.2s ease;
  animation: cm-apparition 0.5s ease both;
}

.ie-wrap .ie-why:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 10px 16px rgba(51, 65, 85, 0.18));
}

.ie-wrap .ie-why h2 {
  margin-top: 0;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.85rem;
  font-family: "Arial Narrow", "Segoe UI Semibold", Arial, sans-serif;
}

.ie-wrap .ie-why ul,
.ie-wrap .ie-why p {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.6;
}

.ie-wrap .ie-why p {
  padding-left: 0;
}

.ie-wrap .ie-card {
  background: #fff;
  border: 3px solid #334155;
  border-radius: 2px;
  padding: 30px 32px;
  animation: cm-apparition 0.5s 0.1s ease both;
}

.ie-wrap .qf-section {
  margin: 28px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #5579ad;
  color: #456490;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: "Arial Narrow", "Segoe UI Semibold", Arial, sans-serif;
}

.ie-wrap .qf-section:first-child {
  margin-top: 0;
}

.ie-wrap .quote-lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.ie-wrap .quote-field-wide {
  grid-column: 1 / -1;
}

.ie-wrap .quote-field label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.8rem;
  font-weight: 600;
}

.ie-wrap .qf-opt {
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.ie-wrap .quote-field input,
.ie-wrap .quote-field select,
.ie-wrap .quote-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #cbd4e1;
  border-radius: 2px;
  color: #1e2a3b;
  font-size: 0.92rem;
  font-family: "Segoe UI", Arial, sans-serif;
}

.ie-wrap .quote-field textarea {
  min-height: 96px;
  resize: vertical;
}

.ie-wrap .quote-field input:focus,
.ie-wrap .quote-field select:focus,
.ie-wrap .quote-field textarea:focus {
  border-color: #5579ad;
  outline: 3px solid rgba(85, 121, 173, 0.35);
  outline-offset: 1px;
}

.ie-wrap .quote-lead-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.ie-wrap .quote-lead-actions .btn.btn-primary {
  min-height: 48px;
  padding: 12px 34px;
  font-size: 0.85rem;
}

.ie-wrap .quote-lead-actions small {
  color: #64748b;
}

@keyframes cm-apparition {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .ie-wrap .quote-lead-grid {
    grid-template-columns: 1fr;
  }
  .ie-wrap .ie-card {
    padding: 22px 18px;
  }
}

@media (max-width: 480px) {
  header.site-header.hdr-minimal .brand {
    font-size: 0.95rem;
    letter-spacing: 0.03em;
  }
}

/* --- Mouvement réduit : toutes les animations coupées ------------------ */

@media (prefers-reduced-motion: reduce) {
  header.site-header.hdr-minimal::after {
    animation: none;
    transform: scaleX(1);
  }
  header.site-header.hdr-minimal .nav-link::after,
  header.site-header.hdr-minimal .dropdown-item,
  header.site-header.hdr-minimal .btn.btn-primary,
  footer.site-footer.ftr-rich .footer-links a::after,
  .ie-wrap .ie-why,
  .ie-wrap .quote-lead-actions .btn.btn-primary {
    transition: none;
  }
  .ie-wrap .ie-card,
  .ie-wrap .ie-why {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
