/* =========================================
   1. REINITIALISATION & FONTS IMPÉRATIVES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Russo+One&family=Ubuntu:wght@300;400;500;700&display=swap');

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background-color: #05030a;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Ubuntu", sans-serif !important;
  color: #ffffff;
  scroll-behavior: smooth;
}

/* Force l'application de Russo One sur tous les titres et éléments sémantiques */
h1,
h2,
h3,
h4,
h5,
h6,
.logo-texte,
.btn-custom,
.section-title,
.filter-group-label,
.btn-filter,
.skill-group-title,
.titre_accueil,
.sidebar-title,
.modal-project-tag,
.related-title {
  font-family: "Russo One", sans-serif !important;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Corps de texte en Ubuntu */
body,
p,
a,
span,
li,
select,
input,
textarea,
button,
label,
.lead-text,
.detail-text-p,
.ac-text-item,
.footer-copy {
  font-family: "Ubuntu", sans-serif !important;
}

/* ─── Liens et cartes cliquables ─── */
.project-card-link {
  display: block;
  color: inherit !important;
  text-decoration: none !important;
}

/* Structure globale pour passer devant le calque de diffraction */
main,
section,
header,
footer,
.hero-section,
.timeline-container,
.glass-card-about,
.filter-panel,
#projects-grid,
.glass-footer {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

/* =========================================
   2. CALQUES DE FOND ANIMÉS & BLOBS
   ========================================= */
.diffraction-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.6) 0px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(0, 0, 0, 0.1) 4px,
    rgba(0, 0, 0, 0.6) 6px
  );
  mix-blend-mode: overlay;
  opacity: 0.85;
}

.blobs-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  filter: blur(90px);
  z-index: 1;
}

@keyframes morph-design {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  25% {
    border-radius: 58% 42% 35% 65% / 51% 59% 41% 49%;
  }
  50% {
    border-radius: 40% 60% 70% 30% / 40% 40% 60% 50%;
  }
  75% {
    border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

.blob {
  position: absolute;
  opacity: 0.9;
  transform-origin: center;
  animation: morph-design 15s ease-in-out infinite both alternate;
  will-change: transform;
}

.blob-darkblue {
  background: #22163d;
  width: 40vw;
  height: 28vw;
  animation-duration: 21s;
  opacity: 0.8;
}
.blob-purple {
  background: #4f1b7a;
  width: 38vw;
  height: 25vw;
  animation-duration: 19s;
  opacity: 0.85;
}
.blob-indigo {
  background: #280d80;
  width: 42vw;
  height: 20vw;
  animation-duration: 18s;
  opacity: 0.8;
}
.blob-orange {
  background: #ff8a42c5;
  width: 26vw;
  height: 25vw;
  animation-duration: 12s;
}
.blob-red {
  background: #b30f00c2;
  width: 30vw;
  height: 22vw;
  animation-duration: 16s;
}
.blob-peach {
  background: #ff5500be;
  width: 25vw;
  height: 18vw;
  animation-duration: 14s;
}

/* =========================================
   3. HEADER PREMIUM & MINIMALISTE (FIX TYPO)
   ========================================= */
.glass-header {
  position: fixed;
  width: 85%;
  max-width: 1100px;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  pointer-events: auto;
  height: 65px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
}

.glass-header .lien_accueil {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  transition: opacity 0.3s ease;
}

.glass-header .lien_accueil:hover {
  opacity: 0.8;
}
.glass-header .logo_header {
  width: 32px;
  margin-right: 12px;
  object-fit: cover;
}
.glass-header .liens {
  display: flex;
  align-items: center;
}

/* Correction ciblage absolu pour forcer Russo One contre Bootstrap */
.glass-header .liens a {
  position: relative;
  color: rgba(255, 255, 255, 0.65) !important;
  text-decoration: none !important;
  margin-left: 35px;
  font-size: 13px !important;
  font-weight: 500;
  letter-spacing: 1.5px;
  padding: 6px 0;
  font-family: "Russo One", sans-serif !important;
  transition: color 0.3s ease;
}

.glass-header .liens a:not(.btn-connexion)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-header .liens a:not(.btn-connexion):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.glass-header .liens a:hover,
.glass-header .liens a.active {
  color: #ff9058 !important;
}

.glass-header .liens .btn-connexion {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  padding: 8px 20px !important;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-header .liens .btn-connexion:hover {
  color: #05030a !important;
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* =========================================
   5. HERO SECTION & ACCUEIL
   ========================================= */
.hero-section {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 60px;
}

.logo-container-large {
  display: inline-block;
}
.grand-logo {
  max-height: 450px;
  width: auto;
  filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.15));
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.grand-logo:hover {
  transform: rotate(3deg) scale(1.03);
}

.titre_accueil {
  font-size: calc(2rem + 2.5vw);
  font-weight: 700;
  color: #ffffff;
  margin-top: 0;
}

.lead-text {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.7;
  text-align: left;
}

/* BOUTONS SPECIFIQUES ACCUEIL RESTAURÉS */
.btn-custom {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 14px;
  text-decoration: none;
  font-family: "Russo One", sans-serif !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid transparent;
}
.btn-primary-custom {
  background: #ffffff !important;
  color: #05030a !important;
}
.btn-primary-custom:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.25);
}

.btn-secondary-custom {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(5px);
}
.btn-secondary-custom:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #ff5500 !important;
  transform: translateY(-3px);
}

/* =========================================
   6. PANNEAU DE TRIS & FILTRES (PROJETS)
   ========================================= */
.filter-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-group-label {
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
  min-width: 110px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-filter {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: 50px;
  font-family: "Russo One", sans-serif !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.btn-filter:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-filter.active {
  background: #ffffff !important;
  color: #05030a !important;
  border-color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

.sub-filters-hidden {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease,
    transform 0.3s ease,
    margin 0.3s ease;
}

.sub-filters-visible {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.project-item {
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.project-item.filtered-out {
  display: none !important;
}

/* =========================================
   7. BLOCS PROJETS & LOGICIELS
   ========================================= */
.project-card {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 140, 66, 0.4) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.project-placeholder-img {
  height: 200px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-info {
  padding: 25px;
}
.project-name {
  font-size: 1.35rem;
  margin: 10px 0;
  color: #ffffff !important;
}
.project-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85) !important;
  margin-bottom: 0;
}

.software-card {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 14px;
  padding: 20px 10px;
  text-align: center;
  height: 100%;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}
.software-card:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.03);
}
.s-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}
.s-name {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

/* =========================================
   8. ÉTIQUETTES & UTILITIES
   ========================================= */
.project-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badge-tag-sm {
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 30px;
  letter-spacing: 0.5px;
}
.badge-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  margin-right: 6px;
}

.b-cat {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.b-pole {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.b-year {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Tags des compétences : une couleur dédiée par compétence (cf. référentiel ACs) */
.b-comp {
  font-weight: bold;
}
.b-comp-comprendre {
  background: rgba(179, 16, 0, 0.14);
  color: #ff6a52;
  border: 1px solid rgba(179, 16, 0, 0.35);
}
.b-comp-concevoir {
  background: rgba(255, 140, 66, 0.14);
  color: #ff8c42;
  border: 1px solid rgba(255, 140, 66, 0.35);
}
.b-comp-exprimer {
  background: rgba(255, 193, 7, 0.14);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.35);
}
.b-comp-developper {
  background: rgba(46, 125, 50, 0.16);
  color: #4caf50;
  border: 1px solid rgba(46, 125, 50, 0.4);
}
.b-comp-entreprendre {
  background: rgba(55, 48, 163, 0.2);
  color: #9a9cff;
  border: 1px solid rgba(55, 48, 163, 0.45);
}

/* COMPÉTENCES & BARRES DE PROGRESSION */
.skill-group-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 25px;
}
.skill-item {
  margin-bottom: 25px;
}
.skill-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
  display: inline-block;
  margin-bottom: 5px;
}
.skill-percent {
  font-size: 0.95rem;
  font-weight: bold;
  color: #ff8c42;
  float: right;
}
.progress-custom-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  overflow: hidden;
  clear: both;
}
.progress-custom-bar {
  height: 100%;
  border-radius: 20px;
  width: 0%;
  transition: width 1.5s cubic-bezier(0.1, 1, 0.1, 1);
}
.p-purple {
  background: linear-gradient(90deg, #4f1b7a, #280d80);
}
.p-orange {
  background: linear-gradient(90deg, #ff8c42, #ff5500);
}
.p-red {
  background: linear-gradient(90deg, #ff5500, #b31000);
}

/* =========================================
   9. INTERSECTION OBSERVER (APPARITIONS)
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s cubic-bezier(0.215, 0.61, 0.355, 1),
    transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   10. STYLE DE LA PAGE À PROPOS & FRISE
   ========================================= */
.glass-card-detail {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.btn-back-custom {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.btn-back-custom:hover {
  background: #ffffff;
  color: #05030a;
  transform: translateX(-4px);
}
.detail-subtitle {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #ffffff;
}
.detail-text-p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
}
.ac-text-item {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid #ff5500;
  border-radius: 0 8px 8px 0;
  margin-bottom: 12px;
}

/* À PROPOS & PHOTO */
.photo-wrapper {
  position: relative;
  display: inline-block;
}
.photo-profil {
  max-height: 350px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.photo-profil:hover {
  transform: scale(1.02) translateY(-4px);
}
.glass-card-about {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* FRISE CHRONOLOGIQUE PARCOURS FIXED (RESTITUTION COULEURS CAPTURE 1) */
.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 40px auto;
  padding: 20px 0;
}
.timeline-glow-line {
  position: absolute;
  width: 4px;
  background: rgba(255, 255, 255, 0.05);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
  overflow: hidden;
}
.timeline-progress-bar {
  width: 100%;
  background: linear-gradient(to bottom, #ffffff, rgba(255, 255, 255, 0.8));
  box-shadow: 0 0 20px 6px rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  transition: height 2s cubic-bezier(0.1, 1, 0.1, 1);
}
.timeline-item {
  position: relative;
  width: 50%;
  margin-bottom: 40px;
}
.left-item {
  left: 0;
  padding-right: 40px;
  text-align: right;
}
.right-item {
  left: 50%;
  padding-left: 40px;
  text-align: left;
}
.timeline-dot {
  position: absolute;
  width: 36px;
  height: 36px;
  background: #05030a;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  z-index: 5;
}
.left-item .timeline-dot {
  right: -18px;
}
.right-item .timeline-dot {
  left: -18px;
}

.current-step .timeline-dot {
  border-color: #ff5500;
  color: #ff5500;
  box-shadow: 0 0 12px #ff5500;
}
.current-step .glass-card-timeline {
  border-color: rgba(255, 85, 0, 0.3) !important;
  background: rgba(255, 255, 255, 0.04);
}

.glass-card-timeline {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

/* REPARATION IMPORTANTE : Suppression du !important générique pour laisser respirer Bootstrap et les .text-orange/.text-purple */
.glass-card-timeline p {
  color: rgba(255, 255, 255, 0.95);
}
.glass-card-timeline h4 {
  color: #ffffff;
}

.glass-card-timeline:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}
.timeline-date {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.65);
  display: block;
  margin-bottom: 5px;
}

.future-step {
  opacity: 0.3;
}
.future-step .glass-card-timeline p {
  color: rgba(255, 255, 255, 0.7);
}

/* UTILITAIRES COULEURS RESTAURES ET BLINDES CONTRE BOOTSTRAP */
.text-purple {
  color: #a37aff !important;
}
.text-orange {
  color: #ff8c42 !important;
}
.text-red {
  color: #ff5500 !important;
}

/* =========================================
   11. STRUCTURATION GENERALE
   ========================================= */
.form-control:focus {
  background-color: rgba(0, 0, 0, 0.5) !important;
  border-color: #ff5500 !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(255, 85, 0, 0.2) !important;
}
.section-padding {
  padding: 100px 20px;
}
.section-title {
  font-size: 2.2rem;
  color: #ffffff;
}
.title-line {
  width: 60px;
  height: 4px;
  background: #ff5500;
  border-radius: 10px;
  margin-top: 15px;
}

/* FIXED GLASS FOOTER (PASSE DEVANT) */
.glass-footer {
  position: relative;
  z-index: 20 !important;
  margin-top: 80px;
  padding: 30px 0;
  background: rgba(5, 3, 10, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-copy {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}
.footer-badge {
  font-size: 11px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 16px;
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.85);
}
.footer-socials .social-link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  margin-left: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}
.footer-socials .social-link:hover {
  color: #ff8c42;
  transform: translateY(-3px);
}

/* =========================================
   12. RESPONSIVE DESIGN & MEDIA QUERIES
   ========================================= */
@media (max-width: 991px) {
  .hero-section {
    text-align: center !important;
    padding-top: 120px;
  }
  .lead-text {
    text-align: center;
  }
  .glass-header {
    width: 85%;
    padding: 0 20px;
  }
}
@media (max-width: 768px) {
  .glass-header {
    width: 95%;
    padding: 0 15px;
  }
  .glass-header .liens a {
    margin-left: 15px;
    font-size: 11px;
  }
  .logo-texte {
    display: none;
  }
}
@media (max-width: 767px) {
  .footer-socials .social-link {
    margin: 0 10px;
  }
  .timeline-glow-line {
    left: 20px;
    transform: none;
  }
  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 45px !important;
    padding-right: 0 !important;
    text-align: left !important;
  }
  .timeline-dot {
    left: 2px !important;
    right: auto !important;
  }
}
@media (hover: none) and (pointer: coarse) {
  body,
  html {
    cursor: auto;
  }
}
@media (orientation: portrait) {
  .blobs-container {
    filter: blur(60px);
    opacity: 0.7;
  }
  .blob-darkblue {
    width: 70vw;
    height: 40vh;
  }
  .blob-purple {
    width: 60vw;
    height: 35vh;
  }
  .blob-indigo {
    width: 65vw;
    height: 35vh;
  }
  .blob-orange {
    width: 60vw;
    height: 35vh;
  }
  .blob-red {
    width: 70vw;
    height: 40vh;
  }
  .blob-peach {
    width: 55vw;
    height: 30vh;
  }
  h1 {
    font-size: 2.5rem;
  }
  p {
    font-size: 0.9rem;
  }
}


/* ================= HEADER & FOOTER ULTRA-TRANSPARENTS (GLASS) ================= */
.glass-header, .glass-footer {
    background: rgba(10, 10, 15, 0.45) !important;
    backdrop-filter: blur(12px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.glass-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-bottom: none !important;
    padding: 15px 0 !important; /* Devient plus compact et petit */
    font-size: 13px;
}

/* ================= CARTES DU CATALOGUE DE PROJETS HARMONISÉES ================= */
.project-card { /* Applique cette classe sur tes colonnes ou div de cartes sur projets.php */
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important; /* Bordure blanche translucide */
    border-radius: 16px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* Force l'égalité exacte en hauteur et largeur via flexbox */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100% !important; 
    min-height: 380px; /* Aligne toutes les cartes sur la même ligne */
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

/* ================= EFFETS DE BORDURES BLANCHES (TRACES) ================= */
.glass-card-detail {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Bordures blanches forcées */
    border-radius: 20px;
}

/* ================= BARRES DE PROGRESSION ET COMPÉTENCES BLANCHES ================= */
.progress {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 8px !important;
}

.progress-bar {
    background-color: #ffffff !important; /* Rendu blanc éclatant */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.competence-percent {
    color: #ffffff !important; /* Chiffre du pourcentage en blanc */
    font-weight: 700;
}

/* Style joli pour l'affichage de ton bouton Drive */
.btn-drive-livrable {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}
.btn-drive-livrable:hover {
    background: #ffffff;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}


/* ================= EFFET VERRE (GLASS) & BORDURES BLANCHES ================= */
.glass-header, 
.glass-footer, 
.project-card, 
.glass-card-detail, 
.glass-card-about, 
.glass-card-timeline, 
.related-card, 
.p-4.border,
.software-card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(15px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important; /* Bordure blanche translucide */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* ================= CARTES PROJETS UNIFORMES ================= */
#projects-grid .project-item {
    display: flex;
}

.project-card {
    width: 100% !important;
    height: 100% !important;
    min-height: 420px; /* Force une hauteur minimum identique */
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-5px);
}

.project-info {
    flex-grow: 1; /* Pousse le contenu pour que toutes les cartes s'alignent */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ================= JAUGES & POURCENTAGES BLANCS ================= */
.progress-custom-bg {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-custom-bar, .progress-bar {
    background: #ffffff !important; /* Barre de progression blanche */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.skill-percent, .skill-label {
    color: #ffffff !important; /* Texte des compétences en blanc */
}

/* ================= FIX POUR LES PAGES NOIRES (DASHBOARD/DETAIL) ================= */
/* Assure-toi que ton fond strié/dégradé est bien sur le body */
body {
    background-color: #050505;
    /* Si tu as une image de fond ou un dégradé, remets-le ici pour qu'il soit partout */
    background-image: radial-gradient(circle at 50% -20%, #252525, #050505);
    background-attachment: fixed;
    color: white;
}



/* =========================================================================
   MISES À JOUR IMPÉRATIVES : FONDS ET RESPONSIVITÉ MOBILE
   ========================================================================= */

/* Les pages laissent transparaître le fond animé (dégradé + blobs) */
.dashboard-container, main {
    background-color: transparent !important;
}

/* 3. Ajustement de l'image de garde pour qu'elle ne soit JAMAIS coupée */
.glass-card-detail .image-cover-wrapper {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: auto;
    max-height: 450px;
}

.glass-card-detail .image-cover-wrapper img {
    width: 100% !important;
    height: auto !important;
    max-height: 450px;
    object-fit: contain !important; /* Force l'image entière sans rognage */
}

/* 4. Agrandissement des icônes de réseaux sociaux dans le footer */
.glass-footer .footer-socials a i {
    font-size: 1.6rem !important;
    transition: color 0.2s ease;
}
.glass-footer .footer-socials a:hover i {
    color: #ff8c42 !important;
}

/* 5. Le bouton burger est stylé et activé plus bas (section CORRECTION FINALE) */

/* =========================================================================
   MEDIA QUERIES : RESPONSIVITÉ SMARTPHONES & TABLETTES
   ========================================================================= */
@media (max-width: 991px) {
    /* Adaptations des textes pour mobile */
    .titre_accueil {
        font-size: 2.4rem !important;
        text-align: center;
    }
    
    h1 {
        font-size: 2.2rem !important;
    }
    
    h2, .section-title {
        font-size: 1.8rem !important;
    }
    
    .lead-text, .detail-text-p {
        font-size: 1rem !important;
        line-height: 1.6;
    }
    
    .glass-card-detail, .glass-card-about {
        padding: 25px !important; /* Moins de marges internes sur petit écran */
    }
}

@media (max-width: 576px) {
    .titre_accueil {
        font-size: 1.9rem !important;
    }
    
    h1 {
        font-size: 1.7rem !important;
    }
    
    .glass-header {
        width: 92% !important;
    }
}



/* =========================================================================
   CORRECTION FINALE COMPLÈTE DU HEADER ET DU MENU BURGER RESPONSIVE
   ========================================================================= */

/* Par défaut sur PC, le bouton burger est STRICTEMENT INVISIBLE */
.navbar-toggler-custom {
    display: none !important;
}

/* On force le header sur PC à rester sur une seule ligne bien alignée */
.glass-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 65px !important;
}

/* --- AFFICHAGE SUR TÉLÉPHONES ET TABLETTES (Moins de 991px) --- */
@media (max-width: 991px) {
    /* Le bouton burger apparaît enfin à droite, avec un style "glass" épuré sans fond blanc */
    .navbar-toggler-custom {
        display: block !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        background: rgba(255, 255, 255, 0.03) !important;
        color: #ffffff !important;
        padding: 4px 12px !important;
        border-radius: 10px !important;
        transition: all 0.2s ease !important;
    }
    
    .navbar-toggler-custom:hover {
        border-color: rgba(255, 255, 255, 0.4) !important;
        background: rgba(255, 255, 255, 0.08) !important;
    }

    /* Le header s'adapte pour pouvoir s'ouvrir vers le bas */
    .glass-header {
        height: auto !important;
        padding: 12px 24px !important;
        flex-wrap: wrap !important;
    }

    /* Cache les liens par défaut sur mobile tant qu'on a pas cliqué */
    .glass-header .liens {
        display: none !important;
        width: 100% !important;
        flex-direction: column !important;
        align-items: center !important;
        background: rgba(10, 8, 20, 0.95) !important; /* Fond ultra sombre immersif */
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-radius: 16px !important;
        margin-top: 12px !important;
        padding: 15px 0 !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    /* Classe activée au clic pour englober et afficher tous les liens d'un coup */
    .glass-header .liens.show {
        display: flex !important;
    }

    /* Style des liens empilés proprement sur mobile */
    .glass-header .liens a {
        margin: 10px 0 !important;
        font-size: 13px !important;
        width: 80% !important;
        text-align: center !important;
    }
    
    .glass-header .liens .btn-connexion {
        width: auto !important;
        padding: 6px 25px !important;
    }
}

/* =========================================================================
   RESPONSIVE COMPLÉMENTAIRE : DASHBOARD, FORMULAIRES & DÉTAIL PROJET
   ========================================================================= */
@media (max-width: 991px) {
    /* Dashboard : en-tête qui passe en colonne */
    .dashboard-container .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    /* Tableaux du dashboard scrollables sans casser la mise en page */
    .table-responsive {
        font-size: 0.85rem;
    }

    /* Cartes "À propos" et photo de profil centrées sur mobile */
    .photo-profil {
        max-height: 280px;
    }
}

@media (max-width: 767px) {
    /* Espacement des sections réduit sur mobile */
    .section-padding {
        padding: 60px 15px;
    }

    /* Cartes du dashboard (blocs accueil / parcours) en pleine largeur */
    .dashboard-container .row.g-4 > [class*="col-"],
    .dashboard-container .row.g-3 > [class*="col-"] {
        margin-bottom: 10px;
    }

    /* Boutons d'action des tableaux empilés proprement */
    .table-responsive .btn-sm {
        margin-bottom: 6px;
    }

    /* Carrousel projets en vedette : hauteur réduite */
    #carouselVedettes .position-relative {
        height: 280px !important;
    }

    /* Image de garde du détail projet plus compacte */
    .glass-card-detail .image-cover-wrapper {
        max-height: 260px;
    }
    .glass-card-detail .image-cover-wrapper img {
        max-height: 260px;
    }

    /* Cartes logiciels/outils : 2 par ligne minimum déjà géré par Bootstrap col-6 */
    .s-icon {
        font-size: 1.6rem;
    }

    /* Boutons pleine largeur sur mobile pour les formulaires de connexion/inscription */
    .glass-card-about .btn-custom {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    /* Réduction des paddings globaux pour éviter tout débordement horizontal */
    .glass-card-detail,
    .glass-card-about,
    .glass-card-timeline,
    .filter-panel {
        padding: 18px !important;
    }

    .modal-project-tag {
        font-size: 10px;
    }
}

/* =========================================================================
   ÉDITEUR DE TEXTE ENRICHI (DASHBOARD - GRAS / COULEUR)
   ========================================================================= */
.rich-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px 10px 0 0;
    padding: 6px 10px;
}

.btn-rt {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-radius: 6px;
    width: 30px;
    height: 28px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-rt:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-rt-color {
    width: 30px;
    height: 28px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.rich-editor {
    border-radius: 0 0 10px 10px !important;
    border-top: none !important;
    overflow-y: auto;
    line-height: 1.5;
}
.rich-editor:focus {
    outline: none;
}
.rich-editor b, .rich-editor strong {
    font-weight: 700;
}

/* =========================================================================
   FILTRES AVANCÉS : APPRENTISSAGES CRITIQUES (AC) & TRI PAR DATE
   ========================================================================= */

/* Conteneur du sous-panneau des AC : même comportement d'ouverture/fermeture
   que .sub-filters-visible / .sub-filters-hidden */
#ac-filters-container.sub-filters-hidden {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease,
    transform 0.3s ease,
    margin 0.3s ease,
    padding 0.3s ease;
}
#ac-filters-container.sub-filters-visible {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Boutons AC : prennent la couleur de la compétence à laquelle ils appartiennent */
.btn-filter-ac {
  background: transparent;
  border: 1px solid var(--ac-color, rgba(255, 255, 255, 0.25));
  color: var(--ac-color, #ffffff);
}
.btn-filter-ac:hover {
  border-color: var(--ac-color, rgba(255, 255, 255, 0.6));
  filter: brightness(1.2);
}
.btn-filter-ac.active {
  background: var(--ac-color, #ffffff) !important;
  border-color: var(--ac-color, #ffffff) !important;
  color: #05030a !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}
.btn-filter-ac[data-value="all"] {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.btn-filter-ac[data-value="all"].active {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #05030a !important;
}

/* Bloc de tri (date de publication / date de réalisation) */
.sort-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.sort-panel .form-select {
  max-width: 280px;
  border-radius: 50px;
  font-size: 12px;
  font-family: "Russo One", sans-serif !important;
  letter-spacing: 0.5px;
  padding: 8px 18px;
}


/* ================= MENU DÉROULANT TRI (GLASSMORPHISM) ================= */
.sort-panel .form-select {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    padding: 8px 20px;
    cursor: pointer !important;
    /* Flèche personnalisée blanche */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
}

.sort-panel .form-select:focus {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

/* Fond sombre opaque pour les options quand on clique dessus (pour rester lisible) */
.sort-panel .form-select option {
    background-color: #120e1f;
    color: #ffffff;
}

/* =========================================================================
   CORRECTIONS SPÉCIFIQUES MOBILE (Page À Propos & Header)
   ========================================================================= */
@media (max-width: 991px) {
    /* 1. Rétablir le texte "Meïa Moudjari" dans le header */
    .logo-texte {
        display: inline-block !important;
        font-size: 15px !important;
    }

    /* 2. Empêcher l'image de devenir géante sur tablette */
    .photo-wrapper {
        max-width: 350px !important; /* Empêche l'étirement excessif */
        margin: 0 auto !important;   /* Garde l'image bien centrée */
    }

    .photo-wrapper img.photo-profil {
        height: 350px !important; /* Hauteur fixe pour garantir le format carré/portrait */
        width: 100% !important;
        object-fit: cover !important;
        object-position: top center !important;
        border-radius: 24px !important;
    }

    /* 3. Centrer et agrandir les textes de présentation */
    .glass-card-about {
        text-align: center !important;
    }
    
    .glass-card-about .modal-project-tag {
        display: inline-block !important;
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }

    .glass-card-about h1.text-start {
        text-align: center !important;
    }
    
    .glass-card-about .lead-text {
        text-align: center !important;
    }

    /* 4. Boutons en pleine largeur et texte centré */
    .glass-card-about .gap-3 {
        flex-direction: column !important;
    }

    .glass-card-about .btn-custom {
        width: 100% !important;
        justify-content: center !important;
    }

    /* 5. Réduire le grand logo sur la page d'accueil */
    .grand-logo {
        max-height: 220px !important; /* Taille réduite adaptée aux téléphones */
        width: auto !important;
        margin-bottom: 15px !important; /* Petit espace sous le logo pour respirer */
    }
}


/* ================= ANIMATION SUGGESTIONS LIÉES (FORCÉE) ================= */
.related-card {
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

/* L'animation se déclenche au survol du lien qui englobe la carte */
a:hover .related-card {
    transform: translateY(-4px) scale(1.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important; /* Règle complète pour écraser l'ancienne */
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
}


/* ================= OUTILS & LOGICIELS (HOVER POURCENTAGE) ================= */
.software-card {
    position: relative;
    overflow: hidden; /* Empêche le pourcentage de dépasser avant le survol */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 10px;
}

.s-icon-wrapper {
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Fait remonter le logo et le nom au survol */
.software-card:hover .s-icon-wrapper {
    transform: translateY(-8px); 
}

/* Style spécifiquement adapté pour les images (logos PNG/SVG) */
.s-logo-img {
    max-width: 50px;
    max-height: 50px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

/* Le pourcentage, caché par défaut en bas de la carte */
.s-percent-hover {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    color: #ff8c42; /* Ton orange */
    font-family: "Russo One", sans-serif;
    font-size: 1.1rem;
    text-align: center;
}

/* Fait apparaître le pourcentage au survol */
.software-card:hover .s-percent-hover {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   PAGE CONTACT — FORMULAIRE & RÉSEAUX SOCIAUX
   ========================================================================= */

/* Champs du formulaire */
.contact-label {
    display: block;
    font-family: 'Ubuntu', sans-serif !important;
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 8px;
}

.contact-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    padding: 14px 20px;
    color: #ffffff;
    font-family: 'Ubuntu', sans-serif !important;
    font-size: 0.95rem;
    text-align: left;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.contact-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    text-align: left;
}

.contact-input:focus {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 100, 50, 0.65);
    box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.12);
}

.contact-textarea {
    resize: vertical;
    min-height: 130px;
}

/* Bouton d'envoi */
.contact-submit {
    font-size: 1rem;
    letter-spacing: 1px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255, 85, 0, 0.35);
}

/* Boutons réseaux sociaux */
.contact-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    color: #ffffff;
    font-family: 'Ubuntu', sans-serif !important;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.contact-social-btn i {
    font-size: 1rem;
}

.contact-social-btn:hover {
    background: rgba(255, 85, 0, 0.12);
    border-color: rgba(255, 85, 0, 0.45);
    color: #ff5500;
    transform: translateY(-2px);
}

/* Coordonnées */
.contact-info-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

/* Icône de succès */
.contact-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(46, 139, 87, 0.15);
    border: 2px solid rgba(46, 139, 87, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.contact-success-icon i {
    font-size: 2.5rem;
    color: #5fd38d;
}

/* Responsive */
@media (max-width: 767px) {
    .contact-input {
        border-radius: 12px;
        padding: 12px 16px;
    }
    .contact-social-btn span {
        display: none; /* Icônes seules sur mobile */
    }
    .contact-social-btn {
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}
/* =========================================================================
   CORRECTIF MOBILE — Boutons sociaux Contact (FORCÉ)
   ========================================================================= */
@media (max-width: 991px) {
    /* Sélecteur hyper-puissant pour battre la règle de la page À propos */
    .glass-card-about div.contact-socials-wrapper.d-flex {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        width: 100% !important;
    }

    .glass-card-about .contact-social-btn {
        width: 46px !important;
        height: 46px !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }

    .glass-card-about .contact-social-btn span {
        display: none !important;
    }

    .glass-card-about .contact-social-btn i {
        margin: 0 !important;
        font-size: 1.2rem !important;
    }
}

/* =========================================================================
   CORRECTIF MOBILE — Filtres projets en dépliants (PÔLE / COMPÉTENCES / ANNÉE / TRIER PAR)
   ========================================================================= */
@media (max-width: 767px) {

    /* Chaque groupe de filtre (sauf catégorie) devient un dépliant */
    .filter-group.collapsible-mobile .filter-group-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        cursor: pointer;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        user-select: none;
        min-width: unset;
    }

    .filter-group.collapsible-mobile .filter-group-label::after {
        content: '\F282'; /* bi-chevron-down */
        font-family: 'bootstrap-icons';
        font-size: 14px;
        color: rgba(255,255,255,0.5);
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }

    .filter-group.collapsible-mobile.open .filter-group-label::after {
        transform: rotate(180deg);
    }

    /* Les boutons sont cachés par défaut sur mobile */
    .filter-group.collapsible-mobile .filter-buttons {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
        padding-top: 0;
    }

    .filter-group.collapsible-mobile.open .filter-buttons {
        max-height: 300px;
        opacity: 1;
        padding-top: 12px;
    }

    /* Idem pour le panneau de tri */
    .sort-panel.collapsible-mobile {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-top: 0;
        margin-top: 0;
        border-top: none;
    }

    .sort-panel.collapsible-mobile .filter-group-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        cursor: pointer;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        border-top: 1px solid rgba(255,255,255,0.08);
        margin-top: 8px;
        user-select: none;
    }

    .sort-panel.collapsible-mobile .filter-group-label::after {
        content: '\F282';
        font-family: 'bootstrap-icons';
        font-size: 14px;
        color: rgba(255,255,255,0.5);
        transition: transform 0.3s ease;
    }

    .sort-panel.collapsible-mobile.open .filter-group-label::after {
        transform: rotate(180deg);
    }

    .sort-panel.collapsible-mobile .form-select {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
        max-width: 100%;
        margin-top: 0;
    }

    .sort-panel.collapsible-mobile.open .form-select {
        max-height: 80px;
        opacity: 1;
        margin-top: 12px;
    }

    /* Les sous-filtres dépliants (pôle/comp/année/ac) doivent aussi être adaptés */
    #sub-filters-container.sub-filters-visible,
    #ac-filters-container.sub-filters-visible {
        padding-top: 0;
        border-top: none;
    }
}