/* =========================================================
   Kevin Arigoni — Portfolio (v2)
   Noir élégant • Mobile-first • Grilles cohérentes
   Support / SaaS / IT / e-commerce
========================================================= */

/* ====== Palette & Base ====== */
:root{
  --bg:#0a0a0a;
  --panel:rgba(0,0,0,.82);
  --card:rgba(0,0,0,.66);
  --text:#e6e7eb;
  --muted:#b6bcc7;
  --line:rgba(255,255,255,.12);
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --shadow-sm:0 6px 16px rgba(0,0,0,.22);
  --container:1080px;
  --gutter:24px;

  --h1:clamp(28px,3.2vw,44px);
  --h2:clamp(22px,2.2vw,32px);
  --h3:clamp(18px,1.8vw,24px);
  --text-size:16px;

  /* Cadres logos */
  --logo-size:150px;
  --logo-padding:12px;
  --logo-border:3px;
  --logo-radius:14px;
  --logo-bg:rgba(255,255,255,.02);
  --logo-border-color:var(--line);
}

/* ====== Reset ====== */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  font-size:var(--text-size);
  line-height:1.65;
  color:var(--text);
  background:#000;
}

/* Fond : image + voile noir */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.82)),
    url("assets/background.jpg") center/cover no-repeat fixed;
}

img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
p{margin:0 0 1rem}
h1,h2,h3{line-height:1.2;margin:0 0 .6rem}
h1{font-size:var(--h1);font-weight:800}
h2{font-size:var(--h2);font-weight:800}
h3{font-size:var(--h3);font-weight:800}
.nowrap{white-space:nowrap}

:focus-visible{
  outline:2px solid #fff;
  outline-offset:2px;
  border-radius:8px
}

/* ====== Skip link (mobile/UX) ====== */
.skip-link{
  position:absolute;
  left:-999px;
  top:12px;
  padding:.6rem .9rem;
  background:rgba(0,0,0,.85);
  border:1px solid var(--line);
  border-radius:10px;
  z-index:1000;
}
.skip-link:focus{ left:12px }

/* ====== Helpers ====== */
.muted{ color:var(--muted) }
.small{ font-size:0.92rem }
.sep{ opacity:.55; padding:0 .2rem }
.callout{
  margin:16px 0 0;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.05);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}
.clean{
  margin:.5rem 0 0;
  padding:0;
  list-style:none;
}
.clean li{
  margin:.35rem 0;
  padding-left:1.1rem;
  position:relative;
}
.clean li::before{
  content:"";
  position:absolute;
  left:0;
  top:.55rem;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#9fd3ff;
  box-shadow:0 0 0 2px rgba(159,211,255,.18);
}

/* ====== Layout ====== */
.container{
  width:min(100% - 2*var(--gutter), var(--container));
  margin-inline:auto
}
.section{ padding:64px 0 }
.section .container > h2{ margin-bottom:1.1rem }

/* Mobile padding un peu plus serré */
@media (max-width:520px){
  :root{ --gutter:16px }
  .section{ padding:48px 0 }
}

/* ====== Sections encadrées ====== */
.section.boxed .container{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:20px;
  padding:28px;
  box-shadow:var(--shadow-sm);
}
@media (max-width:520px){
  .section.boxed .container{ padding:18px }
}

/* ====== Header ====== */
.site-hero{
  background:transparent;
  border-bottom:1px solid var(--line)
}
.hero{
  padding:36px 0 24px;
  text-align:center
}
.subtitle{
  font-size:clamp(16px,1.8vw,20px);
  color:var(--muted);
  margin-top:.25rem
}

/* Ajouts pour le nouveau HTML */
.hero-lead{
  max-width:78ch;
  margin:10px auto 0;
  color:var(--muted);
  font-size:clamp(15px,1.5vw,18px);
}
.hero-meta{
  margin:14px 0 0;
  color:rgba(230,231,235,.8);
  font-size:0.95rem;
}

/* ====== CTA HERO (mobile-first) ====== */
.hero-cta{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  margin:16px 0 0;
}

/* ====== NAV ====== */
.nav-wrap{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(0,0,0,.88);
  backdrop-filter:saturate(140%) blur(8px);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  display:flex;
  align-items:center;
  gap:18px;
  padding:12px var(--gutter);
  flex-wrap:nowrap;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  justify-content:flex-start;
  scroll-snap-type:x proximity;
}
@media (min-width:960px){ .nav-inner{ justify-content:center } }
.nav-wrap a{
  flex:0 0 auto;
  white-space:nowrap;
  scroll-snap-align:center;
  color:#d8dde6;
  font-weight:600;
  padding:8px 6px;
  border-radius:8px;
  border-bottom:2px solid transparent;
}
.nav-wrap a:hover{ color:#fff; background:rgba(255,255,255,.06) }
.nav-wrap a[aria-current="page"]{ color:#fff; border-bottom-color:#fff }
.nav-inner::-webkit-scrollbar{ height:6px }
.nav-inner::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.18); border-radius:999px }

/* ====== Buttons ====== */
.btn{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  font-weight:700;
  padding:.7rem 1rem;
  border-radius:12px;
  border:2px solid var(--line);
  background:rgba(255,255,255,.05);
  color:var(--text);
  transition:.2s ease;
  box-shadow:var(--shadow-sm);
  flex:0 0 auto;
  white-space:nowrap;
}
.btn:hover{ background:rgba(255,255,255,.08) }
.btn.primary{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.22);
}

/* ====== Cards génériques ====== */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px 18px 16px;
  box-shadow:var(--shadow-sm);
}
.card h3{ display:flex; align-items:center; gap:.5rem }
.card ul{ margin:.5rem 0 0 } /* on utilise .clean, pas besoin d'indentation */
.card li{ margin:.25rem 0 }

/* ====== Grilles (mobile-first) ====== */
.grid-2{ display:grid; gap:20px; grid-template-columns:1fr }
@media (min-width:768px){ .grid-2{ grid-template-columns:repeat(2,1fr) } }

.grid-3{ display:grid; gap:20px; grid-template-columns:1fr }
@media (min-width:760px){ .grid-3{ grid-template-columns:repeat(2,1fr) } }
@media (min-width:1100px){ .grid-3{ grid-template-columns:repeat(3,1fr) } }

/* 4 colonnes max */
.grid-4{
  display:grid;
  gap:20px;
  grid-template-columns:1fr;
}
@media (min-width:760px){ .grid-4{ grid-template-columns:repeat(2,1fr) } }
@media (min-width:1100px){ .grid-4{ grid-template-columns:repeat(4, minmax(0,1fr)) } }

/* ====== Réalisations ====== */
.realisations-grid{
  list-style:none; padding:0; margin:16px 0 0;
  display:grid; gap:18px;
}
@media (min-width:768px){ .realisations-grid{ grid-template-columns:repeat(3, minmax(0,1fr)) } }
.tile{
  background:var(--card); border:1px solid var(--line);
  border-radius:14px; padding:12px; box-shadow:var(--shadow-sm)
}
.tile-media{ position:relative }
.tile-media img{
  width:100%; aspect-ratio:16/9; object-fit:cover;
  border-radius:10px; border:1px solid var(--line)
}
.badge{
  position:absolute; left:10px; top:10px;
  padding:.35rem .6rem; font-weight:800; font-size:.9rem;
  background:rgba(0,0,0,.55); border:1px solid var(--line);
  border-radius:10px; color:#fff; letter-spacing:.02em;
}
.impact{ margin:.55rem 0 0 1.1rem; list-style:disc }
.impact li{ margin:.2rem 0 }

/* =========================================================
   PROJETS — cartes UNIFORMES (compactes) + cadres logos
   Mobile-friendly (hauteur adaptable)
   ========================================================= */
.projets-grid{
  list-style:none;
  padding:0;
  margin:16px 0 0;
  display:grid;
  gap:18px;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  justify-items:center;
}

/* Cartes : même largeur/hauteur sur desktop, mais souple sur mobile */
.p-card{
  width:100%;
  max-width:420px;
  height:auto;          
  min-height:420px;     
  overflow:visible;     

  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;

  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--shadow-sm);
}
@media (max-width:520px){
  .p-card{
    height:auto;            /* sur téléphone : ne pas forcer 420px */
    min-height:380px;       /* garde une homogénéité visuelle */
  }
}

/* En-tête projet (média + textes) réservé pour homogénéité */
.p-top{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.45rem;
  width:100%;
  min-height:250px;
}
@media (max-width:520px){
  .p-top{ min-height:220px }
}

/* Cadre logo standard */
.logo-frame{
  width:var(--logo-size);
  height:var(--logo-size);
  display:grid;
  place-items:center;
  box-sizing:border-box;
  padding:var(--logo-padding);
  background:var(--logo-bg);
  border:var(--logo-border) solid var(--logo-border-color);
  border-radius:var(--logo-radius);
  margin:0;
}
@media (max-width:520px){
  :root{ --logo-size:132px } /* un peu plus petit sur téléphone */
}

.logo-frame > img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  border-radius:calc(var(--logo-radius) - 6px);
}

/* Duo compact */
.logos-duo{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  width:auto;
  max-width:100%;
}

/* Titres & descriptions uniformisés */
.p-card h3{
  margin:.2rem 0 .1rem;
  font-weight:800;
  padding:0 .25rem;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.p-card p:not(.links){
  margin:0;
  color:var(--muted);
  padding:0 .25rem;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

/* Liens : 1 ligne + ancrés en bas */
.p-card .links{
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:nowrap;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  margin-top:auto;
  padding:8px 0 6px;
  overflow:visible;
}
.p-card .links a{
  display:inline-flex;
}

/* Pills */
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:92px;
  padding:.45rem .8rem;
  margin:0;
  border-radius:999px;
  font-weight:800;
  color:#fff;
  border:1px solid transparent;
  text-decoration:none;
  flex:0 0 auto;
  white-space:nowrap;
}
.pill:hover{ opacity:.92 }
.pill.yt{ background:#ff0033 }
.pill.tt{ background:#111; border-color:#2b2b2b }
.pill.pt{ background:#ff424d }
.pill.dc{ background:#5865F2 }
.pill.site{ background:#2f8f46 }

/* ====== Centres d’intérêt — tags sobres & jolis ====== */
.chips{
  list-style:none;
  padding:0;
  margin:14px 0 0;
  display:grid;
  gap:10px;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
}
@media (max-width:520px){
  .chips{ grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)) }
}
.chips.pretty li{
  display:flex;
  align-items:center;
  gap:.55rem;
  padding:.55rem .9rem;
  border-radius:999px;
  font-weight:700;
  letter-spacing:.01em;
  color:#eef2f8;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 6px 16px rgba(0,0,0,.18);
  transition:background .2s ease, border-color .2s ease, transform .08s ease;
}
.chips.pretty li::before{
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:#9fd3ff;
  box-shadow:0 0 0 2px rgba(159,211,255,.18);
}
.chips.pretty li:hover{
  background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.22);
  transform:translateY(-1px);
}

/* ====== Formations ====== */
.edu{ margin-bottom:18px }
.edu h3{
  font-weight:800;
  margin:.4rem 0 .4rem;
  padding-bottom:6px;
  border-bottom:1px dashed rgba(255,255,255,.14);
}
.edu-list{ margin:.4rem 0 0 0; padding:0; list-style:none }
.edu-list > li{ margin:.35rem 0 }
.edu-list li{ line-height:1.6 }

/* ====== Contact ====== */
.contact-hub .contact-col p{ color:var(--muted) }
.contact-hub .contact-links{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:nowrap;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:6px;
}
.contact-hub .contact-links::-webkit-scrollbar{ height:6px }
.contact-hub .contact-links::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.18); border-radius:999px }

/* ====== Footer ====== */
footer{
  margin-top:48px;
  padding:24px 0;
  color:#aab3c2;
  text-align:center
}

/* ====== Motion ====== */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto }
}