@charset "UTF-8";

/* ==========================================================
   IPM TOOLS-DESIGN | La Libre / IPM Group
   style.css - feuille principale
   Direction : editorial, dark + light, marques en avant.
   ========================================================== */

/* ==========================================================
   0. FONTS (self-hostees, zero appel Google)
   ========================================================== */
@font-face { font-family:"Gravitas One"; src:url("fonts/GravitasOne.woff2") format("woff2"); font-weight:400; font-display:swap; }
@font-face { font-family:"Noto Sans"; src:url("fonts/NotoSans-VF.woff2") format("woff2"); font-weight:100 900; font-style:normal; font-display:swap; }
@font-face { font-family:"Noto Sans"; src:url("fonts/NotoSans-Italic-VF.woff2") format("woff2"); font-weight:100 900; font-style:italic; font-display:swap; }
@font-face { font-family:"Inconsolata"; src:url("fonts/Inconsolata-VF.woff2") format("woff2"); font-weight:300 700; font-display:swap; }
@font-face { font-family:"Open Sans"; src:url("fonts/OpenSans-VF.woff2") format("woff2"); font-weight:300 800; font-display:swap; }

/* ==========================================================
   1. TOKENS — theme clair (defaut) puis sombre
   ========================================================== */
:root {
  --bg: #faf9f6;
  --bg-2: #f1efe9;
  --surface: #ffffff;
  --ink: #16140f;
  --ink-soft: #595349;
  --muted: #9b9488;
  --line: #e4dfd5;
  --line-strong: #c9c2b4;

  /* Accent IPM (vert), restreint */
  --accent: #119a5e;
  --accent-bright: #2ad587;
  --accent-soft: rgba(42, 213, 135, 0.14);

  --f-display: "Gravitas One", "Times New Roman", Georgia, serif;
  --f-body: "Noto Sans", system-ui, -apple-system, sans-serif;
  --f-mono: "Inconsolata", ui-monospace, "SFMono-Regular", monospace;

  --pad-x: clamp(20px, 5vw, 90px);
  --maxw: 1320px;

  --t-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  --t-slow: 0.85s cubic-bezier(0.22, 1, 0.36, 1);

  --shadow: 0 26px 50px -30px rgba(22, 19, 15, 0.45);
}

[data-theme="dark"] {
  --bg: #0e0e10;
  --bg-2: #161618;
  --surface: #161618;
  --ink: #f3f1ec;
  --ink-soft: rgba(243, 241, 236, 0.74);
  --muted: rgba(243, 241, 236, 0.5);
  --line: rgba(243, 241, 236, 0.12);
  --line-strong: rgba(243, 241, 236, 0.22);
  --accent: #2ad587;
  --accent-bright: #2ad587;
  --accent-soft: rgba(42, 213, 135, 0.16);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

/* ==========================================================
   2. RESET & BASE
   ========================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--t-base), color var(--t-base);
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 0.98; letter-spacing: -0.01em; margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
::selection { background: var(--accent-bright); color: #07120c; }

.kicker {
  font-family: var(--f-mono);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-soft);
}
.accent { color: var(--accent); }

body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }

/* ==========================================================
   3. CURSEUR CUSTOM
   ========================================================== */
.cursor { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; opacity: 0; transition: opacity 0.3s ease; }
.cursor.is-visible { opacity: 1; }
.cursor__ring {
  position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  transition: width var(--t-fast), height var(--t-fast), margin var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.cursor__dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); border-radius: 50%; }
.cursor.is-link .cursor__ring { width: 60px; height: 60px; margin: -30px 0 0 -30px; border-color: var(--accent); background: var(--accent-soft); }
.cursor.is-link .cursor__dot { opacity: 0; }


/* ==========================================================
   4. NAV
   ========================================================== */
.tb-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad-x);
  border-bottom: 1px solid transparent;
  transition: background var(--t-base), border-color var(--t-base), backdrop-filter var(--t-base);
}
.tb-nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.tb-nav__brand { font-family: var(--f-mono); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 9px; }
.tb-nav__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-bright); }
.tb-nav__right { display: flex; align-items: center; gap: 26px; }
.tb-nav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.tb-nav__links a {
  font-family: var(--f-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.05em;
  color: var(--ink-soft); position: relative; padding: 4px 0; transition: color var(--t-fast);
}
.tb-nav__links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--accent-bright); transform: scaleX(0); transform-origin: left; transition: transform var(--t-base); }
.tb-nav__links a:hover { color: var(--ink); }
.tb-nav__links a:hover::after { transform: scaleX(1); }

.tb-build {
  font-family: var(--f-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 100px; padding: 4px 10px;
}

.tb-theme {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink); display: grid; place-items: center;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.tb-theme:hover { border-color: var(--ink); background: var(--bg-2); }
.tb-theme svg { width: 17px; height: 17px; }
.tb-theme .icon-moon { display: none; }
[data-theme="dark"] .tb-theme .icon-sun { display: none; }
[data-theme="dark"] .tb-theme .icon-moon { display: block; }

@media (max-width: 820px) { .tb-nav__links, .tb-build { display: none; } }

/* Nav posée sur le hero foncé : tout en clair tant qu'on n'a pas scrollé */
.tb-nav--hero:not(.is-stuck) .tb-nav__brand,
.tb-nav--hero:not(.is-stuck) .tb-nav__links a,
.tb-nav--hero:not(.is-stuck) .tb-theme { color: #f5f3ed; }
.tb-nav--hero:not(.is-stuck) .tb-nav__links a:hover { color: #fff; }
.tb-nav--hero:not(.is-stuck) .tb-theme { border-color: rgba(245,243,237,0.45); }
.tb-nav--hero:not(.is-stuck) .tb-theme:hover { border-color: #fff; background: rgba(255,255,255,0.12); }
.tb-nav--hero:not(.is-stuck) .tb-build { color: #f5f3ed; border-color: rgba(245,243,237,0.55); }

/* ==========================================================
   5. HERO (image en fond, type plus contenu)
   ========================================================== */
.tb-hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: flex-end;
  padding: clamp(104px, 14vh, 150px) var(--pad-x) clamp(56px, 8vh, 96px);
  overflow: hidden;
}
.tb-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.tb-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  /* background: linear-gradient(180deg, rgba(8,8,9,0.35) 0%, rgba(8,8,9,0.2) 45%, rgba(8,8,9,0.82) 100%); */
}
.tb-hero__inner { position: relative; z-index: 2; max-width: var(--maxw); width: 100%; margin: 0 auto; color: #f6f4ee; }
.tb-hero__kicker { display: inline-flex; align-items: center; gap: 15px; margin-bottom: 26px; color: rgba(246,244,238,0.8); }
.tb-hero__kicker::before { content: ""; width: 50px; height: 2px; background: var(--accent-bright); }
.tb-hero__title {
  font-size: clamp(40px, 6.4vw, 92px);
  line-height: 0.96; letter-spacing: -0.015em; margin: 0 0 26px; max-width: 18ch; color: #fff;
}
.tb-hero__title .accent { color: var(--accent-bright); }
.tb-hero__lead { font-size: clamp(16px, 1.5vw, 21px); line-height: 1.55; max-width: 52ch; color: rgba(246,244,238,0.9); margin: 0 0 38px; }
.tb-hero__meta { display: flex; flex-wrap: wrap; gap: 12px 40px; padding-top: 24px; border-top: 1px solid rgba(246,244,238,0.22); }
.tb-hero__meta div { display: flex; flex-direction: column; gap: 2px; }
.tb-hero__meta dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(246,244,238,0.6); }
.tb-hero__meta dd { margin: 0; font-family: var(--f-display); font-size: 28px; line-height: 1; color: #fff; }

/* ==========================================================
   6. REVELATIONS
   ========================================================== */
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; transform: translateY(110%); transition: transform var(--t-slow); }
.is-loaded .reveal-line > span { transform: translateY(0); }
.is-loaded .reveal-line:nth-child(2) > span { transition-delay: 0.08s; }
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity var(--t-slow), transform var(--t-slow); }
.fade-up.is-in { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.07s; } .delay-2 { transition-delay: 0.14s; } .delay-3 { transition-delay: 0.21s; }
.tb-hero__lead, .tb-hero__meta { opacity: 0; transform: translateY(18px); transition: opacity var(--t-slow) 0.28s, transform var(--t-slow) 0.28s; }
.is-loaded .tb-hero__lead { opacity: 1; transform: none; }
.is-loaded .tb-hero__meta { opacity: 1; transform: none; transition-delay: 0.4s; }

/* ==========================================================
   7. SECTION GENERIQUE
   ========================================================== */
.tb-section { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 11vh, 140px) var(--pad-x); }
.tb-section--alt { background: var(--bg-2); max-width: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background var(--t-base); }
.tb-section--alt .tb-section__wrap { max-width: var(--maxw); margin: 0 auto; }
.tb-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 54px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.tb-section__num { color: var(--accent); }
.tb-section__title { font-size: clamp(34px, 4.6vw, 62px); margin: 14px 0 0; line-height: 0.96; }
.tb-section__intro { font-size: 17px; line-height: 1.6; color: var(--ink-soft); max-width: 40ch; margin: 0; }
@media (max-width: 760px) { .tb-section__head { flex-direction: column; align-items: flex-start; } }

/* ==========================================================
   8. MARQUES (cartes mises en avant)
   ========================================================== */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .brand-grid { grid-template-columns: 1fr; } }

.brand-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  min-height: 320px; overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.brand-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--brand, var(--ink)); }
.brand-card__visual {
  position: relative; flex: 1; display: grid; place-items: center; padding: 40px;
  background:
    radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--brand) 12%, transparent) 0%, transparent 70%),
    var(--surface);
  transition: background var(--t-base);
  border-bottom: 1px solid var(--line);
}
.brand-card:hover .brand-card__visual { background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--brand) 22%, transparent) 0%, transparent 72%), var(--surface); }
.brand-card__visual img { max-height: 56px; width: auto; filter: grayscale(1); opacity: 0.6; transition: filter var(--t-base), opacity var(--t-base); }
.brand-card:hover .brand-card__visual img { filter: none; opacity: 1; }
.brand-card__bar { position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--brand, var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform var(--t-base); }
.brand-card:hover .brand-card__bar { transform: scaleX(1); }
.brand-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 24px; }
.brand-card__name { font-family: var(--f-mono); font-weight: 600; font-size: 14px; letter-spacing: 0.03em; }
.brand-card__go { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; transition: color var(--t-fast); }
.brand-card:hover .brand-card__go { color: var(--brand, var(--ink)); }
.brand-card__go .arrow { transition: transform var(--t-base); }
.brand-card:hover .brand-card__go .arrow { transform: translateX(5px); }

/* ==========================================================
   9. TEMPLATES / OUTILS
   ========================================================== */
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 980px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tpl-grid { grid-template-columns: 1fr; } }

.tpl-card { position: relative; height: 100%; background: var(--surface); border: 1px solid var(--line); padding: 30px 28px 26px; display: flex; flex-direction: column; transition: transform var(--t-base), border-color var(--t-base); }
.tpl-card:hover { transform: translateY(-4px); border-color: var(--ink); }
.tpl-card__tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.tpl-card__title { font-family: var(--f-display); font-size: 26px; line-height: 1; margin: 0 0 14px; }
.tpl-card__desc { font-size: 15px; line-height: 1.55; color: var(--ink-soft); margin: 0 0 26px; flex: 1; }
.tpl-card__dl { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.tpl-card__dl .arrow { transition: transform var(--t-base); }
.tpl-card:hover .tpl-card__dl .arrow { transform: translateX(6px); }

/* ==========================================================
   10. STATS / GROUPE
   ========================================================== */
.tb-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.tb-stat { padding: 44px 32px; border-right: 1px solid var(--line); }
.tb-stat:last-child { border-right: 0; }
.tb-stat__num { font-family: var(--f-display); font-size: clamp(44px, 6vw, 82px); line-height: 0.9; letter-spacing: -0.02em; color: var(--accent); margin-bottom: 14px; }
.tb-stat__label { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 760px) { .tb-stats { grid-template-columns: 1fr; } .tb-stat { border-right: 0; border-bottom: 1px solid var(--line); } .tb-stat:last-child { border-bottom: 0; } }

/* ==========================================================
   11. FOOTER
   ========================================================== */
.tb-footer { max-width: var(--maxw); margin: 0 auto; padding: 56px var(--pad-x) 80px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.tb-footer p { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.03em; color: var(--muted); margin: 0; }
.tb-footer .hint b { color: var(--accent); font-weight: 600; }

/* ==========================================================
   12. KONAMI
   ========================================================== */
.konami-overlay { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 30px; background: rgba(10,10,12,0.92); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--t-base); }
.konami-overlay.is-active { opacity: 1; }
.konami-card { max-width: 560px; text-align: center; color: #f3f1ec; transform: translateY(16px) scale(0.98); transition: transform var(--t-base); }
.konami-overlay.is-active .konami-card { transform: none; }
.konami-card .kicker { color: var(--accent-bright); }
.konami-card h2 { font-family: var(--f-display); color: #fff; font-size: clamp(28px, 4vw, 44px); margin: 16px 0 18px; line-height: 1; }
.konami-card h2 em { color: var(--accent-bright); font-style: normal; }
.konami-card p { color: rgba(243,241,236,0.78); font-size: 16px; line-height: 1.6; margin: 0 auto 30px; max-width: 44ch; }
.konami-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.konami-btn { font-family: var(--f-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 15px 26px; border: 1px solid var(--accent-bright); display: inline-flex; gap: 10px; align-items: center; transition: background var(--t-fast), color var(--t-fast); }
.konami-btn--primary { background: var(--accent-bright); color: #07120c; }
.konami-btn--primary:hover { background: transparent; color: var(--accent-bright); }
.konami-btn--ghost { border-color: rgba(243,241,236,0.3); color: #f3f1ec; }
.konami-btn--ghost:hover { border-color: #f3f1ec; }

/* ==========================================================
   13. REDUCED MOTION
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .reveal-line > span, .fade-up, .tb-hero__lead, .tb-hero__meta { transform: none !important; opacity: 1 !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
