/* ─────────────────────────────────────────
   Jimmy Cassarino — Portfolio
   CSS v1.0
───────────────────────────────────────── */

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

:root {
  --forest:     #1A2B1C;
  --stone:      #EAE4DC;
  --stone-mid:  #C8BFB3;
  --stone-dark: #8A8278;
  --sage:       #7B9E82;
  --white:      #F5F2EE;

  --f-display: 'Fraunces', serif;
  --f-body:    'Urbanist', sans-serif;
  --f-mono:    'Plus Jakarta Sans', sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  background: var(--forest);
}

body {
  background: var(--stone);
  color: var(--forest);
  font-family: var(--f-body);
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── CURSOR ── */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: #FFFFFF;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, opacity 0.3s;
  opacity: 0.4;
  mix-blend-mode: difference;
}

/* ── WIPE D'OUVERTURE ── */
.wipe {
  position: fixed;
  inset: 0;
  background: var(--forest);
  z-index: 200;
  transform-origin: top;
  animation: wipeOut 1s 0.2s var(--ease-out-expo) forwards;
}

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
}

.nav-logo {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--forest);
  text-decoration: none;
  opacity: 0;
  animation: fadeUp 0.7s 1.3s ease forwards;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  opacity: 0;
  animation: fadeUp 0.7s 1.5s ease forwards;
}

.nav-links a {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest);
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.3s;
}

@media (hover: hover) {
  .nav-links a:hover {
    opacity: 1;
    color: var(--sage);
  }
}

nav.scrolled {
  background: rgba(234, 228, 220, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stone-mid);
  transition: background 0.4s ease, border-color 0.4s ease;
}

/* ── HERO ── */

.hero {
  height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto auto;
  padding: 0 48px;
  position: relative;
  overflow: hidden;
}


.hero-top {
  z-index: 1;
}

.hero-counter {
  position: absolute;
  top: 48px;
  right: 48px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--stone-dark);
  opacity: 0;
  animation: fadeUp 0.6s 1.6s ease forwards;
  z-index: 2;
}


/* Bloc nom */
.hero-name-block {
  z-index: 2;
  padding-bottom: 8px;
}

.hero-name {
  font-family: var(--f-display);
  font-size: clamp(60px, 9vw, 116px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.025em;
  color: var(--forest);
}

.clip-wrap {
  overflow: hidden;
  display: block;
}

.word {
  display: block;
  transform: translateY(110%);
  animation: revealUp 1s var(--ease-out-expo) forwards;
}

.word-1 { animation-delay: 1s; }
.word-2 { animation-delay: 1.15s; /*font-style: italic;*/ color: var(--sage); }


/* Meta bas du Hero */
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 48px;
  z-index: 2;
  position: relative;
}

.hero-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-dark);
  opacity: 0;
  animation: fadeUp 0.7s 1.8s ease forwards;
}

.hero-location {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--stone-dark);
  opacity: 0;
  animation: fadeUp 0.7s 1.9s ease forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}

/*.hero-location::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--sage);
  border-radius: 50%;
  animation: pulse 2.5s 2.5s infinite;
}*/

.hero-scroll {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.7s 2s ease forwards;
}

.hero-scroll span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-dark);
}

.scroll-line {
  width: 48px;
  height: 1px;
  background: var(--stone-mid);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--sage);
  animation: slideRight 1.8s 2.2s infinite ease-in-out;
}

/* ── CERCLES DÉCORATIFS ── */
/*
  Ancrés depuis les coins — signature Hoxidis
  Outline uniquement, opacité faible
  Animation : pulse lent, jamais de parallaxe souris
*/
.circles-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--stone-mid);
  opacity: 0;
  animation: circleAppear 2s ease forwards;
}

/* Cercle 1 — grand, ancré coin haut-droit */
.c1 {
  width: 60vw;
  height: 60vw;
  top: -25%;
  right: -15%;
  border-color: var(--stone-mid);
  animation:
    circleAppear 2s 1.2s ease forwards,
    pulseSlow 12s 3.2s ease-in-out infinite;
}

/* Cercle 2 — moyen, ancré coin bas-gauche */
.c2 {
  width: 35vw;
  height: 35vw;
  bottom: -10%;
  left: -8%;
  border-color: var(--sage);
  animation:
    circleAppear 2s 1.5s ease forwards,
    pulseSlow 9s 3.5s ease-in-out infinite;
}

/* Cercle 3 — petit, ancré milieu-gauche */
.c3 {
  width: 16vw;
  height: 16vw;
  top: 40%;
  left: 28%;
  border-color: var(--stone-mid);
  animation:
    circleAppear 2s 1.8s ease forwards,
    pulseSubtle 7s 3.8s ease-in-out infinite;
}

/* Cercle 4 — très grand, ancré coin bas-droit */
.c4 {
  width: 80vw;
  height: 80vw;
  bottom: -50%;
  right: -30%;
  border-color: var(--stone-mid);
  opacity: 0.08;
  animation:
    circleAppear 2s 1s ease forwards,
    pulseSlow 16s 3s ease-in-out infinite;
}

/* ── SECTIONS ── */
section {
  padding: 120px 48px;
  border-top: 1px solid var(--stone-mid);
  position: relative;
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone-dark);
  margin-bottom: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--stone-mid);
}

/* ── EXPERTISE ── */
.expertise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.expertise-left {
  padding-right: 80px;
  border-right: 1px solid var(--stone-mid);
}

.expertise-right {
  padding-left: 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.expertise-statement {
  font-family: var(--f-display);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--forest);
}

.expertise-statement em {
  font-style: italic;
  color: var(--sage);
}

.expertise-list {
  list-style: none;
}

.expertise-list li {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-dark);
  padding: 14px 0;
  border-bottom: 1px solid var(--stone-mid);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.3s;
  cursor: default;
}

.expertise-list li span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stone-mid);
  transition: background 0.3s;
  flex-shrink: 0;
}

.expertise-list li:hover span {
  background: var(--sage);
}

/* ── CARDS PROJETS (Mobilité) ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--stone-mid);
  border: 1px solid var(--stone-mid);
}

.project-card {
  background: var(--stone);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.5s ease;
  display: flex;
  flex-direction: column;
}

/* Image */
.project-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--stone-mid);
}

.project-img img {
  transition: transform 0.6s var(--ease-out-expo);
  /* Placeholder si pas d'image */
  background: var(--stone-mid);
}

.project-card:hover .project-img img {
  transform: scale(1.04);
}

/* Corps */
.project-body {
  padding: 32px 40px 40px;
  position: relative;
  flex: 1;
}

/* Barre sage en bas au hover */
.project-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--sage);
  transition: width 0.5s ease;
}

.project-card:hover::after {
  width: 100%;
}

.project-card:hover {
  background: var(--forest);
}

.project-card:hover .project-title,
.project-card:hover .project-desc {
  color: var(--white);
}

.project-card:hover .project-type,
.project-card:hover .project-num {
  color: var(--sage);
}

.project-card:hover .project-arrow {
  transform: translate(4px, -4px);
  opacity: 1;
}

.project-num {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--stone-dark);
  margin-bottom: 16px;
  transition: color 0.5s;
}

.project-title {
  font-family: var(--f-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 300;
  line-height: 1.2;
  color: var(--forest);
  margin-bottom: 8px;
  transition: color 0.5s;
}

.project-type {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-dark);
  margin-bottom: 16px;
  transition: color 0.5s;
}

.project-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--stone-dark);
  transition: color 0.5s;
}

.project-arrow {
  position: absolute;
  bottom: 40px;
  right: 40px;
  opacity: 0;
  color: var(--sage);
  transition: transform 0.3s, opacity 0.3s;
  display: flex;
}

.project-arrow svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* ── AUTRES PROJETS ── */
.other-projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--stone-mid);
  border: 1px solid var(--stone-mid);
}

.other-card {
  background: var(--stone);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  flex-direction: column;
}

.other-card:hover {
  background: var(--white);
}

.other-card:hover .other-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

.other-card:hover .other-img img {
  transform: scale(1.04);
}

.other-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--stone-mid);
}

.other-img img {
  transition: transform 0.6s var(--ease-out-expo);
}

.other-body {
  padding: 24px 28px 48px;
}

.other-title {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 300;
  color: var(--forest);
  margin-bottom: 6px;
}

.other-type {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-dark);
}

.other-arrow {
  position: absolute;
  bottom: 28px;
  right: 28px;
  opacity: 0;
  color: var(--sage);
  transition: opacity 0.3s, transform 0.3s;
  display: flex;
}

.other-arrow svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* ── CONTACT ── */
.contact-section {
  background: var(--forest);
  color: var(--stone);
  border-top: none;
  overflow: hidden;
}

.contact-logo-bg {
  display: none;
  position: absolute;
  right: -12%;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: 150%;
  opacity: 0.015;
  pointer-events: none;
  user-select: none;
}

.contact-section .section-label {
  color: var(--stone-mid);
}

.contact-section .section-label::before {
  background: var(--stone-dark);
}

.contact-big {
  font-family: var(--f-display);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--stone);
  margin-bottom: 48px;
}

.contact-big em {
  font-style: italic;
  color: var(--sage);
}

.contact-link {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  border-bottom: 1px solid #3A4D3C;
  padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
}

.contact-link:hover {
  color: var(--sage);
  border-color: var(--sage);
}

.contact-links {
  display: flex;
  gap: 32px;
  margin-top: 32px;
}

.contact-social {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-dark);
  text-decoration: none;
  transition: color 0.3s;
}


.contact-social:hover {
  color: var(--stone);
}

.contact-social svg {
  width: 16px;
  height: 16px;
}


.footer-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid #2E3E30;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--stone-dark);
  text-transform: uppercase;
}

/* ── VOIR PLUS ── */
.card-hidden {
  display: none;
}

.voir-plus-wrap {
  text-align: center;
  margin-top: 32px;
}

.voir-plus-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.3s;
  padding: 0;
}

.voir-plus-btn:hover {
  color: var(--forest);
}

/* ── BAC À SABLE ── */
.sandbox-section {
  background: var(--white);
}

.sandbox-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.sandbox-toggle:hover .section-label,
.sandbox-toggle:hover .sandbox-arrow {
  color: var(--sage);
}

.sandbox-toggle:hover .sandbox-arrow {
  transform: translateY(3px);
}

.sandbox-toggle .section-label {
  margin-bottom: 0;
  transition: color 0.3s;
}

.sandbox-arrow {
  font-size: 14px;
  color: var(--stone-dark);
  transition: transform 0.4s var(--ease-out-expo), color 0.3s, color 0.3s;
  display: inline-block;
}

.sandbox-section.open .sandbox-arrow {
  transform: rotate(180deg);
}

.sandbox-body-wrap {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.7s var(--ease-out-expo);
}

.sandbox-section.open .sandbox-body-wrap {
  max-height: 2400px;
}

.sandbox-body-wrap .sandbox-grid {
  margin-top: 48px;
}

.sandbox-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 1px;
  background: var(--stone-mid);
  border: 1px solid var(--stone-mid);
}

.sandbox-card {
  background: var(--white);
  cursor: pointer;
  transition: opacity 0.3s;
}

.sandbox-card:hover {
  opacity: 0.65;
}

.sandbox-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--stone-mid);
}

.sandbox-img img {
  transition: transform 0.5s var(--ease-out-expo);
}

.sandbox-body {
  padding: 16px 20px 20px;
}

.sandbox-title {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 300;
  color: var(--forest);
  margin-bottom: 4px;
}

.sandbox-type {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-dark);
}

/* ── KEYFRAMES ── */
@keyframes wipeOut {
  0%   { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}

@keyframes revealUp {
  to { transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}



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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.5); }
}

/* Cercles — pulse lent, ancré, vivant */
@keyframes circleAppear {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulseSlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.06); opacity: 0.7; }
}

@keyframes pulseSubtle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.10); opacity: 0.6; }
}

/* Opacités finales des cercles (après circleAppear) */
.c1 { opacity: 0; }
.c2 { opacity: 0; }
.c3 { opacity: 0; }
/* c4 a son opacity défini inline car différent */

/* Fix : les animations chainées écrasent l'opacity — on utilise animation-fill-mode */
.c1 { animation-fill-mode: both; }
.c2 { animation-fill-mode: both; }
.c3 { animation-fill-mode: both; }
.c4 { animation-fill-mode: both; }

/* Opacité cible via filter pour ne pas conflictuer */
.c1 { filter: opacity(0.55); }
.c2 { filter: opacity(0.65); }
.c3 { filter: opacity(0.58); }
.c4 { filter: opacity(0.35); }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.34s; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */

/* ── TABLETTE (≤ 768px) ── */
@media (max-width: 768px) {
  nav {
    padding: 24px 36px;
  }

  .hero {
    padding: 0 36px;
  }

  section {
    padding: 80px 36px;
  }

  .expertise-left {
    padding-right: 40px;
  }

  .expertise-right {
    padding-left: 40px;
  }

  .other-projects {
    grid-template-columns: repeat(2, 1fr);
  }

  .sandbox-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/*
  Config cercles mobile d'origine (avant ajustements) :
  .c1 { width: 60vw; height: 60vw; top: -25%; right: -15%; }
  .c2 { width: 35vw; height: 35vw; bottom: -10%; left: -8%; }
  .c3 { width: 16vw; height: 16vw; top: 40%; left: 28%; }
  .c4 { width: 80vw; height: 80vw; bottom: -50%; right: -30%; }
*/

/* ── MOBILE (≤ 480px) ── */
@media (max-width: 480px) {

  /* Cercles — repositionnés pour mobile */
  .c1 {
    width: 90vw;
    height: 90vw;
    top: -12%;
    right: -25%;
  }

  .c2 {
    width: 55vw;
    height: 55vw;
    bottom: -8%;
    left: -12%;
  }

  .c3 {
    width: 55vw;
    height: 55vw;
    top: 18%;
    left: -18%;
    right: auto;
  }

  .c4 {
    display: none;
  }

  /* Curseur custom — pas pertinent sur touch */
  body {
    cursor: auto;
  }

  .cursor,
  .cursor-ring {
    display: none;
  }

  /* Nav */
  nav {
    padding: 20px 24px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 10px;
  }

  /* Hero */
  .hero {
    padding: 0 24px;
    height: 100vh;
    height: 100dvh;
  }

  .hero-top {
    max-height: 25vh;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 48px;
  }

  .hero-scroll {
    display: none;
  }

  /* Sections */
  section {
    padding: 72px 24px;
  }

  .section-label {
    margin-bottom: 40px;
  }

  /* Expertise */
  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .expertise-left {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--stone-mid);
    padding-bottom: 48px;
    margin-bottom: 0;
  }

  .expertise-right {
    padding-left: 0;
    padding-top: 48px;
  }

  /* Projets mobilité */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-body {
    padding: 24px 28px 32px;
  }

  .project-arrow {
    bottom: 28px;
    right: 28px;
  }

  /* Autres projets */
  .other-projects {
    grid-template-columns: 1fr;
  }

  /* Footer contact */
  .footer-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 48px;
  }
}
