* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --danger: #ef4444;
    --warning: #fcd34d;
    --success: #10b981;
    --text: #333;
    --text-light: #666;
    --bg-light: #f8fafc;
    --bg-lighter: #f3f4f6;
    --border-color: #e5e7eb;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: background-color, box-shadow;
}

#header.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.baseline-slogan {
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
    line-height: 1.1;
}


#home {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    margin-top: 60px;
}

#hero-bg {
    transition: transform 0.1s linear;
    will-change: transform;
}

.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.service-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.feature-item {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.feature-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.perspective-container {
    perspective: 1500px;
    perspective-origin: center center;
    will-change: perspective;
}

#map-container {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    height: 600px;
    margin: 2rem 0;
    will-change: box-shadow;
}

#france-map {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transform-origin: center center;
    will-change: transform;
    transition: transform 0.05s linear;
}

#france-map svg {
    width: 80%;
    height: 80%;
    max-width: 600px;
    display: block;
}

.departement {
    fill: #E5E7EB;
    stroke: #9CA3AF;
    stroke-width: 0.5;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.departement:hover {
    fill: #D1D5DB;
    stroke-width: 1;
}

.region-paysloire {
    fill: var(--warning) !important;
    stroke: #CA8A04 !important;
    stroke-width: 1.5 !important;
    filter: drop-shadow(0 0 5px rgba(202, 138, 4, 0.5)) !important;
}

.region-maineetloire {
    fill: var(--danger) !important;
    stroke: #B91C1C !important;
    stroke-width: 2 !important;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.7)) !important;
}


.marker-zones {
    width: 90px;
    height: 90px;
    border-radius: 9999px;
    margin: 0 auto;
    position: relative;
    background:
        /* cercle 1 (centre) */
            radial-gradient(circle at center, #0ea5e9 0, #0ea5e9 35%, transparent 35%),
                /* cercle 2 (milieu) */
            radial-gradient(circle at center, rgba(14,165,233,0.5) 0, rgba(14,165,233,0.5) 65%, transparent 65%),
                /* cercle 3 (extérieur) */
            radial-gradient(circle at center, rgba(148,163,184,0.5) 0, rgba(148,163,184,0.5) 100%);
}

.marker-zones::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--danger);
    border-radius: 9999px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
}

@keyframes pulse-marker {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.map-info {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
    max-width: 400px;
}

.info-phase {
    transition: opacity 0.6s ease-in-out;
}

.info-phase h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.info-phase p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

.scroll-progress-bar {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 20;
    will-change: filter;
}

.progress-fill {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0deg, var(--primary) 0deg, transparent 0deg);
    transition: all 0.1s ease-out;
}

#contact-form input:focus,
#contact-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    transform: translateY(-2px);
    outline: none;
}

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification.bg-green-500 {
    background-color: var(--success);
    color: white;
}

.notification.bg-red-500 {
    background-color: var(--danger);
    color: white;
}

.notification.bg-blue-500 {
    background-color: var(--primary);
    color: white;
}

button, .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

button:hover, .btn:hover {
    transform: translateY(-2px);

}

button:active, .btn:active {
    transform: translateY(0);
}

nav a:not([aria-label="Retour à l'accueil"]) {
    position: relative;
    overflow: hidden;
}

nav a:not([aria-label="Retour à l'accueil"])::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0ea5e9;
    transition: width 0.3s ease-in-out;
}

nav a:not([aria-label="Retour à l'accueil"]):hover::after {
    width: 100%;
}

#mobile-menu {
    transform: translateY(-100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.show {
    transform: translateY(0);
}

#mobile-menu.hidden {
    display: none;
}

@media (max-width: 768px) {
    #map-container {
        height: 400px;
        margin: 1.5rem 0;
        border-radius: 1rem;
    }

    #france-map svg {
        width: 90%;
    }

    .map-info {
        left: 15px;
        right: 15px;
        max-width: none;
        top: 20px;
        padding: 15px 20px;
    }

    .map-info {
        max-width: calc(100% - 30px);
    }

    .info-phase h2 {
        font-size: 1.2rem;
    }

    .info-phase p {
        font-size: 0.85rem;
    }

    .scroll-progress-bar {
        width: 50px;
        height: 50px;
        right: 15px;
        bottom: 15px;
    }

    .service-card {
        margin-bottom: 1.5rem;
    }

    .feature-item {
        margin-bottom: 1.5rem;
    }

    #hero-bg {
        background-attachment: scroll !important;
    }
}

@media (max-width: 480px) {
    #map-container {
        height: 300px;
    }

    #france-map svg {
        width: 95%;
    }

    .scroll-progress-bar {
        width: 45px;
        height: 45px;
    }

    #angers-marker .marker-dot {
        width: 12px;
        height: 12px;
    }

    #angers-marker .marker-label {
        font-size: 10px;
        padding: 4px 10px;
    }

    .map-info {
        max-width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        padding: 12px 15px;
    }

    .info-phase h2 {
        font-size: 1rem;
    }

    .info-phase p {
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.animate-in {
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media print {
    #header,
    #mobile-menu,
    .scroll-progress-bar {
        display: none;
    }
}

.header-title {
    color: #1f2937;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-slogan-text {
    color: #ef4444;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-link {
    color: #1f2937;
    transition: color 0.2s ease;
}

.header-link:hover {
    color: #0ea5e9;
}

#mobile-menu-btn {
    color: #1f2937;
    padding: 20px;
}

.header-title {
    color: #1f2937;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-slogan-text {
    color: #ef4444;  /* Rouge - FIXE, ne change pas */
}

.header-link {
    color: #1f2937;  /* Gris très sombre par défaut */
    transition: color 0.2s ease;
}

.header-link:hover {
    color: #0ea5e9;  /* Sky-400 */
}

#mobile-menu-btn {
    color: #1f2937;
}

#header.scrolled .header-title {
    color: #ffffff;  /* Blanc */
}

#header.scrolled .header-slogan-text {
    color: #ef4444;  /* Reste ROUGE */
}

#header.scrolled .header-link {
    color: #ffffff;  /* Blanc */
}

#header.scrolled .header-link:hover {
    color: #0ea5e9;  /* Sky-400 */
}

#header.scrolled #mobile-menu-btn {
    color: #ffffff;
}

.communes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.commune-item {
    background-color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid;
    transition: all 300ms ease;
}

.commune-item:hover {
    background-color: rgba(14, 165, 233, 0.05);
    transform: translateY(-2px);
}

.commune-last {
    grid-column: 1 / -1;
    display: flex;

}

.zone-btn {
    background-color: white;
    color: #1e293b;
    border: 2px solid #cbd5e1;
    box-shadow: none;
    transform: none;
}

.zone-btn:hover {
    border-color: #0ea5e9;
    transform: translateY(-2px);
}

.zone-btn.active {
    background-color: #0ea5e9;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.zone-btn.active:hover {
    background-color: #0284c7;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .communes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .communes-grid {
        grid-template-columns: 1fr;
    }

    .commune-last {
        grid-column: 1;
    }
}

/* Masquer les zones inactives */
.zone-content {
    display: none;
}

.zone-content-active {
    display: block;
}


