/* FACTOTUM — modern professional UI */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #0c1222;
  --text-muted: #5c667a;
  --border: rgba(12, 18, 34, 0.08);
  --accent: #0d7c7a;
  --accent-hover: #0a6563;
  --accent-soft: rgba(13, 124, 122, 0.12);
  --navy: #152238;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(12, 18, 34, 0.04),
    0 8px 24px rgba(12, 18, 34, 0.06);
  --shadow-lg: 0 4px 6px rgba(12, 18, 34, 0.03),
    0 24px 48px rgba(12, 18, 34, 0.08);
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --header-h: 72px;
  --mobile-dock-h: 58px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header__inner {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--navy);
}

.brand__tag {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease), color 0.2s;
}

.nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    gap: 0.15rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.25s;
  }

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

  .nav a {
    padding: 0.85rem 1rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.15s, box-shadow 0.2s;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 124, 122, 0.35);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid rgba(21, 34, 56, 0.2);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
  overflow: hidden;
}

.hero__photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Dégradé doux : lisibilité à gauche, image plus visible vers la droite */
  background: linear-gradient(
    105deg,
    rgba(248, 250, 252, 0.82) 0%,
    rgba(248, 250, 252, 0.65) 22%,
    rgba(248, 250, 252, 0.38) 40%,
    rgba(248, 250, 252, 0.14) 58%,
    transparent 82%
  );
}

/* Légère assise pour le texte sans masquer la photo */
.hero--with-image .hero__scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(15, 23, 42, 0.035) 0%,
    rgba(15, 23, 42, 0.02) 30%,
    transparent 58%
  );
  pointer-events: none;
}

@media (max-width: 640px) {
  .hero--with-image .hero__scrim {
    background: linear-gradient(
      180deg,
      rgba(248, 250, 252, 0.88) 0%,
      rgba(248, 250, 252, 0.72) 38%,
      rgba(248, 250, 252, 0.4) 62%,
      rgba(248, 250, 252, 0.12) 100%
    );
  }

  .hero--with-image .hero__scrim::after {
    background: linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.04) 0%,
      rgba(15, 23, 42, 0.02) 48%,
      transparent 100%
    );
  }
}

.hero--with-image .hero__mesh {
  opacity: 0.45;
  background: radial-gradient(
      ellipse 90% 80% at 10% 20%,
      rgba(13, 124, 122, 0.1),
      transparent 55%
    ),
    radial-gradient(
      ellipse 70% 60% at 90% 80%,
      rgba(21, 34, 56, 0.05),
      transparent 50%
    ),
    linear-gradient(165deg, rgba(238, 242, 245, 0.25) 0%, transparent 50%);
}

.hero__mesh {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse 90% 80% at 10% 20%,
      rgba(13, 124, 122, 0.14),
      transparent 55%
    ),
    radial-gradient(
      ellipse 70% 60% at 90% 80%,
      rgba(21, 34, 56, 0.08),
      transparent 50%
    ),
    linear-gradient(165deg, #eef2f5 0%, #f8fafb 45%, #f0f3f6 100%);
  z-index: 2;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 4;
}

.hero__content {
  max-width: 640px;
}

/* Panneau lisible sur image claire / détaillée (type vitré + léger flou) */
.hero--with-image .hero__content {
  padding: clamp(1.35rem, 3.25vw, 2rem) clamp(1.35rem, 3vw, 2.1rem);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  box-shadow: 0 4px 28px rgba(12, 18, 34, 0.12), 0 0 0 1px rgba(12, 18, 34, 0.05);
}

.hero--with-image .hero__content .lead {
  color: #3d4d63;
  font-weight: 500;
}

.hero--with-image .hero__content h1 {
  color: var(--navy);
}

.hero--with-image .hero__actions .btn--ghost {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(21, 34, 56, 0.45);
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(12, 18, 34, 0.08);
}

.hero--with-image .hero__actions .btn--ghost:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

h1,
.h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  background: linear-gradient(180deg, #eef1f4 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin-bottom: 0.5rem;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 52ch;
}

/* Sections */
section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-head {
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 56ch;
}

/* Cards grid */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.65rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.25s var(--ease), transform 0.2s;
}

.card:hover {
  border-color: rgba(13, 124, 122, 0.25);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  font-size: 1.25rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--navy);
}

.card p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Split about */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
}

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

.split__visual {
  position: relative;
  border-radius: var(--radius);
  min-height: 300px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #e8ecf0 0%, #dfe6ee 100%);
}

.split__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.split__body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  color: var(--navy);
  margin: 0 0 1rem;
}

.split__body p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.split__body p:last-child {
  margin-bottom: 0;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.team-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.team-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-soft), rgba(21, 34, 56, 0.08));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--accent);
}

.team-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
  color: var(--navy);
}

.team-card .role {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.team-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* News list */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  display: grid;
  grid-template-columns: minmax(0, 200px) 1fr auto;
  gap: 1.25rem;
  align-items: start;
  background: var(--surface);
  padding: 1.5rem 1.65rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.news-item:hover {
  border-color: rgba(13, 124, 122, 0.2);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .news-item {
    grid-template-columns: 1fr;
  }
}

.news-item__label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.news-item__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.news-item__cta {
  align-self: center;
}

.link-arrow {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.link-arrow::after {
  content: " →";
  transition: transform 0.2s;
}

a.link-arrow:hover::after {
  margin-left: 2px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.contact-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-panel h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
  color: var(--navy);
}

.dl-stack dt {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 1.1rem;
}

.dl-stack dt:first-child {
  margin-top: 0;
}

.dl-stack dd {
  margin: 0.35rem 0 0;
  color: var(--text);
  font-size: 0.98rem;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 380px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #e8ecf0;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer a:hover {
  color: #7dd3fc;
}

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

.footer-col h3 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 0.85rem;
}

.footer-col p,
.footer-col address {
  margin: 0;
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom nav {
  display: flex;
  gap: 1.25rem;
}

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

main {
  min-height: 50vh;
}

/* Barre d’actions fixe — smartphone uniquement */
.mobile-dock {
  display: none;
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(
      var(--mobile-dock-h) + env(safe-area-inset-bottom, 0px) + 10px
    );
  }

  .mobile-dock {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    min-height: calc(var(--mobile-dock-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(12, 18, 34, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .mobile-dock__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.45rem 0.35rem 0.5rem;
    color: var(--navy);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s var(--ease), color 0.15s;
  }

  .mobile-dock__btn:hover,
  .mobile-dock__btn:focus-visible {
    color: var(--accent);
  }

  .mobile-dock__btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
    z-index: 1;
  }

  .mobile-dock__btn:active {
    background: var(--accent-soft);
  }

  .mobile-dock__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--accent);
    flex-shrink: 0;
  }

  .mobile-dock__icon svg {
    width: 22px;
    height: 22px;
  }

  .mobile-dock__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 2px;
  }
}
