/* ===== DESIGN SYSTEM VARIABLES ===== */
:root {
  /* Colors */
  --color-text: #000000;
  --color-accent: #efb93d;
  --color-bg-light: #ffffff;
  --color-bg-dark: #000000;
  --color-text-light: #ffffff;
  --light-color: #f9f9f9;

  /* Typography */
  --font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-bold: 900;

  /* Spacing System */
  --spacing-xs: 0.5rem; /* 8px */
  --spacing-sm: 1rem; /* 16px */
  --spacing-md: 1.5rem; /* 24px */
  --spacing-lg: 2rem; /* 32px */
  --spacing-xl: 3rem; /* 48px */
  --spacing-xxl: 4rem; /* 64px */

  /* Container */
  --container-max-width: 1200px;
  --container-padding: var(--spacing-sm);

  /* Height for all thumbnails (uniform but responsive) */
  --thumb-h: clamp(160px, 24vw, 220px);

  /* Font Sizes */
  --font-size-hero: clamp(2.5rem, 8vw, 4.5rem);
  --font-size-h1: clamp(2rem, 4vw, 3rem);
  --font-size-h2: clamp(1.25rem, 2vw, 1.5rem);
  --font-size-body: clamp(1rem, 2vw, 1.125rem);
  --font-size-small: 0.95rem;

  /* === Boutons (manquants) === */
  --btn-padding: 0.75rem 1.25rem;
  --btn-font-weight: 700;
  --btn-font-size: 0.9rem;
  --btn-radius: 999px;
  --btn-transition: all 0.25s ease;
  --btn-letter-spacing: 0;
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-padding-top: 82px;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg-light);
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10000;
  transform: translateY(-150%);
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ===== LAYOUT SYSTEM ===== */
.section {
  width: 100%;
  padding: var(--spacing-xxl) 0;
}
.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
}
.section--light {
  background-color: var(--color-bg-light);
  color: var(--color-text);
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}
.text-center {
  text-align: center;
}

/* ===== HEADER / NAVBAR ===== */
.site-header {
  background: #ffffff;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  height: 40px;
  width: auto; /* width/height du HTML : ratio réservé, taille fixée ici */
}

.nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav a {
  color: #000000;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: color 0.3s ease;
  font-family: var(--font-family);
}
.nav a:hover {
  color: #efb93d;
}

/* BURGER MENU */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.burger span {
  display: block;
  width: 25px;
  height: 3px;
  background: #000000;
}

/* ===== RESPONSIVE NAV ===== */
/* 8 liens : menu resserré jusqu'à 1279 px, burger jusqu'à 1150 px */
@media (max-width: 1279px) {
  .nav ul {
    gap: 0.75rem;
  }
  .nav a {
    font-size: 0.8rem;
  }
}
@media (max-width: 1150px) {
  .burger {
    display: flex;
  }
  .nav {
    position: fixed;
    top: 70px;
    right: 0;
    background: #ffffff;
    width: 100%;
    transform: translateY(-200%);
    transition: transform 0.3s ease;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
  }
  body.menu-open .nav {
    transform: translateY(0);
  }
  .nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
  }
  .nav a {
    font-size: 0.95rem;
  }
}

/* ===== TYPOGRAPHY ===== */
.hero-title {
  font-size: var(--font-size-hero);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-light);
  letter-spacing: 0;
}

.section-title {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-sm);
  position: relative;
  display: inline-block;
}
.card-title::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-accent);
  display: block;
}

.subtitle {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-light);
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: var(--spacing-xl);
}
.body-text {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  margin: var(--spacing-sm) 0;
}
.light-text {
  font-weight: var(--font-weight-light);
  opacity: 0.8;
}

/* ===== COMPONENTS ===== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #ffffff;
}
.hero picture,
.hero picture img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.58);
  z-index: 2;
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: var(--spacing-lg) var(--spacing-sm);
  animation: fadeInUp 1.2s ease-out;
  /* background-color: color-text; */
}
.hero__accent {
  color: var(--color-accent);
}
.hero__subtitle {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: var(--font-weight-light);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-xl);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}
.cta-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-small);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
}
.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-text);
  box-shadow: 0 4px 15px rgba(239, 185, 61, 0.3);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 185, 61, 0.4);
}
.btn--secondary {
  background-color: transparent;
  color: var(--color-text-light);
  border: 2px solid #ffffff;
}
.btn--secondary:hover {
  background-color: var(--color-accent);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--color-text);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-xl) var(--spacing-lg);
}
.skill-card {
  text-align: center;
}
.skill-card__icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}

.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}
.stat {
  text-align: center;
}
.stat__number {
  font-size: 3rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  margin: 0;
}
.stat__number[data-target] {
  opacity: 1;
}
.stat__label {
  font-weight: var(--font-weight-regular);
  opacity: 0.8;
  margin-top: var(--spacing-xs);
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
  color: var(--color-accent) !important;
  transform: translateY(-2px);
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  background: var(--color-accent) !important;
  color: #000000 !important;
  transform: translateY(-5px) scale(1.1);
}

.footer-legal-link:hover,
.footer-legal-link:focus-visible {
  color: var(--color-accent) !important;
}

.scroll-indicator {
  position: absolute;
  bottom: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.25rem;
}
.scroll-indicator__mouse {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  position: relative;
}
.scroll-indicator__wheel {
  width: 4px;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollIndicator 2s infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scrollIndicator {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.3;
    transform: translateX(-50%) translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section div[style*="flex-wrap: wrap"] {
    flex-direction: column !important;
    align-items: center !important;
  }
  section div[style*="flex-wrap: wrap"] a {
    width: 100% !important;
    max-width: 280px !important;
    text-align: center !important;
  }
}
@media (max-width: 768px) {
  #carouselContainer > div {
    min-width: 280px !important;
    flex: 0 0 calc(100% - 1rem) !important;
  }
  #prevBtn,
  #nextBtn {
    width: 35px !important;
    height: 35px !important;
    font-size: 1rem !important;
  }
}
@media (max-width: 1024px) and (min-width: 769px) {
  #carouselContainer > div {
    min-width: 300px !important;
    flex: 0 0 calc(50% - 1rem) !important;
  }
}
#carouselContainer > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}
@media (max-width: 768px) {
  /* mobile tweaks placeholder */
}
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes shine {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: 200px 0;
  }
}

/* ===== PAGE À PROPOS ===== */
.page-header {
  padding: 6rem 1rem 3rem;
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  text-align: center;
}
.page-header h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-sm);
}
.page-header p {
  font-size: 1.2rem;
  font-weight: var(--font-weight-light);
  opacity: 0.8;
}

.about-header {
  padding: 6rem 1rem 3rem;
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  text-align: center;
}
.about-header h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: 1rem;
}
.about-header p {
  font-size: 1.2rem;
  font-weight: var(--font-weight-light);
  opacity: 0.8;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-xl);
  align-items: center;
  margin-bottom: var(--spacing-xl);
}
.about-image {
  border-radius: 8px;
  overflow: hidden;
}
.about-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.about-text {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: 1.7;
}
.about-text p {
  margin-bottom: var(--spacing-md);
}
.highlight {
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}

.formation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}
.formation-card {
  background: var(--color-bg-light);
  padding: var(--spacing-lg);
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.formation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.formation-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}
.formation-title {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-sm);
}
.formation-subtitle {
  font-size: 1rem;
  font-weight: var(--font-weight-regular);
  opacity: 0.8;
  margin-bottom: var(--spacing-sm);
}
.formation-details {
  font-size: 0.9rem;
  font-weight: var(--font-weight-light);
  opacity: 0.7;
}

.experience-timeline {
  margin: var(--spacing-xl) 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}
.timeline-date {
  text-align: right;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  border-right: 4px solid var(--color-accent);
  padding-right: var(--spacing-md);
}
.timeline-content {
  padding-left: var(--spacing-md);
}
.timeline-title {
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-sm);
}
.timeline-company {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--spacing-sm);
}
.timeline-description {
  font-size: var(--font-size-body);
  line-height: 1.6;
}

.competences-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-lg);
  padding: var(--spacing-lg) 0;
}
.competence-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
  text-align: center;
}
.competence-item:hover {
  transform: translateY(-5px);
}
.competence-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: var(--spacing-sm);
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}
.competence-item:hover img {
  filter: grayscale(0%);
}
.competence-item p {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
  margin: 0;
}

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
  .timeline-date {
    text-align: left;
    border-right: none;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
  }
  .timeline-content {
    padding-left: 0;
  }
  .competences-logos {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  .competence-item {
    margin-bottom: var(--spacing-md);
  }
}

/* ===== PAGE CLASSES / LISTE ARTICLES ===== */
.page-header {
  padding: var(--spacing-xxl) var(--spacing-sm) var(--spacing-lg);
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  text-align: center;
}
.page-header h1 {
  font-size: var(--font-size-hero);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-sm);
}
.page-header p {
  font-size: 1.2rem;
  font-weight: var(--font-weight-light);
  opacity: 0.8;
}

header {
  padding: 6rem 1rem 3rem;
  background: #000;
  color: var(--color-text-light);
  text-align: center;
}
header h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  margin-bottom: 1rem;
}
header p {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.8;
}

/* Filtres */
.filters-wrapper {
  background: var(--color-bg-light);
  padding: var(--spacing-lg) var(--spacing-sm);
  text-align: center;
  border-bottom: 1px solid #eee;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}
.filter {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--font-size-small);
  text-transform: uppercase;
  letter-spacing: 0;
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  border-radius: 2rem;
  transition: var(--btn-transition);
}
.filter.active,
.filter:hover {
  color: var(--color-text);
  border-color: var(--color-accent);
  background: var(--color-accent);
}

/* Recherche */
.search-container {
  margin: 0 auto;
  max-width: 300px;
}
.search-container input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: var(--font-family);
}

/* Grille d'articles */
.grid {
  max-width: var(--container-max-width);
  margin: auto;
  padding: var(--spacing-xl) var(--spacing-sm);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.card:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}
.card .card-content {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card .tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: var(--spacing-xs);
  display: inline-block;
}
.card h3 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  margin: 0;
}
.card p {
  font-size: var(--font-size-small);
  color: #555;
  margin: 0;
}

.grid .card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
}

/* Vignette (thumb) : boîte stable + centrage */
.card .thumb {
  display: grid;
  place-items: center;
  height: var(--thumb-h);
  padding: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
}

/* Bouton charger plus */
.load-more {
  display: block;
  margin: var(--spacing-lg) auto;
  padding: var(--btn-padding);
  background-color: var(--color-accent);
  color: var(--color-text);
  font-weight: var(--btn-font-weight);
  font-size: var(--btn-font-size);
  border-radius: var(--btn-radius);
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: var(--btn-transition);
  letter-spacing: var(--btn-letter-spacing);
}

/* Statistiques */
.stats {
  text-align: center;
  padding: var(--spacing-sm);
  background: #f9f9f9;
  margin-bottom: var(--spacing-lg);
  font-weight: var(--font-weight-light);
}

/* ================= SVG THUMBNAILS ================= */
/* Conteneur homogène */
.svg-illu {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-illu > svg {
  width: 100%;
  height: auto;
  display: block;
}
.card .thumb-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f5f5f5, #fafafa, #f5f5f5);
}

.svg-illu svg * {
  vector-effect: non-scaling-stroke;
}

/* Fallback <img> */
.card-svg-fallback {
  width: 50%;
  height: 50%;
  object-fit: contain;
  display: block;
}

/* Réduit la taille du SVG haut et étroit sans le déformer */
.svg-illu svg[viewBox="0 0 330.107 640"] {
  max-height: 170px; /* adapte la hauteur max */
  max-width: auto; /* largeur calculée automatiquement */
}
/* Réduit le SVG très large pour qu’il rentre mieux dans la vignette */
.svg-illu svg[viewBox="0 0 818.55304 686.94758"] {
  max-width: 95%; /* réduit la largeur */
  max-height: 100px; /* limite la hauteur */
  height: auto;
  width: auto;
}

/* === HEADER des articles (single-classe) === */
.article-header {
  background: #000; /* fond sombre */
  color: #fff;
  padding: 80px 20px;
  text-align: center;
}

.article-header .inner {
  max-width: 900px;
  margin: 0 auto;
}

.article-header .article-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-sm);
  color: #f0f0f0;
  font-family: "Montserrat", sans-serif;
  /* En <p> quand l'article a déjà son h1 : ni l'opacité de « header p »,
     ni le « p { text-align: justify } » de certaines feuilles d'article */
  opacity: 1;
  text-align: inherit;
}

.article-header .subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  color: "white";
  margin-bottom: 1.5rem;
}

.article-header .meta {
  margin-top: 10px;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 6px;
}

.badge-theme {
  background: #efb93d;
  color: #000;
}

.badge-niveau {
  background: #444;
  color: #fff;
}

/* ===== NAVIGATION ARTICLE ===== */
.post-nav {
  margin-top: 40px;
  margin-bottom: 40px; /* espace AVANT le footer */
}

.post-nav__container {
  /* .container existe déjà chez toi : max-width + centrage */
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Boutons */
.post-nav__item a,
.post-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  background-color: var(--color-accent, #efb93d);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease,
    opacity 0.2s ease;
  white-space: nowrap;
}

/* Effets */
.post-nav__item a:hover,
.post-nav__item a:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  filter: brightness(1.02);
  outline: none;
}

/* Etat désactivé (quand il n'y a pas de précédent/suivant) */
.post-nav__btn--disabled {
  background: #e6e6e6;
  color: #777;
  cursor: not-allowed;
  box-shadow: none;
}

/* Aligne gauche/droite sur desktop */
.post-nav__prev {
  margin-right: auto;
}
.post-nav__next {
  margin-left: auto;
}

/* Mobile : pleine largeur empilée */
@media (max-width: 640px) {
  .post-nav__container {
    flex-direction: column;
  }
  .post-nav__item a,
  .post-nav__btn {
    width: 100%;
    text-align: center;
  }
}

/* ===== ARTICLES : CONTENUS LARGES ===== */
/* Tableaux (enveloppés par pazokita_wrap_tables), blocs de code et schémas
   défilent dans leur propre cadre : la page ne déborde jamais.
   Portée .article-container : certains articles ferment .article-content trop tôt. */
.article-container pre,
.article-container .svg-container {
  max-width: 100%;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Le cadre des tableaux ne défile qu'à partir de la tablette : sur grand écran,
   il reste transparent et les marges du tableau sont inchangées. */
@media (max-width: 1024px) {
  .article-container .article-scroll {
    max-width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .article-container .article-scroll > table {
    margin-top: 0;
    margin-bottom: 0;
  }
}

/* Texte : un mot ou un lien trop long passe à la ligne */
.article-container {
  overflow-wrap: break-word;
}

/* Code dans le texte : passe à la ligne plutôt que de déborder */
.article-container :not(pre) > code {
  overflow-wrap: anywhere;
}

/* Petits écrans : grilles en style inline (minmax(300px…)) sur une colonne,
   et « ← Retour à la présentation » peut aller à la ligne */
@media (max-width: 480px) {
  .article-container [style*="minmax("] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .article-container .chapter-back .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
}

/* Titre d'article : pas de césure automatique (« Nou-velles »),
   un mot passe entier à la ligne ; coupure seulement s'il dépasse seul */
.article-header .article-title {
  hyphens: manual;
  overflow-wrap: break-word;
}
/* Petits écrans : « Fonctionnalités » (le mot le plus long) tient sur une ligne */
@media (max-width: 480px) {
  .article-header .article-title {
    font-size: clamp(1.75rem, 9vw, 2.5rem);
  }
}

/* Grilles et flex des articles : un bloc large n'élargit plus sa colonne */
:where(.article-container) div {
  min-width: 0;
}

/* ===== ENCART DEVTOTOP (fin d'article) ===== */
/* Styles explicites : certaines feuilles d'article ciblent h2, p ou body. */
.devtotop-cta {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
}

.devtotop-cta__inner {
  background: #0f1e3d;
  color: #ffffff;
  border-radius: 14px;
  padding: var(--spacing-lg);
}

.devtotop-cta__title {
  display: block;
  margin: 0 0 var(--spacing-sm);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  color: #ffffff;
}

.devtotop-cta__title::before {
  content: none;
}

.devtotop-cta__text {
  margin: 0 0 var(--spacing-md);
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
  color: #ffffff;
}

.devtotop-cta__btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 6px;
  background: #f5b921;
  color: #0f1e3d;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.devtotop-cta__btn:hover,
.devtotop-cta__btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.devtotop-cta__btn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.devtotop-cta__note {
  margin: var(--spacing-sm) 0 0;
  font-size: var(--font-size-small);
  text-align: left;
  color: #c4ccdd;
}

@media (max-width: 640px) {
  .devtotop-cta__inner {
    padding: var(--spacing-md);
  }
  .devtotop-cta__btn {
    display: block;
    text-align: center;
  }
}

/* Introduction */
.article-summary {
  background: #f7f7f8;
  border: 1px solid #eeeeef;
  border-radius: 14px;
  padding: 24px;
  margin: 28px 0 18px;
}
.article-summary h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}
.article-summary .intro-html {
  line-height: 1.6;
}

/* Chapitres */
.chapters {
  background: #fff;
  border: 1px solid #eeeeef;
  border-radius: 14px;
  padding: 20px;
  margin: 18px 0 40px;
}
.chapters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}
.btn-primary {
  background: #efb93d;
  color: #111;
  box-shadow: 0 6px 18px rgba(239, 185, 61, 0.25);
}

/* Bouton retour chapitre → même style que la nav article */
.chapter-back {
  margin-top: 40px;
  margin-bottom: 20px;
}
.chapter-back .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  background-color: var(--color-accent, #efb93d);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}
.chapter-back .btn:hover,
.chapter-back .btn:focus-visible {
  background-color: #111;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  outline: none;
}

.chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.chapter-item + .chapter-item {
  margin-top: 10px;
}
.chapter-link {
  display: block;
  background: #f7f7f8;
  border: 1px solid #eeeeef;
  border-left: 6px solid #efb93d;
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
}
.chapter-link .chip {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #eeeeef;
  margin-right: 10px;
  color: #111;
}
.chapter-link .title {
  font-weight: 800;
  font-size: 1.05rem;
  color: #111;
}
.chapter-link .excerpt {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
  color: #6b6b6b;
  line-height: 1.5;
}

/* Fix de ton ancien bloc (manquait un ;) */
.chapters-toc {
  background: var(--light-color);
  color: #111;
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
}

/* ===== PAGES LÉGALES (mentions légales, politique de confidentialité…) ===== */
.article-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.legal-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  color: #111;
}

.legal-content h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  color: #222;
}

.legal-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 1rem;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content li {
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 0.35rem;
}

.legal-content a {
  color: #EFB93D;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: #c9941e;
}

/* ===== PAGE TEMPLATES ===== */
.templates-page {
  background: var(--color-bg-light);
}

.templates-hero {
  background: #000;
  color: #fff;
  padding: clamp(7rem, 12vw, 10rem) 1rem clamp(4rem, 7vw, 6rem);
  text-align: center;
}

.templates-hero__inner {
  max-width: 900px;
}

.templates-kicker {
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.templates-hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
  margin-bottom: 1.5rem;
}

.templates-hero p:not(.templates-kicker) {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 300;
}

.templates-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.templates-section-head {
  max-width: 760px;
  margin: 0 auto var(--spacing-xl);
  text-align: center;
}

.templates-section-head--dark .subtitle {
  color: rgba(255, 255, 255, 0.72);
}

.templates-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
}

.template-category {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  padding: var(--spacing-lg);
}

.template-category h3 {
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.template-category p {
  color: #555;
  font-size: 0.95rem;
  font-weight: 300;
  margin: 0;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--spacing-lg);
}

.template-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--spacing-lg);
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.template-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 185, 61, 0.55);
}

.template-card__category {
  display: inline-block;
  width: fit-content;
  margin-bottom: 1.25rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #000;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.template-card h3 {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.template-card__top p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.97rem;
  font-weight: 300;
  margin: 0;
}

.template-card__meta {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.template-card__meta div {
  display: grid;
  gap: 0.25rem;
}

.template-card__meta dt {
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.template-card__meta dd {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 300;
  margin: 0;
}

.template-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
}

.template-card__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.template-card__actions a:hover {
  background: #fff;
  color: #000;
  transform: translateY(-2px);
}

.template-card__actions .template-card__primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #000;
}

.templates-method__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: var(--spacing-xl);
  align-items: start;
}

.templates-steps {
  display: grid;
  gap: 1rem;
}

.templates-steps div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem;
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 16px;
}

.templates-steps span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #000;
  color: var(--color-accent);
  font-weight: 900;
}

.templates-steps p {
  margin: 0;
  color: #333;
}

@media (max-width: 768px) {
  .templates-actions .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  .templates-method__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
