/* =========================================================
   0) RESET
   ========================================================= */

*,
*::before,
*::after{
  box-sizing: border-box;
}

html,
body{
  margin: 0;
  padding: 0;
}

img{
  max-width: 100%;
  height: auto;
  display: block;
}

a{
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   1) VARIABLES
   ========================================================= */

:root{
  --maxw: 1200px;
  --pad: 18px;

  --bg: #111214;
  --panel: rgba(15, 16, 20, 0.62);
  --panel-2: rgba(15, 16, 20, 0.82);

  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.62);

  --border: rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.12);
  --shadow: 0 18px 60px rgba(0,0,0,0.45);

  --radius: 14px;
  --radius-lg: 18px;

  --accent: #fae7bf;

  --header-height: 90px;
}

/* =========================================================
   2) BASE
   ========================================================= */

body{
  background:
    linear-gradient(180deg, #2b2e33 0%, #20242a 22%, #181c22 50%, #12161b 78%, #0d1014 100%),
    linear-gradient(90deg, rgba(250, 231, 191, 0.05) 0%, rgba(250, 231, 191, 0.022) 10%, rgba(250, 231, 191, 0.007) 18%, rgba(250, 231, 191, 0) 30%);

  color: var(--text);
  font-family: Arial, sans-serif;
  line-height: 1.5;

  min-height: 100vh;
  display: flex;
  flex-direction: column;

  overflow-x: hidden;
}

body::after{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 1;
  background: rgba(0, 0, 0, 1);
  transition: opacity 300ms linear;
}

body::selection{
  background: rgba(250, 231, 191, 0.22);
}

main{
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* =========================================================
   GRAIN OVERLAY
   ========================================================= */

body::before{
  content: none;
}

/* =========================
   PAGE TRANSITIONS
   ========================= */

main {
  opacity: 1;
  transform: none;
  transition: none;
  will-change: auto;
}

body.page-ready::after {
  opacity: 0;
}

body.page-leaving main {
  pointer-events: none;
}

html.browser-lite-effects body::after{
  transition: opacity 180ms linear;
}

/* Respect des préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  main,
  body.page-ready main,
  body.page-leaving main {
    transition: none;
    opacity: 1;
  }

  body::after,
  body.page-ready::after,
  body.page-leaving::after {
    transition: none;
    opacity: 0;
  }
}


/* =========================================================
   3) HEADER
   ========================================================= */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  isolation: isolate;

  background:
  radial-gradient(760px 240px at 12% -30%, rgba(171, 126, 55, 0.08) 0%, rgba(171, 126, 55, 0.03) 34%, transparent 68%),
  radial-gradient(280px 180px at 92% 0%, rgba(120, 134, 154, 0.08) 0%, transparent 72%),
  linear-gradient(180deg, rgba(18, 21, 27, 0.78) 0%, rgba(18, 21, 27, 0.62) 100%);
  backdrop-filter: blur(6px) saturate(108%);
  -webkit-backdrop-filter: blur(6px) saturate(108%);

  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0);

  transition: background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.site-header::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 1px;

  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(250, 231, 191, 0.08) 20%,
    rgba(250, 231, 191, 0.30) 50%,
    rgba(250, 231, 191, 0.08) 80%,
    transparent 100%
  );

  opacity: 0.42;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(250, 231, 191, 0.10);
}

.site-header.is-scrolled{
  backdrop-filter: blur(8px) saturate(108%);
  -webkit-backdrop-filter: blur(8px) saturate(108%);
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
}

html.browser-lite-effects .site-header{
  background:
    linear-gradient(180deg, rgba(18, 21, 27, 0.94) 0%, rgba(18, 21, 27, 0.86) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.browser-lite-effects .site-header.is-scrolled{
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}

.header-inner{
  width: 100%;
  height: 72px;
  padding: 0 24px;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo{
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img{
  height: 54px;
  width: auto;
  object-fit: contain;
}

.main-nav a{
  position: relative;
  padding: 8px 20px;
  border-radius: 12px;

  color: rgba(255,255,255,0.72);
  transition: color 160ms ease, text-shadow 160ms ease;
}

.main-nav a::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;

  width: 22px;
  height: 2px;
  border-radius: 999px;

  background: rgba(255, 255, 255, 0);
  opacity: 0;

  transform: translateX(-50%) scaleX(0.6);
  transform-origin: center;

  transition: opacity 500ms ease, transform 500ms ease;
  box-shadow: 0 0 12px rgba(250, 231, 191, 0.16);
}

.main-nav a:hover{
  color: #fff;
  text-shadow: none;
}

.main-nav a:hover::after{
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.main-nav a.is-active{
  color: #fff;
  text-shadow: none;
  font-weight: 600;
}

.header-right{
  justify-self: end;
  min-height: 34px;
}

/* =========================
   NAV INDICATOR (desktop)
   ========================= */

.main-nav{
  position: relative;
}

.nav-indicator{
  position: absolute;
  left: 0;
  bottom: -10px;

  width: 22px;
  height: 2px;
  border-radius: 999px;

  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.18),
    0 0 10px rgba(250, 231, 191, 0.10);

  transform: translateX(-50%);
  opacity: 0;

  pointer-events: none;

  transition:
    left 420ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease;
}

.nav-indicator::before{
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;

  background:
    radial-gradient(circle, rgba(250, 231, 191, 0.10) 0%, rgba(250, 231, 191, 0.03) 42%, transparent 72%);
}

@media (max-width: 1024px){
  .nav-indicator{
    display: none;
  }
}

/* =========================
   CTA – HALO
   ========================= */

.cta-halo{
  display: inline-flex;
  align-items: center;
  gap: 12px;

  text-decoration: none;
  font-weight: 600;
  font-size: 19px;

  color: rgba(255,255,255,0.92);
}

.home-inline-cta{
  margin-top: 35px;
  display: flex;
  justify-content: center;
}

.cta-halo__icon{
  position: relative;
  width: 30px;
  height: 30px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.cta-halo__halo{
  position: absolute;
  inset: 0;

  border-radius: 999px;
  background: rgba(130, 201, 83, 0.16);

  transform: scale(1);
  transition: transform 220ms ease, background 300ms ease;
}

.cta-halo__dot{
  position: relative;

  width: 22px;
  height: 22px;

  border-radius: 999px;
  background: rgb(130, 201, 83);

  display: flex;
  align-items: center;
  justify-content: center;

  transition: background 300ms ease;
}

@keyframes ctaDotPulse{
  0%,
  100%{
    transform: scale(1);
  }

  50%{
    transform: scale(1.14);
  }
}

@keyframes ctaIconSpinPause{
  0%,
  22%{
    transform: rotate(0deg);
  }

  58%,
  78%{
    transform: rotate(360deg);
  }

  100%{
    transform: rotate(360deg);
  }
}

.cta-halo__dot .chev{
  width: 12px;
  height: 12px;
  color: #fff;
  flex: 0 0 auto;
  transform-origin: center;
  transition: color 220ms ease;
}

@media (hover:hover){
  .cta-halo:hover .cta-halo__halo{
    transform: scale(1.22);
    background: rgba(130, 201, 83, 0.18);
  }

  .cta-halo:hover .cta-halo__dot{
    background: #fff;
    animation: ctaDotPulse 2.1s ease-in-out infinite;
  }

  .cta-halo:hover .cta-halo__dot .chev{
    color: rgb(130, 201, 83);
    animation: ctaIconSpinPause 1.6s ease-in-out infinite;
  }
}

/* =========================================================
   4) FOOTER
   ========================================================= */

.site-footer{
  margin-top: 90px;
  padding: 22px 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.footer-bar{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-center{
  grid-column: 2;
  text-align: center;
  font-weight: 300;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.45);
}

.footer-icons{
  position: absolute;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-icons a{
  width: 18px;
  height: 18px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: rgba(255,255,255,0.45);
  transition: color 200ms ease, transform 200ms ease;
}

.footer-icons a:hover{
  color: #fff;
  transform: translateY(-2px);
}

.footer-icons svg{
  width: 18px;
  height: 18px;
}

.footer-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  white-space: nowrap;
}

.footer-sign{
  display: inline-flex;
  align-items: center;
  gap: 0;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;

  font-size: 12px;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.45);

  transition: max-width 450ms ease, opacity 200ms ease;
}

.sign-dot{
  opacity: 0.6;
  margin-right: 6px;
}

.sign-name{
  display: inline-block;
  font-style: italic;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  transition: width 600ms steps(4, end);
}

.footer-brand:hover .footer-sign,
.footer-brand:focus-within .footer-sign{
  max-width: 72px;
  opacity: 1;
}

.footer-brand:hover .sign-name{
  width: 4ch;
}

.footer-brand:focus-within .sign-name{
  width: 4ch;
}

@media (prefers-reduced-motion: reduce){
  .footer-brand:hover .footer-sign,
  .footer-brand:focus-within .footer-sign{
    max-width: 72px;
    opacity: 1;
  }

  .footer-brand:hover .sign-name,
  .footer-brand:focus-within .sign-name{
    width: 4ch;
  }
}

/* =========================================================
   5) UTILITAIRES
   ========================================================= */

.muted{
  color: var(--muted);
}

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

/* =========================================================
   6) LOGO SWITCH
   ========================================================= */

.logo .logo-mobile{ display: none; }
.logo .logo-desktop{ display: block; }

@media (max-width: 1024px){
  .logo .logo-mobile{
    display: block;
    height: 40px;
  }

  .logo .logo-desktop{
    display: none;
  }
}

/* =========================================================
   7) BURGER MENU
   ========================================================= */

.burger{ display: none; }
.mobile-menu{ display: none; }

/* =========================================================
   8) MOBILE
   ========================================================= */

@media (max-width: 1024px){

  :root{
    --header-h: 72px;
  }

  .site-header{
    height: var(--header-h);
  }

  .mobile-menu{
    top: var(--header-h);
    height: calc(100dvh - var(--header-h));
  }

  html{
    overflow-x: hidden;
  }

  .header-inner{
    width: 100%;
    padding: 0 18px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: var(--header-h);
  }

  .main-nav{
    display: none;
  }

  /* =========================
     BURGER
     ========================= */

  .burger{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;

    width: 40px;
    height: 40px;

    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 10002;

    -webkit-tap-highlight-color: transparent;
  }

  .burger span{
    position: absolute;
    width: 18px;
    height: 2px;
    background: rgba(255,255,255,0.92);
    border-radius: 999px;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .burger span:nth-child(1){ transform: translateY(-6px); }
  .burger span:nth-child(2){ transform: translateY(0); }
  .burger span:nth-child(3){ transform: translateY(6px); }

  .burger[aria-expanded="true"] span:nth-child(1){
    transform: translateY(0) rotate(45deg);
  }

  .burger[aria-expanded="true"] span:nth-child(2){
    opacity: 0;
  }

  .burger[aria-expanded="true"] span:nth-child(3){
    transform: translateY(0) rotate(-45deg);
  }

  .burger:focus{
    outline: none;
  }

  .burger:focus-visible{
    outline: 2px solid rgba(255,255,255,0.16);
    outline-offset: 4px;
    border-radius: 10px;
  }

  .burger::-moz-focus-inner{
    border: 0;
  }

  /* =========================
   MOBILE MENU
   ========================= */

.site-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.mobile-menu{
  display: flex;
  flex-direction: column;

  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;

  width: 100%;
  height: calc(100dvh - var(--header-h));

  overflow-y: auto;

  background:
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.89),
      rgba(53, 53, 53, 0.178),
      rgba(0, 0, 0, 0.897)
    );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-top: 1px solid rgba(255,255,255,0.08);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-18px);

  transition:
    transform 320ms cubic-bezier(.22,.61,.36,1),
    opacity 220ms ease,
    visibility 0s linear 320ms;

  z-index: 90;
}

html.menu-open .mobile-menu{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    transform 320ms cubic-bezier(.22,.61,.36,1),
    opacity 220ms ease,
    visibility 0s linear 0s;
}

.mobile-menu[hidden]{
  display: none !important;
}

.burger{
  position: relative;
  z-index: 110;
}

/* =========================
   MOBILE LINKS
   ========================= */

.mobile-menu a{
  display: flex;
  align-items: center;
  justify-content: flex-start;

  width: 100%;
  min-height: 64px;
  padding: 0 24px;
  margin: 0;

  color: rgba(255,255,255,0.88);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  letter-spacing: 0.01em;

  background:
    linear-gradient(
      to right,
      rgb(0, 0, 0),
      rgba(66, 66, 66, 0.932),
      rgb(0, 0, 0)
    );
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
  box-shadow: none;

  opacity: 0;
  transform: translateY(10px);

  transition:
    opacity 220ms ease,
    transform 320ms cubic-bezier(.22,.61,.36,1),
    background 160ms ease,
    color 160ms ease,
    padding-left 160ms ease;
}

html.menu-open .mobile-menu a{
  opacity: 1;
  transform: translateY(0);
}

/* léger décalage par lien */
html.menu-open .mobile-menu a:nth-child(1){ transition-delay: 40ms; }
html.menu-open .mobile-menu a:nth-child(2){ transition-delay: 80ms; }
html.menu-open .mobile-menu a:nth-child(3){ transition-delay: 120ms; }
html.menu-open .mobile-menu a:nth-child(4){ transition-delay: 160ms; }
html.menu-open .mobile-menu a:nth-child(5){ transition-delay: 200ms; }
html.menu-open .mobile-menu a:nth-child(6){ transition-delay: 240ms; }

.mobile-menu a:hover,
.mobile-menu a:active{
  background: rgba(255,255,255,0.02);
  color: #fff;
  padding-left: 28px;
}

.mobile-menu a.is-active{
  color: #fff;
  font-weight: 700;
  background:
    linear-gradient(
      to right,
      rgb(0, 0, 0),
      rgb(37, 37, 37),
      rgb(0, 0, 0)
    );
}

/* =========================
   HEADER WHEN MENU OPEN
   ========================= */

html.menu-open .site-header{
  background:
    linear-gradient(
      to right,
      rgb(0, 0, 0),
      rgba(66, 66, 66, 0.938),
      rgb(0, 0, 0)
    );
  backdrop-filter: blur(14px) saturate(108%);
  -webkit-backdrop-filter: blur(14px) saturate(108%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 12px 34px rgba(0,0,0,0.26);
}

.site-header::after,
.site-header::before{
  display: none !important;
  content: none !important;
}
}

/* =========================================================
   9) ACCESSIBILITÉ
   ========================================================= */

@media (prefers-reduced-motion: reduce){
  *{
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
