
@font-face {
    font-family: 'Space Grotesk';
    src: url('webfont/Space_Grotesk/static/SpaceGrotesk-Regular.woff2') format('woff2'),
         url('webfont/Space_Grotesk/static/SpaceGrotesk-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Manrope';
    src: url('webfont/Manrope/static/Manrope-Regular.woff2') format('woff2'),
         url('webfont/Manrope/static/Manrope-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}


@keyframes gradient {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
@keyframes fade-in-normal {0% { opacity: 0; } 100% { opacity: 1;} }

.fade-in-normal { 
    animation: fade-in-normal 1s ease-out 0s 1 normal none; 
}
@keyframes slide-top-normal {0% { transform: translateY(0); } 100% { transform: translateY(-100px);} }

.slide-top-normal { 
    animation: slide-top-normal 1s ease-out 0s 1 normal none; 
}
@keyframes fade-in-bottom-normal {0% { transform: translateY(50px); opacity: 0; } 100% { transform: translateY(0); opacity: 1;} }

.fade-in-bottom-normal { 
    animation: fade-in-bottom-normal 1s ease-out 1s 1 normal none; 
}
@keyframes slide-bottom-normal {0% { transform: translateY(0); } 100% { transform: translateY(100px);} }

.slide-bottom-normal { 
    animation: slide-bottom-normal 1s ease 0s 1 normal none; 
}
@keyframes slide-right-normal {0% { transform: translateX(0); } 100% { transform: translateX(100px);} }

.slide-right-normal { 
    animation: slide-right-normal 1s ease 0s 1 normal backwards; 
}
@keyframes slide-left-reverse {0% { transform: translateX(0); } 100% { transform: translateX(-50px);} }

.slide-left-reverse { 
    animation: slide-left-reverse 1s cubic-bezier(0.550, 0.085, 0.680, 0.530) 0s 1 reverse none; 
}
@keyframes flip-vertical-left {0% { transform: rotateY(0); } 100% { transform: rotateY(-180deg);} }

.flip-vertical-left-normal { 
    animation: flip-vertical-left-normal 0.4s cubic-bezier(0.455, 0.030, 0.515, 0.955) 0s 1 normal both; 
}
/* ----------------------------------------------------------------------------------------------------------------------------*/
html {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
* {font-family: 'Manrope', sans-serif;}
a {
    text-decoration: none;
}
a:hover{
    text-decoration: none;
}
a:focus{
    text-decoration: none;
}
a:visited{
    text-decoration: none;
}
body {
    background: linear-gradient(to bottom, #053b50, #5cd0fd, #ffffff);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
  }
  
  .cloud {
    position: absolute;
    width: 400px;
    height: 200px;
    background: url('../img/nuage.png') no-repeat center/contain;
    opacity: 0;
    animation: moveClouds linear infinite, fadeClouds 8s ease-in-out infinite alternate;
    z-index: -1;
  }
  
  /* Nuage proche (bouge vite) */
  .cloud:nth-child(1) {
    top: 5%;
    left: -400px;
    width: 450px;
    height: 220px;
    animation-duration: 80s;
  }
  
  /* Nuage intermédiaire (vitesse normale) */
  .cloud:nth-child(2) {
    top: 30%;
    left: -500px;
    width: 400px;
    height: 200px;
    animation-duration: 95s;
  }
  
  /* Nuage lointain (bouge lentement) */
  .cloud:nth-child(3) {
    top: 50%;
    left: -600px;
    width: 350px;
    height: 180px;
    animation-duration: 90s;
  }
  
  /* Animation de déplacement */
  @keyframes moveClouds {
    from {
      transform: translateX(-200px);
    }
    to {
      transform: translateX(120vw);
    }
  }
  
  /* Animation de fondu pour opacité dynamique */
  @keyframes fadeClouds {
    from {
      opacity: 0.3;
    }
    50% {
      opacity: 0.7;
    }
    to {
      opacity: 0.5;
    }
  }
  
  
#container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre tout */
}
#homemain {
    width: 1300px;
    max-width: 100%;
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap; /* Permet aux divs de passer à la ligne si besoin */
    align-items: flex-start; /* Garde l'alignement en haut */
    gap: 10px; /* Espacement entre les divs */
}

.carre {
    min-height: 150px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e0e0e0, #ffffff, #cfcfcf);
    animation: gradient 15s ease infinite;
    background-size: 400% 400%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

/* Ajustement pour que la deuxième div colle bien à droite */
.carre:nth-child(2) {
    margin-left: auto;
}
.carrejob {
    width: 300px; /* Largeur de la galerie */
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes */
    grid-template-rows: repeat(2, 120px); /* Fixe la hauteur des lignes */
    gap: 3px; /* Supprime l'espace entre les colonnes et les lignes */
    padding: 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e0e0e0, #ffffff, #cfcfcf);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}
.carre img {
    max-width: 100%; /* L’image ne dépasse pas la largeur de la div */
    max-height: 100%; /* L’image ne dépasse pas la hauteur de la div */
    object-fit: cover; /* Recadre l’image pour remplir l’espace sans déformation */
    border-radius: 8px; /* Arrondi pour mieux s’intégrer au design */
}

.ban {
    width: 1300px;
    max-width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #e0e0e0, #ffffff, #cfcfcf);
    animation: gradient 15s ease infinite;
    background-size: 400% 400%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto; /* Ajout pour bien centrer */
}
.mainbloc {
    display: block !important;
    height: auto; /* Enlève le 100vh qui causait le problème */
    width: fit-content;
    height: fit-content;
    width: 400px;
}
.region_class {
    background: -webkit-linear-gradient(#0592f0, #0364a5);
    color: #f0f0f0;
    border: 3px solid #f0f0f0;
    padding: 5px;
    border-radius: 10px;
    font-size: 18px;
    font-variant: small-caps;
}
.depart_class {
    background: -webkit-linear-gradient(#139441, #05702b);
    color: #f0f0f0;
    border: 3px solid #f0f0f0;
    padding: 5px;
    border-radius: 10px;
    font-size: 18px;
    font-variant: small-caps;
}
table { 
    width: 100%; 
    height: 60%;
}
    th, td { 
    text-align: left; 
}
td {
    padding: 0; /* Supprime les espaces internes */
    overflow: hidden; /* Coupe l'image si elle dépasse */
    position: relative; /* Nécessaire pour positionner l’image */
}

td img {
    width: 100%; /* Remplit toute la largeur */
    height: 100%; /* Remplit toute la hauteur */
    object-fit: cover; /* Coupe l’image pour qu’elle s’adapte sans être déformée */
    display: block; /* Évite les espaces blancs autour de l’image */
}

    th { 
    background-color: transparent; 
}
    tr:nth-child(even) { 
    background-color: transparent;

}
h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: bold;
    background: -webkit-linear-gradient(#0364a5, #0592f0);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.right-box {
    position: fixed; /* Fixe la boîte en haut à droite */
    top: 120px;
    right: 20px;
    width: 80px; /* Taille du cercle */
    height: 80px;
    background: linear-gradient(135deg, #ff7e5f, #feb47b); /* Dégradé */
    border-radius: 50%; /* Rend la div totalement ronde */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10; /* Priorité pour éviter qu'elle soit bloquée */
    pointer-events: auto; /* Permet les interactions */
    transition: transform 0.3s ease-in-out;
}
.offrejob {
    background-color: #ffffff;
    color: #3498db;
    display: flex;
    flex-direction: column; /* Aligner le texte verticalement */
    align-items: center; /* Centrer le contenu */
    justify-content: center;
    width: 100px;  /* Carré */
    height: 100px;
    border-radius: 4px;
    text-align: center;
    margin: 0;
    padding: 8px;
    line-height: 1.2;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}
  .offrejob:hover {
    box-shadow: 0 1px 3px rgb(209, 16, 129, 0.7);
  }
  .offrejob h2 {
    margin-top: 0;
    font-size: 90%;
    background: -webkit-linear-gradient(#580535, #aa0766);
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .offrejob p {
    font-size: 11px;
    margin: 5px 0 0;
    padding: 0;
}
  

svg {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease-in-out;
}
path {
    fill:inherit;
    opacity: 0.5;
    stroke-width: 1px;
    cursor: pointer;
}
path:hover {
    fill: rgb(94, 200, 250);
    stroke:rgb(94, 200, 250);
    stroke-width: 1px;
}
path:focus {
    outline: none;
}
#info-panel {
    width: 750px;
    padding: 15px;
    font-size: 14px;
}
#info-panel region {
    margin-top: 0;
    font-size: 100%;
    background: -webkit-linear-gradient(#0592f0, #0364a5);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
#info-panel population {
    margin-top: 0;
    font-size: 100%;
    background: -webkit-linear-gradient(#a5038f, #e069d1);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
#info-panel superficie {
    margin-top: 0;
    font-size: 100%;
    background: -webkit-linear-gradient(#9aa503, #585e07);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
#info-panel img {
    border-radius: 10px;
}
.tooltip {
    position: absolute;
    background: -webkit-linear-gradient(#139441, #05702b);
    color: #f0f0f0;
    border: 3px solid #f0f0f0;
    font-weight: bolder;
    padding: 5px;
    border-radius: 10px;
    font-size: 18px;
    pointer-events: none;
    z-index: 9999;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    font-variant: small-caps;
}
/* Bouton Retour en haut */
.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none; /* Caché par défaut */
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s;
}

/* Apparition fluide */
.scroll-top-btn.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Effet au survol */
.scroll-top-btn:hover {
    background: #ff4500;
}
 /* Style de la pop-up */
 .popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 250px;
    background: -webkit-linear-gradient(#555555, #2b2b2b);
    border: 1px solid rgb(105, 105, 105);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    z-index: 1000;
    cursor: grab;
    overflow: hidden; /* 🔥 Supprime le scroll */
}
.popup iframe {
    background: transparent;
    width: 100%;
    height: calc(100% - 20px);
    border: none;
    overflow: hidden; /* 🔥 Supprime le scroll */
}
.popup-header {
    background:transparent;
    color: white;
    padding: 5px;
    cursor: move;
    text-align: center;
    font-size: 12px;
}
.close-btn {
    position: absolute;
    border-radius: 50%;
    top: 5px;
    right: 5px;
    background: #ff7300;
    color: #ffffff;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 12px;
}
.blur-bg {
    position: relative;
    width: 100%;
    height: 400px;
    background-image: url('image.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden; /* Évite les débordements */
}

.blur-bg::before {
    content: "";
    position: absolute;
    top: -10px; /* Ajuste pour éviter les bords nets du flou */
    left: -10px;
    width: calc(100% + 20px); /* Élargit légèrement pour couvrir tout */
    height: calc(100% + 20px);
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
    z-index: 1;
}

.blur-bg * {
    position: relative;
    z-index: 2; /* Assure que le texte reste net */
}
:root {
    --region: #0a80ff;
    --region-soft: #66b3ff;
    --region-deep: #045bb8;
    --region-muted: #dfefff;

    --departement: #6a9e09;
    --departement-soft: #9bc945;
    --departement-deep: #4f7706;
    --departement-muted: #edf6db;

    --commune-accent: #ce0328;
    --commune-soft: #f36a85;
    --commune-deep: #93011d;
    --commune-muted: #fff1f4;

    --news: #0800ff;
    --news-soft: #6f69ff;
    --news-deep: #0600a8;
    --news-muted: #e6e5ff;

    --surface-1: rgba(255, 255, 255, 0.82);
    --surface-2: rgba(255, 255, 255, 0.68);
    --surface-3: rgba(244, 249, 255, 0.52);

    --text-1: #08233f;
    --text-2: #35506c;
    --text-3: #6d8298;

    --sky-top: #0c4aa1;
    --sky-mid: #34aff7;
    --sky-bottom: #edf8ff;
    --sky-glow: rgba(255, 243, 191, 0.42);
    --season-wash: rgba(146, 214, 180, 0.15);
    --weather-veil: rgba(255, 255, 255, 0);
    --weather-overlay: none;
    --cloud-opacity: 0.34;
    --cloud-brightness: 1;
}

body {
    background:
        radial-gradient(circle at 82% 17%, var(--sky-glow) 0%, rgba(255, 255, 255, 0.08) 10%, transparent 22%),
        linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 56%, var(--sky-bottom) 100%);
    color: var(--text-1);
    isolation: isolate;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    z-index: -3;
    background:
        linear-gradient(180deg, var(--season-wash) 0%, transparent 65%),
        linear-gradient(180deg, var(--weather-veil) 0%, transparent 75%);
}

body::after {
    z-index: -2;
    background:
        var(--weather-overlay),
        radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.14) 0%, transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(5, 22, 45, 0.1) 100%);
}

body[data-cycle="day"] {
    --sky-top: #0c4aa1;
    --sky-mid: #34aff7;
    --sky-glow: rgba(255, 243, 191, 0.42);
    --cloud-brightness: 1.02;
}

body[data-cycle="night"] {
    --sky-top: #07163e;
    --sky-mid: #17376f;
    --sky-glow: rgba(240, 244, 255, 0.18);
    --cloud-brightness: 0.76;
}

body[data-season="spring"] {
    --sky-bottom: #ebfff2;
    --season-wash: rgba(121, 216, 161, 0.18);
}

body[data-season="summer"] {
    --sky-bottom: #fff2d7;
    --season-wash: rgba(255, 214, 117, 0.18);
}

body[data-season="autumn"] {
    --sky-bottom: #f6e5d6;
    --season-wash: rgba(206, 132, 64, 0.18);
}

body[data-season="winter"] {
    --sky-bottom: #edf7ff;
    --season-wash: rgba(179, 213, 244, 0.2);
}

body[data-weather="clear"] {
    --weather-veil: rgba(255, 255, 255, 0);
    --cloud-opacity: 0.24;
}

body[data-weather="cloudy"] {
    --weather-veil: rgba(136, 158, 180, 0.14);
    --cloud-opacity: 0.44;
}

body[data-weather="rain"] {
    --weather-veil: rgba(87, 109, 145, 0.22);
    --weather-overlay: none;
    --cloud-opacity: 0.54;
}

body[data-weather="storm"] {
    --weather-veil: rgba(50, 57, 92, 0.34);
    --weather-overlay: none;
    --cloud-opacity: 0.62;
}

body[data-weather="fog"] {
    --weather-veil: rgba(228, 238, 248, 0.28);
    --cloud-opacity: 0.6;
}

body[data-weather="snow"] {
    --weather-veil: rgba(240, 246, 255, 0.22);
    --weather-overlay: none;
    --cloud-opacity: 0.38;
}

.cloud {
    opacity: var(--cloud-opacity);
    filter: saturate(0.92) brightness(var(--cloud-brightness));
}

.weather-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.weather-band {
    position: absolute;
    inset: -18%;
    opacity: 0;
    will-change: transform, opacity;
}

body[data-weather="rain"] .weather-band,
body[data-weather="storm"] .weather-band {
    display: block;
    background-repeat: repeat;
    background-image:
        repeating-linear-gradient(
            103deg,
            rgba(214, 236, 255, 0) 0 12px,
            rgba(214, 236, 255, 0.72) 12px 14px,
            rgba(214, 236, 255, 0) 14px 28px
        );
}

body[data-weather="rain"] .weather-band-1,
body[data-weather="storm"] .weather-band-1 {
    opacity: 0.28;
    background-size: 220px 220px;
    animation: weather-rain-fall-1 1.2s linear infinite;
}

body[data-weather="rain"] .weather-band-2,
body[data-weather="storm"] .weather-band-2 {
    opacity: 0.2;
    background-size: 300px 300px;
    filter: blur(0.4px);
    animation: weather-rain-fall-2 1.8s linear infinite;
}

body[data-weather="rain"] .weather-band-3,
body[data-weather="storm"] .weather-band-3 {
    opacity: 0.12;
    background-size: 380px 380px;
    filter: blur(0.8px);
    animation: weather-rain-fall-3 2.4s linear infinite;
}

body[data-weather="storm"] .weather-band-1 {
    opacity: 0.38;
}

body[data-weather="storm"] .weather-band-2 {
    opacity: 0.28;
}

body[data-weather="storm"] .weather-band-3 {
    opacity: 0.18;
}

body[data-weather="snow"] .weather-band {
    display: block;
    background-repeat: repeat;
}

body[data-weather="snow"] .weather-band-1 {
    opacity: 0.5;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1.8px, transparent 2.1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 1.2px, transparent 1.5px);
    background-size: 140px 140px, 220px 220px;
    background-position: 0 0, 60px 80px;
    animation: weather-snow-fall-1 14s linear infinite;
}

body[data-weather="snow"] .weather-band-2 {
    opacity: 0.34;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 2.3px, transparent 2.6px),
        radial-gradient(circle, rgba(255, 255, 255, 0.66) 0 1.5px, transparent 1.8px);
    background-size: 190px 190px, 280px 280px;
    background-position: 40px 30px, 120px 150px;
    animation: weather-snow-fall-2 18s linear infinite;
}

body[data-weather="snow"] .weather-band-3 {
    opacity: 0.22;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.78) 0 2.7px, transparent 3px),
        radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1.8px, transparent 2.1px);
    background-size: 260px 260px, 340px 340px;
    background-position: 20px 60px, 160px 100px;
    filter: blur(0.3px);
    animation: weather-snow-fall-3 24s linear infinite;
}

@keyframes weather-rain-fall-1 {
    from { transform: translate3d(0, -6%, 0); }
    to { transform: translate3d(2%, 14%, 0); }
}

@keyframes weather-rain-fall-2 {
    from { transform: translate3d(-2%, -10%, 0); }
    to { transform: translate3d(1%, 16%, 0); }
}

@keyframes weather-rain-fall-3 {
    from { transform: translate3d(1%, -8%, 0); }
    to { transform: translate3d(3%, 18%, 0); }
}

@keyframes weather-snow-fall-1 {
    from { transform: translate3d(-1%, -8%, 0); }
    to { transform: translate3d(2%, 12%, 0); }
}

@keyframes weather-snow-fall-2 {
    from { transform: translate3d(1%, -12%, 0); }
    to { transform: translate3d(-2%, 14%, 0); }
}

@keyframes weather-snow-fall-3 {
    from { transform: translate3d(-2%, -10%, 0); }
    to { transform: translate3d(3%, 16%, 0); }
}

.region_class {
    background: linear-gradient(135deg, var(--region), var(--region-deep));
}

.depart_class {
    background: linear-gradient(135deg, var(--departement), var(--departement-deep));
}

#container {
    position: relative;
    z-index: 1;
}

.right-box,
.tooltip {
    z-index: 4;
}

body {
    margin: 0;
    padding: 0 0 3rem;
}

#container {
    width: 100%;
}

.home-shell {
    position: relative;
    --home-card-width: min(70vw, 980px);
    width: min(var(--home-card-width), calc(100vw - 1.25rem));
    box-sizing: border-box;
    display: grid;
    justify-items: start;
    gap: 0;
    margin: 4.2rem auto 2rem;
}

.home-top-stage {
    display: block;
    width: 100%;
}

.right-box {
    position: static;
    margin-top: 0.2rem;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    box-shadow: none;
    display: block;
}

.home-hero {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

.home-map-card {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    min-height: 18rem;
    padding: 1.4rem 1.25rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 1.8rem 1.8rem 0 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.12) 100%);
    box-shadow: 0 24px 60px rgba(8, 28, 58, 0.22);
    backdrop-filter: blur(18px);
    overflow: visible;
}

.home-map-stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(1rem, 2.8vw, 2.2rem);
    width: 100%;
}

.home-map-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.18) 0%, transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 40%);
    pointer-events: none;
}

.mainbloc {
    position: relative;
    z-index: 1;
    width: min(61%, 500px);
    margin: 0;
}

.mainbloc main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 220px;
}

.right-box,
.user-menu {
    position: relative;
    z-index: 3;
    overflow: visible;
}

.mainbloc svg,
.home-map-fallback {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.home-main-panel {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    justify-self: start;
    margin-top: 0;
    padding: 0.9rem 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-top: 0;
    border-radius: 0 0 1.6rem 1.6rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 251, 255, 0.78) 100%);
    box-shadow: 0 24px 68px rgba(7, 29, 59, 0.16);
    backdrop-filter: blur(18px);
    display: grid;
    grid-template-columns: minmax(86px, 18%) minmax(0, 1fr) minmax(72px, 15%);
    gap: 0.8rem;
    align-items: start;
}

.home-side-rail,
.home-main-column {
    display: grid;
    gap: 0.7rem;
    min-width: 0;
}

.home-side-card,
.home-intro-card,
.home-info-card,
.home-strip-card {
    border: 1px solid rgba(216, 228, 240, 0.92);
    border-radius: 1.05rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 250, 255, 0.84) 100%);
    box-shadow: 0 12px 28px rgba(9, 30, 57, 0.08);
}

.home-side-card,
.home-intro-card {
    padding: 0.82rem 0.62rem 0.9rem;
}

.home-side-card p,
.home-intro-card p {
    margin: 0.55rem 0 0;
    color: var(--text-2);
    line-height: 1.45;
    font-size: 0.84rem;
    word-break: break-word;
}

.home-intro-card h1 {
    margin: 0.4rem 0 0;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.08;
}

.home-info-card {
    min-height: 18.5rem;
    padding: 0.95rem;
    overflow: hidden;
}

.home-side-card {
    min-height: 8.2rem;
    align-content: start;
}

.home-strip-list {
    display: grid;
    gap: 0.55rem;
}

.home-strip-card {
    padding: 0.72rem 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-1);
    font-weight: 700;
    font-size: 0.86rem;
}

.home-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-2);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92);
}

.home-dot-region {
    background: var(--region);
}

.home-dot-departement {
    background: var(--departement);
}

.home-dot-commune {
    background: #ffffff;
    border: 2px solid var(--commune-accent);
    box-sizing: border-box;
}

.home-dot-news {
    background: var(--news);
}

.home-side-card .carrejob {
    width: 100%;
    margin-top: 0.65rem;
    padding: 0;
    gap: 0.35rem;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    background: transparent;
    box-shadow: none;
}

.home-side-card .offrejob {
    width: 100%;
    min-height: 74px;
    height: auto;
    padding: 0.6rem 0.4rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 0 0 1px rgba(221, 231, 243, 0.96);
}

.home-side-card .offrejob h2 {
    font-size: 0.76rem;
}

.home-side-card .offrejob p {
    display: none;
}

.home-panel-placeholder,
.home-panel-details {
    display: grid;
    gap: 1rem;
}

.home-panel-placeholder h2,
.home-panel-heading h2 {
    margin: 0.3rem 0 0;
    font-size: 1.4rem;
}

.home-panel-placeholder p {
    margin: 0;
    color: var(--text-2);
    line-height: 1.6;
}

.home-panel-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.home-panel-body {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.home-panel-visual img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    border-radius: 1rem;
}

.home-panel-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.home-fact {
    padding: 0.85rem 0.9rem;
    border-radius: 0.95rem;
    background: rgba(240, 246, 255, 0.88);
    box-shadow: inset 0 0 0 1px rgba(215, 226, 239, 0.9);
}

.home-fact span {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-3);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-fact strong {
    display: block;
    color: var(--text-1);
    font-size: 1rem;
}

.tooltip {
    z-index: 8;
}

#info-panel {
    width: auto;
    font-size: 1rem;
}

path {
    transition: fill 0.18s ease, stroke 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

path:hover,
path.selected {
    fill: rgba(10, 128, 255, 0.92);
    stroke: rgba(10, 128, 255, 0.92);
    opacity: 0.96;
}

@media (max-width: 1080px) {
    .home-shell {
        --home-card-width: min(72vw, 900px);
        width: min(var(--home-card-width), calc(100vw - 1rem));
    }

    .home-main-panel {
        grid-template-columns: 1fr;
        margin-top: 0;
    }

    .home-side-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    body {
        padding-bottom: 2rem;
    }

    .home-shell {
        --home-card-width: min(410px, calc(100vw - 1rem));
        width: var(--home-card-width);
        margin-top: 4.3rem;
    }

    .home-top-stage {
        width: 100%;
        display: block;
    }

    .home-hero {
        width: var(--home-card-width);
    }

    .home-map-card {
        min-height: 15.5rem;
        padding: 1.25rem 0.85rem 1.15rem;
    }

    .home-map-stage {
        display: grid;
        justify-items: center;
        gap: 0.7rem;
    }

    .mainbloc {
        width: min(84%, 360px);
    }

    .home-main-panel {
        width: 100%;
        margin-top: 0;
        padding: 0.78rem;
    }

    .home-side-rail {
        grid-template-columns: 1fr;
    }

    .home-side-card .carrejob {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-panel-body,
    .home-panel-facts {
        grid-template-columns: 1fr;
    }
}
