/* ========================================
   AB-Vigie - Site Vitrine
   ======================================== */

/* === Variables === */
:root {
  /* Couleurs principales */
  --primary: #57c7d4;
  --primary-dark: #3ba5b0;
  --primary-light: #7dd4df;
  --primary-a11y: #0d7a85; /* version foncée accessible (4.5:1 sur blanc) */

  --secondary: #fbbc04;
  --secondary-dark: #e59f2b;

  --accent: #f9f5d7;

  /* Couleurs de texte */
  --text-primary: #2c3e50;
  --text-secondary: #555;
  --text-light: #6b6b6b; /* min #767676 pour WCAG AA */
  --text-white: #ffffff;

  /* Couleurs de fond */
  --bg-light: #f8f8f8;
  --bg-white: #ffffff;
  --bg-dark: #2c3e50;

  /* Niveaux de risque (palette PDF mars 2026) */
  --risk-1: #4caf50;
  --risk-2: #ffb300;
  --risk-3: #f57c00;
  --risk-4: #e53935;
  --risk-5: #7b1fa2;

  /* Ombres */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);

  /* Espacements */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* Transitions */
  --transition: all 0.3s ease;
}

/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* === Accessibilité === */
/* Focus clavier visible et homogène (souris = pas d'outline) */
:focus-visible {
  outline: 3px solid var(--primary-a11y);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Contenu réservé aux lecteurs d'écran */
.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;
}

/* Lien d'évitement : masqué jusqu'au focus clavier */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--bg-dark);
  color: var(--text-white);
  border-radius: 6px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* === Container === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* === Navigation === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.logo img {
  border-radius: 50%;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-menu a {
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--primary);
}

/* Le bouton app dans la nav : garder le texte blanc (sinon .nav-menu a l'emporte) */
.nav-menu a.btn-primary,
.nav-menu a.btn-primary:hover {
  color: var(--text-white);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-align: center;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Cadenas devant les liens vers l'app (connexion requise). Masque SVG → prend currentColor. */
.app-lock::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.4em;
  vertical-align: -0.12em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='11'%20width='18'%20height='11'%20rx='2'/%3E%3Cpath%20d='M7%2011V7a5%205%200%200%201%2010%200v4'/%3E%3C/svg%3E")
    center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='11'%20width='18'%20height='11'%20rx='2'/%3E%3Cpath%20d='M7%2011V7a5%205%200%200%201%2010%200v4'/%3E%3C/svg%3E")
    center/contain no-repeat;
}

.btn-primary {
  background: var(--primary-a11y);
  color: var(--text-white);
}

.btn-primary:hover {
  background: #0a5f68;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--text-white);
  border-color: var(--text-white);
}

.btn-secondary:hover {
  background: var(--text-white);
  color: var(--primary-a11y);
}

/* === Hero Section === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: var(--text-white);
  padding-top: 80px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-sm);
}

.hero-subtitle {
  display: block;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.hero-main {
  display: block;
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.hero-description {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 80px;
}

/* === Sections === */
.section {
  padding: var(--spacing-xl) 0;
}

.section-light {
  background: var(--bg-light);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-white);
}

.section-contact {
  background: var(--accent);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-lg);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: inherit;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

/* === Mission Section === */
.mission-content {
  display: grid;
  gap: var(--spacing-lg);
}

.mission-text {
  background: var(--bg-white);
  padding: var(--spacing-md);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.mission-text h3 {
  color: var(--primary-a11y);
  margin-bottom: 1rem;
}

.mission-text p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.mission-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.card {
  background: var(--bg-white);
  padding: var(--spacing-md);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.card h4 {
  color: var(--primary-a11y);
  margin-bottom: 0.75rem;
}

.danger-info {
  display: flex;
  gap: 2rem;
  background: #fff3cd;
  border-left: 5px solid var(--secondary);
  padding: var(--spacing-md);
  border-radius: 8px;
  margin-top: var(--spacing-lg);
}

.danger-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.danger-content h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* === Process Steps === */
.process-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.step {
  flex: 1;
  min-width: 200px;
  max-width: 250px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--primary-a11y);
  color: var(--text-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.step-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step-arrow {
  font-size: 2rem;
  color: var(--primary);
  flex-shrink: 0;
}

/* === Risk Levels === */
.risk-levels {
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  padding: var(--spacing-md);
  border-radius: 12px;
}

.risk-levels h3 {
  margin-bottom: 2rem;
}

.risk-scale {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.risk-level {
  width: 150px;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  transition: var(--transition);
}

.risk-level:hover {
  transform: scale(1.1);
}

.risk-1 {
  background: var(--risk-1);
  color: var(--text-primary);
}

.risk-2 {
  background: var(--risk-2);
  color: var(--text-primary);
}

.risk-3 {
  background: var(--risk-3);
  color: var(--text-primary);
}

.risk-4 {
  background: var(--risk-4);
  color: var(--text-white);
}

.risk-5 {
  background: var(--risk-5);
  color: var(--text-white);
}

.risk-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.risk-label {
  font-size: 1.2rem; /* ≥18.7px + gras 700 = « grand texte » WCAG (seuil 3.0) */
  font-weight: 700;
  margin-top: 0.5rem;
}

/* === Team === */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  max-width: 800px;
  margin: 0 auto;
}

.team-card {
  background: var(--bg-white);
  padding: var(--spacing-md);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-a11y);
  color: var(--text-white);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.team-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.team-role {
  font-size: 0.9rem;
  color: var(--primary-a11y);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.team-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* === Publications === */

.publications {
  max-width: 860px;
  margin: 0 auto;
}

.publications ul {
  list-style: none;
}

.publications li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.9rem 0;
}

.publications li:last-child {
  border-bottom: none;
}

.publications a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.5;
  flex-wrap: wrap;
}

.publications a:hover {
  color: var(--primary-light);
}

.pub-journal {
  font-style: italic;
  color: var(--primary-light);
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* === Partners === */
.partners-intro {
  text-align: center;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.partner-card {
  background: var(--bg-white);
  padding: var(--spacing-md);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.partner-card h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary-a11y);
}

.publications-related {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.publications-related a {
  color: var(--primary-light);
  font-weight: 600;
}

.publications-related a:hover {
  text-decoration: underline;
}

.partner-cta {
  text-align: center;
  background: var(--bg-white);
  padding: var(--spacing-lg);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.partner-cta h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.partner-cta p {
  margin-bottom: 1.5rem;
}

/* === Contact === */

.contact-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.contact-zone {
  color: var(--text-light);
  font-size: 1rem;
}

/* === Footer === */
.footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  opacity: 0.8;
  font-size: 0.9rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--primary-light);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.8;
}

.footer-bottom a {
  color: var(--primary-light);
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-main {
    font-size: 3rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .process-steps {
    flex-direction: column;
  }

  .step-arrow {
    transform: rotate(90deg);
  }

  .mission-content {
    gap: var(--spacing-md);
  }

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

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .hero-main {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .nav-menu {
    top: 60px;
    padding: 1.5rem;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
  }

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