.imagePP{
    height: 35vh;
    border: solid 5px #223047;
    border-radius: 50%;
}

/* === Layout général === */

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  padding-top: 70px; /* pour la navbar fixed-top */
}

main {
  min-height: 60vh;
}

.header-portfolio {
  position: relative;
  /* Hauteur naturelle = au moins un écran. Le SVG (preserveAspectRatio="none")
     s'étire/s'aplatit pour remplir, plein largeur, sans coupure ni bandes vides. */
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  overflow: visible;
  padding-block: clamp(2rem, 4vw, 5rem);
}

.subtitle-portfolio {
  opacity: 0.85;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

.photo-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.photo-profil {
  width: 280px;
  height: 280px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  border: 4px solid rgba(255,255,255,0.15);
}

.lien-github {
  color: inherit;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
}

.lien-github:hover {
  transform: translateY(-2px);
  opacity: 0.85;
  color: inherit;
}

.bouton-musique-wrapper {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
}

#playPauseBtn {
  align-items: center;
  justify-content: center;
}

.main-portfolio {
  position: relative;
  overflow: hidden;
}

#backToTop {
  background: rgba(0,0,0,0.4);
  color: #fff !important;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 999;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
#backToTop.show { display: flex; }
#backToTop:hover,
#backToTop:focus-visible {
  background: rgba(0,0,0,0.65);
  transform: translateY(-2px);
}

/* Focus visible global pour la navigation clavier */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid #ffd54a;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(255, 213, 74, 0.35);
}

/* Respect des préférences utilisateur sur les animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Navbar adaptative par thème === */

.navbar-portfolio {
  --nav-bg: rgba(34, 48, 71, 0.95);
  --nav-bg-scrolled: rgba(34, 48, 71, 0.55);
  --nav-fg: #ffffff;
  --nav-border: rgba(255,255,255,0.08);

  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--nav-border);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.navbar-portfolio.navbar-scrolled {
  background-color: var(--nav-bg-scrolled);
}

.navbar-portfolio .navbar-brand,
.navbar-portfolio .nav-link {
  color: var(--nav-fg);
}

.navbar-portfolio .brand-sub {
  opacity: 0.65;
  font-weight: 400;
  margin-left: 0.25rem;
}

.navbar-portfolio .nav-link {
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.navbar-portfolio .nav-link:hover { opacity: 1; }

.navbar-portfolio .navbar-toggler {
  border: none;
  color: var(--nav-fg);
}
.navbar-portfolio .navbar-toggler:focus { box-shadow: none; }

/* Couleurs navbar par thème */
.theme-originale .navbar-portfolio { --nav-bg: rgba(34, 48, 71, 0.95); --nav-bg-scrolled: rgba(34, 48, 71, 0.55); }
.theme-bleu      .navbar-portfolio { --nav-bg: rgba(0, 51, 102, 0.95);  --nav-bg-scrolled: rgba(0, 51, 102, 0.55); }
.theme-rouge     .navbar-portfolio { --nav-bg: rgba(138, 1, 0, 0.95);   --nav-bg-scrolled: rgba(138, 1, 0, 0.55); }
.theme-vert      .navbar-portfolio { --nav-bg: rgba(21, 90, 51, 0.95);  --nav-bg-scrolled: rgba(21, 90, 51, 0.55); }
.theme-jaune     .navbar-portfolio { --nav-bg: rgba(212, 163, 1, 0.95); --nav-bg-scrolled: rgba(212, 163, 1, 0.55); --nav-fg: #2C2C2C; }
.theme-noir      .navbar-portfolio { --nav-bg: rgba(15, 15, 15, 0.95);  --nav-bg-scrolled: rgba(15, 15, 15, 0.55); }
.theme-gris      .navbar-portfolio { --nav-bg: rgba(74, 74, 74, 0.95); --nav-bg-scrolled: rgba(74, 74, 74, 0.55); }
.theme-cyan      .navbar-portfolio { --nav-bg: rgba(112, 185, 184, 0.95); --nav-bg-scrolled: rgba(112, 185, 184, 0.55); --nav-fg: #1a3838; }
.theme-blanc     .navbar-portfolio { --nav-bg: rgba(244, 244, 245, 0.95); --nav-bg-scrolled: rgba(244, 244, 245, 0.65); --nav-fg: #2C2C2C; --nav-border: rgba(0,0,0,0.08); }
.theme-halloween .navbar-portfolio { --nav-bg: rgba(20, 15, 25, 0.95);  --nav-bg-scrolled: rgba(20, 15, 25, 0.55); --nav-fg: #f5730a; --nav-border: rgba(245, 115, 10, 0.25); }

.theme-blanc .navbar-portfolio .bouton_top,
.theme-cyan  .navbar-portfolio .bouton_top,
.theme-jaune .navbar-portfolio .bouton_top {
  color: #2C2C2C;
}

/* === Cartes === */

.card {
  height: 100%;
  border-radius: 14px;
}

.card-icon-top {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.6rem;
  opacity: 0.95;
}

.card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* espace entre le haut et le bas */
  height: 100%;
}


.equal-height {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* CORRIGÉ: theme-originale */

.theme-originale .card {
  background-color: #283F5D;
  border: none;
  color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-originale .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-originale .bouton_top {
  background-color: #293B56;
  border: none;
  color: #ffffff;
}

.theme-originale .bouton_top:hover {
  background-color: #25344D;
}

.theme-originale .bouton_milieu {
  background-color: #273B57;
  border: none;
  color: #ffffff;
}

.theme-originale .bouton_milieu:hover {
  background-color: #223047;
}

.theme-originale .boxfooter {
  background-color: #2B4362;
  color: #ffffff;
}


/* CORRIGÉ: theme-bleu */

.theme-bleu .card {
  background-color: #205281;
  border: none;
  color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-bleu .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-bleu .bouton_top {
  background-color: #3F739B;
  border: none;
  color: #ffffff;
}

.theme-bleu .bouton_top:hover {
  background-color: #003366;
}

.theme-bleu .bouton_milieu {
  background-color: #3F739B;
  border: none;
  color: #ffffff;
}

.theme-bleu .bouton_milieu:hover {
  background-color: #003366;
}

.theme-bleu .boxfooter {
  background-color: #205281;
  color: #ffffff;
}


/* CORRIGÉ: theme-gris (contraste WCAG AA) */

.theme-gris .card {
  background-color: #5C5C5D;
  border: none;
  color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-gris .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-gris .bouton_top {
  background-color: #4A4A4A;
  border: none;
  color: #ffffff;
}

.theme-gris .bouton_top:hover {
  background-color: #2C2C2C;
  color: #ffffff;
}

.theme-gris .bouton_milieu {
  background-color: #4A4A4A;
  border: none;
  color: #ffffff;
}

.theme-gris .bouton_milieu:hover {
  background-color: #2C2C2C;
  color: #ffffff;
}

.theme-gris .boxfooter {
  background-color: #5C5C5D;
  color: #ffffff;
}


/* CORRIGÉ: theme-vert */

.theme-vert .card {
  background-color: #327446;
  border: none;
  color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-vert .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-vert .bouton_top {
  background-color: #518F5D;
  border: none;
  color: #ffffff;
}

.theme-vert .bouton_top:hover {
  background-color: #155B32;
}

.theme-vert .bouton_milieu {
  background-color: #518F5D;
  border: none;
  color: #ffffff;
}

.theme-vert .bouton_milieu:hover {
  background-color: #155B32;
}

.theme-vert .boxfooter {
  background-color: #327446;
  color: #ffffff;
}


/* CORRIGÉ: theme-rouge */

.theme-rouge .card {
  background-color: #A22F18;
  border: none;
  color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-rouge .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-rouge .bouton_top {
  background-color: #BA4C2E;
  border: none;
  color: #ffffff;
}

.theme-rouge .bouton_top:hover {
  background-color: #8A0100;
}

.theme-rouge .bouton_milieu {
  background-color: #BA4C2E;
  border: none;
  color: #ffffff;
}

.theme-rouge .bouton_milieu:hover {
  background-color: #8A0100;
}

.theme-rouge .boxfooter {
  background-color: #A22F18;
  color: #ffffff;
}


/* CORRIGÉ: theme-jaune (contraste WCAG AA) */

.theme-jaune .card {
  background-color: #DCAE20;
  border: none;
  color: #1F1A00;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-jaune .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-jaune .bouton_top {
  background-color: #6F5300;
  border: none;
  color: #ffffff;
}

.theme-jaune .bouton_top:hover {
  background-color: #4F3B00;
  color: #ffffff;
}

.theme-jaune .bouton_milieu {
  background-color: #6F5300;
  border: none;
  color: #ffffff;
}

.theme-jaune .bouton_milieu:hover {
  background-color: #4F3B00;
  color: #ffffff;
}

.theme-jaune .boxfooter {
  background-color: #DCAE20;
  color: #1F1A00;
}


/* CORRIGÉ: theme-cyan (contraste WCAG AA) */

.theme-cyan .card {
  background-color: #70B9B8;
  border: none;
  color: #0E2929;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-cyan .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-cyan .bouton_top {
  background-color: #1F5F5F;
  border: none;
  color: #ffffff;
}

.theme-cyan .bouton_top:hover {
  background-color: #103939;
  color: #ffffff;
}

.theme-cyan .bouton_milieu {
  background-color: #1F5F5F;
  border: none;
  color: #ffffff;
}

.theme-cyan .bouton_milieu:hover {
  background-color: #103939;
  color: #ffffff;
}

.theme-cyan .boxfooter {
  background-color: #70B9B8;
  color: #0E2929;
}

.theme-cyan .titre_grosprojet,
.theme-cyan .Text_Titre,
.theme-cyan h1,
.theme-cyan .flèche {
  color: #2C2C2C;
}


/* CORRIGÉ: theme-blanc */

.theme-blanc .card {
  background-color: #E1E0E0;
  border: none;
  color: #2C2C2C;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-blanc .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.theme-blanc .card-title,
.theme-blanc .card-text,
.theme-blanc .titre_miniprojet,
.theme-blanc .titre_grosprojet,
.theme-blanc .titreBoxgrosprojet,
.theme-blanc .Text_Titre,
.theme-blanc h1,
.theme-blanc .Copyrightbottom,
.theme-blanc .flèche {
  color: #2C2C2C;
}

.theme-blanc .bouton_top {
  background-color: #E7E7E6;
  border: none;
  color: #2C2C2C;
}

.theme-blanc .bouton_top:hover {
  background-color: #F4F4F5;
}

.theme-blanc .bouton_milieu {
  background-color: #E7E7E6;
  border: none;
  color: #2C2C2C;
}

.theme-blanc .bouton_milieu:hover {
  background-color: #F4F4F5;
}

.theme-blanc .boxfooter {
  background-color: #E1E0E0;
  color: #2C2C2C;
}


/* CORRIGÉ: theme-noir */

.theme-noir .card {
  background-color: #1F1F1F;
  border: none;
  color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-noir .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(255, 122, 0, 0.3);
}

.theme-noir .bouton_top {
  background-color: #161617;
  border: none;
  color: #ffffff;
}

.theme-noir .bouton_top:hover {
  background-color: #010100;
}

.theme-noir .bouton_milieu {
  background-color: #161617;
  border: none;
  color: #ffffff;
}

.theme-noir .bouton_milieu:hover {
  background-color: #010100;
}

.theme-noir .boxfooter {
  background-color: #1F1F1F;
  color: #ffffff;
}



/* thème halloween */

.theme-halloween .card {
  background-color: #1E2939 ; 
  border: none;  
  color: #f5730a;
  border-radius: 12px;;
}

.theme-halloween .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(255, 122, 0, 0.3);
}

.theme-halloween .bouton_top {
  background-color: #1E2939; 
  border: none;
  color: #f5730a;  
  font-weight: 600;
  border-radius: 8px;
}

.theme-halloween .bouton_top:hover {
  background-color: #f5730a;
  color: #1A1A1A;
  box-shadow: 0 0 12px rgba(255, 122, 0, 0.6);
}

.theme-halloween .bouton_milieu {
  background-color: #1F1F25;
  border: 1px solid #2E2E2E;
  color: #f5730a;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.theme-halloween .bouton_milieu:hover {
  background-color: #f5730a;
  border-color: #FF7A00;
  color: #1A1A1A;
}

.theme-halloween .boxfooter {
  background-color: #1E2939;
  color: #f5730a;
  border-top: 2px solid #FF7A00;
  text-align: center;
  padding: 1rem;
  letter-spacing: 0.5px;
}

/* === Décor Halloween (caché par défaut, visible en theme-halloween) === */

#contouros,
#araigner,
#citrouille,
#épouvantail,
#fantôme,
#squelette,
#squelette2 {
  position: absolute;
  z-index: 2;
  display: none;
  pointer-events: none;
  user-select: none;
}

/* Décor d'en-tête (dans halloween-decor, parent = header) */
#araigner {
  top: 80px;
  right: 6%;
  width: 80px;
  z-index: 3;
}

#squelette2 {
  top: 60px;
  left: -10px;
  width: 200px;
  transform: rotate(-8deg);
  z-index: 3;
}

#citrouille {
  top: 100px;
  right: 18%;
  width: 110px;
  z-index: 3;
}

/* Contour os autour de la photo */
#contouros {
  top: 50%;
  left: 50%;
  width: 320px;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Décor dans <main> */
#fantôme {
  top: 30%;
  left: 1%;
  width: 130px;
}

#squelette {
  top: 60%;
  right: 0;
  width: 280px;
}

/* Épouvantail dans le footer */
#épouvantail {
  top: -120px;
  left: 20px;
  width: 180px;
  z-index: 2;
}

/* === Footer === */

.footer-portfolio {
  position: relative;
  overflow: hidden;
  /* Pas de min-height imposé : le footer suit la hauteur du contenu.
     Le SVG est aplati verticalement via background-size: 100% 100%
     (réglé en JS) → motif compressé mais jamais coupé. */
  padding-block: clamp(2rem, 4vw, 4rem);
}

.footer-portfolio h5,
.footer-portfolio h6,
.footer-portfolio p {
  color: inherit;
}

.opacity-85 { opacity: 0.85; }

.footer-links,
.footer-portfolio ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a,
.footer-portfolio a {
  color: inherit !important;
  text-decoration: none !important;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover,
.footer-portfolio a:hover {
  opacity: 1;
  transform: translateX(2px);
}

.footer-separator {
  border-color: rgba(255,255,255,0.25);
  opacity: 1;
}

/* Footer texte sombre pour thèmes clairs */
.theme-blanc .footer-portfolio,
.theme-cyan  .footer-portfolio,
.theme-jaune .footer-portfolio,
.theme-gris  .footer-portfolio {
  color: #2C2C2C !important;
}

.theme-blanc .footer-separator,
.theme-cyan  .footer-separator,
.theme-jaune .footer-separator,
.theme-gris  .footer-separator {
  border-color: rgba(0,0,0,0.18);
}

/* Cartes · amélioration visuelle de base */
.theme-blanc .card-icon-top,
.theme-cyan  .card-icon-top {
  color: #2C2C2C;
}

/* Titres de section */
.titre_miniprojet h2,
.titre_grosprojet h2 {
  letter-spacing: 0.5px;
}

.theme-blanc .titre_miniprojet,
.theme-cyan  .titre_miniprojet,
.theme-jaune .titre_miniprojet {
  color: #2C2C2C;
}

/* Cartes placeholder « À venir » */
.card-placeholder {
  opacity: 0.55;
  filter: grayscale(0.4);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.card-placeholder:hover {
  opacity: 0.8;
  filter: grayscale(0.15);
}
.card-placeholder .btn.disabled {
  pointer-events: none;
  opacity: 0.85;
}

/* Découpage Année / Semestre */
.annee-block + .annee-block {
  margin-top: 3rem;
}

.annee-titre {
  font-size: 1.85rem;
  margin-bottom: 1.75rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.annee-titre::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  background: currentColor;
  opacity: 0.45;
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

.semestre-titre {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin: 1.25rem 0 1rem;
  opacity: 0.92;
}

.semestre-code {
  font-weight: 400;
  font-size: 0.95rem;
  opacity: 0.7;
  margin-left: 0.25rem;
}

.theme-blanc .annee-titre,
.theme-cyan  .annee-titre,
.theme-jaune .annee-titre,
.theme-blanc .semestre-titre,
.theme-cyan  .semestre-titre,
.theme-jaune .semestre-titre {
  color: #2C2C2C;
}

/* Texte hero */
.theme-blanc .Text_Titre,
.theme-cyan  .Text_Titre,
.theme-jaune .Text_Titre,
.theme-blanc .subtitle-portfolio,
.theme-cyan  .subtitle-portfolio,
.theme-jaune .subtitle-portfolio {
  color: #2C2C2C;
}

/* === Sous-page (R103/112/113/212) === */

.header-sub {
  min-height: calc(60vh - 70px);
  text-align: center;
}

.badge-module {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.theme-blanc .badge-module,
.theme-cyan  .badge-module,
.theme-jaune .badge-module {
  color: #2C2C2C;
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.15);
}

/* === Pages "mestravaux" · wrapper centré pour mini-apps === */

.app-shell {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}

.app-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 520px;
}

.app-card.app-card-wide { max-width: 820px; }

.app-card h1,
.app-card h4 {
  color: inherit;
}

.theme-blanc .app-card,
.theme-cyan  .app-card,
.theme-jaune .app-card {
  background: rgba(255,255,255,0.55);
  border-color: rgba(0,0,0,0.08);
  color: #2C2C2C;
}

.theme-halloween #contouros,
.theme-halloween #araigner,
.theme-halloween #citrouille,
.theme-halloween #épouvantail,
.theme-halloween #fantôme,
.theme-halloween #squelette,
.theme-halloween #squelette2 {
  display: block;
}

/* Sur petits écrans, on cache les déco trop encombrantes */
@media (max-width: 768px) {
  .theme-halloween #squelette,
  .theme-halloween #squelette2,
  .theme-halloween #fantôme,
  .theme-halloween #contouros {
    display: none;
  }
}

