/* ========================= */
/*        VARIABLES          */
/* ========================= */

:root {
  --bg-light: #f7f7f7;
  --text-light: #1a1a1a;
  --bg-dark: #151915;
  --text-dark: #ececec;

  --bg-button-light: #e8e6e6;
  --bg-button-dark: #444;

  --card-light: rgba(0,0,0,0.05);
  --card-dark: rgba(255,255,255,0.05);

  --border-light: rgba(0,0,0,0.15);
  --border-dark: rgba(255,255,255,0.15);

  --accent: #6c63ff;
  --radius: 10px;
  --transition: 0.3s;
}

[data-theme="light"] {
  --bg: var(--bg-light);
  --text: var(--text-light);
  --btn-bg: var(--bg-button-light);
  --card-bg: var(--card-light);
  --border: var(--border-light);
}

[data-theme="dark"] {
  --bg: var(--bg-dark);
  --text: var(--text-dark);
  --btn-bg: var(--bg-button-dark);
  --card-bg: var(--card-dark);
  --border: var(--border-dark);
}

/* ========================= */
/*       RESET + GLOBAL      */
/* ========================= */

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

.layout {
  display: flex;
  flex-direction: column;
}

.content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ========================= */
/*         SIDEBAR           */
/* ========================= */

.sidebar {
  background: #111;
  color: #fff;
}

.sidebar-topbar,
.sidebar-inner {
  padding: 12px 16px;
}

.sidebar-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #222;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: bold;
}

.brand-role {
  font-size: 0.75rem;
  color: #bbbbbb;
}

.burger {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid #fff;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  cursor: pointer;
}

.burger span {
  height: 2px;
  width: 100%;
  background: #fff;
}

.sidebar-inner {
  display: none;
  flex-direction: column;
  background: #111;
  animation: fadeIn 0.3s ease-in-out;
}

.sidebar-inner.open {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================= */
/*        NAVIGATION         */
/* ========================= */

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}

.nav-links a {
  color: #eee;
  font-size: 1.1rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
}

.social-links,
.lang-switch {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.social-links a {
  color: #ccc;
  font-size: 1.2rem;
  transition: color var(--transition);
}

.social-links a:hover {
  color: #fff;
}

.lang-switch button {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.lang-switch button.active,
.lang-switch button:hover {
  color: #fff;
  font-weight: bold;
}

/* ========================= */
/*         CONTENT           */
/* ========================= */

.Gr_Partie {
  margin-bottom: 24px;
  width: 100%;
  max-width: 800px;
  min-height: 800px;
}

.section-divider {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 12px auto 24px;
  border-radius: 2px;
}


.skill-category-title {
  font-size: 1.3rem;
  margin: 30px 0 12px;
  text-align: left;
  width: 100%;
  opacity: 0.9;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  width: 100%;
  margin-bottom: 20px;
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .2s ease, background .2s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  background: rgba(0,0,0,0.08);
}

[data-theme="dark"] .skill-card:hover {
  background: rgba(255,255,255,0.12);
}

.skill-card i {
  font-size: 1.8rem;
}

.skill-card img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.skill-info {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.skill-info span {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.skill-level {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  width: var(--level);
  background: var(--accent);
  border-radius: 4px;
  transition: width 1s ease;
}



.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.Projet {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: var(--card-bg);
}

.ImgProj {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}



footer {
  margin-top: 24px;
  font-size: 0.85rem;
  text-align: center;
  color: #666;
}



@media (min-width: 768px) {

  .layout {
    flex-direction: row;
    height: 100vh;
    overflow: hidden;
  }

  .sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 40px 30px;
    gap: 40px;
  }

  .sidebar-topbar {
    display: none;
  }

  .sidebar-inner {
    display: flex !important;
    flex-direction: column;
    gap: 40px;
    height: 100%;
    padding: 0;
  }

  .sidebar-header {
    display: block;
    text-align: center;
  }

  .content {
    margin-left: 260px;
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 40px;
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


.theme-button {
  display: inline-block;
  padding: 10px 16px;
  background: var(--btn-bg);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.theme-button:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}


.cv-button {
  display: inline-block;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.cv-button:hover {
  background: #584ef2;
  transform: translateY(-2px);
}


/* Par défaut : mobile */
.sidebar-topbar {
  display: flex;
}

.sidebar-header {
  display: none;
}

/* Desktop : on inverse */
@media (min-width: 768px) {
  .sidebar-topbar {
    display: none;
  }

  .sidebar-header {
    display: block;
  }
}
