/* ═══════════════════════════════════════════════════════════════════════
   ASSEKLA — Design System & Global Styles
   Couleurs: Noir & Blanc. Typographie: Cormorant Garamond + Inter
   ═══════════════════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --void:       #000000;
  --light:      #FFFFFF;
  --smoke:      #0a0a0a;
  --mist:       #E8E8E8;
  --shadow:     #111111;
  --ghost:      rgba(255,255,255,0.06);
  --ghost-md:   rgba(255,255,255,0.12);
  --ghost-hi:   rgba(255,255,255,0.25);
  --ghost-line: rgba(255,255,255,0.08);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, sans-serif;

  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:    cubic-bezier(0.64, 0, 0.78, 0);

  --z-canvas:   0;
  --z-content:  10;
  --z-header:   100;
  --z-portal:   200;
  --z-loader:   300;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--void);
  color: var(--light);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea { font: inherit; }

/* ── CANVAS ── */
#webgl-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-canvas);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   LOADER
   ═══════════════════════════════════════════════════════════ */
.loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  background: var(--void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__ring {
  width: 80px;
  height: 80px;
  border: 0.5px solid rgba(255,255,255,0.15);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1.4s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader__text {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.loader__dots span {
  display: inline-block;
  animation: blink 1.2s infinite;
}
.loader__dots span:nth-child(2) { animation-delay: 0.2s; }
.loader__dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

.loader__progress {
  font-size: 3rem;
  font-family: var(--font-display);
  font-weight: 300;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 3rem;
  mix-blend-mode: normal;
  pointer-events: none;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: all;
  cursor: pointer;
  user-select: none;
  opacity: 0;
  transform: translateY(-10px);
}

.logo-svg {
  width: 32px;
  height: 32px;
  transition: transform 0.6s var(--ease-out);
}

.header__logo:hover .logo-svg {
  transform: rotate(180deg) scale(1.05);
}

.logo-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════
   SECTIONS — Common
   ═══════════════════════════════════════════════════════════ */
.section {
  position: relative;
  z-index: var(--z-content);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 3rem;
}

.section__inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.section__inner--centered {
  text-align: center;
  max-width: 700px;
}

.section__inner--wide {
  max-width: 1100px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 4rem;
  color: rgba(255,255,255,0.9);
}

.sep {
  color: rgba(255,255,255,0.25);
}

/* ── Reveal animations ── */
.reveal-text {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-card {
  opacity: 0;
  transform: translateY(40px);
}

/* ═══════════════════════════════════════════════════════════
   SECTION: HERO
   ═══════════════════════════════════════════════════════════ */
.section--hero {
  min-height: 100vh;
  align-items: flex-end;
  padding-bottom: 8rem;
  padding-left: 4rem;
}

.hero__content {
  position: relative;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 14rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--light);
  opacity: 0;
  transform: translateY(60px);
  will-change: transform;
}

.hero__tagline {
  margin-top: 1.5rem;
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  opacity: 0;
}

.hero__scroll-hint {
  position: absolute;
  bottom: -5rem;
  left: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: white;
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

.scroll-text {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}

/* ═══════════════════════════════════════════════════════════
   SECTION: PHILOSOPHY
   ═══════════════════════════════════════════════════════════ */
.section--philosophy {
  min-height: 100vh;
}

.philosophy__block {
  margin-bottom: 4rem;
}

.philosophy__statement {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
}

.philosophy__block--en .philosophy__statement {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  color: rgba(255,255,255,0.35);
  font-style: normal;
  font-weight: 300;
}

/* ═══════════════════════════════════════════════════════════
   SECTION: DISSOLUTION
   ═══════════════════════════════════════════════════════════ */
.section--dissolution {
  min-height: 80vh;
  flex-direction: column;
  gap: 4rem;
}

.dissolution__circle {
  width: clamp(200px, 30vw, 320px);
  height: clamp(200px, 30vw, 320px);
  margin: 0 auto;
  animation: slowRotate 20s linear infinite;
  opacity: 0;
}

@keyframes slowRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.dissolution__texts {
  text-align: center;
}

.dissolution__text {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}

.dissolution__text--en {
  color: rgba(255,255,255,0.2);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════
   SECTION: PRINCIPLES
   ═══════════════════════════════════════════════════════════ */
.section--principles {
  min-height: 100vh;
}

.principles__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.principle {
  padding: 3rem 2.5rem;
  border: 0.5px solid var(--ghost-line);
  position: relative;
  transition: background 0.4s var(--ease-out);
}

.principle:hover {
  background: var(--ghost);
}

.principle__num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.2);
  display: block;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.principle__name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 300;
  color: var(--light);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.principle__name[lang="en"] {
  font-style: italic;
  color: rgba(255,255,255,0.25);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  margin-bottom: 1.5rem;
}

.principle__desc[lang="fr"] {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
}

.principle__desc[lang="en"] {
  font-size: 0.8rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.2);
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════
   SECTION: MANIFESTO
   ═══════════════════════════════════════════════════════════ */
.section--manifesto {
  min-height: 80vh;
  padding: 10rem 3rem;
}

.manifesto__quote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.5rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  border-left: 1px solid rgba(255,255,255,0.1);
  padding-left: 3rem;
  max-width: 800px;
}

.manifesto__quote [lang="en"] {
  font-size: clamp(1rem, 2vw, 1.6rem);
  color: rgba(255,255,255,0.25);
  font-style: normal;
}

/* ═══════════════════════════════════════════════════════════
   SECTION: CONTACT
   ═══════════════════════════════════════════════════════════ */
.section--contact {
  min-height: 80vh;
  flex-direction: column;
}

.contact__desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.form__field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 0.5px solid rgba(255,255,255,0.15);
  padding: 1rem 0;
  color: var(--light);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  outline: none;
  transition: border-color 0.3s;
}

.form__field input::placeholder {
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.1em;
}

.form__field input:focus {
  border-bottom-color: rgba(255,255,255,0.5);
}

.form__field input[type="checkbox"],
.rdv-form .form__field input[type="checkbox"] {
  width: auto;
  flex-shrink: 0;
  padding: 0;
  border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  border: 0.5px solid rgba(255,255,255,0.3);
  color: var(--light);
  margin-top: 1rem;
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
  z-index: -1;
}

.btn--primary:hover {
  color: var(--void);
}

.btn--primary:hover::before {
  transform: scaleX(1);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
  position: relative;
  z-index: var(--z-content);
  padding: 4rem 3rem;
  border-top: 0.5px solid var(--ghost-line);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
}

.footer__copy {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════
   HIDDEN PORTALS
   ═══════════════════════════════════════════════════════════ */
.hidden-portal {
  position: fixed;
  z-index: var(--z-portal);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s var(--ease-out), transform 0.4s var(--ease-out);
  cursor: pointer;
}

.hidden-portal.is-revealed {
  pointer-events: all;
}

/* École portal — bottom right */
.hidden-portal--school {
  bottom: 2.5rem;
  right: 2.5rem;
}

.hidden-portal--school svg {
  width: 36px;
  height: 36px;
}

.hidden-portal--school:hover {
  transform: scale(1.3);
}

/* Store portal — bottom left (revealed by triple-click) */
.hidden-portal--store {
  bottom: 2.5rem;
  left: 2.5rem;
}

.hidden-portal--store svg {
  width: 28px;
  height: 28px;
}

.hidden-portal--store:hover {
  transform: scale(1.5);
}

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */
.portal-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: calc(var(--z-portal) + 10);
  background: rgba(255,255,255,0.06);
  border: 0.5px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(20px);
  padding: 0.75rem 2rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s, transform 0.5s var(--ease-out);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   SECTION: SERVICES & INTERVENTIONS
   ═══════════════════════════════════════════════════════════ */
.section--services {
  min-height: 100vh;
}

.services__subtitle {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.05em;
  margin-top: -3rem;
  margin-bottom: 4rem;
  max-width: 650px;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ghost-line);
  margin-bottom: 3rem;
}

.service-card {
  background: var(--void);
  padding: 3rem 2rem 2.5rem;
  position: relative;
  transition: all 0.4s var(--ease-out);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  background: rgba(255,255,255,0.03);
  transform: translateY(-2px);
}

.service-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.service-card__num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.25);
}

.service-card__badge {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border: 0.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.02);
}

.service-card__name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.8vw, 1.6rem);
  font-weight: 300;
  color: var(--light);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.service-card__desc {
  font-size: 0.8rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.4);
  flex-grow: 1;
  margin-bottom: 2rem;
}

.service-card__action {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
  padding-top: 1rem;
  border-top: 0.5px solid var(--ghost-line);
}

.service-card:hover .service-card__action {
  color: var(--light);
}

/* ═══════════════════════════════════════════════════════════
   RDV DRAWER / MODAL
   ═══════════════════════════════════════════════════════════ */
.rdv-drawer {
  position: fixed;
  inset: 0;
  z-index: 600;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.4s;
}

.rdv-drawer.is-open {
  pointer-events: all;
  visibility: visible;
}

.rdv-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s;
}

.rdv-drawer.is-open .rdv-drawer__overlay {
  opacity: 1;
}

.rdv-drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(520px, 100vw);
  background: #0a0a0a;
  border-left: 0.5px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-out);
  padding: 3rem 2.5rem;
  overflow-y: auto;
}

.rdv-drawer.is-open .rdv-drawer__panel {
  transform: translateX(0);
}

.rdv-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  border-bottom: 0.5px solid var(--ghost-line);
  padding-bottom: 1.5rem;
}

.rdv-drawer__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--light);
  line-height: 1.2;
}

.rdv-drawer__close {
  font-size: 1rem;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: color 0.3s;
  padding: 0.5rem;
}
.rdv-drawer__close:hover { color: var(--light); }

.rdv-form {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.rdv-form .form__field label {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.6rem;
}

.rdv-form .form__field select,
.rdv-form .form__field input,
.rdv-form .form__field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 0.5px solid rgba(255,255,255,0.15);
  padding: 0.8rem 0;
  color: var(--light);
  font-size: 0.9rem;
  font-weight: 300;
  outline: none;
  border-radius: 0;
}

.rdv-form .form__field select {
  cursor: pointer;
}
.rdv-form .form__field select option {
  background: #111111;
  color: white;
}

.rdv-form .form__field textarea {
  resize: vertical;
  min-height: 80px;
}

.rdv-radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.4rem;
}

.rdv-radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
}

.rdv-success {
  text-align: center;
  padding: 4rem 0;
}
.rdv-success__icon {
  font-size: 2.5rem;
  color: rgba(255,255,255,0.3);
  margin-bottom: 1.5rem;
}
.rdv-success__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--light);
  margin-bottom: 0.8rem;
}
.rdv-success__text {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
}


@media (hover: hover) {
  body { cursor: none; }

  .cursor {
    position: fixed;
    top: 0; left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
  }

  .cursor-follower {
    position: fixed;
    top: 0; left: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0.5px solid rgba(128,128,128,0.5);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, opacity 0.3s;
    mix-blend-mode: difference;
  }

  /* Light page override — cursor uses dark color, no blend needed */
  .page-school .cursor {
    background: #0A0A0A;
    mix-blend-mode: normal;
  }
  .page-school .cursor-follower {
    border-color: rgba(0,0,0,0.25);
    mix-blend-mode: normal;
  }
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 6rem 1.5rem; }
  .header { padding: 1.5rem 1.5rem; }
  .section--hero { padding-left: 1.5rem; padding-bottom: 6rem; }
  .principles__grid { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: 1fr; }
  .manifesto__quote { padding-left: 1.5rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .hidden-portal--school { bottom: 1.5rem; right: 1.5rem; }
  .hidden-portal--store { bottom: 1.5rem; left: 1.5rem; }
}

@media (max-width: 480px) {
  .hero__title { font-size: clamp(3.5rem, 20vw, 6rem); }
}
