/* ══════════════════════════════════════════════════════════════
   INDEX.CSS — Landing page artistique Abdelmalek Limari
══════════════════════════════════════════════════════════════ */

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: stretch;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 55% -5%, rgba(232,104,42,0.22) 0%, transparent 58%),
    radial-gradient(ellipse 35% 28% at 92% 88%, rgba(232,104,42,0.07) 0%, transparent 50%),
    var(--bg);
}

/* Watermark géant */
.hero-wm {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-size: clamp(80px, 18vw, 260px);
  font-weight: 700; font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232,104,42,0.06);
  white-space: nowrap;
  pointer-events: none; user-select: none;
  z-index: 0; letter-spacing: -0.04em;
  will-change: transform;
}

/* Glows radials */
.hero-glow-top {
  position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 500px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(232,104,42,0.16) 0%, transparent 70%);
  filter: blur(60px); pointer-events: none; z-index: 0;
}
.hero-glow-bottom {
  position: absolute; bottom: -5%; right: 5%;
  width: 400px; height: 300px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(232,104,42,0.07) 0%, transparent 70%);
  filter: blur(40px); pointer-events: none; z-index: 0;
}

/* Bandes verticales scintillantes */
.hero-stripes {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.stripe {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(232,104,42,0.18), transparent);
}
.stripe-1 { left: 20%; animation: stripe-flicker 8s ease-in-out infinite; }
.stripe-2 { left: 50%; animation: stripe-flicker 12s ease-in-out infinite 2s; }
.stripe-3 { right: 20%; animation: stripe-flicker 10s ease-in-out infinite 5s; }
@keyframes stripe-flicker {
  0%,100% { opacity: 0.25; }
  50%      { opacity: 1; }
}

/* Grand index décoratif */
.hero-index {
  position: absolute; bottom: 3rem; right: 5%;
  font-family: 'Playfair Display', serif;
  font-size: 8rem; font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232,104,42,0.1);
  line-height: 1; pointer-events: none; z-index: 0;
  will-change: transform;
}

/* Contenu */
.hero-wrapper {
  position: relative; z-index: 2;
  width: 100%; padding: 0 clamp(1.5rem, 6vw, 5rem);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding-top: clamp(5.5rem, 11vh, 7.5rem);
  padding-bottom: clamp(2.5rem, 5vh, 4rem);
}
.hero-top, .hero-bottom {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 1rem;
}
.hero-avail {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--text2); letter-spacing: 0.04em;
}
.avail-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  animation: avail-pulse 2.2s ease-in-out infinite;
}
@keyframes avail-pulse {
  0%,100% { opacity:1; box-shadow:0 0 0 0 rgba(74,222,128,.6); }
  50%      { opacity:.7; box-shadow:0 0 0 5px rgba(74,222,128,0); }
}
.hero-coords { font-size: 0.74rem; color: var(--text3); letter-spacing: 0.1em; }

/* Nom */
.hero-name-block {
  margin: auto 0;
  padding: clamp(1.5rem, 4vh, 3rem) 0;
  overflow: visible;
}
.hero-name-row {
  display: flex; line-height: 0.87; overflow: hidden;
}
.hero-name-row--right { justify-content: flex-end; }
.name-line {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 9.5vw, 11.5rem);
  font-weight: 700; color: var(--text);
  white-space: nowrap; line-height: 0.87;
  transform: translateY(115%); opacity: 0;
}
.name-line.visible {
  animation: name-up 1.1s cubic-bezier(0.16,1,0.3,1) forwards;
}
.nl-last { animation-delay: 140ms !important; }
@keyframes name-up {
  from { transform: translateY(115%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.na { color: var(--accent); font-style: normal; }

/* Bas hero */
.hero-bottom-left  { display: flex; flex-direction: column; gap: 4px; }
.hero-role  { font-size: 0.92rem; color: var(--text2); font-weight: 500; }
.hero-loc   { font-size: 0.76rem; color: var(--text3); letter-spacing: 0.04em; }
.hero-bottom-right { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-secondary {
  display: inline-flex; align-items: center;
  padding: 12px 26px; border-radius: 999px;
  border: 1px solid var(--border);
  font-family: 'Inter', sans-serif; font-size: 0.88rem;
  font-weight: 600; color: var(--text2); text-decoration: none;
  letter-spacing: 0.03em;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-secondary:hover { border-color: var(--border-h); color: var(--text); background: var(--bg3); }

/* Scroll indicator */
.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 0.66rem; color: var(--text3);
  letter-spacing: 0.14em; text-transform: uppercase; z-index: 2;
}
.scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2.2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%,100% { opacity:1; transform: scaleY(1); transform-origin: top; }
  50%      { opacity:.35; transform: scaleY(.5); transform-origin: top; }
}

/* Reveal hero */
.reveal-hero {
  opacity: 0; transform: translateY(12px);
  transition: opacity .65s ease var(--d,0ms), transform .65s cubic-bezier(0.16,1,0.3,1) var(--d,0ms);
}
.reveal-hero.visible { opacity: 1; transform: translateY(0); }

/* ── TICKER ────────────────────────────────────────────────── */
.ticker {
  background: var(--accent); padding: 12px 0;
  overflow: hidden; white-space: nowrap;
  position: relative; z-index: 2;
}
.ticker-inner {
  display: inline-flex; gap: 0;
  animation: ticker-run 30s linear infinite;
}
.ticker-inner span {
  font-family: 'Inter', sans-serif; font-size: 0.82rem;
  font-weight: 600; color: white; padding: 0 1.4rem; letter-spacing: 0.06em;
}
.ticker-sep { opacity: 0.4 !important; padding: 0 0.4rem !important; }
@keyframes ticker-run {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── HOME ABOUT ────────────────────────────────────────────── */
.home-about {
  position: relative;
  padding: clamp(6rem, 12vh, 10rem) 0;
  overflow: hidden;
}
.ha-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 45% at 82% 50%, rgba(232,104,42,0.07) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 50%, var(--bg) 100%);
  pointer-events: none;
  will-change: transform;
}
.ha-inner {
  display: grid; grid-template-columns: 55fr 45fr;
  gap: clamp(3rem, 6vw, 6rem); align-items: center;
  position: relative; z-index: 2;
}
.ha-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  font-weight: 700; line-height: 1.05;
  color: var(--text); margin: 1rem 0 1.5rem;
  will-change: transform;
}
.ha-title em { color: var(--accent); font-style: italic; display: block; }
.ha-body {
  font-size: 1rem; color: var(--text2); line-height: 1.82;
  margin-bottom: 2rem; max-width: 500px;
}
.ha-stats {
  display: flex; gap: 2.5rem; margin-bottom: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.ha-stat { display: flex; flex-direction: column; }
.ha-stat-n {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem; font-weight: 700; color: var(--accent); line-height: 1; display: block;
}
.ha-stat-l {
  font-size: 0.68rem; color: var(--text3);
  letter-spacing: 0.12em; text-transform: uppercase; margin-top: 4px; display: block;
}
.ha-cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  text-decoration: none; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border); padding-bottom: 5px;
  transition: color .2s, border-color .2s;
}
.ha-cta:hover { color: var(--accent); border-color: var(--accent); }
.ha-cta-arrow { transition: transform .25s cubic-bezier(0.16,1,0.3,1); display: inline-block; }
.ha-cta:hover .ha-cta-arrow { transform: translateX(6px); }

/* Photo */
.ha-visual { position: relative; }
.ha-photo-wrap {
  position: relative; display: inline-block;
  width: min(380px, 90%);
}
.ha-photo {
  width: 100%; height: auto; max-height: 500px;
  object-fit: cover; border-radius: 18px; display: block;
  transform: rotate(-2.5deg);
  box-shadow: 10px 10px 0 var(--accent);
  transition: transform .5s cubic-bezier(0.16,1,0.3,1), box-shadow .4s ease;
}
.ha-photo-wrap:hover .ha-photo {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 6px 6px 0 var(--accent);
}
.ha-frame {
  position: absolute; inset: -10px; border-radius: 24px;
  border: 1.5px solid rgba(232,104,42,0.3);
  transform: rotate(-2.5deg); pointer-events: none;
  transition: transform .5s ease, border-color .3s ease;
}
.ha-photo-wrap:hover .ha-frame {
  transform: rotate(0deg); border-color: rgba(232,104,42,0.6);
}
.ha-badge {
  position: absolute; bottom: -1.2rem; right: -1.2rem;
  background: var(--accent); color: white; border-radius: 12px;
  padding: 10px 16px; font-size: 0.78rem; font-weight: 600;
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 8px 32px rgba(232,104,42,0.4);
  animation: badge-float 3.5s ease-in-out infinite;
}
@keyframes badge-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
.ha-vert-text {
  position: absolute; right: -3.5rem; top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center;
  font-family: 'Inter', sans-serif; font-size: 0.62rem;
  font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text3); white-space: nowrap; will-change: transform;
}

/* ── PROJETS FEATURED ──────────────────────────────────────── */
.home-projects {
  position: relative;
  padding: clamp(5rem, 10vh, 8rem) 0;
  overflow: hidden;
}
.hp-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg) 50%, var(--bg2) 100%);
  will-change: transform;
}
.hp-header {
  display: flex; justify-content: space-between;
  align-items: flex-end; margin-bottom: clamp(2.5rem, 5vw, 4rem);
  flex-wrap: wrap; gap: 1.5rem;
  position: relative; z-index: 2;
}
.hp-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 700; line-height: 1; color: var(--text); margin-top: 0.75rem;
  will-change: transform;
}
.hp-title em { color: var(--accent); font-style: italic; }
.hp-all-link {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.86rem; font-weight: 600; color: var(--text2);
  text-decoration: none; letter-spacing: 0.04em;
  transition: color .2s ease, gap .22s ease;
}
.hp-all-link:hover { color: var(--accent); gap: 14px; }

/* Grille asymétrique */
.hp-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
  position: relative; z-index: 2;
}
.hp-card-large { grid-row: 1 / 3; min-height: 660px; }
.hp-card-tall  { min-height: 315px; }
.hp-card-wide  { min-height: 315px; }

.hp-card {
  position: relative; border-radius: 16px; overflow: hidden;
  cursor: pointer; isolation: isolate;
}
.hp-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .85s cubic-bezier(0.215,.61,.355,1), filter .5s ease;
  filter: brightness(0.72);
}
.hp-card:hover .hp-card-bg { transform: scale(1.07); filter: brightness(0.45); }

/* Overlay grille animée au hover */
.hp-card::before {
  content: ''; position: absolute; inset: 0; z-index: 0; opacity: 0;
  background:
    linear-gradient(rgba(0,0,0,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.3) 1px, transparent 1px),
    linear-gradient(135deg, var(--accent) 0%, #c9521e 40%, #1a1208 70%, #080807 100%);
  background-size: 26px 26px, 26px 26px, 100% 100%;
  transition: opacity .38s cubic-bezier(0.16,1,0.3,1);
}
.hp-card:hover::before {
  opacity: 1;
  animation: grid-scroll-hp 3s linear infinite;
}
@keyframes grid-scroll-hp {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 26px 26px, 26px 26px, 0 0; }
}

.hp-card-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  justify-content: space-between; padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.1) 55%, transparent 100%);
  transition: background .35s ease;
}
.hp-card:hover .hp-card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 60%);
}
.hp-card-num {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em;
  color: rgba(255,255,255,0.45); align-self: flex-start;
}
.hp-card-bottom { display: flex; flex-direction: column; gap: 0.6rem; }
.hp-card-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  font-weight: 700; color: white !important; display: block;
  transform: translateY(110%);
  transition: transform .5s cubic-bezier(0.16,1,0.3,1);
}
.hp-card:hover .hp-card-title { transform: translateY(0); }
.hp-card-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
  opacity: 0; transform: translateY(8px);
  transition: opacity .35s ease .08s, transform .35s ease .08s;
}
.hp-card:hover .hp-card-tags { opacity: 1; transform: translateY(0); }
.hp-card-tags span {
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px; padding: 3px 9px;
  font-size: 0.68rem; color: rgba(255,255,255,0.9) !important;
}

/* ── COMPÉTENCES RAPIDE ────────────────────────────────────── */
.home-skills {
  position: relative;
  padding: clamp(5rem, 10vh, 8rem) 0;
  overflow: hidden;
}
.hs-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 40% 35% at 14% 50%, rgba(232,104,42,0.07) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 60%, var(--bg) 100%);
  will-change: transform;
}
.hs-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0; align-items: start; margin-top: 3rem;
  position: relative; z-index: 2;
}
.hs-item { padding: 2rem 3rem; }
.hs-divider { width: 1px; background: var(--border); align-self: stretch; margin: 1rem 0; }
.hs-num {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem; font-weight: 700;
  color: transparent; -webkit-text-stroke: 1px rgba(232,104,42,0.24);
  line-height: 1; display: block; margin-bottom: 0.75rem;
  will-change: transform;
}
.hs-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700; color: var(--text); line-height: 1.1; margin-bottom: 1rem;
}
.hs-name em { color: var(--accent); font-style: italic; display: block; }
.hs-tools { font-size: 0.78rem; color: var(--text3); line-height: 1.82; letter-spacing: 0.02em; }
.hs-link {
  display: inline-block; margin-top: 3rem;
  font-size: 0.88rem; font-weight: 600; color: var(--text2);
  text-decoration: none; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border); padding-bottom: 5px;
  transition: color .2s, border-color .2s;
  position: relative; z-index: 2;
}
.hs-link:hover { color: var(--accent); border-color: var(--accent); }

/* ── MARQUEE TEXTE ─────────────────────────────────────────── */
.marquee-text {
  overflow: hidden; padding: 2.5rem 0;
  background: var(--bg2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  position: relative; z-index: 2;
  will-change: transform;
}
.marquee-inner {
  display: inline-flex; gap: 3rem; white-space: nowrap;
  animation: marquee-run 22s linear infinite;
}
.marquee-inner span {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 700; font-style: italic;
  color: var(--text); letter-spacing: -0.02em;
}
.marquee-outline {
  color: transparent !important;
  -webkit-text-stroke: 1px rgba(240,235,224,0.22) !important;
}
@keyframes marquee-run {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── CTA FINAL ─────────────────────────────────────────────── */
.home-cta {
  position: relative;
  padding: clamp(7rem, 14vh, 12rem) 0;
  overflow: hidden; text-align: center;
}
.hcta-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 50% 100%, rgba(232,104,42,0.14) 0%, transparent 65%),
    var(--bg);
}
.hcta-wm {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-size: clamp(80px, 20vw, 280px);
  font-weight: 700; font-style: italic;
  color: transparent; -webkit-text-stroke: 1px rgba(232,104,42,0.05);
  white-space: nowrap; pointer-events: none; user-select: none;
  will-change: transform;
}
.hcta-inner { position: relative; z-index: 2; }
.hcta-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 700; line-height: 0.93;
  color: var(--text); margin: 1.5rem 0;
  will-change: transform;
}
.hcta-title em { color: var(--accent); font-style: italic; }
.hcta-sub { font-size: 1rem; color: var(--text2); margin-bottom: 2.5rem; }
.hcta-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; flex-wrap: wrap;
}
.hcta-mail {
  font-size: 0.88rem; color: var(--text2); text-decoration: none;
  border-bottom: 1px solid var(--border); padding-bottom: 4px;
  transition: color .2s, border-color .2s;
}
.hcta-mail:hover { color: var(--accent); border-color: var(--accent); }
.btn-large { padding: 16px 42px !important; font-size: 1rem !important; }

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 4rem 0 0;
}
.footer-inner {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem; padding-bottom: 3rem;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.5rem;
}
.footer-tagline { font-size: 0.82rem; color: var(--text2); margin-bottom: 0.3rem; }
.footer-loc     { font-size: 0.76rem; color: var(--text3); letter-spacing: 0.04em; }
.footer-links, .footer-socials {
  display: flex; flex-direction: column; gap: 0.65rem;
  padding-top: 0.25rem;
}
.footer-links a, .footer-socials a {
  font-size: 0.84rem; color: var(--text2); text-decoration: none;
  transition: color .2s ease;
}
.footer-links a:hover, .footer-socials a:hover { color: var(--accent); }
.footer-bottom {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom p { font-size: 0.76rem; color: var(--text3); }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hs-row { grid-template-columns: 1fr; }
  .hs-divider { width: 100%; height: 1px; margin: 0; }
  .hs-item { padding: 2rem 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .ha-inner { grid-template-columns: 1fr; gap: 3.5rem; }
  .ha-photo-wrap { width: min(300px, 80%); margin: 0 auto; }
  .ha-vert-text { display: none; }
  .hp-grid { grid-template-columns: 1fr; }
  .hp-card-large { grid-row: auto; min-height: 340px; }
  .hp-card-tall, .hp-card-wide { min-height: 240px; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .name-line  { font-size: clamp(2.2rem, 13vw, 4.5rem) !important; }
  .hero-bottom { flex-direction: column; align-items: flex-start; }
  .hero-top    { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .hcta-actions { flex-direction: column; align-items: center; }
}
