/* CORPS DE LA PAGE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  background-color: #0A0A0A;
  color: #E6ECEF;
  width: 100%;
}





/* HEADER */
/* ------------------------------------------------------------------ */

.header {
  width: 100%;
  background-color: #0A0A0A;
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 2px solid #CCCCCC;
}

/* topbar */
.header-topbar {
  background-color: #111111;
  color: #FFFFFF;
  font-size: 12px;
  padding: 6px 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 2px solid #CCCCCC;
}

.topbar-right a {
  margin-left: 15px;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.3s ease;
}

.topbar-right a:hover {
  background-color: #FFFFFF;
  color: #000000;
  padding: 2px 6px;
  border-radius: 4px;
}

/* barre principale */
.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  width: 100%;
}

/* logo */
.logo img {
  height: 50px;
  width: 50px;
  border: 2px solid #CCCCCC;
  border-radius: 8px;
}

/* navigation (menu) */
.nav {
  display: flex;
  align-items: center;
  position: relative;
}

.nav-list {
  display: flex;
  gap: 45px;
  list-style: none;
}

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 14px;   
  line-height: 1;
  border-radius: 6px;
}

.nav-link:hover {
  background-color: #E6ECEF;
  color: #000000;
  box-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.nav-toggle {
  display: none;      
  position: relative; 
  z-index: 1001;      
}




/* CONTENU */
/* ------------------------------------------------------------------ */

.container {
  max-width: 1140px;
  margin: auto;
  padding: 20px 20px 40px;
  width: 100%;
}

/* titre */
.page-title{
  text-align: center;
  font-size: 80px;
  line-height: 1.05;
  margin: 12px auto 16px;
  font-weight: 800;
  color: #E6ECEF;
}

.page-title::after{
  content: '';
  display: block;
  width: min(100%, 1140px);
  height: 2px;
  margin: 12px auto 0;
  background: #BFDFFF;
}

h2 {
  font-size: 45px;
  color: #E6ECEF;
  margin-top: 80px;
  margin-bottom: 30px;
}


.projects-grid{
  display:flex;
  flex-direction:column;
  gap:30px;
  justify-content:center;
}

.project-card{
  background:#0A0A0A;
  border:2px solid #BFDFFF;
  border-radius:12px;
  width:100%;
  padding:26px;
  box-shadow:0 0 8px rgba(255,255,255,.05);
  transition:transform .3s ease, box-shadow .3s ease;

  display:grid;
  grid-template-columns: 420px 1fr;          
  grid-template-areas:
    "header      description"
    "buttons     extra";
  column-gap:24px;                           
  row-gap:18px;                               
  align-items:start;
}

.project-card:hover{ transform:translateY(-4px); box-shadow:0 0 15px rgba(255,255,255,.1); }

/* Colonne gauche */
.project-header {
  grid-area: header;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:26px;
}
                                 
.project-header img {
  width:420px;
  height:420px;
  object-fit:cover;
  border-radius:12px;
  border:2px solid #E6ECEF;
}

/* Boutons sous l'image */
.download-buttons{
  grid-area:buttons;
  display:flex;
  flex-direction:column;
  align-items:stretch; 
  gap:15px;
  margin:0;
}

.btn-download{
  display:inline-block;
  width:100%;           
  text-align:center;
  padding:8px 14px;
  background:#0A0A0A;
  color:#E6ECEF;
  border:2px solid #E6ECEF;
  border-radius:12px;
  text-decoration:none;
  font-size:15px;
  transition:background .3s,color .3s,box-shadow .3s;
}

.btn-download:hover{ background:#000; color:#fff; box-shadow:0 0 8px rgba(0,0,0,.35); }


.description{
  grid-area:description;
  font-size:20px;
  color:#E6ECEF;
  line-height:1.8;
  background:#2A2A2A;
  border-radius:12px;
  text-align:justify;
  border:2px solid #E6ECEF;
  padding:26px;   /* demandé */
  margin-top: 26px;
}


.project-extra{
  grid-area:extra;              
  display:flex;
  justify-content:center;
  align-items:center;
  gap:120px;
  margin:8px 0 0 0;             
  padding: 26px;                  
}
.project-extra .flag{
  width:40px;
  height:auto;
  border:2px solid #E6ECEF;
  border-radius:6px;
}
.project-extra .stars{ font-size:20px; color:gold; }

/* FOOTER */
/* ------------------------------------------------------- */

.footer {
  background-color: #0e0e0e;
  color: #E6ECEF;
  padding: 40px 20px 10px;
  font-size: 14px;
  border-top: 2px solid #CCCCCC;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.footer-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
  gap: 30px;
}

.footer-section h4 {
  color: #E6ECEF;
  font-size: 15px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 6px;
}

.footer-section a {
  color: #E6ECEF;
  text-decoration: none;
  transition: 0.2s ease;
}

.footer-section a:hover {
  color: #CCCCCC; 
}

.footer-bottom {
  text-align: center;
  margin-top: 10px;
  font-size: 15px;
  color: #E6ECEF;
}

.footer-divider {
  width: 80%;
  max-width: 4000px;
  margin-top: 15px;
  border-top: 1px solid #CCCCCC;
  width: 100%;
}

.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #CCCCCC;
  color: #000;
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 8px;
  opacity: 0.7;
  transition: all 0.3s ease;
  z-index: 999;
}

.scroll-top:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ------------------ Responsive ------------------ */
@media (max-width: 900px) {
  .project-card {
    display: grid; /* nécessaire si tu utilises grid-template-areas */
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "buttons"
      "description"
      "extra";
  }
  .project-extra { gap: 40px; }
}

@media (max-width: 768px) {
  /* Header compact + burger harmonisé */
  .header { z-index: 9990; }
  .header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
  }
  .logo img { width: 40px; height: 40px; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 26px;
    cursor: pointer;
    margin-left: auto;
    position: relative;
    z-index: 10001;
  }
  .nav-toggle span {
    height: 3px;
    background-color: #FFFFFF;
    border-radius: 2px;
    display: block;
  }

  /* Menu fermé par défaut */
  .nav-list { display: none; }

  /* Menu ouvert : plein écran sous le header, scrollable */
  .nav-list.active {
    display: flex;
    flex-direction: column;
    gap: 14px;

    position: fixed;
    top: 64px;             /* ajuste si ton header est un peu + haut */
    left: 0; right: 0; bottom: 0;

    padding: 16px;
    background-color: #0A0A0A;
    border-top: 1px solid #CCCCCC;
    z-index: 10000;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-list li { margin: 0; text-align: left; }
  .nav-link { display: block; padding: 14px 10px; }

  /* Titres compacts */
  h1 { font-size: 38px; margin-bottom: 20px; }
  h2 { font-size: 24px; margin: 28px 0 16px; }

  /* Grille de projet : 1 colonne empilée, zones réordonnées proprement */
  .projects-grid { gap: 20px; }

  .project-card{
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "buttons"
      "description"
      "extra";
    row-gap: 14px;
    column-gap: 0;
    padding: 16px;
  }

  /* Image de tête : pleine largeur, ratio carré agréable */
  .project-header { padding: 0; }
  .project-header img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;      /* carré responsive */
    object-fit: cover;
    border-radius: 12px;
  }

  /* Boutons : pleine largeur, séparés */
  .download-buttons{
    gap: 10px;
    margin: 0;
  }
  .btn-download{
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
  }

  /* Description : texte plus compact */
  .description{
    font-size: 16px;
    line-height: 1.7;
    padding: 16px;
    margin-top: 0;
  }

  /* Drapeau + étoiles : en colonne */
  .project-extra{
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 0;
  }
  .project-extra .flag{ width: 36px; }
  .project-extra .stars{ font-size: 18px; }

  /* Container & footer */
  .container { padding: 24px 16px; }
  .footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Bouton remonter */
  .scroll-top {
    bottom: 18px;
    right: 18px;
    font-size: 18px;
    padding: 8px 10px;
  }
}