:root {
  /* Palette Dark & Neon */
  --bg-page: #0f0f0f;
  --bg-card: #1c1c1e;
  --text-main: #f5f5f7;
  /* CORRECTION CONTRASTE */
  --text-dim: #c7c7cc; 
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --border-color: #333333;
  --radius: 24px;
  --gap: 20px;
}

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

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  padding: 40px 20px;
  line-height: 1.6;
}

/* --- GRILLE BENTO --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: var(--gap);
  max-width: 1200px;
  margin: 0 auto;
}

/* --- STYLE DES CARTES --- */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

/* --- FOOTER --- */
.site-footer {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover, .site-footer:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.15);
  border-color: var(--accent);
}

/* --- CLASSES TAILLES --- */
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.row-span-2 { grid-row: span 2; }

/* --- TYPOGRAPHIE --- */
h1 { font-size: 2rem; font-weight: 800; margin-bottom: 5px; }
h2 { font-size: 1.1rem; color: var(--accent); font-weight: 600; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
h3 { font-size: 1.4rem; margin-bottom: 10px; font-weight: 700; color: #fff; }
p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 15px; }

/* --- COMPOSANTS --- */
.profile-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  height: 100%;
}
.profile-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
}
.bio-text { font-size: 1rem; line-height: 1.5; }

.media-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 15px;
  background: #000;
  border: 1px solid #333;
}
.media-wrapper img, .media-wrapper iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}
.clickable-image { cursor: pointer; transition: transform 0.3s; }
.clickable-image:hover { transform: scale(1.05); }

/* BOUTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: auto;
}
.btn:hover { background: var(--accent-hover); transform: scale(1.02); }
.btn-social { background: #2c2c2e; margin-top: 10px; }
.btn-social:hover { opacity: 0.9; transform: scale(1.02); }

/* --- FORMULAIRE --- */
.form-group { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }

input, textarea {
  width: 100%;
  padding: 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid #333;
  border-radius: 8px;
  color: white;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.3s;
  margin-bottom: 10px;
  resize: none; 
  min-width: 0; text-overflow: ellipsis; 
}

@media (min-width: 768px) {
  .form-group input { width: calc(50% - 5px); }
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0,0,0,0.5);
}

/* --- LIGHTBOX & 404 & RESPONSIVE --- */
.lightbox {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox-img { max-width: 90%; max-height: 90%; border-radius: 8px; box-shadow: 0 0 50px rgba(139,92,246,0.3); display: none; }
.lightbox-pdf { width: 90%; height: 90vh; border: none; border-radius: 12px; background-color: #fff; box-shadow: 0 0 50px rgba(139,92,246,0.3); display: none; }
.close-lightbox { position: absolute; top: 30px; right: 40px; font-size: 3rem; color: white; cursor: pointer; z-index: 1001; }

@media (max-width: 768px) {
  .bento-grid { grid-template-columns: 1fr; }
  .col-span-2, .col-span-3, .col-span-4, .row-span-2 { grid-column: span 1; grid-row: span 1; }
  .profile-content { flex-direction: column; align-items: center; text-align: center; }
  .close-lightbox { top: 10px; right: 20px; font-size: 2.5rem; }
  .site-footer { margin-top: 20px; width: 100%; }
}

.error-page-body { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; }
.error-card { max-width: 500px; width: 100%; text-align: center; align-items: center; border-color: var(--accent); box-shadow: 0 0 30px rgba(139, 92, 246, 0.1); }
.error-code { font-size: 5rem; font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 10px; text-shadow: 0 0 20px rgba(139, 92, 246, 0.4); }