/* ==========================================================
   PORTFOLIO FUSION — VERSION PROPRE
   Charger après style.css et projects.css.
   Images : ../images/portrait.png (via HTML)
            ../images/hero-data.jpg (via CSS)
   ========================================================== */

:root {
  --fusion-ink: #092d32;
  --fusion-teal: #087570;
  --fusion-line: #d7e7e3;
}

/* Navigation latérale */
.sidebar {
  background: linear-gradient(160deg, #092e32 0%, #103d40 57%, #05272d 100%);
  border-right: 1px solid rgba(129, 209, 199, .14);
  isolation: isolate;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background-image:
    linear-gradient(rgba(103, 200, 189, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 200, 189, .09) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to top, black, transparent);
  mask-image: linear-gradient(to top, black, transparent);
  pointer-events: none;
  z-index: -1;
}
.sidebar-nav .nav-link.active {
  background: rgba(0, 126, 121, .36);
  border-left-color: #56c6b8;
}
.sidebar-nav .nav-link:hover { background: rgba(99, 207, 195, .12); }
.logo { font-family: Georgia, 'Times New Roman', serif; }

/* Accueil : une seule couche pour la photographie de serveurs */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(780px, 92svh);
  background: linear-gradient(100deg, #fff 0%, #fbfdfc 53%, #e8f3f1 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 42%;
  display: block;
  background: url("../images/hero-data.197fa266fbed.webp") center right / cover no-repeat;
  opacity: .56;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.45) 32%, #000 75%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.45) 32%, #000 75%);
  pointer-events: none;
  z-index: 0;
}
.hero::after { content: none; }
.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, .87fr);
  gap: clamp(24px, 4vw, 70px);
  align-items: center;
}
.hero-text { position: relative; z-index: 2; min-width: 0; }
.hero-text .eyebrow { color: #167d78; letter-spacing: .17em; font-weight: 700; }
.hero-text h1 {
  color: var(--fusion-ink);
  font-size: clamp(58px, 5.8vw, 94px);
  line-height: 1.03;
  letter-spacing: -.045em;
  margin-bottom: 12px;
}
.hero-text h1 span { color: #0b6766; }
.hero-text h2 {
  color: var(--fusion-teal);
  font-size: clamp(24px, 2.2vw, 33px);
  margin: 8px 0 24px;
}
.hero-text p { color: #4b6367; max-width: 560px; }
.hero-text .actions { gap: 12px; }
.hero-text .btn {
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.hero-text .btn.primary {
  background: linear-gradient(110deg, #075c5a, #0b7974);
  box-shadow: 0 9px 22px rgba(5, 88, 84, .14);
}
.hero-text .btn:hover { transform: translateY(-2px); }
.hero-text .btn:focus-visible { outline: 3px solid #42b9ad; outline-offset: 3px; }

/* Portrait PNG transparent : aucun panneau, aucune découpe latérale */
.hero .hero-visual {
  position: relative;
  z-index: 1;
  isolation: isolate;
  min-width: 0;
  min-height: 520px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: visible;
}
.hero .hero-visual::before,
.hero .hero-visual::after { content: none; display: none; }
.hero .portrait-frame {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: min(100%, 490px);
  max-width: none;
  height: auto;
  margin: 0;
  padding: 0;
  transform: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.hero .portrait {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: bottom center;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  /* Estompe seulement le bas du buste, pas les contours des cheveux. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 77%, rgba(0,0,0,.9) 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 77%, rgba(0,0,0,.9) 85%, transparent 100%);
}
.hero .data-label {
  position: absolute;
  left: 0;
  bottom: 42px;
  z-index: 3;
  border-left: 3px solid #0b8780;
  box-shadow: 0 16px 34px rgba(4, 54, 60, .12);
}

/* Autres sections */
.section { scroll-margin-top: 20px; }
.section .eyebrow { color: #13867e; }
.section h2, .section-heading h2 { color: #11383d; }
.cards .card {
  background: linear-gradient(160deg, #fff 0%, #fbfefd 100%);
  border-color: var(--fusion-line);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cards .card:hover {
  transform: translateY(-4px);
  border-color: #69bdb3;
  box-shadow: 0 16px 30px rgba(6, 70, 73, .07);
}
.card-number { color: #16867e; }
.timeline-marker { box-shadow: 0 0 0 5px #edf6f4; }
.portfolio-project { transition: transform .2s ease, box-shadow .2s ease; }
.portfolio-project:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(6, 70, 73, .08);
}

/* Tablettes */
@media (max-width: 1100px) {
  .hero { min-height: auto; }
  .hero-content { gap: 28px; }
  .hero-text h1 { font-size: clamp(48px, 6vw, 74px); }
  .hero .hero-visual { min-height: 390px; }
  .hero::before { inset-inline-start: 28%; opacity: .40; }
}
@media (max-width: 900px) {
  .hero-content { grid-template-columns: minmax(0, 1fr); }
  .hero-text { max-width: 690px; }
  .hero .hero-visual { width: min(100%, 430px); margin: 15px auto 0; min-height: 0; }
  .hero .portrait-frame { width: min(100%, 400px); }
  .hero::before { inset: 25% 0 0; opacity: .28; }
  .hero .data-label { left: 0; bottom: 24px; }
}
/* Mobiles */
@media (max-width: 700px) {
  .sidebar::before { display: none; }
  .hero { min-height: auto; }
  .hero::before {
    inset: 25% 0 0;
    opacity: .20;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 55%);
    mask-image: linear-gradient(to bottom, transparent, #000 55%);
  }
  .hero-text h1 { font-size: clamp(42px, 11vw, 64px); }
  .hero-text h2 { font-size: clamp(22px, 5vw, 28px); }
  .hero .hero-visual { width: min(100%, 360px); }
  .hero .portrait-frame { width: min(100%, 340px); }
  .hero .data-label { left: 0; bottom: 10px; }
  .hero-text .btn:hover { transform: none; }
  .section { scroll-margin-top: 76px; }
}
@media (max-width: 420px) {
  .hero .hero-visual { width: 100%; }
  .hero .portrait-frame { width: min(100%, 290px); }
  .hero .data-label { bottom: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-text .btn, .cards .card, .portfolio-project { transition: none; }
  .hero-text .btn:hover, .cards .card:hover, .portfolio-project:hover { transform: none; }
}
