/* ============================================================
   PORTFOLIO — NATHAN SURIN / AKA KITSOUNE
   Feuille de style partagée — style.css
   ============================================================ */

/* ---- Variables & Reset ---- */

/* Police Persona 5 Menu — utilisée pour le nom "NATHAN SURIN" */
@font-face {
  font-family: "P5Menu";
  src: url("../assets/fonts/p5menu.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #ba0101;
  --dark-red: #420306;
  --gray: #d3d2d2;
  --white: #ffffff;
  --black: #060505;
  --nav-bg: rgba(6, 5, 5, 0.9);
  --card-bg: rgba(255, 255, 255, 0.02);
  --overlay-solid: rgba(6, 5, 5, 0.9);
  --font-h: "Arsenal", sans-serif;
  --font-sh: "Zilla Slab", serif;
  --font-b: "Fira Sans", sans-serif;
  --font-p5: "P5Menu", "Arsenal", sans-serif;
}

/* ---- Light Mode Variables ---- */
html.light-mode {
  --red: #d10000;
  --dark-red: #f4d9d9;
  --gray: #4a4a4a;
  --white: #060505;
  --black: #f9f9f9;
  --nav-bg: rgba(249, 249, 249, 0.9);
  --card-bg: rgba(0, 0, 0, 0.03);
  --overlay-solid: rgba(249, 249, 249, 0.95);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-b);
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: manipulation;
}

/* ---- Scrollbar native masquée — remplacée par scrollbar custom DOM ---- */
/* On masque complètement la scrollbar native pour éviter le curseur OS */
html {
  scrollbar-width: none; /* Firefox */
  overflow-y: scroll;
}
html::-webkit-scrollbar {
  width: 0px !important;
  display: none !important;
}

/* ---- Scrollbar custom DOM (cursor:none fonctionne ici) ---- */
#customScrollbar {
  position: fixed;
  right: 4px;
  top: 0;
  bottom: 0;
  width: 6px;
  z-index: 999998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#customScrollbar.visible {
  opacity: 1;
}
#customScrollbarTrack {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(186, 1, 1, 0.08);
  border-radius: 3px;
}
#customScrollbarThumb {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--red);
  border-radius: 3px;
  min-height: 40px;
  pointer-events: auto;
  cursor: none !important;
  transition: background 0.2s ease;
}
#customScrollbarThumb:hover {
  background: #e00101;
}

/* ---- Custom Cursor Set (Persona 5) sur PC / Pointeurs non-tactiles ---- */
*,
*::before,
*::after {
  cursor: none !important;
}

@media (hover: hover) and (pointer: fine) {

  #p5CustomCursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    pointer-events: none;
    z-index: 999999;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top left;
    transform: translate3d(-5px, -5px, 0);
    transition: opacity 0.2s ease;
    will-change: transform;
    display: block;
  }
}



/* ---- Noise overlay ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(186, 1, 1, 0.03) 40px,
    rgba(186, 1, 1, 0.03) 42px
  );
}

/* ---- Page flash (Persona 5 transition) ---- */
.page-flash {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--red);
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left;
}
.page-flash.out {
  animation: flashOut 0.5s cubic-bezier(0.7, 0, 0.3, 1) forwards;
}
@keyframes flashOut {
  0% {
    transform: scaleX(1);
    transform-origin: left;
  }
  50% {
    transform: scaleX(1);
    transform-origin: right;
  }
  100% {
    transform: scaleX(0);
    transform-origin: right;
  }
}

/* ---- Navbar ---- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: var(--nav-bg);
  border-bottom: 2px solid var(--red);
  backdrop-filter: blur(12px);
}
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-logo:hover {
  opacity: 0.85;
}
.nav-logo img {
  height: 38px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 0px var(--red));
  transition: filter 0.3s;
}
.nav-logo:hover img {
  filter: drop-shadow(0 0 6px var(--red));
}
.nav-logo-text {
  font-family: var(--font-p5);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-left: 0.75rem;
  transition: color 0.3s;
}
.nav-logo:hover .nav-logo-text {
  color: var(--red);
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-h);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover {
  color: var(--white);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}
.nav-links a.active {
  color: var(--red);
}

/* ---- Nav Controls & Theme Toggle ---- */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.theme-toggle,
.lang-toggle,
.weather-toggle {
  width: 28px;
  height: 42px; /* Allure de carte de tarot */
  background: rgba(186, 1, 1, 0.05);
  border: 1px solid var(--red);
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  transition: all 0.3s;
  position: relative;
}
.theme-toggle::after,
.lang-toggle::after,
.weather-toggle::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px dashed rgba(186, 1, 1, 0.35);
  border-radius: 1px;
  pointer-events: none;
}
.theme-toggle:hover,
.lang-toggle:hover,
.weather-toggle:hover {
  background: rgba(186, 1, 1, 0.15);
  box-shadow: 0 0 10px rgba(186, 1, 1, 0.3);
  transform: translateY(-2px);
}
.weather-toggle.disabled {
  opacity: 0.45;
  filter: grayscale(1);
}
.weather-toggle.disabled::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  right: 3px;
  height: 2px;
  background: var(--red);
  transform: rotate(-45deg);
  z-index: 2;
}
.lang-toggle {
  font-family: var(--font-h);
  font-size: 0.85rem;
  font-weight: 700;
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  position: relative;
}
.icon-moon {
  display: none;
}
html.light-mode .icon-sun {
  display: none;
}
html.light-mode .icon-moon {
  display: block;
}

/* ---- Audio Control Persona 5 Royal ---- */
.audio-control-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--red);
  padding: 0.3rem 0.6rem;
  position: relative;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.audio-control-wrap:hover {
  background: rgba(186, 1, 1, 0.15);
  box-shadow: 0 0 14px rgba(186, 1, 1, 0.4);
}

.audio-toggle {
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem;
  transition: color 0.2s;
}

.audio-toggle:hover {
  color: var(--red);
}

.audio-toggle svg {
  width: 16px;
  height: 16px;
}

.audio-toggle svg.hidden {
  display: none !important;
}

.volume-slider-wrap {
  display: flex;
  align-items: center;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin 0.3s ease;
  margin-left: 0;
}

.audio-control-wrap:hover .volume-slider-wrap,
.audio-control-wrap:focus-within .volume-slider-wrap {
  max-width: 75px;
  opacity: 1;
  margin-left: 0.4rem;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 65px;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--red) 0%,
    var(--red) var(--val-pct, 30%),
    rgba(211, 210, 210, 0.3) var(--val-pct, 30%)
  );
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 14px;
  background: var(--white);
  border: 1px solid var(--red);
  cursor: pointer;
  clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%);
  transition: transform 0.15s, background 0.15s;
}

.volume-slider::-webkit-slider-thumb:hover {
  background: var(--red);
  transform: scale(1.15);
}

.volume-slider::-moz-range-thumb {
  width: 10px;
  height: 14px;
  background: var(--white);
  border: 1px solid var(--red);
  cursor: pointer;
  clip-path: polygon(2px 0, 100% 0, calc(100% - 2px) 100%, 0 100%);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1100;
}
.burger span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--white);
  transition:
    transform 0.3s,
    opacity 0.3s;
}
.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: var(--black);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  font-family: var(--font-h);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.mobile-menu a:hover {
  color: var(--red);
}

/* ---- Section labels & titles (shared) ---- */
.section-label {
  font-family: var(--font-h);
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 2px;
  background: var(--red);
}
.section-title {
  font-family: var(--font-p5);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 2.5rem;
  padding-right: 0.15em;
  padding-bottom: 0.1em;
}
.section-title em {
  color: var(--red);
  font-style: normal;
}

/* ---- Buttons ---- */
.btn-primary {
  font-family: var(--font-h);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  background: var(--red);
  border: 2px solid var(--red);
  padding: 0.8rem 2rem;
  display: inline-block;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition:
    background 0.2s,
    color 0.2s,
    clip-path 0.2s;
}
.btn-primary:hover {
  background: transparent;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.btn-ghost {
  font-family: var(--font-h);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  background: transparent;
  border: 2px solid var(--gray);
  padding: 0.8rem 2rem;
  display: inline-block;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition:
    border-color 0.2s,
    color 0.2s,
    clip-path 0.2s;
}
.btn-ghost:hover {
  border-color: var(--red);
  color: var(--red);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Diagonal separator ---- */
.diag-sep {
  position: relative;
  z-index: 1;
  height: 80px;
  overflow: hidden;
}
.diag-sep::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -5%;
  right: -5%;
  height: 100%;
  background: rgba(186, 1, 1, 0.07);
  transform: skewY(-2deg);
}

/* ---- Footer ---- */
footer {
  position: relative;
  z-index: 1;
  background: var(--black);
  border-top: 2px solid var(--dark-red);
  padding: 2rem 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-logo {
  font-family: var(--font-p5);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}
.footer-logo span {
  color: var(--red);
}
.footer-legal {
  font-family: var(--font-b);
  font-size: 0.75rem;
  color: var(--gray);
  opacity: 0.7;
  text-align: center;
  flex: 1 0 100%;
  order: 10;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(186, 1, 1, 0.15);
}
.footer-legal a {
  color: var(--red);
  text-decoration: none;
}
.footer-legal a:hover {
  text-decoration: underline;
}
.footer-socials {
  display: flex;
  gap: 1rem;
}
.footer-socials a {
  font-family: var(--font-h);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-socials a:hover {
  color: var(--red);
}

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 40px;
  height: 40px;
  background: rgba(186, 1, 1, 0.1);
  border: 1px solid rgba(186, 1, 1, 0.3);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: rgba(186, 1, 1, 0.3);
  border-color: var(--red);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  nav {
    padding: 0 1rem;
  }
  .nav-logo-text {
    font-size: 0.9rem;
    margin-left: 0.5rem;
    letter-spacing: 0.05em;
  }
  .nav-links {
    display: none;
  }
  .nav-controls {
    gap: 0.75rem;
  }
  .burger {
    display: flex;
  }
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* ---- Custom Checkbox & Form Groups ---- */
.checkbox-group {
  margin-top: 1rem;
}
.checkbox-group input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-label {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-family: var(--font-b);
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.5;
  cursor: pointer;
  transition: color 0.2s;
}
.checkbox-label:hover {
  color: var(--white);
}
.checkbox-label::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1px solid rgba(186, 1, 1, 0.4);
  background: rgba(186, 1, 1, 0.05);
  border-radius: 2px;
  margin-top: 0.1rem;
  transition: all 0.2s;
}
.checkbox-group input[type="checkbox"]:checked + .checkbox-label::before {
  background: var(--red);
  border-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}
.checkbox-group input[type="checkbox"]:focus-visible + .checkbox-label::before {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.form-submit-group {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ---- Modal Mentions Légales ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  padding: 1rem;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: var(--black);
  border: 1px solid var(--red);
  padding: 2.5rem 2rem;
  max-width: 800px;
  width: 100%;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.modal-overlay.open .modal-content {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--gray);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover {
  color: var(--red);
}
.modal-content h2 {
  font-family: var(--font-p5);
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  padding-right: 0.1em;
  padding-bottom: 0.1em;
  color: var(--white);
}
.modal-content h2 em {
  color: var(--red);
  font-style: normal;
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.modal-grid p {
  font-family: var(--font-b);
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.modal-grid strong {
  color: var(--white);
  font-weight: 500;
}
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0.75rem;
  }
  .modal-content {
    padding: 2rem 1.25rem 1.5rem 1.25rem;
    max-height: calc(100vh - 1.5rem);
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  }
  .modal-close {
    top: 0.5rem;
    right: 0.75rem;
  }
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ---- Lightbox (Zoom Image) ---- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
  padding: 2rem;
}
.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--red);
}
.lightbox-overlay.open .lightbox-img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: transparent;
  border: none;
  color: var(--gray);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  z-index: 3001;
}
.lightbox-close:hover {
  color: var(--red);
}
/* Remplace les curseurs navigateur par les gifs custom Persona 5 (voir @media (hover: hover) en haut) */

/* ============================================================
   WEATHER WIDGET — Affichage météo + date/heure
   ============================================================ */

.weather-widget {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-h);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gray);
  white-space: nowrap;
  flex-shrink: 0;
}

.weather-widget .w-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.weather-widget .w-icon .weather-svg { width: 1.15rem; height: 1.15rem; color: var(--red); vertical-align: middle; }
.hero-weather-card .w-icon .weather-svg { width: 2.2rem; height: 2.2rem; color: var(--red); margin-bottom: 0.2rem; }
.weather-widget .w-temp { color: var(--white); font-weight: 700; font-size: 0.8rem; }
.weather-widget .w-label { opacity: 0.75; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.65rem; }
.weather-widget .w-sep { opacity: 0.4; margin: 0 0.15rem; }
.weather-widget .w-date { opacity: 0.7; font-size: 0.68rem; }

/* ---- Widget Navbar (PC uniquement) ---- */
.nav-weather { display: none; }

@media (hover: hover) and (pointer: fine) {
  .nav-weather {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-left: 1px solid rgba(186, 1, 1, 0.25);
    margin-right: 0.25rem;
  }
}

/* ---- Widget Hero (PC uniquement) ---- */
.hero-weather-wrap { display: none; }

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .hero-weather-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    position: absolute;
    top: 50%;
    right: max(2rem, calc((100vw - 1100px) / 2));
    transform: translateY(-50%);
    z-index: 3;
  }
  .hero-weather-card {
    background: rgba(6, 5, 5, 0.75);
    border: 1px solid rgba(186, 1, 1, 0.3);
    padding: 1.1rem 1.4rem;
    backdrop-filter: blur(14px);
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 220px;
    animation: fadeUp 0.8s 1.5s ease forwards;
    opacity: 0;
  }
  .hero-weather-card .w-icon { font-size: 2rem; display: block; margin-bottom: 0.15rem; }
  .hero-weather-card .w-temp { font-size: 1.8rem; font-family: var(--font-h); color: var(--white); font-weight: 700; line-height: 1; }
  .hero-weather-card .w-label { font-family: var(--font-h); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
  .hero-weather-card .w-sep { display: none; }
  .hero-weather-card .w-date { font-family: var(--font-b); font-size: 0.72rem; color: var(--gray); opacity: 0.8; border-top: 1px solid rgba(186, 1, 1, 0.2); padding-top: 0.5rem; margin-top: 0.25rem; }
}

/* ---- Widget Footer ---- */
.footer-weather { display: flex; align-items: center; }

/* ============================================================
   WEATHER PARTICLES CANVAS
   ============================================================ */
#weatherParticles,
#weatherParticles canvas,
#customWeatherCanvas {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 99995 !important;
}

/* ============================================================
   AMBIANCE MÉTÉO — teintes sur body
   ============================================================ */
body.weather-rain::before,
body.weather-storm::before {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(186, 1, 1, 0.03) 40px,
    rgba(186, 1, 1, 0.03) 42px
  );
}
body.weather-snow::before {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(186, 1, 1, 0.03) 40px,
    rgba(186, 1, 1, 0.03) 42px
  );
}

/* Brouillard : brume atmosphérique animée très légère pour lisibilité parfaite */
body.weather-fog::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle, rgba(160, 160, 190, 0.04) 0%, rgba(10, 10, 20, 0.15) 100%);
  backdrop-filter: blur(0.5px);
  animation: fogPulse 8s ease-in-out infinite alternate;
}

@keyframes fogPulse {
  0% { opacity: 0.4; }
  100% { opacity: 0.75; }
}

/* ---- Météo Simulator : bouton actif ---- */
.admin-toolbar .btn-sm.active {
  background: var(--red) !important;
  color: var(--white) !important;
  border-color: var(--red) !important;
}

/* ============================================================
   GUIRLANDES DE NOËL — Décembre
   ============================================================ */
#xmasGarland {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 999;
  pointer-events: none;
  overflow: hidden;
  height: 36px;
}
.garland-wire {
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(100, 65, 10, 0.7) 0%,
    rgba(170, 120, 30, 0.9) 15%,
    rgba(100, 65, 10, 0.7) 30%,
    rgba(170, 120, 30, 0.9) 50%,
    rgba(100, 65, 10, 0.7) 70%,
    rgba(170, 120, 30, 0.9) 85%,
    rgba(100, 65, 10, 0.7) 100%
  );
  box-shadow: 0 1px 4px rgba(170, 120, 30, 0.4);
}
.garland-bulbs {
  position: absolute;
  top: 2px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 0 0.75rem;
}
.garland-bulb {
  display: block;
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 55% 55%;
  background: var(--bulb-color, #ff0000);
  box-shadow: 0 0 6px 2px var(--bulb-color, #ff0000),
              0 0 14px 4px var(--bulb-color, #ff0000);
  animation: bulbGlow 1.5s ease-in-out infinite alternate;
  flex-shrink: 0;
  position: relative;
}
.garland-bulb::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 5px;
  background: rgba(170, 120, 30, 0.9);
  border-radius: 1px;
}
@keyframes bulbGlow {
  from { opacity: 0.55; box-shadow: 0 0 4px 1px var(--bulb-color, #ff0000); }
  to   { opacity: 1;    box-shadow: 0 0 10px 4px var(--bulb-color, #ff0000), 0 0 20px 8px var(--bulb-color, #ff0000); }
}
@media (max-width: 768px) {
  #xmasGarland { top: 64px; }
  .garland-bulb { width: 7px; height: 10px; }
}

/* ---- Manteau de neige irrégulier & dégoulinant (CSS natif fixe par conteneur) ---- */
body.weather-snow .project-card::before,
body.weather-snow .value-card::before,
body.weather-snow .timeline-content::before,
body.weather-snow .contact-card::before,
body.weather-snow .hero-weather-card::before,
body.weather-snow .cat-card::before,
body.weather-snow .pcard::before,
body.weather-snow .admin-toolbar::before,
body.weather-snow .stat-card::before,
body.weather-snow .modal-content::before,
body.weather-snow .hero-tag::before,
body.weather-xmas .project-card::before,
body.weather-xmas .value-card::before,
body.weather-xmas .timeline-content::before,
body.weather-xmas .contact-card::before,
body.weather-xmas .hero-weather-card::before,
body.weather-xmas .cat-card::before,
body.weather-xmas .pcard::before,
body.weather-xmas .admin-toolbar::before,
body.weather-xmas .stat-card::before,
body.weather-xmas .modal-content::before,
body.weather-xmas .hero-tag::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 14px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 14" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,3 C92,3 90,11 84,11 C78,11 76,2 70,2 C64,2 62,9 56,9 C50,9 48,3 42,3 C36,3 34,13 28,13 C22,13 20,4 14,4 C8,4 6,8 0,3 Z" fill="rgba(255,255,255,0.93)"/></svg>');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 10;
}



body.weather-snow .contact-card,
body.weather-snow .value-card,
body.weather-snow .hero-tag,
body.weather-snow .timeline-content,
body.weather-xmas .contact-card,
body.weather-xmas .value-card,
body.weather-xmas .hero-tag,
body.weather-xmas .project-card,
body.weather-xmas .timeline-content,
body.weather-xmas .cat-card {
  overflow: visible !important;
}

