/* ------------------------------
   Base & typographie
------------------------------ */

:root {
  --color-bg: #0b1220;        /* Bleu nuit sobre */
  --color-bg-alt: #0f172a;
  --color-surface: #111827;
  --color-accent: #e11d48;    /* Accent framboise/rouge élégant */
  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-border: #1f2937;

  --container-width: 1120px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 999px;

  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #111827 0%, #020617 55%);
  color: var(--color-text);
  line-height: 1.6;
}

/* Liens & textes */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

p {
  margin: 0 0 1.1rem;
  color: var(--color-text-muted);
}

h1,
h2,
h3 {
  margin: 0 0 0.85rem;
  font-weight: 600;
  color: #f9fafb;
}

/* Containers & sections */

.nav-lang a {
  font-size: 0.85rem;
}

.nav-lang a.active {
  color: #f97373;
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.section-header h2 {
  font-size: 1.8rem;
}

.section-header p {
  font-size: 1rem;
}

/* ------------------------------
   Header & navigation
------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.8)
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.logo a {
  display: inline-flex;
  align-items: center;
}

.logo-img {
  height: 36px;
  display: block;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.main-nav a:hover {
  color: #e5e7eb;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e5e7eb;
  border-radius: var(--radius-md);
  padding: 0.3rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ------------------------------
   Hero
------------------------------ */

.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
  gap: 3.5rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 3vw + 1rem, 2.8rem);
  line-height: 1.15;
  letter-spacing: 0.04em;
}

.hero p {
  font-size: 1rem;
}

.hero-text {
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.8rem 0 1rem;
}

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

/* Stats */
.hero-aside {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.95),
    rgba(30, 64, 175, 0.25)
  );
  border-radius: 24px;
  padding: 1.8rem 1.8rem 2.2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
  color: #f97373;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ------------------------------
   Chiffres clés
------------------------------ */

.section-metrics {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

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

.metric {
  text-align: center;
}

.metric-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
  color: #f97373;
}

.metric-label {
  display: block;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ------------------------------
   Boutons
------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.7rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.16s ease-out;
}

.btn.primary {
  background: var(--color-accent);
  border-color: rgba(248, 113, 113, 0.9);
  color: #f9fafb;
  box-shadow: 0 14px 30px rgba(248, 113, 113, 0.4);
}

.btn.primary:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(248, 113, 113, 0.55);
}

.btn.secondary {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.5);
}

.btn.secondary:hover {
  border-color: rgba(248, 113, 113, 0.7);
  color: #f9fafb;
}

/* ------------------------------
   Grids & cartes
------------------------------ */

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

.card {
  background: var(--color-surface);
  border-radius: 18px;
  padding: 1.7rem 1.6rem 1.8rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.6);
}

.card h3 {
  font-size: 1.15rem;
}

.card p {
  font-size: 0.95rem;
}

.card ul {
  list-style: disc;
  padding-left: 1.1rem;
  margin: 0.5rem 0 0;
}

.card li {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.card .result {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: #e5e7eb;
}

/* ------------------------------
   Réseau ELA
------------------------------ */

.section-network {
  background: #020617;
  border-top: 1px solid rgba(15, 23, 42, 0.9);
}

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

.network-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
  background: #0b1120;
}

.network-caption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.6rem;
}

/* ------------------------------
   Approche & Domaines
------------------------------ */

.section-approach {
  background: radial-gradient(circle at top left, #111827 0%, #020617 60%);
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.bullets {
  display: grid;
  gap: 1.2rem;
}

.bullet {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.9);
}

.bullet h3 {
  font-size: 1rem;
}

/* ------------------------------
   Sections II 901 & Spatial
------------------------------ */

.section-ii901 {
  background: radial-gradient(circle at top right, #0f172a 0%, #020617 65%);
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.ii901-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.7fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.section-ii901 h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.section-ii901 p {
  font-size: 0.95rem;
}

/* ------------------------------
   Contact / Externalisation
------------------------------ */

.section-contact {
  background: #020617;
  border-top: 1px solid rgba(15, 23, 42, 0.9);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
  gap: 2.3rem;
  align-items: flex-start;
}

.contact-highlights {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

.contact-highlights li {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

/* Formulaire */

.contact-form {
  background: var(--color-surface);
  padding: 1.8rem 1.7rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.75);
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--color-text-muted);
}

input,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.6rem 0.75rem;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.95rem;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
}

/* ------------------------------
   Équipe
------------------------------ */

.section-team {
  background: #020617;
  border-top: 1px solid rgba(15, 23, 42, 0.9);
}

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

.team-card {
  background: var(--color-surface);
  border-radius: 18px;
  padding: 1.6rem 1.4rem 1.8rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.7);
  text-align: center;
}

.team-photo {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.9rem;
  border: 2px solid rgba(248, 113, 113, 0.55);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.team-role {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}

.team-bio {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.team-card .team-trigger {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.team-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.team-modal.open {
  display: block;
}

.team-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.team-modal-dialog {
  position: relative;
  max-width: 640px;
  margin: 5vh auto;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  z-index: 1001;
}

.team-modal-content {
  max-height: 80vh;      /* ou 100vh si plein écran */
  overflow-y: auto;
}


.team-modal-photo img {
  max-width: 160px;
  border-radius: 8px;
}

.team-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.team-bio-full {
  display: none;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.team-card.open .team-bio-full {
  display: block;
}

.team-card .team-more-btn {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.team-modal-text {
  white-space: pre-line; /* respecte les sauts de ligne \n */
}

#team-modal-bio {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

#team-modal-bio p {
  margin: 0 0 0.6rem;
}


/* ------------------------------
   Footer
------------------------------ */

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  background: #020617;
  padding: 1.8rem 0 2.1rem;
  font-size: 0.8rem;
}

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

.footer-links {
  color: var(--color-text-muted);
}

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

.footer-links a:hover {
  color: #e5e7eb;
}

/* ------------------------------
   Responsive
------------------------------ */

@media (max-width: 900px) {
  .hero-inner,
  .cards-grid,
  .approach-grid,
  .ii901-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    order: -1;
    margin-bottom: 1.5rem;
  }

  .cards-grid {
    gap: 1.3rem;
  }

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

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

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .main-nav {
    position: absolute;
    top: 56px;
    right: 1.5rem;
    background: #020617;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0.6rem 0.9rem;
    display: none;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.6rem;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

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

@media (max-width: 600px) {
  .hero {
    padding-top: 3.5rem;
  }

  .section {
    padding: 3.2rem 0;
  }

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

  .contact-form {
    padding: 1.4rem 1.2rem;
  }

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

/* Responsive Équipe */
@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
  }

  .team-card {
    padding: 1.4rem 1.2rem 1.6rem;
  }

  .team-photo {
    width: 80px;
    height: 80px;
  }

  .team-card h3 {
    font-size: 0.95rem;
  }

  .team-role,
  .team-bio,
  .team-bio-full {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .team-modal {
    position: fixed;
    inset: 0;            /* top:0; right:0; bottom:0; left:0 */
    width: 100vw;
    height: 100vh;
  }

  .team-modal-content {
    max-height: calc(100vh - 80px); /* en laissant la place pour le header + bouton close */
    overflow-y: auto;
  }
}


@media (max-width: 640px) {
  .team-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .team-card {
    padding: 1.2rem 1rem 1.4rem;
    text-align: left;
  }

  .team-photo {
    margin: 0 0 0.8rem;
  }

  .team-card h3,
  .team-role,
  .team-bio,
  .team-bio-full {
    text-align: left;
  }

  .team-card .team-more-btn {
    width: 100%;
    text-align: center;
  }

  .team-modal-dialog {
    margin: 8vh 1rem;
    padding: 1.2rem;
  }

  .team-modal-content {
    flex-direction: column;
    align-items: center;
  }

  .team-modal-photo img {
    max-width: 120px;
    margin-bottom: 0.75rem;
  }
}

.no-scroll {
  overflow: hidden;
}