/* =========================================
   PAGE : projects
   ========================================= */

/* Conteneur global */
.project-detail {
  background: #fff;
  padding-block: clamp(2rem, 4vw, 5rem);
  border-radius: 0.75rem;
  box-shadow: 0 0.6rem 2rem rgb(0 0 0 / 5%);
  overflow-x: hidden;
}

.project-detail .container {
  width: clamp(85%, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

/* Titres principaux */
.project-detail h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--secondary-color);
  text-align: left;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.3rem;
}

.project-detail h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--primary-color);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  border-left: 0.35rem solid var(--primary-color);
  padding-left: 2%;
}

/* Paragraphes et texte */
.project-detail p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.75;
  color: var(--text-color, #333);
  margin-bottom: clamp(1rem, 2.5vw, 2rem);
}

/* ===============================
   SECTIONS COMMUNES (style carte)
   =============================== */

.project-detail section {
  position: relative;
  background-color: #fff;
  border-radius: 0.625rem;
  padding: clamp(1rem, 3vw, 1.8rem);
  box-shadow: 0 0.3125rem 0.9375rem rgb(0 0 0 / 8%);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.project-detail section:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 0.5rem 1.25rem rgb(0 0 0 / 12%);
}

/* ===============================
   Listes
   =============================== */
.project-detail ul,
.project-detail ol {
  margin-left: clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  width: 95%;
}

.project-detail li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* ===============================
   Code & Préformaté
   =============================== */

.project-detail code {
  background-color: var(--light-color, #f5f5f5);
  color: var(--secondary-color, #444);
  padding: 0.25em 0.5em;
  border-radius: 0.4em;
  font-family: "Fira Code", monospace;
  font-size: 0.9em;
}

.project-detail pre {
  background-color: #0f1724;
  color: #e6eef8;
  padding: clamp(0.8rem, 2vw, 1.2rem);
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 15%);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

/* ===============================
   Tableaux
   =============================== */
.project-detail table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-block: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid #e2e2e2;
}

.project-detail th,
.project-detail td {
  padding: 0.6rem;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

.project-detail th {
  background-color: var(--light-color, #f6f6f6);
  color: var(--secondary-color);
  font-weight: 700;
}

/* ===============================
   Figures et galeries
   =============================== */
figure {
  margin-block: clamp(1rem, 3vw, 2rem);
  text-align: center;
}

figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 10%);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

figure img:hover {
  transform: scale(1.02);
  box-shadow: 0 0.5rem 1.25rem rgb(0 0 0 / 15%);
}

figure figcaption {
  font-size: 0.9rem;
  color: var(--medium-light-color, #666);
  margin-top: 0.5rem;
}

/* ===============================
   Galerie (3 images flex)
   =============================== */
.project-gallery > div {
  display: flex;
  flex-wrap: wrap;
  gap: 2%;
  justify-content: center;
}

.project-gallery figure {
  flex: 1 1 30%;
  min-width: 220px;
}

/* ===============================
   Disposition spécifique de sections
   =============================== */

/* Bloc technique */
.project-technical-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 3%;
}

.project-technical-stack > div {
  flex: 1 1 48%;
}

/* Bloc Snowflake paramètres */
.project-snowflake-params > div {
  display: flex;
  flex-wrap: wrap;
  gap: 2%;
}

.project-snowflake-params > div > div {
  flex: 1 1 48%;
  background-color: var(--light-color, #fafafa);
  border-radius: 0.5rem;
  padding: clamp(0.8rem, 2vw, 1rem);
}

/* ===============================
   Arborescence & arbres JSON
   =============================== */
#file-tree {
  background-color: #fafafa;
  border-radius: 0.5rem;
  padding: clamp(0.8rem, 2vw, 1.2rem);
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  overflow-x: auto;
}

/* ===============================
   Responsive
   =============================== */
@media (width <= 900px) {
  .project-technical-stack > div,
  .project-snowflake-params > div > div {
    flex: 1 1 100%;
  }

  figure img {
    max-width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
}
