/* ==========================================================================
   FONTS
   ========================================================================== */

@font-face {
  font-family: 'Fira Sans';
  src: url('../assets/fonts/FiraSans-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Sans';
  src: url('../assets/fonts/FiraSans-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Serif Text';
  src: url('../assets/fonts/DMSerifText-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Serif Text';
  src: url('../assets/fonts/DMSerifText-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  font-family: 'Fira Sans', sans-serif;
  font-weight: 300;
  color: #2c2c2c;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f1e7dd;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ==========================================================================
   SPLIT LAYOUT
   ========================================================================== */

.split {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- LEFT PANEL ---------- */

.split__left {
  position: relative;
  width: 50%;
  min-height: 100vh;
  min-height: 100dvh;
  background: url('../assets/img/_DSC8569.jpg') center center / cover no-repeat;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.split__logo {
  width: clamp(50px, 6vw, 92px);
  height: auto;
  opacity: 0;
  animation: fadeIn 0.8s ease 1.4s forwards;
  z-index: 2;
}

.split__signature {
  width: 152px;
  height: auto;
  opacity: 0;
  animation: fadeIn 0.8s ease 1.6s forwards;
  z-index: 2;
}

/* ---------- RIGHT PANEL ---------- */

.split__right {
  position: relative;
  width: 50%;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #F1E7DD;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.split__texture {
    position: absolute;
    bottom: -20%;
    right: -20%;
    width: 100%;
    height: 100%;
    background: url(../assets/img/texture.png) right bottom / contain no-repeat;
    opacity: 0.35;
    pointer-events: none;
}

/* ---------- CONTENT ---------- */

.split__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 400px;
  width: 100%;
}

.split__subtitle {
  font-family: 'Fira Sans', sans-serif;
  font-weight: 300;
  font-size: clamp(0.105rem, 1.5vw, 1.35rem);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #2c2c2c;
  margin-bottom: 0.35rem;
}

.split__title {
  font-family: 'DM Serif Text', serif;
  font-weight: 400;
  font-size: clamp(2.7rem, 4.4vw, 3.8rem);
  line-height: 1.1;
  color: #000000;
}

/* ---------- CONTACT ---------- */

.split__contact {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.split__contact-label {
  font-family: 'Fira Sans', sans-serif;
  font-weight: 300;
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #573828;
}

.split__links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.split__link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Fira Sans', sans-serif;
  font-weight: 300;
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  color: #000000;
  transition: color 0.25s ease, transform 0.25s ease;
}

.split__link:hover,
.split__link:focus-visible {
  color: #8a7766;
  transform: translateX(4px);
}

.split__link:focus-visible {
  outline: 2px solid #8a7766;
  outline-offset: 4px;
  border-radius: 2px;
}

.split__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

/* --- Left : fondu du noir vers la photo --- */

@keyframes revealFromBlack {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.split__left::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  animation: revealFromBlack 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
  z-index: 1;
}

/* --- Right : fade slide-up séquencé --- */

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

.split__subtitle,
.split__title,
.split__contact-label,
.split__links li {
  opacity: 0;
  animation: fadeSlideUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.split__subtitle                { animation-delay: 1.0s; }
.split__title                   { animation-delay: 1.25s; }
.split__contact-label           { animation-delay: 1.5s; }
.split__links li:nth-child(1)   { animation-delay: 1.7s; }
.split__links li:nth-child(2)   { animation-delay: 1.85s; }
.split__links li:nth-child(3)   { animation-delay: 2.0s; }

/* --- Accessibilité : mouvement réduit --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Tablette portrait et en dessous */
@media (max-width: 768px) {
  .split {
    flex-direction: column;
  }

  .split__left {
    width: 100%;
    min-height: 50vh;
    min-height: 50dvh;
  }

  .split__right {
    width: 100%;
    min-height: 50vh;
    min-height: 50dvh;
  }

  .split__content {
    max-width: 100%;
  }

  .split__logo {
    width: 88px;
  }

  .split__signature {
    width: 152px;
  }
}

/* Petits écrans mobiles */
@media (max-width: 480px) {
  .split__left {
    min-height: 65vh;
    padding: 1.5rem;
  }

  .split__right {
    min-height: auto;
    padding: 2rem 1.5rem;
  }

  .split__content {
    gap: 1.2rem;
  }

  .split__subtitle {
     font-size: 1rem;
}

  .split__title {
    font-size: 2.8rem;
  }

  .split__logo {
    width: 76px;
  }

  .split__signature {
    width: 110px;
  }
}

/* Paysage mobile — retour en split horizontal */
@media (max-height: 500px) and (orientation: landscape) {
  .split {
    flex-direction: row;
  }

  .split__left,
  .split__right {
    width: 50%;
    min-height: 100vh;
    min-height: 100dvh;
  }
}
