/* ================================================================
   RM Technologies - feuille de styles
   Palette : blanc / bleu ciel / marine, dégradé hero bleu profond
   Typo   : Poppins (display), Figtree (texte), IBM Plex Mono (données)
   Rayons : cartes 16px, boutons pilule (règle documentée)
   ================================================================ */

:root {
  --bg: #F7FBFE;
  --tint: #EAF3FB;
  --ink: #0B2B4C;
  --ink-soft: #4A6580;
  --accent: #1E88D6;
  --accent-deep: #146CB0;
  --hairline: #D9E7F2;
  --mono-muted: #5E7A93;

  --grad-hero: linear-gradient(115deg, #0C3B66 0%, #14639F 48%, #3E97D9 100%);
  --shadow-card: 0 10px 30px rgba(13, 60, 110, 0.08);

  --font-display: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Figtree", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", monospace;

  --container: 1120px;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero a:focus-visible,
.section-ink a:focus-visible {
  outline-color: #fff;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 4.2vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 600; margin-bottom: 0.6em; }
h3 { font-size: 1.18rem; font-weight: 600; margin-bottom: 0.45em; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-lead {
  max-width: 620px;
  color: var(--ink-soft);
  margin-bottom: 3rem;
}

/* ============ Header (fondu dans le hero) ============ */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: transparent;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

/* ---- Bouton hamburger (mobile) ---- */

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.site-header--solid .nav-toggle { color: var(--ink); }

.nav-toggle-bars { position: relative; }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.nav-toggle-bars::before { content: ""; position: absolute; left: 0; top: -7px; }
.nav-toggle-bars::after  { content: ""; position: absolute; left: 0; top: 7px; }

.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle-bars::after  { top: 0; transform: rotate(-45deg); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.06rem;
}
.wordmark:hover { text-decoration: none; }

/* Le mark est appliqué en masque pour qu'il suive currentColor selon le contexte
   (blanc sur le hero, encre sur l'en-tête solide, bleu clair dans le footer).
   Le SVG est inliné en data: URI plutôt que référencé en fichier : un masque
   chargé comme sous-ressource est soumis au CORS et échoue en file://. */
.wordmark-logo {
  --logo-mask: url("data:image/svg+xml,%3Csvg version='1' xmlns='http://www.w3.org/2000/svg' width='578' height='393' viewBox='0 0 578 393' preserveAspectRatio='xMidYMid meet'%3E %3Cg transform='translate(0,393) scale(0.1,-0.1)' fill='%23000000' stroke='none'%3E %3Cpath d='M5499 3583 c-420 -522 -1139 -1419 -1184 -1477 -93 -122 -95 -123 -118 -96 -38 46 -1171 1465 -1316 1648 l-144 182 -173 0 -172 0 121 -122 c77 -77 207 -230 347 -407 236 -298 806 -1011 1149 -1439 112 -138 207 -250 212 -247 4 3 93 113 196 243 103 130 275 347 381 482 107 135 249 314 316 399 66 85 157 199 201 255 44 56 113 143 153 194 l72 94 0 -1531 0 -1531 -130 0 -130 0 0 1123 c-1 1122 -1 1122 -31 1087 -37 -42 -470 -579 -784 -970 -125 -157 -231 -286 -234 -288 -4 -1 -58 62 -121 140 -63 78 -149 183 -190 233 -41 51 -138 170 -215 266 -221 273 -285 349 -293 349 -4 -1 -26 -33 -48 -73 -72 -125 -237 -405 -358 -607 -64 -107 -120 -202 -125 -211 -5 -9 -27 -19 -49 -22 -114 -19 -163 -152 -86 -237 109 -121 291 -27 254 130 -11 46 -11 46 182 368 106 177 195 321 198 321 3 0 25 -25 50 -57 25 -31 104 -127 175 -213 72 -86 195 -236 275 -334 198 -243 207 -254 275 -339 77 -96 72 -97 190 52 55 70 237 302 405 515 l305 389 3 -926 2 -926 360 0 360 0 0 1960 c0 1078 -2 1960 -4 1960 -3 0 -127 -152 -277 -337z M0 2916 c0 -510 3 -926 6 -926 3 0 172 163 375 361 l369 362 0 194 0 194 473 -3 c472 -3 472 -3 539 -35 371 -175 313 -722 -87 -829 -35 -10 -124 -14 -305 -14 l-254 0 -298 -297 -298 -298 0 -697 0 -698 -140 0 -140 0 0 728 0 729 448 441 c449 441 449 441 491 435 124 -17 219 134 149 237 -92 135 -275 88 -286 -74 -5 -60 -5 -60 -523 -574 l-519 -514 0 -819 0 -819 373 2 372 3 3 743 2 742 235 0 235 0 397 -498 c219 -275 486 -610 593 -745 l195 -246 473 -1 c259 0 472 4 472 8 0 5 -19 31 -42 59 -75 88 -159 191 -354 433 -105 129 -258 318 -340 420 -82 102 -226 280 -318 395 -93 116 -182 224 -198 242 -30 31 -30 31 62 78 873 452 799 1766 -120 2120 -80 31 -130 46 -250 71 -19 4 -430 9 -912 11 l-878 4 0 -925z m1780 681 c682 -142 985 -975 557 -1532 -128 -167 -366 -311 -572 -346 -38 -6 -72 -13 -74 -15 -2 -2 34 -50 80 -106 46 -57 190 -236 321 -398 239 -298 340 -422 614 -760 82 -102 153 -191 157 -197 7 -10 -29 -13 -166 -13 l-175 0 -329 413 c-289 361 -597 749 -786 987 -59 75 -59 75 -280 80 l-222 5 146 141 147 142 253 5 c351 6 451 39 615 202 354 350 204 935 -281 1096 -70 23 -73 24 -667 27 l-598 3 0 -268 0 -268 -140 -140 -140 -140 0 553 0 553 733 -4 c615 -3 744 -7 807 -20z M3075 2526 c-74 -32 -110 -119 -80 -194 17 -41 17 -41 -13 -84 -37 -54 -251 -412 -323 -539 -53 -95 -55 -97 -96 -101 -186 -22 -167 -288 21 -288 106 0 182 113 136 201 -9 15 -3 30 28 77 40 59 313 516 351 587 18 34 26 40 57 42 158 10 207 213 69 290 -45 26 -104 29 -150 9z'/%3E %3C/g%3E %3C/svg%3E") no-repeat center / contain;
  display: block;
  flex: none;
  width: 47px;
  height: 32px;
  background-color: currentColor;
  -webkit-mask: var(--logo-mask);
  mask: var(--logo-mask);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.94rem;
  font-weight: 500;
}
.site-nav a:hover { color: #fff; text-decoration: none; }

.nav-cta {
  padding: 8px 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-deep) !important;
  transition: background-color 0.18s ease;
}
.nav-cta:hover { background: var(--tint); }

/* Variante opaque (pages sur fond clair) */

.site-header--solid {
  position: sticky;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header--solid .header-inner { height: 68px; }
.site-header--solid .wordmark { color: var(--ink); }
.site-header--solid .site-nav a { color: var(--ink-soft); }
.site-header--solid .site-nav a:hover { color: var(--ink); }
.site-header--solid .nav-cta {
  background: var(--accent);
  color: #fff !important;
}
.site-header--solid .nav-cta:hover { background: var(--accent-deep); }

/* ============ Hero (photo + dégradé) ============ */

.hero {
  position: relative;
  color: #fff;
  background-image:
    linear-gradient(100deg,
      #0B3560 0%,
      rgba(15, 74, 122, 0.94) 38%,
      rgba(17, 80, 127, 0.55) 68%,
      rgba(17, 80, 127, 0.28) 100%),
    url("https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=1920&q=80");
  background-size: cover;
  background-position: center right;
  padding: 148px 0 56px;
}

.hero h1 {
  color: #fff;
  max-width: 620px;
  animation: rise 0.7s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.hero-inner { position: relative; }

/* ---- Label souligné + paragraphe ---- */

.hero-sub {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin: 1.6rem 0 2.1rem;
  animation: rise 0.7s ease-out 0.08s both;
}

.hero-sub-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  border-bottom: 2px solid #fff;
  padding-bottom: 6px;
  white-space: nowrap;
  margin-top: 4px;
}

.hero-sub p {
  font-size: 0.97rem;
  color: #D6E9F8;
  max-width: 420px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  animation: rise 0.7s ease-out 0.12s both;
}

/* ---- Lien "voir comment nous travaillons" (bouton play) ---- */

.hero-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
}
.hero-play:hover { text-decoration: none; }
.hero-play:hover .play-circle { background: rgba(255, 255, 255, 0.18); }

.play-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  transition: background-color 0.18s ease;
}
.play-circle::before {
  content: "";
  border-left: 9px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 3px;
}

/* ---- Barre de chiffres en verre dépoli ---- */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 60px;
  padding: 26px 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: rise 0.7s ease-out 0.2s both;
}

@media (prefers-reduced-transparency: reduce) {
  .hero-stats {
    background: rgba(10, 45, 82, 0.92);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.hero-stats > div {
  text-align: center;
  padding: 0 18px;
}
.hero-stats > div + div { border-left: 1px solid rgba(255, 255, 255, 0.22); }

.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
}
.hero-stats span { font-size: 0.85rem; color: #CFE6F7; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: #fff;
  color: var(--accent-deep);
}
.btn-primary:hover { background: var(--tint); }

.btn-ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #fff;
}
.btn-ghost:hover { border-color: #fff; }

.btn-light {
  background: #fff;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.btn-light:hover { background: var(--tint); }

/* ============ Sections ============ */

.section { padding: 96px 0; }

.section-paper { background: var(--tint); }

.section-ink {
  background: var(--grad-hero);
  color: #EAF4FB;
}
.section-ink h2 { color: #fff; }
.section-ink .section-lead { color: #CFE6F7; }

/* ---- Services ---- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service {
  padding: 34px 32px 38px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.service p { color: var(--ink-soft); margin-bottom: 1rem; }

.service ul { list-style: none; }
.service li {
  position: relative;
  padding-left: 22px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.service li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 2px;
  background: var(--accent);
}

/* ---- Méthode ---- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}

.step { border-top: 3px solid var(--accent); padding-top: 20px; }

.step p { font-size: 0.95rem; color: var(--ink-soft); }

/* ---- Secteurs ---- */

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 48px;
  margin-bottom: 56px;
}

.sector {
  border-left: 3px solid var(--accent);
  padding-left: 22px;
}
.sector p { color: var(--ink-soft); font-size: 0.98rem; }

.stack {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 18px;
  border-top: 1px solid var(--hairline);
  padding-top: 28px;
}

.stack-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mono-muted);
  white-space: nowrap;
}

.stack-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stack-list li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 13px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(13, 60, 110, 0.07);
  color: var(--ink-soft);
}

/* ---- À propos ---- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.about-grid p { color: var(--ink-soft); margin-bottom: 1.1rem; max-width: 580px; }

/* ---- Carte photo avec bandeau bleu ---- */

.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
  align-self: start;
}
.about-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.about-photo figcaption {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 13px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---- Listes d'informations légales ---- */

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

.contact-inner { max-width: 640px; }

.contact-address {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #BFDCF2;
  margin-top: 2rem;
}

/* ============ Footer ============ */

.site-footer {
  background: #0B2B4C;
  color: #A9C4DC;
  padding: 36px 0;
  font-size: 0.88rem;
}

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

.footer-id { display: flex; gap: 16px; align-items: center; }
.site-footer .wordmark-logo { color: #EAF4FB; }

.footer-nav { display: flex; gap: 24px; }
.footer-nav a { color: #EAF4FB; }

/* ============ Page mentions légales ============ */

.legal-page { padding: 72px 0 96px; }
.legal-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 2.2rem; }
.legal-page h2 { font-size: 1.35rem; margin: 2.4rem 0 0.7rem; }
.legal-page p, .legal-page li { color: var(--ink-soft); max-width: 720px; margin-bottom: 0.8rem; }
.legal-page ul { padding-left: 22px; }

.legal-back {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 2.5rem;
}

/* ============ Responsive ============ */

@media (max-width: 900px) {
  .hero { padding: 120px 0 48px; }
  .hero-sub { flex-direction: column; gap: 14px; }
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
    margin-top: 44px;
  }
  .hero-stats > div + div { border-left: none; }
  .hero-stats > div:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, 0.22); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .section { padding: 72px 0; }
}

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

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% - 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 18px 44px rgba(8, 40, 80, 0.28);
  }
  .nav-open .site-nav { display: flex; }

  .site-nav a,
  .site-header--solid .site-nav a {
    color: var(--ink);
    padding: 13px 14px;
    border-radius: 10px;
  }
  .site-nav a:hover,
  .site-header--solid .site-nav a:hover { background: var(--tint); color: var(--ink); }

  .nav-cta,
  .site-header--solid .nav-cta {
    background: var(--accent);
    color: #fff !important;
    text-align: center;
  }
  .nav-cta:hover,
  .site-header--solid .nav-cta:hover { background: var(--accent-deep); }

  .services-grid { grid-template-columns: 1fr; }
  .sectors-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; padding: 8px 8px; }
  .hero-stats > div { padding: 16px 12px; }
  .hero-stats > div:nth-child(even) { border-left: none; }
  .hero-stats > div + div { border-top: 1px solid rgba(255, 255, 255, 0.22); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
