:root {
    --cgt-red: #e30613;
    --cgt-dark: #1f1f1f;
    --cgt-border: rgba(0, 0, 0, 0.08);
    --header-height: 96px;
    --page-gap: 16px;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: #fff;
    color: var(--cgt-dark);
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
    font-weight: 400;
    overflow-x: hidden;
}

p,
div,
span,
li,
a,
button,
input,
textarea,
select,
label,
small {
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
    font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.modal-title,
.eyebrow {
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
    font-weight: 800;
}

.page-shell {
    min-height: 100vh;
}

.page-header {
    background: #fff;
    border-bottom: 1px solid var(--cgt-border);
    z-index: 1030;
}

.page-header-fixed {
    position: static;
}

.page-header-bg-right {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(38vw, 520px);
    background-image: url("../assets/header-right.jpg");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
    opacity: 1;
    pointer-events: none;
    z-index: 1;
}


.header-title-image-wrap {
    position: relative;
    z-index: 2;
}

.header-title-image {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
}

.modal-dialog-scrollable .modal-content{
    min-height: 100%;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* ratio 16:9 */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* garde le h1 pour le SEO/accessibilité, mais invisible */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


.page-main {
    padding: 1rem 0 1.25rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: var(--cgt-red);
    margin: 0;
}

.page-title {
    line-height: 1.05;
    margin: 0;
}

.page-subtitle {
    font-size: 1rem;
    color: #555;
    margin: 0;
}

.map-card {
    background: #fff;
    border: 1px solid var(--cgt-border);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    padding: 12px;
}

.map-stage {
    position: relative;
    width: 100%;
}

.map-svg-wrap {
    position: relative;
    width: 100%;
    line-height: 0;
    overflow: hidden;
    border-radius: 2px;

}

/* état normal : la carte s'affiche toujours */
.map-svg-wrap svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

.map-svg-wrap a {
    cursor: default;
}

.map-svg-wrap .departement {
    fill: #64a3de;
    stroke: #ffffff;
    stroke-width: 1;
    transition: fill 0.16s ease, opacity 0.16s ease;
}

.map-svg-wrap .departement:hover,
.map-svg-wrap .departement.is-related {
    fill: #dd4948;
}

.map-svg-wrap .region {
    opacity: 1;
}

#project-markers {
    pointer-events: auto;
}

.project-marker {
    cursor: pointer;
    outline: none;
}

.project-marker-pulse {
    fill: rgba(227, 6, 19, 0.18);
    transform-box: fill-box;
    transform-origin: center;
    animation: markerPulse 2.2s infinite;
    pointer-events: none;
}

.project-marker-ring {
    fill: rgba(255, 255, 255, 0.88);
    stroke: rgba(0, 0, 0, 0.12);
    stroke-width: 1;
    pointer-events: none;
}

.project-marker-dot {
    fill: var(--cgt-red);
    stroke: #ffffff;
    stroke-width: 3;
    transition: transform 0.18s ease, fill 0.18s ease, stroke 0.18s ease;
    vector-effect: non-scaling-stroke;
}

.project-marker:hover .project-marker-dot,
.project-marker.is-active .project-marker-dot,
.project-marker:focus .project-marker-dot,
.project-marker:focus-visible .project-marker-dot {
    fill: #111;
}

.project-marker:hover .project-marker-ring,
.project-marker.is-active .project-marker-ring,
.project-marker:focus .project-marker-ring,
.project-marker:focus-visible .project-marker-ring {
    stroke: rgba(0, 0, 0, 0.25);
}

.project-marker:focus-visible .project-marker-dot,
.project-marker:focus-visible .project-marker-ring {
    filter: drop-shadow(0 0 0.35rem rgba(227, 6, 19, 0.35));
}

.map-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.nav-btn {
    min-width: 52px;
    font-weight: 800;
}

.project-modal .modal-content,
.project-modal {
    border-radius: 18px;
}

.modal-kicker {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cgt-red);
    font-weight: 800;
}

#projectModalContent iframe,
#projectModalContent video,
#projectModalContent embed,
#projectModalContent blockquote,
#projectModalContent .twitter-tweet,
#projectModalContent .instagram-media {
    max-width: 100%;
}

#projectModalContent img {
    max-width: 100%;
    height: auto;
}

@keyframes markerPulse {
    0% {
        transform: scale(0.75);
        opacity: 0.75;
    }
    70% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

@media (min-width: 992px) {
    .page-header-fixed {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }

    .page-header .container {
        min-height: 132px;
        display: flex;
        align-items: center;
    }

    .header-title-image {
        max-height: 88px;
        width: auto;
        max-width: 100%;
    }

    .page-header-bg-right {
        width: min(34vw, 520px);
        background-position: right center;
        background-size: auto 100%;
    }

    .page-main {
        padding-top: calc(var(--header-height) + var(--page-gap));
        padding-bottom: var(--page-gap);
    }

    /* on limite la hauteur dispo, sans casser l'affichage */
    .map-svg-wrap {
        max-height: calc(100vh - var(--header-height) - 60px);
    }

    .map-svg-wrap svg {
        width: 100%;
        height: auto;
        max-height: calc(100vh - var(--header-height) - 60px);
    }
}

@media (max-width: 991.98px) {
    .page-header {
        position: relative;
    }

    .page-header-bg-right {
        width: 42vw;
        opacity: 0.22;
        background-size: cover;
    }

    .header-title-image {
        max-width: 100%;
    }

    .page-main {
        padding-top: 1rem;
    }

    .map-card {
        padding: 10px;
    }

    .map-nav {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.85rem;
    }
    .page-header-bg-right {
        width: 50vw;
        opacity: 0.16;
    }

    .map-nav-top {
        justify-content: flex-start;
    }
    .page-subtitle {
        font-size: 0.95rem;
    }
}

body a.info-trigger, 
body a.info-trigger h2, 
body a.info-trigger i {
    color: var(--cgt-dark) !important;
    text-decoration: none !important;
}

body a.info-trigger:hover, 
body a.info-trigger:hover h2, 
body a.info-trigger:hover i {
    color: var(--cgt-red) !important;
    text-decoration: none !important;
    display: inline-block;
}

#lien-modale-intro {
    text-decoration: none !important;
    color: var(--cgt-red) !important;
}
/* centrage du titre sur mobile */
@media (max-width: 991.98px) {
    .text-lg-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}