/* =============================================================================
   components.css — Éléments réutilisables sur plusieurs pages
   ========================================================================== */

/* --- Bouton « pilule » (repris des boutons Wix, en plus vivant) --------- */
.bouton {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-width: 16rem; padding: .75rem 2rem;
  font-family: var(--f-fort); font-weight: 800; font-size: 1.05rem; text-transform: uppercase;
  border: 2px solid var(--c-texte); border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: color .45s var(--ease), transform .45s var(--ease);
}
/* Le fond blanc monte depuis le bas au survol. */
.bouton::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--c-texte);
  transform: translateY(101%); transition: transform .45s var(--ease);
}
.bouton:hover, .bouton:focus-visible { color: var(--c-fond); }
.bouton:hover::before, .bouton:focus-visible::before { transform: none; }
.bouton:active { transform: scale(.97); }
.bouton svg { width: 1.1em; height: 1.1em; transition: transform .45s var(--ease); }
.bouton:hover svg { transform: translateX(4px); }

/* Variante e-mail : pas de majuscules. */
.bouton--email { text-transform: none; }

/* Variante pleine (blanche). */
.bouton--plein { background: var(--c-texte); color: var(--c-fond); }
.bouton--plein::before { background: var(--c-accent); }

/* --- Carte de page (accueil) : image + titre géant ---------------------- */
.carte-page {
  --grad: var(--grad-showreel-3d);
  position: relative; display: block; overflow: hidden;
  border-radius: var(--rayon);
  aspect-ratio: 4 / 5;
  background: var(--grad);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.carte-page img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .85; transform: scale(1.02);
  transition: transform 1s var(--ease), opacity .6s;
}
/* Voile de la couleur de la section, par le bas. */
.carte-page::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .15) 55%, transparent 100%);
}
.carte-page__contenu {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.carte-page__titre {
  font-family: var(--f-titre); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.4rem, 4.6vw, 3.8rem); line-height: .95;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .4);
}
.carte-page__sous-titre { margin-top: .5rem; font-size: .9rem; color: var(--c-texte-doux); }
.carte-page__fleche {
  position: absolute; z-index: 1; top: 1.25rem; right: 1.25rem;
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 2px solid var(--c-texte); border-radius: 50%;
  transition: background-color .4s, color .4s, transform .5s var(--ease);
}
.carte-page__fleche svg { width: 20px; height: 20px; }
.carte-page:hover img { transform: scale(1.08); opacity: 1; }
.carte-page:hover .carte-page__fleche { background: var(--c-texte); color: var(--c-fond); transform: rotate(-45deg); }

/* Couleur de chaque carte. */
.carte-page--showreel { --grad: var(--grad-showreel-3d); }
.carte-page--motion   { --grad: var(--grad-marshall); }
.carte-page--montage  { --grad: var(--grad-multicam); }

/* --- Bande de couleur pleine largeur (Showreel, Motion Design, Montage) --- */
/* La couleur vient de --grad, définie par une classe .bande--xxx ci-dessous. */
.bande {
  --grad: var(--grad-showreel-3d);
  position: relative; overflow: hidden;
  background: var(--grad);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.bande__grille {
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
/* Variante inversée : le texte à gauche, le média à droite. */
.bande--inverse .bande__media { order: 2; }

.bande__titre {
  font-family: var(--f-titre); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3.2rem, 6.2vw, 7rem); line-height: .92;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
}
.bande__infos { margin-top: 1.25rem; }

.bande--showreel-3d { --grad: var(--grad-showreel-3d); }
.bande--showreel-2d { --grad: var(--grad-showreel-2d); }
.bande--liqd        { --grad: var(--grad-liqd); }
.bande--marshall    { --grad: var(--grad-marshall); }
.bande--skypix      { --grad: var(--grad-skypix); }
.bande--logitech    { --grad: var(--grad-logitech); }
.bande--multicam    { --grad: var(--grad-multicam); }
.bande--youtube     { --grad: var(--grad-youtube); }

@media (max-width: 860px) {
  .bande__grille { grid-template-columns: 1fr; }
  .bande .bande__media { order: 2; }   /* toujours : titre puis média */
  .bande__texte { text-align: center; }
  .outils { justify-content: center; }
}

/* --- Liste des logiciels (pastilles) ------------------------------------ */
.outils { display: flex; flex-wrap: wrap; gap: .5rem; }
.outils li {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .85rem .35rem .45rem;
  font-size: .85rem; font-weight: 500;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.outils li:not(:has(img)) { padding-left: .85rem; } /* pastille sans logo */
.outils img { width: 22px; height: 22px; border-radius: 5px; }

/* --- Lecteur vidéo : image + bouton lecture, puis lecteur natif --------- */
/* Le fonctionnement est dans js/video.js. */
.lecteur {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--rayon);
  background: #000;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .45);
}
.lecteur video { width: 100%; height: 100%; object-fit: cover; }
.lecteur.est-lance video { object-fit: contain; }

.lecteur__lancer {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(to top, rgba(0, 0, 0, .35), transparent 60%);
  transition: background-color .4s;
}
.lecteur__lancer:hover { background-color: rgba(0, 0, 0, .15); }
/* Disque « lecture » qui grossit au survol. */
.lecteur__icone {
  display: grid; place-items: center;
  width: clamp(64px, 8vw, 92px); aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 2px solid #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .5s var(--ease), background-color .4s, color .4s;
}
.lecteur__icone svg { width: 38%; height: 38%; margin-left: 6%; }
.lecteur__lancer:hover .lecteur__icone { transform: scale(1.12); background: #fff; color: #000; }
/* Durée affichée en bas à droite. */
.lecteur__duree {
  position: absolute; right: 1rem; bottom: .9rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .05em;
  padding: .2rem .6rem; border-radius: 6px; background: rgba(0, 0, 0, .55);
}
.lecteur.est-lance .lecteur__lancer,
.lecteur.est-lance .lecteur__duree { display: none; }

/* --- Variantes d'apparition : depuis la gauche / la droite -------------- */
.js .revele--gauche { transform: translateX(-60px); }
.js .revele--droite { transform: translateX(60px); }

/* --- Carrousel (une bande = plusieurs diapositives) --------------------- */
/* Défilement natif : glisser au doigt sur mobile, flèches et points ailleurs.
   Le fonctionnement est dans js/carousel.js. */
.carrousel { position: relative; }
.carrousel__piste {
  display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.carrousel__piste::-webkit-scrollbar { display: none; }
.diapo {
  flex: 0 0 100%; scroll-snap-align: center;
  display: flex; align-items: center;   /* contenu centré verticalement */
}
.diapo > .conteneur { width: min(100% - 2 * var(--marge) - 96px, var(--largeur-max)); }

/* Flèches sur les côtés. */
.carrousel__fleche {
  position: absolute; top: 50%; z-index: 2; translate: 0 -50%;
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  transition: background-color .3s, transform .4s var(--ease);
}
.carrousel__fleche svg { width: 34px; height: 34px; }
.carrousel__fleche:hover { background: rgba(255, 255, 255, .15); }
.carrousel__fleche--prec { left: clamp(.25rem, 2vw, 2rem); }
.carrousel__fleche--suiv { right: clamp(.25rem, 2vw, 2rem); }
.carrousel__fleche--prec:hover { transform: translateX(-4px); }
.carrousel__fleche--suiv:hover { transform: translateX(4px); }

/* Points de navigation. */
.carrousel__points { display: flex; justify-content: center; gap: .6rem; margin-top: 2rem; }
.carrousel__points button {
  width: 10px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .45);
  transition: width .4s var(--ease), background-color .3s;
}
.carrousel__points button[aria-current="true"] { width: 30px; background: #fff; }

@media (max-width: 860px) {
  .diapo > .conteneur { width: min(100% - 2 * var(--marge), var(--largeur-max)); }
  /* Sur mobile, les flèches descendent à côté des points. */
  .carrousel__fleche { top: auto; bottom: -14px; translate: 0 0; width: 44px; height: 44px; }
  .carrousel__fleche--prec { left: calc(50% - 120px); }
  .carrousel__fleche--suiv { right: calc(50% - 120px); }
  .carrousel__points { min-height: 20px; align-items: center; }
}

/* --- Fiche projet (page Motion Design) ---------------------------------- */
.projet__meta { margin-top: 1rem; font-weight: 500; text-transform: uppercase; font-size: clamp(.95rem, 1.4vw, 1.1rem); line-height: 1.5; }
.projet__meta li::before { content: "• "; }
/* Lien « Détails du projet » qui fait passer à la diapositive suivante. */
.projet__plus {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.75rem;
  font-weight: 700; font-size: .95rem; border-bottom: 2px solid currentColor; padding-bottom: .15rem;
}
.projet__plus svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.projet__plus:hover svg { transform: translateX(5px); }

/* Texte descriptif. */
.projet__texte { font-size: clamp(.98rem, 1.3vw, 1.1rem); line-height: 1.55; }
.projet__texte h3 { font-family: var(--f-texte); font-size: 1.15em; font-weight: 800; margin-bottom: 1rem; }
.projet__texte ul { display: grid; gap: .35rem; }
.projet__texte li { padding-left: 1.1rem; position: relative; }
.projet__texte li::before { content: ""; position: absolute; left: 0; top: .7em; width: .45rem; height: 2px; background: currentColor; }
.projet__texte strong { font-weight: 800; }
.projet__realisation { margin-top: 1.25rem; font-weight: 800; }
/* Diapositive de texte seul : centrée. */
.projet__texte--seul { max-width: 36rem; margin-inline: auto; text-align: center; }
.projet__texte--seul li { padding-left: 0; }
.projet__texte--seul li::before { display: none; }

/* Visuel de présentation (charte, storyboard…) : sans cadre, juste une ombre. */
.projet__visuel { width: 100%; height: auto; filter: drop-shadow(0 25px 40px rgba(0, 0, 0, .45)); }

/* Mosaïque de 3 images (Logitech) : une grande à gauche, deux à droite. */
.mosaique { display: grid; grid-template-columns: .56fr 1fr; grid-template-rows: auto auto; gap: .75rem; }
.mosaique img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: 0 15px 35px rgba(0, 0, 0, .4); }
.mosaique img:first-child { grid-row: span 2; }

@media (max-width: 860px) {
  /* Les listes de tâches restent alignées à gauche, plus lisibles sur mobile. */
  .bande__texte.projet__texte { text-align: left; }
}
