/* ============================================
   PORTFOLIO TYMOTHÉ SAINTE – BTS SIO SISR
   Optimisé Hostinger (HTML statique)
   ============================================ */

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

:root {
  --bg: #0a0a0f;
  --bg2: #0f0f17;
  --bg3: #16161f;
  --card: #12121a;
  --border: #1e1e2e;
  --border2: #2a2a3e;
  --accent: #6366f1;
  --accent2: #818cf8;
  --accent3: #a5b4fc;
  --green: #10b981;
  --orange: #f59e0b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #475569;
  --sidebar-w: 270px;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --glow: 0 0 30px rgba(99,102,241,0.15);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
}

a { color: var(--accent2); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent3); text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 18px 24px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--green));
}

.sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

/* Photo de profil */
.profile-img-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  overflow: hidden;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow);
  flex-shrink: 0;
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: var(--accent3);
  letter-spacing: -1px;
}

#profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.3px;
}

.sidebar-role {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--accent2);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ===== NAV ===== */
.nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.nav-item.active {
  background: rgba(99,102,241,0.12);
  color: var(--accent2);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

/* ===== MAIN ===== */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  background: var(--bg);
}

/* ===== PAGES ===== */
.page { display: none; }
.page.active {
  display: block;
  animation: pageIn 0.3s ease;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 44px;
}

/* ===== SECTION HEADER ===== */
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.6px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 560px;
}

.divider {
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  margin: 14px 0 36px;
}

/* ===== HOME ===== */
.home-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 44px;
  max-width: 860px;
  margin: 0 auto;
  gap: 6px;
}

.home-greeting {
  font-size: 14px;
  color: var(--accent2);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.home-name {
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 4px;
}

.home-name .accent { color: var(--accent); }

.home-subtitle {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.3px;
  margin-bottom: 20px;
}

.home-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 28px;
}

.home-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  border: none;
  text-decoration: none;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.35);
  color: #fff;
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border2);
}
.btn-outline:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--accent);
  text-decoration: none;
}

.home-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.stat { display: flex; flex-direction: column; }
.stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.stat-label { font-size: 11.5px; color: var(--text-dim); }

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border2); }

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-title svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Info rows */
.info-row {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.info-row:last-child { border-bottom: none; }
.info-key { color: var(--text-dim); min-width: 110px; flex-shrink: 0; }
.info-val { color: var(--text); font-weight: 500; }

/* Tags */
.skill-category { margin-bottom: 14px; }
.skill-category:last-child { margin-bottom: 0; }
.skill-cat-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 20px;
  font-weight: 500;
  transition: all var(--transition);
}
.tag:hover { border-color: var(--accent); color: var(--accent2); }

/* About text */
.prose {
  color: var(--text-muted);
  line-height: 1.78;
  font-size: 14px;
}
.prose p + p { margin-top: 12px; }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.tl-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.tl-item:last-child { border-bottom: none; }
.tl-date { font-size: 11.5px; color: var(--text-dim); padding-top: 3px; }
.tl-title { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.tl-sub { font-size: 12.5px; color: var(--accent2); margin-bottom: 5px; }
.tl-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ===== COMPANY ===== */
.company-header {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.company-logo {
  width: 72px; height: 72px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 900;
  color: var(--accent3);
  border: 1px solid var(--border2);
  flex-shrink: 0;
  letter-spacing: -0.5px;
}
.company-info h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.company-info p { font-size: 13.5px; color: var(--text-muted); margin-bottom: 3px; }
.company-info a { font-size: 13px; }

/* Mission list */
.mission-list { display: flex; flex-direction: column; gap: 10px; }
.mission-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-muted);
}
.mission-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
}

/* ===== DOCUMENTS ===== */
.docs-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
}
.docs-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.docs-section-title svg { width: 16px; height: 16px; color: var(--accent); }

.doc-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}
.doc-item:hover { border-color: var(--border2); }

.doc-icon {
  width: 34px; height: 34px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.doc-icon-pdf { background: rgba(239,68,68,0.1); }
.doc-icon-xlsx { background: rgba(16,185,129,0.1); }

.doc-meta { flex: 1; min-width: 0; }
.doc-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-size { font-size: 11.5px; color: var(--text-dim); }

.doc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
}
.doc-btn-view {
  background: rgba(99,102,241,0.1);
  color: var(--accent2);
  border: 1px solid rgba(99,102,241,0.2);
}
.doc-btn-view:hover { background: rgba(99,102,241,0.2); color: var(--accent2); text-decoration: none; }
.doc-btn-dl {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border2);
}
.doc-btn-dl:hover { background: var(--bg3); color: var(--text); text-decoration: none; }

/* ===== REALISATION CARDS ===== */
.real-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.real-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
}
.real-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--glow); }
.real-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.real-card-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: rgba(99,102,241,0.1);
  display: flex; align-items: center; justify-content: center;
}
.real-card-icon svg { width: 18px; height: 18px; color: var(--accent); }
.badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 700;
}
.badge-green { background: rgba(16,185,129,0.1); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.badge-blue { background: rgba(99,102,241,0.1); color: var(--accent2); border: 1px solid rgba(99,102,241,0.2); }
.badge-orange { background: rgba(245,158,11,0.1); color: var(--orange); border: 1px solid rgba(245,158,11,0.2); }
.real-card h3 { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.real-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }

/* ===== VEILLE ===== */
.veille-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.veille-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.veille-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.veille-top { padding: 20px; flex: 1; }
.veille-cat {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 9px;
}
.veille-top h3 { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 9px; line-height: 1.4; }
.veille-top p { font-size: 13px; color: var(--text-muted); line-height: 1.65; }
.veille-bottom {
  padding: 11px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.veille-date { color: var(--text-dim); }
.veille-source { color: var(--accent2); font-weight: 600; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-items { display: flex; flex-direction: column; gap: 14px; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-item-icon {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: rgba(99,102,241,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-item-icon svg { width: 18px; height: 18px; color: var(--accent); }
.contact-item-label { font-size: 10.5px; color: var(--text-dim); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 3px; }
.contact-item-val { font-size: 14px; color: var(--text); font-weight: 600; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.3px; }
.form-input, .form-textarea {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 110px; }

/* ===== EPREUVE HEADER ===== */
.epreuve-header {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(129,140,248,0.03));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

/* ===== MOBILE TOGGLE ===== */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 200;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 99;
  backdrop-filter: blur(4px);
}
.overlay.visible { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); z-index: 150; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-toggle { display: flex; }
  .page-inner { padding: 70px 18px 32px; }
  .home-wrap { padding: 70px 18px 32px; }
  .home-stats { gap: 16px; }
  .real-grid { grid-template-columns: 1fr; }
  .veille-grid { grid-template-columns: 1fr; }
  .doc-actions { flex-direction: column; }
  .company-header { flex-direction: column; gap: 14px; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== SELECTION ===== */
::selection { background: rgba(99,102,241,0.25); color: var(--text); }
