/* =============================================================================
   HERO.CSS – 🧭 Section d’introduction
   Harmonisé le 2025-07-04
   -----------------------------------------------------------------------------
   CHANGEMENTS CLÉS
   • Palette alignée sur base.css : couleurs via var(--primary), var(--accent), var(--text-color)
   • Bouton .btn--primary ➜ .btn.btn-primary (convention globale)
   • Badges : supprime duplication, exploitent .badge & helpers déjà définis dans badges.css
   • Border profil utilise var(--primary)
   • Indentation / commentaires homogènes
   • Classes maintenues sauf bouton (HTML à mettre à jour)
   ---------------------------------------------------------------------------*/

/* ---------------------------------------------------------------------------
   1 · CONTENEUR PRINCIPAL
   ------------------------------------------------------------------------ */
.hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  width: 100%;
  max-width: 960px;
  border-radius: 20px;
  background-color: rgb(255 255 255 / .05);
  backdrop-filter: blur(10px);
  border: 1px solid rgb(255 255 255 / .10);
  box-shadow: 0 8px 32px rgb(31 38 135 / .37);
  transition: transform .3s ease, box-shadow .3s ease;
}
.hero:hover {
  transform: scale(1.01);
  box-shadow: 0 12px 40px rgb(0 0 0 / .25);
}

/* Screen Readers Only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------------------
   2 · TEXTE / COLONNE GAUCHE
   ------------------------------------------------------------------------ */
.hero-text {
  flex: 1 1 280px;
  min-width: 280px;
  color: var(--text-color);
  line-height: 1.7;
  font-size: 1rem;
}
.hero-text h1,
.hero-text h2,
.hero-text h3 {
  font-weight: 700;
  line-height: 1.2;
  margin-block-end: 1rem;
}
.hero-text p { margin-block-end: .75rem; opacity: .9; }

html.light .hero-text { color: var(--text-light); }

/* Badges techniques (utilise .badge de badges.css) */
.hero .tech-badges { margin-top: 1rem; }

/* ---------------------------------------------------------------------------
   3 · BOUTON « ME CONTACTER »
   ------------------------------------------------------------------------ */
.btn.btn-primary.hero-cta {
  margin-top: 1.5rem;
}

/* ---------------------------------------------------------------------------
   4 · IMAGE / COLONNE DROITE
   ------------------------------------------------------------------------ */
.hero-img {
  flex-shrink: 0;
  min-width: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Photo de profil */
.profile-pic {
  position: relative;
  width: 260px; height: 260px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--primary);
  box-shadow: 0 0 20px rgb(0 123 255 / .3);
  transition: transform .3s ease, box-shadow .3s ease;
  z-index: 1;
}
.profile-pic::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: rgb(0 123 255 / .2);
  z-index: -1;
  animation: pulse-border 2.5s infinite;
}
.profile-pic:is(:hover, :focus) {
  transform: scale(1.04) rotate(.2deg);
  box-shadow: 0 0 25px rgb(0 123 255 / .5);
  outline: none;
}
.profile-pic:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@keyframes pulse-border {
  0%   { transform: scale(.95); opacity: .6; }
  50%  { transform: scale(1.05); opacity: .2; }
  100% { transform: scale(.95); opacity: .6; }
}

/* ---------------------------------------------------------------------------
   5 · RESPONSIVE
   ------------------------------------------------------------------------ */
@media (max-width: 576px) {
  .hero { flex-direction: column; text-align: center; }
  .hero-text { order: 2; }
  .hero-img  { order: 1; margin-block-end: 1rem; }
}

/* Grid layout wrap variant */
.hero-section { padding-block: 3rem; }
.hero-content { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 768px) {
  .hero-content { flex-direction: row; align-items: center; justify-content: space-between; }
  .hero-text, .hero-image { width: 48%; }
}

.hero-text h1 { font-size: 2.2rem; font-weight: 700; }
.hero-image img {
  width: 100%; border-radius: 12px;
  box-shadow: 0 10px 40px rgb(0 0 0 / .4);
}

/* ───────── Portrait grayscale → couleur ───────── */
.portrait-grayscale {
  filter: grayscale(1);
  transition: filter .4s ease, transform .4s ease;
}

/* état couleur épinglé */
.portrait-show-color {
  filter: none;
  transform: scale(1.02);
}

/* Desktop + tablette avec souris : hover */
@media (hover: hover) {
  .portrait-grayscale:hover {
    filter: none;
    transform: scale(1.02);
  }
}

/* Smartphone (≤ 767 px) : couleur permanente */
@media (hover: none) and (max-width: 767.98px) {
  .portrait-grayscale { filter: none; }
}

/* Tablette tactile (≥ 768 px) : tap pour couleur */
@media (hover: none) and (min-width: 768px) {
  .portrait-grayscale:active {
    filter: none;
    transform: scale(1.02);
  }
}