/* ==========================================================
   amynechamakh.fr — feuille de style
   Direction « cinéma » : fond quasi noir, texte crème,
   accent ambré, titres Montserrat en capitales, texte Raleway.
   Le logo garde la police « Climate Crisis ».
   ========================================================== */

:root {
  --noir: #090a0b;
  --surface: #131517;
  --creme: #f5eee4;
  --creme-doux: rgba(245, 238, 228, 0.74);
  --creme-pale: rgba(245, 238, 228, 0.5);
  --ligne: rgba(245, 238, 228, 0.12);
  --ambre: #f3b04a;

  --police-logo: 'Climate Crisis', 'Arial Black', Impact, sans-serif;
  --police-titre: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --police-texte: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif;

  --largeur-max: 1320px;
  --gouttiere: clamp(16px, 4vw, 64px);
  --rayon: 6px;
  --courbe: cubic-bezier(0.2, 0.7, 0.2, 1);
  --h-entete: 120px; /* recalculée en JS */
}

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

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

body {
  margin: 0;
  background: var(--noir);
  color: var(--creme);
  font-family: var(--police-texte);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--ambre);
  color: var(--noir);
}

:focus-visible {
  outline: 2px solid var(--ambre);
  outline-offset: 3px;
}

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

/* ---------- Titres ---------- */

.hero__titre,
.titre-section,
.presentation__texte h1,
.presentation__texte h2,
.panneau__titre,
.bandeau h1,
.carte__titre,
.apropos h2 {
  font-family: var(--police-titre);
  font-weight: 800;
  text-transform: uppercase;
}

.logo {
  font-family: var(--police-logo);
  font-weight: 400;
  color: var(--creme);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

/* Titre de section : capitales fines, mot-clé en gras */
.titre-section {
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--ambre);
  margin: 0 0 3.5rem;
  text-align: center;
}

.titre-section strong {
  font-weight: 800;
}

/* ---------- En-tête fixe, transparent sur le showreel ---------- */

.entete {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--creme);
  transition: background-color 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.entete--defile {
  background: rgba(9, 10, 11, 0.82);
  border-bottom-color: var(--ligne);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.entete__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem var(--gouttiere);
}

.entete .logo {
  grid-column: 2;
  grid-row: 1;
  font-size: clamp(1.05rem, 1.7vw, 1.5rem);
}

/* Navigation empilée en haut à droite */
.nav {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.nav a {
  position: relative;
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--creme-pale);
  transition: color 0.25s;
}

.nav a::before {
  content: '';
  position: absolute;
  right: calc(100% + 0.6rem);
  top: 50%;
  width: 0;
  height: 2px;
  background: var(--ambre);
  transition: width 0.3s var(--courbe);
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--creme);
}

.nav a[aria-current='page']::before {
  width: 14px;
}

@media (max-width: 720px) {
  .entete__inner {
    grid-template-columns: 1fr auto;
    padding: 1rem var(--gouttiere);
  }
  .entete .logo {
    grid-column: 1;
    font-size: 1.05rem;
  }
  .nav {
    grid-column: 2;
  }
}

/* Les pages sans showreel commencent sous l'en-tête fixe */
main {
  padding-top: var(--h-entete);
}

/* ---------- Héros : showreel plein écran ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  height: 100svh;
  min-height: 520px;
  margin-top: calc(-1 * var(--h-entete));
  padding: var(--h-entete) var(--gouttiere) 0;
  overflow: hidden;
  background: var(--noir);
}

.hero video,
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Voile : lisibilité du titre et fondu vers la section suivante */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(9, 10, 11, 0.78) 0%, rgba(9, 10, 11, 0.25) 60%, rgba(9, 10, 11, 0.1) 100%),
    linear-gradient(180deg, rgba(9, 10, 11, 0.55) 0%, transparent 22%, transparent 70%, var(--noir) 100%);
}

/* Indicateur de défilement */
.hero::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: 1px;
  height: 64px;
  background: linear-gradient(var(--creme), transparent);
  transform-origin: top;
  animation: defile 2.4s var(--courbe) infinite;
}

@keyframes defile {
  0% {
    transform: scaleY(0);
    opacity: 1;
  }
  60% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

.hero__titre {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--largeur-max);
  margin: 0 auto;
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
}

.hero__titre span {
  display: block;
  animation: monte 1.1s var(--courbe) both;
}

.hero__titre span:nth-child(2) {
  color: var(--ambre);
  animation-delay: 0.15s;
}

@keyframes monte {
  from {
    opacity: 0;
    transform: translateY(0.35em);
  }
}

/* ---------- Présentation : photo détourée + accroche ---------- */

.presentation {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 42% 60% at 28% 72%, rgba(243, 176, 74, 0.16), transparent 70%),
    var(--noir);
  border-bottom: 1px solid var(--ligne);
}

.presentation__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 6rem var(--gouttiere) 0;
}

.presentation__photo {
  align-self: end;
  justify-self: center;
  width: 100%;
  max-width: 540px;
  max-height: 78vh;
  object-fit: contain;
  object-position: bottom center;
}

.presentation__texte {
  padding-bottom: 6rem;
}

.presentation__texte h1,
.presentation__texte h2 {
  margin: 0;
  color: var(--ambre);
  font-size: clamp(1.9rem, 3.8vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
}

.presentation__texte h1::after,
.presentation__texte h2::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  margin: 2rem 0 1.8rem;
  background: var(--creme);
}

.presentation__texte p {
  margin: 0;
  max-width: 26ch;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--creme-doux);
}

@media (max-width: 860px) {
  .presentation__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 4rem;
  }
  .presentation__photo {
    order: 2;
    max-height: 60vh;
  }
  .presentation__texte {
    order: 1;
    padding-bottom: 0;
  }
}

/* ---------- Clients ---------- */

.clients {
  padding: 6rem var(--gouttiere);
}

.clients__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem clamp(2.5rem, 6vw, 5.5rem);
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

/* Logos ramenés en silhouettes crème, pleine opacité au survol */
.clients__logos img {
  height: clamp(34px, 4.6vw, 58px);
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.55;
  transition: opacity 0.3s;
}

.clients__logos img:hover {
  opacity: 1;
}

/* ---------- Panneaux : Réalisation / Montage / Motion ---------- */

.panneaux {
  padding: 0;
}

.panneaux__grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.panneau {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface);
  color: var(--creme);
  text-decoration: none;
  isolation: isolate;
}

.panneau img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--courbe);
  z-index: -2;
}

.panneau::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(9, 10, 11, 0.5);
  transition: background-color 0.5s;
  z-index: -1;
}

.panneau:hover img,
.panneau:focus-visible img {
  transform: scale(1.06);
}

.panneau:hover::before,
.panneau:focus-visible::before {
  background-color: rgba(9, 10, 11, 0.28);
}

.panneau:focus-visible {
  outline-offset: -4px;
}

/* Visuel clair portant déjà son propre lettrage : ni voile ni titre superposé.
   Inversé pour passer en fond sombre ; la rotation de teinte garde les couleurs. */
.panneau--clair img {
  filter: invert(1) hue-rotate(180deg);
}

.panneau--clair::before {
  background: none;
}

.panneau--clair:hover::before,
.panneau--clair:focus-visible::before {
  background-color: rgba(9, 10, 11, 0.06);
}

.panneau__titre {
  position: relative;
  font-size: clamp(1rem, 1.7vw, 1.55rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-align: center;
  padding: 0 1rem 0.9rem;
}

.panneau__titre::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--ambre);
  translate: -50% 0;
  transition: width 0.45s var(--courbe);
}

.panneau:hover .panneau__titre::after,
.panneau:focus-visible .panneau__titre::after {
  width: 100%;
}

@media (max-width: 900px) {
  .panneaux__grille {
    grid-template-columns: 1fr;
  }
  .panneau {
    aspect-ratio: 16 / 9;
  }
}

/* ---------- Logiciels ---------- */

.logiciels {
  padding: 5.5rem var(--gouttiere);
}

.logiciels__liste {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 3rem);
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.logiciels__liste img,
.logiciel--repli {
  width: clamp(44px, 4.6vw, 64px);
  aspect-ratio: 1;
  height: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter 0.3s, opacity 0.3s, transform 0.3s var(--courbe);
}

.logiciels__liste li:hover > * {
  filter: none;
  opacity: 1;
  transform: translateY(-4px);
}

/* Tuile de repli si l'icône n'est pas encore déposée */
.logiciel--repli {
  display: grid;
  place-items: center;
  border-radius: 18%;
  background: var(--surface);
  color: var(--creme);
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: clamp(0.85rem, 1.4vw, 1.2rem);
}

/* ---------- Pied de page ---------- */

.pied {
  border-top: 1px solid var(--ligne);
  padding: 5rem var(--gouttiere) 2.5rem;
}

/* Réseaux à gauche, logo au centre, coordonnées à droite */
.pied__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem 3rem;
  max-width: var(--largeur-max);
  margin: 0 auto;
}

.pied__contact {
  display: contents;
}

.pied .logo {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
}

.pied__contact > a,
.pied__contact > p {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  font-size: 1rem;
  color: var(--creme-doux);
  text-decoration: none;
  transition: color 0.25s;
}

.pied__contact > a {
  grid-row: 1;
}

.pied__contact > p {
  grid-row: 2;
}

.pied__contact > a:hover {
  color: var(--creme);
}

.pied__contact > a::before,
.pied__contact > p::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: none;
  background: var(--ambre);
  -webkit-mask: var(--icone) center / contain no-repeat;
  mask: var(--icone) center / contain no-repeat;
}

.pied__contact > a::before {
  --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Crect x='2.5' y='4.5' width='19' height='15' rx='2'/%3E%3Cpath d='m3 6 9 7 9-7'/%3E%3C/svg%3E");
}

.pied__contact > p::before {
  --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E");
}

.pied__reseaux {
  grid-column: 1;
  grid-row: 1 / span 2;
  justify-self: start;
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pied__reseaux a {
  display: inline-flex;
}

.pied__reseaux svg {
  width: 22px;
  height: 22px;
  fill: var(--creme-doux);
  transition: fill 0.25s;
}

.pied__reseaux a:hover svg {
  fill: var(--ambre);
}

.pied__mentions {
  max-width: var(--largeur-max);
  margin: 4.5rem auto 0;
  color: var(--creme-pale);
  font-size: 0.8rem;
  font-weight: 300;
  text-align: center;
}

@media (max-width: 720px) {
  .pied__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1rem;
  }
  .pied .logo,
  .pied__contact > a,
  .pied__contact > p,
  .pied__reseaux {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
  }
  .pied .logo {
    margin-bottom: 1rem;
  }
  .pied__reseaux {
    margin-top: 1rem;
  }
}

/* ---------- Pages intérieures : bandeau de titre ---------- */

.bandeau {
  max-width: calc(var(--largeur-max) + 2 * var(--gouttiere));
  margin: 0 auto;
  padding: 5rem var(--gouttiere) 4rem;
}

.bandeau h1 {
  margin: 0 0 1.6rem;
  color: var(--ambre);
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
}

.bandeau p {
  max-width: 58ch;
  margin: 0;
  color: var(--creme-doux);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  font-weight: 300;
  line-height: 1.65;
}

/* ---------- Galerie de vidéos ---------- */

.galerie {
  padding: 0 var(--gouttiere) 7rem;
}

.galerie__grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 3rem 1.6rem;
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 3rem 0 0;
  border-top: 1px solid var(--ligne);
  list-style: none;
}

.carte__lecture {
  all: unset;
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--rayon);
  overflow: hidden;
  background: var(--surface) center / cover no-repeat;
  cursor: pointer;
}

/* La vignette (posée en JS sur le bouton) est reprise ici pour pouvoir zoomer */
.carte__lecture::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  filter: brightness(0.78);
  transition: transform 0.9s var(--courbe), filter 0.5s;
}

.carte__lecture:hover::before {
  transform: scale(1.05);
  filter: brightness(1);
}

.carte__lecture:focus-visible {
  outline: 2px solid var(--ambre);
  outline-offset: 3px;
}

.carte__lecture::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  translate: -50% -50%;
  border: 2px solid var(--creme);
  border-radius: 50%;
  background: rgba(9, 10, 11, 0.35)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f5eee4' d='M8 5v14l11-7z'/%3E%3C/svg%3E")
    55% 50% / 26px no-repeat;
  transition: transform 0.3s var(--courbe), background-color 0.3s, border-color 0.3s;
}

.carte__lecture:hover::after {
  transform: scale(1.08);
  border-color: var(--ambre);
  background-color: var(--ambre);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23090a0b' d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}

.carte__corps {
  padding: 1.1rem 0 0;
}

.carte__titre {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.carte__meta {
  margin: 0;
  color: var(--creme-pale);
  font-size: 0.95rem;
  font-weight: 300;
}

.galerie__vide {
  max-width: 60ch;
  margin: 0 auto;
  text-align: center;
  color: var(--creme-pale);
}

/* ---------- Lightbox vidéo ---------- */

.lightbox {
  position: relative;
  border: 0;
  padding: 3rem 0 0;
  background: transparent;
  max-width: min(94vw, 1400px);
  width: 100%;
}

.lightbox::backdrop {
  background: rgba(9, 10, 11, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox__cadre {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--rayon);
  overflow: hidden;
}

.lightbox iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lightbox__fermer {
  all: unset;
  position: absolute;
  top: 0;
  right: 0;
  cursor: pointer;
  color: var(--creme);
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.4rem 0.2rem;
  transition: color 0.25s;
}

.lightbox__fermer:hover {
  color: var(--ambre);
}

.lightbox__fermer:focus-visible {
  outline: 2px solid var(--ambre);
}

/* ---------- Page À propos ---------- */

.apropos {
  padding: 6rem var(--gouttiere) 7rem;
}

/* Intertitres à gauche, contenu à droite */
.apropos__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  column-gap: clamp(2rem, 6vw, 6rem);
  max-width: 1120px;
  margin: 0 auto;
}

.apropos h2 {
  grid-column: 1;
  margin: 0;
  padding: 2.4rem 0;
  border-top: 1px solid var(--ligne);
  color: var(--ambre);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.apropos h2 + * {
  grid-column: 2;
  margin: 0;
  padding: 2.4rem 0;
  border-top: 1px solid var(--ligne);
}

.apropos p,
.apropos li {
  font-size: 1.12rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--creme-doux);
}

.apropos strong {
  font-weight: 600;
  color: var(--creme);
}

.apropos ul {
  list-style: none;
  padding-left: 0;
}

.apropos li {
  position: relative;
  padding-left: 1.8rem;
}

.apropos li + li {
  margin-top: 0.8rem;
}

.apropos li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.9rem;
  height: 2px;
  background: var(--ambre);
}

.apropos .bouton {
  grid-column: 2;
  justify-self: start;
  margin-top: 0;
}

@media (max-width: 860px) {
  .apropos__inner {
    grid-template-columns: 1fr;
  }
  .apropos h2,
  .apropos h2 + *,
  .apropos .bouton {
    grid-column: 1;
  }
  .apropos h2 {
    padding-bottom: 1rem;
  }
  .apropos h2 + * {
    padding-top: 0;
    border-top: 0;
  }
}

.bouton {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 1rem 1.8rem;
  border: 2px solid var(--creme);
  color: var(--creme);
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.bouton:hover {
  background: var(--ambre);
  border-color: var(--ambre);
  color: var(--noir);
}

/* ---------- Apparition au défilement (classes posées en JS) ---------- */

.apparition {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--courbe), transform 0.9s var(--courbe);
}

.apparition--visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero::after,
  .hero__titre span {
    animation: none;
  }
}
