/* --- CONFIGURATION & VARIABLES --- */
:root {
  --font-header: "Special Elite", cursive;
  --font-tech: "Courier Prime", "Courier New", Courier, monospace;
  --ink-color: #2b2b2b;
  --paper-color: #ffffffd3;
  --blueprint-blue: #1a3a6c;
  --blueprint-ink: #e0e0e0;
  --accent-ink: #3a5a8c; /* Bleu Blueprint / Encre de stylo plume */
  --stamp-red: #a63d2d; /* Rouge tampon séché */
  --hover-bg: rgba(58, 90, 140, 0.1); /* Surbrillance légère */
}

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

html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden; /* Verrouille le viewport pour le look "plan fixe" */
  background-color: var(--paper-color);
  color: var(--ink-color);
  font-family: var(--font-tech);
  -webkit-font-smoothing: antialiased;
}

article h3 {
  margin-top: 50px;
  line-height: 2.5;
}
/* --- LAYOUT PRINCIPAL --- */
.patent-layout {
  height: 100vh;
  width: 100vw;
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.patent-frame {
  flex: 1;
  /* border: 1px solid var(--ink-color); */
  position: relative;
  padding: 25px;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Garde les cartouches et bordures en place */
  /* width: 100vw; */
  /* height: 100vh; */
  /* Étape 1 : Créer un dégradé très large (400%) pour pouvoir naviguer dedans */
  background: linear-gradient(
    140deg,
    #f4f1ea,
    #e0f2fe,
    #e6f4ea,
    #fef3c7,
    #e0f2fe,
    #f4f1ea
  );
  background-size: 400% 400%;
  animation: gradient 20s ease infinite;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 50% 100%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 50% 0%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.overlay-content {
  /* background: rgba(255, 255, 255, 0.2); */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
/* --- ZONE DE CONTENU (SCROLLABLE) --- */
.content {
  flex: 1;
  overflow-y: auto; /* Seul le texte défile si trop long */
  padding-right: 15px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.fx-center {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
}
/* Scrollbar discrète type dessin technique */
.content::-webkit-scrollbar {
  width: 4px;
}
.content::-webkit-scrollbar-thumb {
  background: var(--ink-color);
}

/* --- CARTOUCHE DE TITRE (HAUT) --- */
.title-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ink-color);
  padding-bottom: 15px;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-family: var(--font-header);
}

.patent-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.project-id,
.serial-number {
  font-size: 0.75rem;
  border: 1px solid var(--ink-color);
  padding: 4px 10px;
}

/* --- CARTOUCHE TECHNIQUE (BAS DROITE) --- */
.technical-stamp {
  position: absolute;
  bottom: 15px;
  right: 15px;
  border: 1px solid var(--ink-color);
  background-color: var(--paper-color);
  width: 220px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.stamp-row {
  display: flex;
  border-bottom: 1px solid var(--ink-color);
  font-size: 0.7rem;
}

.stamp-row:last-child {
  border-bottom: none;
}

.label {
  padding: 6px;
  border-right: 1px solid var(--ink-color);
  width: 80px;
  background-color: rgba(0, 0, 0, 0.03);
  font-family: var(--font-header);
}

.value {
  padding: 6px;
  flex: 1;
  font-weight: bold;
  text-transform: uppercase;
}

.signature .value {
  font-size: 1rem;
  text-align: center;
}

/* --- ILLUSTRATIONS & SVG --- */
.patent-illustration {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.patent-svg {
  max-width: 100%;
  max-height: 350px;
  height: auto;
}

/* --- VARIANTE BLUEPRINT --- */
.patent-frame.blueprint {
  background-color: var(--blueprint-blue);
  color: var(--blueprint-ink);
  border-color: var(--blueprint-ink);
}

.patent-frame.blueprint * {
  border-color: var(--blueprint-ink);
}

.patent-frame.blueprint .technical-stamp {
  background-color: var(--blueprint-blue);
}
.patent-nav {
  display: flex;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 0.8rem;
}

.nav-label {
  font-family: var(--font-header);
  font-weight: bold;
  margin-right: 15px;
  text-decoration: underline;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav-list li a {
  text-decoration: none;
  color: var(--ink-color);
  font-family: var(--font-tech);
  transition: all 0.2s ease;
}

/* Effet au survol : on simule un surlignage au feutre ou une inversion */
.nav-list li a:hover {
  background-color: var(--ink-color);
  color: var(--paper-color);
  padding: 2px 5px;
}

/* Style pour la page active */
.nav-list li a[aria-current="page"] {
  font-weight: bold;
  border: 1px solid var(--ink-color);
  padding: 2px 5px;
}
/* Style de base des liens dans le contenu */
.content a {
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-ink);
  transition: all 0.2s ease-in-out;
}

/* État : Survol (Hover) */
.content a:hover {
  color: var(--ink-color);
  background-color: var(--hover-bg);
  border-bottom: 1px solid var(--ink-color);
}

/* État : Visité */
/* On évite le violet moche, on part sur un bleu plus gris/éteint */
.content a:visited {
  color: #5a6a82;
}

/* Navigation (Index) spécifique */
.nav-list li a {
  color: var(--ink-color);
  font-weight: bold;
}

.nav-list li a:hover {
  color: var(--accent-ink);
  background-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Lien actif (page actuelle) - Couleur Tampon */
.nav-list li a[aria-current="page"] {
  color: var(--stamp-red);
  border: 1px solid var(--stamp-red);
  padding: 2px 8px;
  transform: rotate(-1deg); /* Petit effet "tamponné à la main" */
  display: inline-block;
}

/* Grille des cartes */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0;
  margin: 0 auto;
  max-width: 1200px;
}

/* Style de chaque carte */
.post-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.post-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Image de la carte */
.post-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #eee; /* Couleur de fond en attendant le chargement */
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Contenu de la carte */
.post-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-card-title {
  font-size: var(--text-h4);
  margin: 0 0 0.5rem 0;
  color: #333;
}

.post-card-description {
  font-size: var(--base-size);
  color: #666;
  margin: 0 0 1rem 0;
  line-height: var(--lh-body);
}

.post-card-date {
  font-size: var(--text-small);
  color: #999;
  display: block;
  margin-top: auto;
}
.post-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
}
@media (max-width: 767px) {
  .technical-stamp {
    bottom: 0;
    right: 0;
  }
  .patent-layout {
    padding: 15px 0;
  }
  .post-list {
    grid-template-columns: 1fr;
    padding: 20px 0;
  }
}

.post-card-content {
  background-color: var(--paper-color);
}
