/* styles.css — design moderne, grid & thèmes */

/* Reset & tokens */
:root {
  --bg: #0b0c10;
  --bg-soft: #11131a;
  --text: #0e1116;
  --muted: #5b6476;
  --brand: #5562ff;
  --brand-600: #3b46ff;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --ring: 0 0 0 3px rgba(85, 98, 255, .25);
  --radius: 16px;
}

:root[data-theme="dark"] {
  --bg: #0c1222;
  --bg-soft: #0f1730;
  --text: #eef0f6;
  --muted: #a7b0c6;
  --brand: #7b85ff;
  --brand-600: #9aa3ff;
  --surface: #141b2f;
  --surface-2: #101728;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  background: var(--surface-2);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Layout */
.container {
  width: min(1100px, 92%);
  margin-inline: auto
}

.section {
  padding: 64px 0
}

.section__header {
  margin-bottom: 28px;
  text-align: center
}

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem
}

h1 {
  font-size: clamp(28px, 3.6vw, 44px);
  margin: 0 0 12px
}

h2 {
  font-size: clamp(22px, 2.4vw, 32px);
  margin: 0 0 6px
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 6px
}

/* Header / nav */
.siteHeader {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid rgba(0, 0, 0, .06)
}

.navbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 600
}

.brand img {
  border-radius: 8px
}

.navMenu {
  margin-left: auto
}

.navMenu ul {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0
}

.navMenu a {
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  border-radius: 10px
}

.navMenu a:hover {
  background: var(--surface-2)
}

.modeToggle {
  background: none;
  border: 0;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer
}

.modeToggle:hover {
  background: var(--surface-2)
}

.burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  position: relative
}

.burger__bar,
.burger__bar::before,
.burger__bar::after {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: currentColor;
  content: "";
}

.burger__bar {
  top: 50%;
  transform: translateY(-50%)
}

.burger__bar::before {
  top: -8px
}

.burger__bar::after {
  top: 8px
}

/* Dropdown */
.hasDropdown {
  position: relative
}

.dropdownToggle {
  background: none;
  border: 0;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer
}

.dropdownToggle:hover {
  background: var(--surface-2)
}

.dropdown {
  position: absolute;
  inset: auto 0 auto 0;
  top: calc(100% + 8px);
  left: -10px;
  display: none;
  gap: 28px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.dropdown.open {
  display: flex
}

.dropdown__col {
  min-width: 200px
}

.dropdown__col h3 {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 6px
}

.dropdown a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit
}

.dropdown a:hover {
  background: var(--surface-2)
}

/* Mobile nav */
@media (max-width: 900px) {
  .burger {
    display: inline-flex;
    align-items: center;
    justify-content: center
  }

  .navMenu {
    position: fixed;
    inset: 60px 0 0 0;
    background: var(--surface);
    transform: translateY(-100%);
    transition: .25s;
    padding: 14px 4%
  }

  .navMenu.open {
    transform: translateY(0)
  }

  .navMenu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px
  }

  .hasDropdown .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    padding: 0
  }

  .hasDropdown .dropdown.open {
    display: block;
    margin-left: 8px
  }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 32px;
  align-items: center;
  padding: 56px 0
}

.hero__content p {
  color: var(--muted);
  margin: 0 0 18px
}

.hero__illustration {
  border-radius: 20px;
  background: linear-gradient(135deg, #dde1ff, #f1f3ff)
}

/* Cards */
.grid {
  display: grid;
  gap: 18px
}

.cards {
  grid-template-columns: repeat(3, 1fr)
}

@media (max-width: 960px) {
  .cards {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width: 640px) {
  .hero {
    grid-template-columns: 1fr
  }

  .cards {
    grid-template-columns: 1fr
  }
}

.card {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .08)
}

.card__icon {
  font-size: 22px
}

/* Buttons & links */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent
}

.btn--primary:hover {
  background: var(--brand-600)
}

/* Ghost → Outline + hover plein */
.btn--ghost {
  background: transparent;
  border: 1px solid var(--brand);
  color: var(--brand);
}

.btn--ghost:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.link.more {
  justify-self: flex-start;
  padding: 0;
  background: none;
  border: 0;
  color: var(--brand);
  cursor: pointer
}

.link.more:hover {
  text-decoration: underline
}

/* CTA box */
.ctaBox {
  display: flex;
  justify-content: center
}

/* Forms */
.formGrid {
  grid-template-columns: repeat(2, 1fr)
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.field--full {
  grid-column: 1/-1
}

input,
textarea {
  background: var(--surface);
  color: inherit;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

input:focus,
textarea:focus {
  box-shadow: var(--ring);
  border-color: var(--brand)
}

.hp {
  position: absolute !important;
  left: -10000px !important;
  opacity: 0 !important
}

/* Newsletter block (wrapper) */
.newsletter {
  margin-top: 8px
}

/* Footer */
.siteFooter {
  margin-top: 50px;
  background: var(--surface);
  border-top: 1px solid rgba(0, 0, 0, .06)
}

.footerGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 28px 0
}

.footerGrid h3 {
  margin-bottom: 8px
}

.list {
  list-style: none;
  padding: 0;
  margin: 0
}

.list a {
  text-decoration: none;
  color: inherit
}

.list a:hover {
  text-decoration: underline
}

.footerBottom {
  border-top: 1px dashed rgba(0, 0, 0, .1);
  padding: 14px 0;
  text-align: center
}

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

/* --- Fix thème nuit : couleur du menu & lune --- */
.siteHeader,
.siteHeader a,
.siteHeader button {
  color: var(--text);
  /* hérite du thème clair/sombre */
}

/* Le bouton "Services" est un <button> => forcer la couleur */
.navMenu .dropdownToggle {
  color: var(--text);
}

/* Lien de nav et hover: garder le contraste en dark */
.navMenu a:hover,
.navMenu .dropdownToggle:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* Icône lune Font Awesome (bouton thème) */
.modeToggle,
.modeToggle i,
.modeToggle svg {
  color: var(--text);
  fill: var(--text);
}

/* Lock textarea size (contact form) */
.contactForm textarea {
  resize: none;
  /* plus de poignée */
  min-height: 160px;
  /* fixe une hauteur confortable */
}

/* Newsletter — carte + mise en page */
.newsletterCard {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 16px;
}

.newsletterText h3 {
  margin: 0 0 8px
}

.nlPoints {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted)
}

.nlPoints li {
  margin: 6px 0
}

.newsletterForm form,
.newsletter form {
  /* si ton include sort un <form>, on le capte ici */
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.newsletterForm input[type="email"],
.newsletter input[type="email"] {
  flex: 1 1 260px;
  min-width: 240px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .15);
  background: var(--surface);
  color: inherit;
}

.newsletterForm button,
.newsletter button[type="submit"] {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.newsletterForm button:hover,
.newsletter button[type="submit"]:hover {
  background: var(--brand-600);
}

@media (max-width: 720px) {
  .newsletterCard {
    grid-template-columns: 1fr
  }
}

/* --- NAVBAR (dark mode) : hover plus visible et clair --- */
:root[data-theme="dark"] .navMenu a:hover,
:root[data-theme="dark"] .navMenu .dropdownToggle:hover {
  background: rgba(255, 255, 255, 0.08);
  /* léger fond clair */
  color: #fff;
  /* texte blanc */
  transition: background 0.2s ease, color 0.2s ease;
}

/* --- DROPDOWN : meilleure lisibilité en thème nuit --- */
:root[data-theme="dark"] .dropdown {
  background: var(--surface);
  /* légèrement plus clair que le fond global */
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .dropdown a {
  color: #eaeaea;
  /* texte plus clair */
}

:root[data-theme="dark"] .dropdown a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Les titres de colonne dans le dropdown */
:root[data-theme="dark"] .dropdown__col h3 {
  color: #b5b9c9;
  font-weight: 600;
}

/* ---------- Bouton "Services" actif / hover en pill ---------- */
.navMenu .dropdownToggle {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.navMenu .dropdownToggle:hover {
  background: var(--surface-2);
}

.navMenu .dropdownToggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, .08);
  /* visible en dark */
  color: var(--text);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

/* ---------- Panneau dropdown style "carte" ---------- */
.hasDropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: none;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  /* bord visible en dark */
  background: rgba(26, 32, 48, .92);
  /* carte sombre */
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
  /* léger blur */
  -webkit-backdrop-filter: blur(6px);
  min-width: 520px;
  /* largeur mini proche de ton screen */
  max-width: min(92vw, 900px);
  gap: 28px;
}

.dropdown.open {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Variante thème clair (si tu utilises le mode light) */
:root:not([data-theme="dark"]) .dropdown {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .10);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .15);
}

/* Petite “flèche douce” en haut */
.dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 18px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-left: inherit;
  border-top: inherit;
  transform: rotate(45deg);
}

/* ---------- Contenu du dropdown ---------- */
.dropdown__col {
  min-width: 240px;
}

.dropdown__col h3 {
  margin: 0 0 8px;
  font-size: .9rem;
  font-weight: 700;
  color: #b5b9c9;
  /* titre gris clair */
}

.dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #eaeaea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown a:hover,
.dropdown a:focus {
  background: rgba(255, 255, 255, .10);
  color: #fff;
}

/* Hover nav plus visible en dark */
:root[data-theme="dark"] .navMenu a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

/* Sécurité overflow au cas où */
.dropdown__col {
  overflow: hidden;
}

/* Empêche tout dépassement du contenu sur les coins arrondis */
.dropdown {
  overflow: hidden;
  /* clé pour couper le hover aux bords */
  padding: 16px 16px;
  /* un peu d'air à l'intérieur */
  border-radius: 16px;
  /* assure la cohérence avec l'overflow */
}

/* La “flèche” doit rester sous le contenu et ne pas créer d'overflow */
.dropdown::before {
  z-index: 0;
  /* sous le contenu */
}

.dropdown>* {
  position: relative;
  z-index: 1;
  /* au-dessus de la flèche */
}

/* Lien sous forme de pill : on évite qu'il colle au bord droit/gauche */
.dropdown a {
  margin: 2px 6px;
  /* évite de toucher les bords => plus de débordement visuel */
  max-width: calc(100% - 12px);
  box-sizing: border-box;
  border-radius: 12px;
}

/* Survol/Focus : même pill, mais confiné par overflow du parent */
.dropdown a:hover,
.dropdown a:focus {
  background: rgba(255, 255, 255, .10);
  color: #fff;
}

/* Option : si tu veux un pill encore plus compact */
@media (pointer:fine) {
  .dropdown a {
    padding: 8px 12px;
  }
}

/* ===========================
   ✅ DROPDOWN — COULEURS TEXTES & HOVER
   =========================== */

/* Thème clair */
:root:not([data-theme="dark"]) .dropdown {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}

:root:not([data-theme="dark"]) .dropdown__col h3 {
  color: #3b3f4a;
  /* Titres plus visibles */
}

:root:not([data-theme="dark"]) .dropdown a {
  color: #1c1e21;
  /* Texte principal bien contrasté */
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

:root:not([data-theme="dark"]) .dropdown a:hover,
:root:not([data-theme="dark"]) .dropdown a:focus {
  background: rgba(0, 0, 0, 0.08);
  color: #000;
  /* Texte foncé sur fond gris clair */
}

/* Thème sombre */
:root[data-theme="dark"] .dropdown {
  background: rgba(26, 32, 48, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .dropdown__col h3 {
  color: #b5b9c9;
}

:root[data-theme="dark"] .dropdown a {
  color: #eaeaea;
}

:root[data-theme="dark"] .dropdown a:hover,
:root[data-theme="dark"] .dropdown a:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* messages */
.alert {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .95rem
}

.alert--success {
  background: #e9f7ef;
  color: #0a5e2a;
  border: 1px solid #bfe6cc
}

.alert--error {
  background: #fdecea;
  color: #7a1f1f;
  border: 1px solid #f3c1bd
}

.alert--info {
  background: #ebf5ff;
  color: #0a3f8a;
  border: 1px solid #c9e1ff
}

/* honeypot */
.hp {
  position: absolute !important;
  left: -10000px !important;
  opacity: 0 !important
}

/* ===== Newsletter Card (version premium) ===== */
.nlCard {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  padding: 26px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .08);
}

:root[data-theme="dark"] .nlCard {
  background: rgba(23, 27, 39, .96);
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .55);
}

.nlLeft {
  display: flex;
  gap: 16px;
  align-items: flex-start
}

.nlIcon {
  flex: 0 0 46px;
  height: 46px;
  width: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(85, 98, 255, .1);
  color: var(--brand);
}

:root[data-theme="dark"] .nlIcon {
  background: rgba(123, 133, 255, .18);
  color: #cfd3ff
}

.nlLeft h3 {
  margin: 0 0 8px
}

.nlList {
  margin: 0;
  padding-left: 18px;
  color: var(--muted)
}

.nlList li {
  margin: 6px 0
}

/* Form */
.nlRight {
  display: flex;
  align-items: center
}

.nlForm {
  width: 100%
}

.nlField {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 14px;
  padding: 8px 8px 8px 12px;
}

:root[data-theme="dark"] .nlField {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .08);
}

.nlField i {
  opacity: .85
}

.nlField input {
  flex: 1 1 auto;
  min-width: 220px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  padding: 10px 6px;
}

.nlField input::placeholder {
  color: var(--muted)
}

.nlField .btnPrimary {
  margin-left: auto;
  padding: 12px 18px;
  border-radius: 10px;
}

/* Note RGPD */
.nlNote {
  margin: 10px 2px 0;
  font-size: .9rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nlNote i {
  opacity: .8
}

/* Responsive */
@media (max-width: 860px) {
  .nlCard {
    grid-template-columns: 1fr
  }

  .nlRight {
    align-items: flex-start
  }
}

/* Utilitaire (si pas déjà présent) */
.hp {
  position: absolute !important;
  left: -10000px !important;
  opacity: 0 !important
}