:root {
  --bg-900: #0b1220;
  --bg-800: #0f2438;
  --panel: #0f1724;
  --card: #0b1a2b;
  --muted: #9aa6b2;
  --accent: #1e90ff;
  --accent-2: #3aa0ff;
  --glass: rgba(255, 255, 255, 0.04);
  --radius: 12px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; width: 100%; }

body {
  height: 100%;
  margin: 0;
  background:
    radial-gradient(1200px 400px at 10% 20%, rgba(56, 135, 255, 0.06), transparent 6%),
    radial-gradient(900px 300px at 90% 80%, rgba(10, 200, 255, 0.04), transparent 8%),
    linear-gradient(180deg, var(--bg-900) 0%, var(--bg-800) 100%);
  color: #e6eef8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  padding: 28px;
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
}

/* Layout header */
.header {
  max-width: 1100px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  font-weight: 600;
}
.back-button:hover { transform: translateY(-3px); color: var(--accent); }

h1 { margin: 0; font-size: 20px; font-weight: 700; color: #f5fbff; }

.container { max-width: 1100px; margin: 0 auto; }

/* ==========================================
   CARD PRINCIPALE (GRILLE)
   ========================================== */
.project-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.03);
  align-items: start;
  box-shadow: 0 10px 40px rgba(2, 6, 23, 0.6);
  max-width: 100%;
  overflow: hidden;
}

.project-content {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

@media (max-width: 860px) { 
  .project-card { grid-template-columns: 1fr; } 
  .thumb-wrap { margin: 0 auto; }
}

/* Logo container */
.thumb-wrap {
  width: 100%;
  max-width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.03);
  flex-shrink: 0;
}
.thumb {
  width: 84%;
  height: 84%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(10, 40, 80, 0.5));
}

/* Header projet */
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 8px;
  width: 100%;
}
.title-block h2 { margin: 0; font-size: 22px; letter-spacing: 0.2px; color: #f8fbff; }
.meta { color: var(--muted); font-size: 13px; margin-top: 6px; }

.btn {
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #061226;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  border: 0;
  box-shadow: 0 8px 30px rgba(30, 144, 255, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 48px rgba(30, 144, 255, 0.18); }

.project-section { margin-top: 14px; width: 100%; }
.kicker { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.9px; font-weight: 700; }
.lead { color: #eaf6ff; font-weight: 500; margin: 10px 0 0; }
.muted { color: var(--muted); font-size: 14px; }
.hr { width: 100%; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02)); margin: 16px 0; border-radius: 2px; }
.block { margin-top: 20px; }

/* ==========================================
   SKILLS
   ========================================== */
.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px auto;
  width: 100%;
  max-width: 90%;
}
@media (max-width: 760px) {
  .skills { grid-template-columns: 1fr; }
}

.skill {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 10px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.03);
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}
.skill:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(10,30,60,0.5); border-color: rgba(30,144,255,0.5); }
.skill-title { font-weight: 700; margin: 0 0 6px; color: #eaf6ff; }
.skill-desc { margin: 0; color: var(--muted); font-size: 14px; }
.meta-row { display: flex; gap: 10px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }

/* ========================================
   MEDIA SLIDER
   ======================================== */
.media-slider {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 60px auto 30px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ms-track-wrapper {
  flex: 1;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  margin: 0 auto;
}

.ms-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  will-change: transform;
  border-radius: 12px;
  overflow: visible;
  cursor: grab;
}

.ms-track:active {
  cursor: grabbing;
}

.ms-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-shrink: 0;
}

.media-card {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.03);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: flex;
  flex-direction: column;
}

.media-card img,
.media-card video {
  width: 100%;
  height: auto;
  min-height: 300px; 
  max-height: 500px;
  object-fit: contain;
  display: block;
  background: #000;
}

.media-caption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  background: rgba(0,0,0,0.3);
}

/* ======================================================= */
/* FLÈCHES */
/* ======================================================= */
.ms-btn {
  background: rgba(30, 144, 255, 0.15);
  border: 2px solid rgba(30, 144, 255, 0.3);
  color: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 20px;
  transition: all 0.2s;
  position: absolute;
  top: 50%;
  z-index: 20;
  transform: translateY(-50%);
}

.ms-prev {
  left: -20px;
}

.ms-next {
  right: -20px;
}

@media (max-width: 950px) {
  .ms-prev { left: 10px; }
  .ms-next { right: 10px; }
}

.ms-btn:hover {
  background: rgba(30,144,255,0.25);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}
.ms-btn:active { transform: translateY(-50%) scale(0.95); }
.ms-btn:disabled { 
  opacity: 0.3; 
  cursor: not-allowed; 
  transform: translateY(-50%) scale(1);
  pointer-events: none;
}

/* Dots de navigation */
.ms-dots {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  justify-content: center;
  z-index: 10;
}
.ms-dot {
  width: 10px; 
  height: 10px; 
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer; 
  transition: all 0.3s; 
  padding: 0;
}
.ms-dot:hover { background: rgba(255,255,255,0.4); transform: scale(1.2); }
.ms-dot[aria-selected="true"] { 
  background: var(--accent); 
  border-color: var(--accent); 
  box-shadow: 0 0 12px rgba(30,144,255,0.6); 
  transform: scale(1.3); 
}

/* Responsive */
@media (max-width: 520px) {
  .ms-btn { display: none; }
  .media-slider { gap: 0; margin-bottom: 40px; }
}

/* Styles Tableau */
.project-structure-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 14px;
  border-radius: var(--radius);
  overflow: hidden;
}
.project-structure-table th, 
.project-structure-table td { padding: 14px 18px; text-align: left; }
.project-structure-table thead { background-color: var(--accent); color: var(--bg-900); }
.project-structure-table th { font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.project-structure-table td { color: var(--muted); background-color: var(--panel); border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.project-structure-table tbody tr:nth-child(even) td { background-color: var(--card); }
.project-structure-table td strong { color: #eaf6ff; font-weight: 600; }
.project-structure-table tbody tr:hover td { background-color: rgba(30, 144, 255, 0.15); color: #f8fbff; transform: scale(1.005); transition: all 0.2s ease-out; }

/* ==========================================================================
   STYLES SPÉCIFIQUES PAR PROJET (IMAGES)
   ========================================================================== */

/* Projet CMS */
#slider-cms .ms-slide img,
#slider-cms .ms-slide video {
  min-height: 350px !important;
  max-height: 600px !important;
  object-fit: contain !important; 
  width: 100%;
  height: auto;
  display: block; 
}

/* Projet Harry Potter */
#slider-harry-potter .ms-slide img {
  min-height: 400px !important; 
  max-height: 700px !important;
  object-fit: contain !important;
  width: 100%;
  height: auto;
  display: block;
}