:root {
  --bg-image: url("../ressources/fond.jpg");

  --win-bg: rgba(192, 192, 192, 0.96);
  --win-panel: rgba(255, 255, 255, 0.95);
  --win-panel-2: rgba(248, 248, 248, 0.98);
  --win-border-light: #ffffff;
  --win-border-mid: #8c8c8c;
  --win-border-deep: #202020;
  --title-blue: linear-gradient(90deg, #0f2f82 0%, #2f68db 100%);
  --text: #111;
  --muted: #4f4f4f;
  --shadow: 5px 5px 0 rgba(0, 0, 0, 0.32);

  --comp-comprendre: #cf3e3e;
  --comp-concevoir: #e98c20;
  --comp-exprimer: #dcc225;
  --comp-developper: #2d8b58;
  --comp-entreprendre: #2f6fd6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  background:
    linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.42)),
    var(--bg-image) center center / cover fixed no-repeat;
  overflow-x: hidden;
}

button,
input,
a {
  font: inherit;
}

.hidden {
  display: none !important;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.08) 0px,
      rgba(0, 0, 0, 0.08) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: multiply;
  z-index: 9999;
}

/* WINDOWS */
.boot-window,
.hero-window,
.window,
.modal-window {
  background: var(--win-bg);
  border-top: 2px solid var(--win-border-light);
  border-left: 2px solid var(--win-border-light);
  border-right: 2px solid var(--win-border-deep);
  border-bottom: 2px solid var(--win-border-deep);
  box-shadow: var(--shadow);
}

.title-bar {
  background: var(--title-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: bold;
}

.title-actions {
  display: flex;
  gap: 4px;
}

.title-actions span,
.close-btn {
  width: 16px;
  height: 16px;
  background: #c0c0c0;
  border-top: 1px solid var(--win-border-light);
  border-left: 1px solid var(--win-border-light);
  border-right: 1px solid var(--win-border-deep);
  border-bottom: 1px solid var(--win-border-deep);
  display: inline-grid;
  place-items: center;
  color: #111;
  font-size: 10px;
  line-height: 1;
}

.close-btn {
  cursor: pointer;
  padding: 0;
}

.window-body {
  background: var(--win-panel);
  padding: 18px;
}

/* LOGIN */
.boot-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 3000;
}

.boot-window {
  width: min(700px, 96vw);
  overflow: hidden;
}

.boot-body {
  padding: 26px;
}

.boot-status {
  margin-bottom: 20px;
}

.bootline {
  margin: 0 0 10px;
  font-size: 12px;
  color: #124333;
}

.boot-progress {
  width: 100%;
  height: 16px;
  background: #efefef;
  border: 2px inset #fff;
  overflow: hidden;
}

.boot-progress__bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2153c0, #5ea2ff);
  transition: width 0.35s ease;
}

.login-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  align-items: center;
  background: var(--win-panel-2);
  border: 2px inset #fff;
  padding: 24px;
}

.login-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 2px inset #fff;
  background: #efefef;
}

.login-content h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1;
}

.login-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: bold;
  color: #1743a8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.boot-subtitle {
  margin: 0 0 18px;
  font-size: 14px;
  color: #444;
}

.fake-input-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: bold;
}

.fake-input {
  width: 100%;
  max-width: 320px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 2px inset #fff;
  background: white;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-link,
.secondary-link,
.nav-btn,
.filter-btn,
.skill-tag,
.start-btn {
  font-family: inherit;
  cursor: pointer;
  border-top: 2px solid var(--win-border-light);
  border-left: 2px solid var(--win-border-light);
  border-right: 2px solid var(--win-border-deep);
  border-bottom: 2px solid var(--win-border-deep);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.hero-link:hover,
.secondary-link:hover,
.nav-btn:hover,
.filter-btn:hover,
.skill-tag:hover,
.start-btn:hover {
  transform: translateY(-1px);
}

.hero-link:active,
.secondary-link:active,
.nav-btn:active,
.filter-btn:active,
.skill-tag:active,
.start-btn:active {
  transform: translateY(0);
}

.hero-link {
  display: inline-block;
  padding: 10px 16px;
  text-decoration: none;
  color: #000;
  background: #c0c0c0;
  font-weight: bold;
}

.secondary-link {
  display: inline-block;
  padding: 10px 16px;
  background: #ececec;
  color: #000;
  text-decoration: none;
  font-weight: bold;
}

.ghost-link {
  color: #173d98;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
}

.login-tip {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* HERO */
.site-shell {
  min-height: 100vh;
}

.hero {
  min-height: 36vh;
  display: grid;
  place-items: center;
  padding: 28px 20px 20px;
}

.hero-content {
  width: min(1280px, 100%);
}

.hero-inner {
  padding: 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 18px;
  align-items: stretch;
}

.hero-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  color: #1743a8;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.02;
}

.hero-subtitle {
  margin: 14px 0 18px;
  font-size: 15px;
  line-height: 1.7;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-panels {
  display: grid;
  gap: 12px;
}

.hero-panel {
  background: linear-gradient(145deg, #ffffff, #edf3ff);
  border: 2px inset #fff;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -20px -20px auto;
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, rgba(47,111,214,0.14), transparent 70%);
}

.hero-panel__number {
  display: block;
  font-size: 24px;
  font-weight: bold;
  color: #123da3;
}

.hero-panel__label {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* LAYOUT */
.desktop {
  display: grid;
  grid-template-columns: 295px 1fr;
  gap: 18px;
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 0 0 10px;
}

.sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
}

.profile-card {
  text-align: center;
}

.profile-image {
  width: 150px;
  height: 150px;
  object-fit: cover;
  display: block;
  margin: 0 auto 12px;
  background: #fff;
  border-top: 2px solid var(--win-border-light);
  border-left: 2px solid var(--win-border-light);
  border-right: 2px solid var(--win-border-deep);
  border-bottom: 2px solid var(--win-border-deep);
}

.profile-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.profile-role,
.profile-text {
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 10px;
  text-align: left;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.nav-btn,
.filter-btn {
  background: #c0c0c0;
  color: #000;
  padding: 8px 10px;
  font-size: 12px;
}

.nav-btn.is-active,
.filter-btn.is-active {
  background: #dcdcdc;
  font-weight: bold;
}

.skill-shortcuts {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.skill-tag {
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  background: #c0c0c0;
}

.skill-comprendre { background: var(--comp-comprendre); }
.skill-concevoir { background: var(--comp-concevoir); }
.skill-exprimer { background: var(--comp-exprimer); color: #222; }
.skill-developper { background: var(--comp-developper); }
.skill-entreprendre { background: var(--comp-entreprendre); }

.main-content {
  display: grid;
  gap: 18px;
}

.content-window {
  display: none;
}

.content-window.is-visible {
  display: block;
  animation: fadeInWindow 0.22s ease;
}

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

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.about-block,
.highlight-box {
  background: #fafafa;
  border: 2px inset #fff;
  padding: 16px;
}

.about-block h3,
.highlight-box h4 {
  margin-top: 0;
}

.about-block p,
.highlight-box p,
.highlight-box li {
  font-size: 14px;
  line-height: 1.7;
}

.highlight-box + .highlight-box {
  margin-top: 12px;
}

/* FILTERS */
.toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.toolbar-label {
  min-width: 95px;
  font-weight: bold;
  font-size: 13px;
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 18px;
}

.project-card {
  background: linear-gradient(180deg, rgba(252, 252, 252, 0.99), rgba(239, 239, 239, 0.98));
  border-top: 2px solid var(--win-border-light);
  border-left: 2px solid var(--win-border-light);
  border-right: 2px solid var(--win-border-deep);
  border-bottom: 2px solid var(--win-border-deep);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.16);
}

.project-card__button {
  width: 100%;
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.project-card__media {
  position: relative;
  overflow: hidden;
}

.project-card__media img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  background: #9d9d9d;
  transition: transform 0.35s ease;
}

.project-card:hover .project-card__media img {
  transform: scale(1.035);
}

.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.22), transparent 45%);
  pointer-events: none;
}

.project-card__body {
  padding: 14px;
}

.project-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.project-card__meta-row span {
  display: inline-block;
  padding: 4px 7px;
  font-size: 11px;
  border: 1px solid #8f8f8f;
  background: #f2f2f2;
}

.project-card__title {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

.project-card__description {
  margin: 0 0 12px;
  line-height: 1.58;
  font-size: 13px;
}

.project-card__domains {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.project-card__ac {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card__ac span {
  display: inline-block;
  padding: 4px 7px;
  font-size: 11px;
  border: 1px solid #777;
  background: #f7f7f7;
}

.domain-chip {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid rgba(0,0,0,0.25);
}

.domain-chip--comprendre { background: var(--comp-comprendre); color: #fff; }
.domain-chip--concevoir { background: var(--comp-concevoir); color: #fff; }
.domain-chip--exprimer { background: var(--comp-exprimer); color: #222; }
.domain-chip--developper { background: var(--comp-developper); color: #fff; }
.domain-chip--entreprendre { background: var(--comp-entreprendre); color: #fff; }

/* AC */
.ac-intro {
  margin-top: 0;
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.6;
}

.table-wrap {
  overflow-x: auto;
}

.ac-category {
  margin-bottom: 14px;
  border-top: 2px solid var(--win-border-light);
  border-left: 2px solid var(--win-border-light);
  border-right: 2px solid var(--win-border-deep);
  border-bottom: 2px solid var(--win-border-deep);
  background: rgba(255,255,255,0.96);
  overflow: hidden;
}

.ac-category__header {
  width: 100%;
  border: 0;
  text-align: left;
  padding: 12px 14px;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: filter 0.12s ease;
}

.ac-category__header:hover {
  filter: brightness(1.04);
}

.ac-category__header span:last-child {
  font-size: 18px;
}

.ac-category--comprendre .ac-category__header { background: var(--comp-comprendre); color: #fff; }
.ac-category--concevoir .ac-category__header { background: var(--comp-concevoir); color: #fff; }
.ac-category--exprimer .ac-category__header { background: var(--comp-exprimer); color: #222; }
.ac-category--developper .ac-category__header { background: var(--comp-developper); color: #fff; }
.ac-category--entreprendre .ac-category__header { background: var(--comp-entreprendre); color: #fff; }

.ac-category__content {
  padding: 0;
}

.ac-category.is-collapsed .ac-category__content {
  display: none;
}

.ac-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.96);
  font-size: 13px;
}

.ac-table th,
.ac-table td {
  border: 1px solid #b7b7b7;
  padding: 8px 10px;
  vertical-align: top;
}

.ac-table th {
  background: #002b9a;
  color: white;
  text-align: left;
}

.ac-level-row td {
  background: #efefef;
  font-weight: bold;
  color: #666;
  font-size: 12px;
}

.ac-table td:nth-child(1) {
  width: 95px;
  font-weight: bold;
  color: #1b35a8;
}

.ac-table td:nth-child(3) {
  width: 80px;
  text-align: center;
  font-size: 20px;
}

.ac-table td:nth-child(4) {
  width: 290px;
}

/* FOOTER */
.desktop-footer {
  width: min(1280px, calc(100% - 24px));
  margin: 26px auto 90px;
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  padding: 30px 0 0;
  border-top: 2px dashed rgba(255,255,255,0.35);
}

.desktop-icon {
  width: 92px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: white;
  text-shadow: 1px 1px 2px #000;
  transition: transform 0.14s ease;
}

.desktop-icon:hover {
  transform: translateY(-2px);
}

.desktop-icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.desktop-icon span {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  padding: 2px;
}

.desktop-icon:hover span {
  background: #000080;
}

/* TASKBAR */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  z-index: 100;
}

.start-btn {
  padding: 7px 12px;
  font-weight: bold;
  background: #c0c0c0;
}

.taskbar-window,
.clock {
  background: #d4d0c8;
  padding: 7px 10px;
  border-top: 2px solid var(--win-border-deep);
  border-left: 2px solid var(--win-border-deep);
  border-right: 2px solid var(--win-border-light);
  border-bottom: 2px solid var(--win-border-light);
  font-size: 12px;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 1000;
}

.modal-window {
  width: min(1120px, 96vw);
  max-height: 90vh;
  overflow: hidden;
}

.modal-body {
  max-height: calc(90vh - 40px);
  overflow: auto;
}

.project-detail {
  font-size: 14px;
  line-height: 1.65;
}

.project-detail h2,
.project-detail h3,
.project-detail h4 {
  margin-top: 0;
}

.project-detail p,
.project-detail li {
  line-height: 1.65;
}

.project-detail ul {
  padding-left: 18px;
}

.project-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.project-header-meta span {
  display: inline-block;
  background: #ececec;
  border: 1px solid #888;
  padding: 4px 8px;
  font-size: 12px;
}

.project-domains {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.project-rich-block {
  margin-bottom: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #fafafa, #f3f3f3);
  border: 1px solid #a7a7a7;
}

.project-rich-block--accent {
  background: linear-gradient(180deg, #f5f8ff, #eef3ff);
  border-color: #8da8e6;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.project-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #ddd;
  border: 1px solid #888;
  cursor: zoom-in;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.project-gallery img:hover {
  transform: scale(1.02);
  filter: brightness(1.03);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: grid;
  place-items: center;
  z-index: 1200;
  padding: 20px;
}

.lightbox img {
  max-width: 90vw;
  max-height: 84vh;
  object-fit: contain;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: #c0c0c0;
  color: #111;
  border-top: 2px solid var(--win-border-light);
  border-left: 2px solid var(--win-border-light);
  border-right: 2px solid var(--win-border-deep);
  border-bottom: 2px solid var(--win-border-deep);
  cursor: pointer;
}

.lightbox__close {
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  font-size: 24px;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 52px;
  font-size: 28px;
}

.lightbox__nav--prev {
  left: 18px;
}

.lightbox__nav--next {
  right: 18px;
}

.lightbox__counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 13px;
  text-shadow: 1px 1px 2px black;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .desktop {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .about-grid,
  .hero-grid,
  .login-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 30vh;
    padding-top: 20px;
  }

  .toolbar-label {
    width: 100%;
    min-width: 0;
  }

  .taskbar {
    grid-template-columns: 1fr;
    height: auto;
  }

  .desktop-footer {
    margin-bottom: 110px;
    gap: 18px;
  }

  .desktop-icon {
    width: 72px;
  }

  .desktop-icon img {
    width: 40px;
    height: 40px;
  }

  .desktop-icon span {
    font-size: 10px;
  }

  .project-card__media img,
  .project-gallery img {
    height: 165px;
  }
}