/* ─────────────────────────────────────────────────────────────
   style.css — styles communs au portfolio (cal-matthieu.github.io)
   Partagé par index.html, alternance.html, rapport-stage.html et
   projet-ecodrop.html. Chaque page garde ensuite un <style> inline
   pour ses sections propres (hero, contenu, thème de couleur...).
   ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-bg: #0f172a;
  --sidebar-border: rgba(255,255,255,0.06);
  --accent: #3b82f6;
  --accent-dark: #1d4ed8;
  --accent-light: #dbeafe;
  --accent-dim: rgba(59,130,246,0.08);
  --content-bg: #f8fafc;
  --section-white: #ffffff;
  --text: #0f172a;
  --text-muted: #55606f;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.07);
  --shadow-md: 0 6px 24px rgba(15,23,42,0.1);
  --sidebar-width: 360px;
  --ease: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--content-bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ─── SIDEBAR (index.html, alternance.html) ───
   Thème par défaut en bleu (--accent). Une page qui veut une autre
   teinte pour le badge de rôle (.profile-role) la redéfinit dans son
   propre <style>, après ce fichier. */

.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: -100px; left: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(59,130,246,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 48px 36px;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 36px;
}

.profile-photo-wrap {
  position: relative;
  width: 96px; height: 96px;
  margin-bottom: 16px;
}

.profile-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid rgba(59,130,246,0.6);
  display: block;
}

.profile-photo-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px dashed rgba(59,130,246,0.25);
  animation: spin 18s linear infinite;
}

.profile-status {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 14px; height: 14px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--sidebar-bg);
}

.profile-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f1f5f9;
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.profile-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  color: #93c5fd;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.profile-bio {
  font-size: 0.82rem;
  color: #64748b;
  text-align: center;
  line-height: 1.7;
  max-width: 240px;
}

.sidebar-nav { list-style: none; flex: 1; }
.sidebar-nav li { margin-bottom: 2px; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
  transition: all var(--ease);
}

.sidebar-nav a .nav-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all var(--ease);
}

.sidebar-nav a:hover,
.sidebar-nav a.active { background: rgba(255,255,255,0.05); color: #f1f5f9; }

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a.active .nav-icon { background: rgba(59,130,246,0.2); color: #93c5fd; }

.sidebar-nav a.active .nav-icon { color: var(--accent); }

.nav-divider {
  height: 1px;
  background: var(--sidebar-border);
  margin: 10px 0;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0 14px;
  margin-bottom: 6px;
}

.sidebar-bottom { padding-top: 24px; border-top: 1px solid var(--sidebar-border); }

.social-row { display: flex; gap: 10px; margin-bottom: 16px; }

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--sidebar-border);
  border-radius: 8px;
  color: #64748b;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--ease);
}

.social-btn:hover {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.3);
  color: #93c5fd;
}

.btn-cv {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--ease);
}

.btn-cv:hover { background: var(--accent-dark); }

.main { margin-left: var(--sidebar-width); min-height: 100vh; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--text); }

/* ─── TOPBAR + FOOTER (rapport-stage.html, projet-ecodrop.html) ─── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--sidebar-border);
  padding: 0 48px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color var(--ease);
}
.topbar-back:hover { color: #f1f5f9; }

.topbar-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
}

footer {
  background: var(--sidebar-bg);
  padding: 32px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.footer-left { position: relative; z-index: 1; }
.footer-name { font-family: 'Space Grotesk', sans-serif; font-size: 0.95rem; font-weight: 700; color: #f1f5f9; margin-bottom: 2px; }
.footer-copy { font-size: 0.72rem; color: #475569; }
.footer-right { position: relative; z-index: 1; display: flex; gap: 12px; align-items: center; }
.footer-link { color: #475569; font-size: 1rem; text-decoration: none; transition: color var(--ease); }
.footer-link:hover { color: #3b82f6; }
