/* ============================================================
   Hadaros — feuille de styles autonome
   Aucune dépendance externe (police système), CSP default-src 'self'
   ============================================================ */

:root {
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --stellar: #38bdf8;
  --stellar-deep: #0ea5e9;

  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-soft: #475569;
  --text-mute: #64748b;
  --border: #e2e8f0;
  --band: #f1f5f9;
  --header-h: 4rem;

  --radius: 1.25rem;
  --radius-lg: 2rem;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 20px 40px -24px rgba(15, 23, 42, 0.25);

  --maxw: 72rem;
  --pad: clamp(1rem, 4vw, 2rem);

  --font:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Réserve la hauteur de l'en-tête sticky pour toutes les ancres internes */
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}
p {
  margin: 0;
}
a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* --- Accessibilité --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--stellar-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Orbes d'ambiance --- */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.orb--1 {
  top: -10%;
  left: -8%;
  width: 32rem;
  height: 32rem;
  background: #e0f2fe;
  animation: float 12s ease-in-out infinite;
}
.orb--2 {
  bottom: -12%;
  right: -8%;
  width: 38rem;
  height: 38rem;
  background: #f1f5f9;
  animation: float 16s ease-in-out 4s infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(12px, -22px);
  }
}

/* --- En-tête --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  margin-right: auto;
}
.brand__logo {
  width: 1.85rem;
  height: 1.85rem;
  display: block;
}
.brand__name {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  gap: 1.4rem;
}
.nav__links a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav__links a:hover {
  color: var(--ink);
}

/* Sélecteur de langue : une seule bulle (langue courante) + menu au survol/clic */
.lang {
  position: relative;
}
.lang__toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
.lang__toggle:hover {
  background: rgba(15, 23, 42, 0.04);
}
.lang__chevron {
  width: 0.7rem;
  height: 0.7rem;
  transition: transform 0.2s ease;
}
.lang:hover .lang__chevron,
.lang:focus-within .lang__chevron,
.lang.is-open .lang__chevron {
  transform: rotate(180deg);
}
.lang__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 9rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  box-shadow: 0 12px 30px -12px rgba(15, 23, 42, 0.25);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  z-index: 30;
}
.lang:hover .lang__menu,
.lang:focus-within .lang__menu,
.lang.is-open .lang__menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.lang-btn {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.65rem;
  border-radius: 0.55rem;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.lang-btn:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink);
}
.lang-btn[aria-checked="true"] {
  color: var(--ink);
  font-weight: 600;
}

/* --- Hero (occupe le premier écran proprement) --- */
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid;
  place-items: center;
  padding-block: clamp(2rem, 6vw, 4rem);
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}
.hero__logo {
  width: clamp(6rem, 16vw, 9rem);
}
.hero__logo svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(15, 23, 42, 0.18));
}
.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
}
.hero__tagline {
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 40ch;
}
.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--text-soft);
  max-width: 52ch;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.75rem;
}

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.btn--primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--primary:active {
  transform: translateY(0);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  background: rgba(15, 23, 42, 0.04);
}
.btn__arrow {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform 0.2s ease;
}
.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* --- Sections --- */
.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}
.section__title {
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}
/* Bande grise façon Apple : démarque visuellement les sujets de la page */
.section--gray {
  background: var(--band);
  box-shadow:
    inset 0 1px 0 rgba(15, 23, 42, 0.04),
    inset 0 -1px 0 rgba(15, 23, 42, 0.04);
}

/* --- Cartes Services --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  max-width: 52rem;
  margin-inline: auto;
}
.card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
}
.card__icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 0.85rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--stellar-deep);
  margin-bottom: 1rem;
}
.card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}
.card__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.card__desc {
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* --- Approche --- */
.approche {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}
.approche__body {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--text-soft);
  margin-top: 1rem;
}

/* --- Contact --- */
.contact {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
}
.contact__info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 3rem;
  margin: 1.75rem 0;
}
.contact__info dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  margin-bottom: 0.25rem;
}
.contact__info dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
}
.contact__info a {
  color: var(--stellar-deep);
  text-decoration: none;
}
.contact__info a:hover {
  text-decoration: underline;
}

/* --- Pied de page --- */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 2rem var(--pad);
  text-align: center;
  border-top: 1px solid var(--border);
}
.site-footer__legal {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* --- Logo animé (identique à l'original) --- */
.core-binary {
  animation: core-breathe 4s ease-in-out infinite;
  transform-origin: 100px 110px;
}
.core-beacon {
  animation: beacon-pulse 1.5s ease-in-out infinite;
  transform-origin: 100px 72px;
}

@keyframes core-breathe {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}
@keyframes beacon-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* --- Apparition douce au chargement (CSS seul, ne masque jamais le contenu) --- */
.reveal {
  animation: reveal-in 0.7s ease both;
}
@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .nav__links {
    display: none;
  }
}

/* --- Préférence : mouvement réduit --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .orb,
  .core-binary,
  .core-beacon {
    animation: none;
  }
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .btn,
  .card,
  .btn__arrow,
  .lang__menu,
  .lang__chevron {
    transition: none;
  }
}
