/*
 * Glazio, feuille de style unique du site.
 *
 * Le nuancier glaz : les couleurs de la mer bretonne, du bleu nuit des
 * tempêtes à l'écume, plus deux touches de terre (ardoise et ajonc).
 * Les composants ne lisent que les rôles (--bg, --text…), jamais la palette
 * directement, sauf sur les surfaces sombres qui ne changent pas de thème.
 */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Nuancier glaz */
  --glaz-nuit: #0B2A30;
  --glaz-large: #0F4A52;
  --glaz: #17727C;
  --glaz-lagon: #4FA3A0;
  --glaz-lagon-clair: #8FD0C7;
  --glaz-brume: #9FB5B4;
  --glaz-ecume: #E3EFEC;
  --ardoise: #3D4E54;
  --ajonc: #E2B13C;
  --ajonc-vif: #EDC45A;
  --lin: #F4F6F3;
  --blanc: #FFFFFF;
  --titube-violet: #3B0F6F;
  --titube-violet-clair: #5A2496;

  /* Rôles, thème clair */
  --bg: var(--lin);
  --surface: var(--blanc);
  --surface-soft: var(--glaz-ecume);
  --text: var(--glaz-nuit);
  --text-muted: #4A6066;
  --line: rgba(11, 42, 48, 0.12);
  --line-strong: rgba(11, 42, 48, 0.24);
  --accent: var(--glaz);
  --btn-dark-bg: var(--glaz-nuit);
  --btn-dark-text: var(--blanc);
  --on-dark: #EAF4F1;
  --on-dark-muted: rgba(234, 244, 241, 0.74);
  --shadow: 0 1px 2px rgba(11, 42, 48, 0.06), 0 18px 40px -18px rgba(11, 42, 48, 0.28);

  /* Typographie */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Mise en page */
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-space: clamp(72px, 10vw, 128px);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071C20;
    --surface: #0D272C;
    --surface-soft: #123238;
    --text: #E6F1EE;
    --text-muted: #9FB5B4;
    --line: rgba(230, 241, 238, 0.12);
    --line-strong: rgba(230, 241, 238, 0.26);
    --accent: var(--glaz-lagon-clair);
    --btn-dark-bg: var(--glaz-lagon-clair);
    --btn-dark-text: var(--glaz-nuit);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  }
}

/* Base */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ajonc);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ajonc);
  color: var(--glaz-nuit);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.kicker {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker-on-dark {
  color: var(--glaz-lagon-clair);
}

/* Boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--ajonc);
  color: var(--glaz-nuit);
  box-shadow: 0 10px 24px -12px rgba(226, 177, 60, 0.8);
}

.btn-primary:hover {
  background: var(--ajonc-vif);
}

.btn-ghost {
  color: var(--on-dark);
  box-shadow: inset 0 0 0 1.5px rgba(234, 244, 241, 0.35);
}

.btn-ghost:hover {
  background: rgba(234, 244, 241, 0.08);
  box-shadow: inset 0 0 0 1.5px rgba(234, 244, 241, 0.6);
}

.btn-dark {
  background: var(--btn-dark-bg);
  color: var(--btn-dark-text);
}

.btn-large {
  min-height: 56px;
  padding: 0 30px;
  font-size: 17px;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* En-tête */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  color: var(--on-dark);
}

.site-header-solid {
  position: relative;
  background: var(--glaz-nuit);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--on-dark-muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav a:hover {
  color: var(--on-dark);
}

.site-nav .nav-cta {
  margin-left: 6px;
  color: var(--on-dark);
  box-shadow: inset 0 0 0 1.5px rgba(234, 244, 241, 0.3);
}

.site-nav .nav-cta:hover {
  background: rgba(234, 244, 241, 0.08);
}

@media (max-width: 560px) {
  .site-nav a:not(.nav-cta) {
    display: none;
  }
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(150px, 20vw, 210px) 0 clamp(150px, 18vw, 230px);
  background:
    radial-gradient(70% 95% at 100% 30%, rgba(79, 163, 160, 0.4), transparent 70%),
    linear-gradient(180deg, var(--glaz-nuit) 0%, var(--glaz-large) 100%);
  color: var(--on-dark);
}

/* --sink vient de tides.js (grand écran) : le texte s'enfonce pendant que l'eau monte. */
.hero-inner {
  position: relative;
  z-index: 2;
  opacity: calc(1 - var(--sink, 0) * 0.8);
  transform: translateY(calc(var(--sink, 0) * 56px));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: rgba(234, 244, 241, 0.08);
  box-shadow: inset 0 0 0 1px rgba(234, 244, 241, 0.16);
  color: var(--on-dark);
  font-size: 14px;
  font-weight: 600;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ajonc);
  box-shadow: 0 0 0 4px rgba(226, 177, 60, 0.22);
}

.hero-title {
  max-width: 14ch;
  font-size: clamp(44px, 8.4vw, 96px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-accent {
  color: var(--glaz-lagon-clair);
}

.hero-lead {
  max-width: 54ch;
  margin-top: 28px;
  color: var(--on-dark-muted);
  font-size: clamp(17px, 1.6vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.hero-inner > * {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-inner > :nth-child(2) { animation-delay: 0.08s; }
.hero-inner > :nth-child(3) { animation-delay: 0.16s; }
.hero-inner > :nth-child(4) { animation-delay: 0.24s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* Vagues : trois couches qui dérivent, la dernière prend la couleur de la page. */

.waves {
  position: absolute;
  inset: auto 0 -1px;
  height: clamp(90px, 13vw, 170px);
  pointer-events: none;
  transform: scaleY(calc(1 + var(--sink, 0) * 3.4));
  transform-origin: 50% 100%;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  max-width: none;
  animation: drift 26s linear infinite;
}

.wave-back {
  height: 100%;
  fill: var(--glaz);
  opacity: 0.55;
  animation-duration: 34s;
}

.wave-mid {
  height: 88%;
  fill: var(--glaz-lagon);
  opacity: 0.35;
  animation-duration: 22s;
  animation-direction: reverse;
}

.wave-front {
  height: 76%;
  fill: var(--bg);
  animation-duration: 40s;
}

@keyframes drift {
  to {
    transform: translateX(-50%);
  }
}

/* Sections */

.section {
  padding-block: var(--section-space);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head h2,
.studio-text h2 {
  font-size: clamp(34px, 5vw, 56px);
}

.section-head p:last-child {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 18px;
}

/* Produits */

.product {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  outline: 1px solid var(--line);
}

.product-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: clamp(28px, 5vw, 56px);
}

.product-id {
  display: flex;
  align-items: center;
  gap: 18px;
}

.product-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 20px -8px rgba(59, 15, 111, 0.6);
}

.product-name {
  font-size: clamp(32px, 4vw, 44px);
}

.product-category {
  margin-top: 4px;
  color: var(--text-muted);
  font-weight: 600;
}

.product-desc {
  max-width: 46ch;
  font-size: 18px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.product-body .btn {
  margin-top: 8px;
}

.product-visual {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 32px;
  background:
    radial-gradient(circle at 50% 55%, var(--titube-violet-clair), var(--titube-violet) 68%);
}

.product-visual img {
  width: min(100%, 380px);
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(14, 5, 24, 0.45));
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.product:hover .product-visual img {
  transform: rotate(-3deg) scale(1.03);
}

.product-next {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 28px clamp(24px, 5vw, 56px);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.product-next-mark {
  flex: none;
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.product-next h3 {
  color: var(--text);
  font-size: 22px;
}

.product-next p {
  margin-top: 4px;
}

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

  .product-visual {
    order: -1;
    min-height: 0;
    padding: 28px 24px;
  }

  .product-visual img {
    width: min(72%, 300px);
  }
}

/*
 * Marées entre les sections. La vague de devant prend la couleur de la
 * section suivante. --tide vient de tides.js (grand écran) : la vague
 * grossit et des bulles remontent. Sans --tide : vague fixe, pas de bulles.
 */

.tide {
  --tide-from: var(--bg);
  --tide-to: var(--surface);
  position: relative;
  height: clamp(72px, 26vw, 380px);
  margin-bottom: -1px;
  /* Les 2 derniers pixels prennent déjà la couleur suivante : pas de liseré sous la vague. */
  background: linear-gradient(var(--tide-from) calc(100% - 2px), var(--tide-to) 0);
  pointer-events: none;
}

.tide-to-bg {
  --tide-from: var(--surface);
  --tide-to: var(--bg);
}

.tide-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: scaleY(calc(0.08 + var(--tide, 1) * 0.92));
  transform-origin: 50% 100%;
}

.tide-layer svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  max-width: none;
  height: 100%;
  animation: drift 30s linear infinite;
}

.tide-back svg {
  fill: var(--glaz);
  opacity: 0.3;
  animation-duration: 38s;
  animation-direction: reverse;
}

.tide-front svg {
  fill: var(--tide-to);
  animation-duration: 28s;
}

.bubble {
  position: absolute;
  bottom: 20%;
  left: var(--x);
  width: var(--d);
  height: var(--d);
  border: 1.5px solid var(--glaz-lagon);
  border-radius: 50%;
  opacity: calc(var(--tide, 0) * (1 - var(--tide, 0)) * 2.6);
  transform: translateY(calc(var(--tide, 0) * var(--k) * -1.8px));
}

.section:has(+ .tide) {
  padding-bottom: calc(var(--section-space) * 0.5);
}

.tide + .section {
  padding-top: calc(var(--section-space) * 0.6);
}

/* Studio */

.section-studio {
  background: var(--surface);
}

.studio-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: start;
  gap: clamp(40px, 6vw, 88px);
}

.studio-text p:not(.kicker) {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 18px;
}

.studio-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 44px;
  margin: 36px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.studio-facts li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-facts strong {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.studio-facts span {
  color: var(--text-muted);
  font-size: 14px;
}

.values {
  display: grid;
  gap: 16px;
}

.value {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--bg);
  outline: 1px solid var(--line);
  transition: transform 0.3s ease;
}

.value:hover {
  transform: translateX(6px);
}

.value-num {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.75;
}

.value h3 {
  font-size: 22px;
}

.value p {
  margin-top: 8px;
  color: var(--text-muted);
}

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

/* Contact */

.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: end;
  gap: 40px;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 360px at 100% 0%, rgba(143, 208, 199, 0.28), transparent 65%),
    linear-gradient(135deg, var(--glaz-nuit), var(--glaz-large) 55%, var(--glaz));
  color: var(--on-dark);
}

.contact-main h2 {
  max-width: 16ch;
  font-size: clamp(32px, 4.6vw, 52px);
}

.contact-main p:not(.kicker) {
  margin: 18px 0 32px;
  color: var(--on-dark-muted);
  font-size: 18px;
}

.contact-main .btn {
  white-space: normal;
  overflow-wrap: anywhere;
}

.company-facts {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(234, 244, 241, 0.07);
  box-shadow: inset 0 0 0 1px rgba(234, 244, 241, 0.14);
}

.company-facts dt {
  color: var(--glaz-lagon-clair);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.company-facts dd {
  margin: 4px 0 0;
}

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

/* Pied de page */

.site-footer {
  padding-block: 40px 48px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 15px;
}

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

.footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}

.footer-brand .wordmark {
  color: var(--text);
  font-size: 22px;
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-copy {
  flex-basis: 100%;
  font-size: 14px;
}

/* Mentions légales */

.legal {
  padding-block: clamp(48px, 8vw, 96px);
}

.legal-inner {
  max-width: calc(760px + 2 * var(--gutter));
}

.legal h1 {
  font-size: clamp(38px, 6vw, 60px);
}

.legal-updated {
  margin: 12px 0 32px;
  color: var(--text-muted);
  font-size: 15px;
}

.legal h2 {
  margin: 48px 0 14px;
  font-size: 24px;
}

.legal p + p {
  margin-top: 12px;
}

.legal p a:not(.btn),
.legal dd a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.legal-facts {
  display: grid;
  margin: 16px 0 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  outline: 1px solid var(--line);
}

.legal-facts > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 14px 20px;
}

.legal-facts > div + div {
  border-top: 1px solid var(--line);
}

.legal-facts dt {
  color: var(--text-muted);
  font-weight: 600;
}

.legal-facts dd {
  margin: 0;
}

.legal .legal-back {
  margin-top: 56px;
}

@media (max-width: 560px) {
  .legal-facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Mouvement réduit */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
