/* =========================================================
   GUYENNE ENTREPRISES — Base / Reset / Typographie
   ========================================================= */

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

html, body { margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
  cursor: none; /* curseur custom prend le relai */
}

/* Quand JS désactivé, on rétablit le curseur */
.no-js body,
[data-cursor="off"] body { cursor: auto; }

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

/* Liens */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}

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

/* Sélection — razzmatazz pour pop maximal */
::selection {
  background: var(--c-accent-2);
  color: #fff;
}

/* Scrollbar minimaliste */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-line); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-line-strong); }

/* ---------- Typographie ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--c-text);
  text-wrap: balance; /* casse les lignes uniformément, évite les orphelins */
}

.t-mega {
  font-size: var(--fs-mega);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-mega);
  font-weight: 600;
}

h1, .t-h1 { font-size: var(--fs-h1); }
h2, .t-h2 { font-size: var(--fs-h2); }
h3, .t-h3 { font-size: var(--fs-h3); }
h4, .t-h4 { font-size: var(--fs-h4); font-weight: 600; }

p {
  margin: 0 0 1.25em;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-justify: inter-word;
}
p:last-child { margin-bottom: 0; }

/* Pas de justify sur les paragraphes courts ou structurels */
.eyebrow,
.nav-links p,
.brand p,
.footer-bottom p,
.cta-block p,
nav p,
header p,
footer p {
  text-align: left;
  hyphens: manual;
}

.lead {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: var(--c-text);
  line-height: 1.55;
  max-width: 62ch;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--ff-mono);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--c-text-muted);
  font-weight: 500;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--c-accent);
  display: inline-block;
}

.italic-accent {
  font-family: var(--ff-italic);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--c-accent-3); /* héliotrope */
}

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--section-pad-y);
  position: relative;
}

.section-soft { background: var(--c-bg-soft); }

.section-divider {
  height: 1px;
  background: var(--c-line);
  margin-inline: var(--container-pad);
}

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--c-text-muted); }
.text-dim { color: var(--c-text-dim); }
.text-accent { color: var(--c-accent); }
.text-accent-2 { color: var(--c-accent-2); }
.uppercase { text-transform: uppercase; letter-spacing: 0.04em; }

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

/* ---------- Reveal animations init state ---------- */
[data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); will-change: transform, opacity; }
[data-reveal].is-revealed { opacity: 1; transform: none; transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }

[data-split] .word { display: inline-block; overflow: hidden; }
[data-split] .word > span { display: inline-block; transform: translate3d(0, 110%, 0); transition: transform 0.9s var(--ease-out); }
[data-split].is-revealed .word > span { transform: none; }

/* Stagger par défaut */
[data-split] .word { transition-delay: 0s; }
[data-split].is-revealed .word > span { transition-delay: calc(var(--word-i, 0) * 35ms); }

/* ---------- RTL ---------- */
[dir="rtl"] body { font-family: var(--ff-arabic), var(--ff-body); }
[dir="rtl"] .eyebrow::before { margin-left: 0; margin-right: var(--sp-3); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  body { cursor: auto !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  [data-split] .word > span { transform: none; }
}
