:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #0f172a;
  --accent: #f97316;
  --bg: #f9fafb;
  --text: #0f172a;
  --muted: #6b7280;
  --white: #ffffff;
  --border: #e5e7eb;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(249, 250, 251, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-img {
  width: 42px;
  height: auto;
  object-fit: contain;
}

.logo-text-main {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.logo-text-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.main-nav a {
  color: var(--muted);
}

.main-nav a:hover {
  color: var(--text);
}

/* CTA header : texte bien blanc */
.main-nav .btn-primary {
  color: #ffffff;
}

.nav-cta {
  margin-left: 0.5rem;
}

/* Burger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.15rem;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease,
    background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 16px 45px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: #e0ecff;
  color: var(--primary);
}

.btn-secondary:hover {
  background: #d0e2ff;
  transform: translateY(-1px);
}

/* HERO */
.hero {
  position: relative;
  padding: 3.5rem 0 3.2rem;
  /* image de fond depuis assets/img, vu depuis assets/css/style.css */
  background: url('../img/vieuxport.jpg') center/cover no-repeat;
  color: #0b1120;
}

/* Overlay pour lisibilité – ~60% */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(249, 250, 251, 0.60);
  z-index: 0;
}

/* Dégradé de transition vers la section suivante */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 160px;
  background: linear-gradient(
    to bottom,
    rgba(249, 250, 251, 0) 0%,
    #f9fafb 45%,
    #f9fafb 100%
  );
  z-index: 1;
}

/* Contenu par-dessus overlay + dégradé */
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: stretch;
}

/* Badge "Marseille & accompagnement à distance" plus visible */
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.18);
  color: #0f7a3a;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
  color: #0b1120;
}

.hero-title .highlight {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 0.98rem;
  color: #111827;
  margin-bottom: 1.4rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  font-size: 0.78rem;
}

.hero-meta-label {
  display: block;
  color: var(--muted);
}

.hero-meta-value {
  font-weight: 600;
  color: #0b1120;
}

/* Section generic */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: #f3f4f6;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.section-intro {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 1.8rem;
}

.section-text {
  font-size: 0.95rem;
  color: #111827;
  margin-bottom: 0.9rem;
}

/* Two columns */
.two-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.2rem;
  align-items: center;
}

/* About / cabinet */
.section-content {
  max-width: 520px;
}

.section-media {
  display: flex;
  justify-content: flex-end;
}

.photo-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(15, 23, 42, 0.9);
  color: var(--white);
  border-radius: 14px;
  padding: 0.5rem 0.8rem;
  font-size: 0.78rem;
}

.photo-badge-title {
  display: block;
  font-weight: 600;
}

.photo-badge-text {
  display: block;
  color: #e5e7eb;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.2rem 0 1.6rem;
}

.info-block {
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: #e5edff;
  font-size: 0.8rem;
}

.info-label {
  display: block;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.info-value {
  font-weight: 600;
}

/* Cards grid (expertises) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  font-size: 0.9rem;
}

.card h3 {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.card p {
  margin: 0 0 0.6rem;
  color: var(--muted);
}

.card ul {
  padding-left: 1.1rem;
  margin: 0;
  color: #4b5563;
  font-size: 0.83rem;
}

.card li {
  margin-bottom: 0.25rem;
}

/* Profils */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}

.profile-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  border: 1px solid var(--border);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.03);
  font-size: 0.9rem;
}

.profile-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.profile-card p {
  margin: 0 0 0.6rem;
  color: var(--muted);
}

.profile-card ul {
  padding-left: 1.1rem;
  margin: 0;
  font-size: 0.83rem;
  color: #4b5563;
}

.profile-card li {
  margin-bottom: 0.25rem;
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.process-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.04);
  font-size: 0.9rem;
}

.process-number {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e0ecff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.process-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

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

/* Stats */
.stats-section {
  background: #0f172a;
  color: var(--white);
  padding: 2.4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 1.2rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.8);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.85rem;
  color: #e5e7eb;
}

/* Contact */
.section-contact {
  background: #f9fafb;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0 1.3rem;
}

.contact-info-list {
  display: grid;
  gap: 0.7rem;
}

.contact-info-item {
  font-size: 0.88rem;
}

.contact-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.contact-value {
  font-weight: 600;
  color: #0f172a;
}

.contact-note {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  font-size: 0.9rem;
}

.contact-note h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #f3f4f6;
  padding: 1.2rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-right {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-right a {
  color: var(--muted);
}

.footer-right a:hover {
  color: var(--text);
}

.footer-separator {
  opacity: 0.6;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

  .section-media {
    justify-content: flex-start;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profiles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .main-nav {
    position: absolute;
    top: 56px;
    right: 0;
    left: 0;
    background: #f9fafb;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .main-nav a,
  .main-nav .btn {
    width: 100%;
    justify-content: flex-start;
  }

  .site-header.nav-open .main-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .menu-toggle {
    display: flex;
  }

  .header-inner {
    padding: 0.55rem 0;
  }

  .hero {
    padding: 2.8rem 0 2.6rem;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .profiles-grid,
  .process-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2.8rem 0;
  }
}

/* ========== POPUP MENTIONS LÉGALES ========== */

.modal-legal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 40;
}

.modal-legal.active {
  display: flex;
}

.modal-legal-dialog {
  background: #ffffff;
  border-radius: 18px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  padding: 1.5rem 1.75rem 1.6rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  /* 🔽 important : on garde les arrondis, on coupe ce qui dépasse */
  overflow: hidden;
  font-size: 0.9rem;
  color: #111827;
  position: relative;
}

/* Titre principal du popup (avec séparation) */
.modal-legal-title {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

/* Contenu qui scroll à l'intérieur, pas le conteneur */
.legal-notice {
  max-height: calc(90vh - 90px); /* on laisse de la place pour le titre + padding */
  overflow-y: auto;
  padding-right: 0.25rem; /* petit padding pour que le texte ne colle pas à la barre de scroll */
}

/* Sous-titres internes comme "Mentions légales" */
.legal-notice h2 {
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  color: #111827;
  font-weight: 700;
}

.modal-legal-dialog p {
  margin-bottom: 0.9rem;
}

.modal-legal-dialog a {
  color: #2563eb;
}

.modal-legal-dialog a:hover {
  text-decoration: underline;
}

.modal-legal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}

.modal-legal-close:hover {
  color: #111827;
}

