/* --- Variables et Configuration --- */
:root {
    /* Palette de couleurs INFOLOC */
    /* Dégradé Rouge / Bleu / Violet / Orange */
    --gradient-primary: linear-gradient(135deg, #e74c3c, #9b59b6, #3498db, #e67e22);
    --primary-color: #e74c3c; /* Rouge dominant si dégradé non applicable */
    --secondary-color: #3498db; /* Bleu */
    --accent-color: #e67e22; /* Orange */
    
    /* Couleurs neutres */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --footer-bg: #1a252f;
    
    /* Typographie */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
    
    /* Espacements et Layout */
    --container-width: 1200px;
    --border-radius: 8px;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* --- Reset et Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden; /* Empêche le scroll horizontal si animation dépasse */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Arrière-plan Animé (Style Tech) --- */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Derrière tout le contenu */
    overflow: hidden;
    background: #ffffff; /* Fond blanc de base */
    pointer-events: none; /* Permet de cliquer au travers */
}

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(52, 152, 219, 0.4); /* Opacité augmentée à 0.4 */
    animation: animate 25s linear infinite;
    bottom: -150px;
    border-radius: 4px; /* Légèrement arrondi */
}

/* Configuration individuelle des particules */
.circles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
    background: rgba(231, 76, 60, 0.3); /* Rouge plus visible */
}

.circles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
    background: rgba(155, 89, 182, 0.4); /* Violet plus visible */
}

.circles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
    background: rgba(230, 126, 34, 0.35); /* Orange plus visible */
}

.circles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
    background: rgba(52, 152, 219, 0.3); /* Bleu plus visible */
}

.circles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
    background: rgba(231, 76, 60, 0.35); /* Rouge plus visible */
}

.circles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
    background: rgba(155, 89, 182, 0.25); /* Violet */
}

.circles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
    background: rgba(52, 152, 219, 0.2); /* Bleu */
}

.circles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
    background: rgba(230, 126, 34, 0.4); /* Orange */
}

.circles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
    /* Garde la couleur par défaut (bleu) mais plus opaque */
}

.circles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
    background: rgba(231, 76, 60, 0.2); /* Rouge */
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

/* --- Utilitaires --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 15px auto 0;
    border-radius: 2px;
}

.text-left {
    text-align: left;
}
.text-left::after {
    margin-left: 0;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--font-heading);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    border: 2px solid #3498db; /* Fallback color */
    border-image: var(--gradient-primary) 1;
    color: var(--text-dark);
    margin-left: 10px;
}

.btn-outline:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    text-align: center;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Header & Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    max-height: 60px; /* Réduit à 60px pour une navbar plus fine */
    width: auto;
    display: block;
}

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-contact {
    background: var(--gradient-primary);
    color: white !important;
    padding: 8px 20px;
    border-radius: 50px;
}

.btn-contact:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-contact::after {
    display: none; /* Retire le soulignement pour le bouton */
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* --- Hero Section --- */
.hero {
    padding: 160px 0 100px;
    background-color: transparent; /* Rend le fond transparent pour voir l'animation derrière */
    /* On garde le gradient léger si on veut, ou on l'enlève pour mieux voir les carrés. 
       Je l'enlève ici pour que l'effet "pop" plus, mais on peut le remettre. */
    min-height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* --- Voltage Button Wrapper Styles --- */
.voltage-button-wrapper {
    position: relative;
    display: inline-block;
    z-index: 10;
}

/* Le bouton conserve son style original (géré par .btn-primary) mais on ajoute la logique de survol */
.voltage-btn {
    position: relative;
    z-index: 5; /* Au-dessus du SVG */
}

/* On active l'effet quand on survole le wrapper OU le bouton */
.voltage-button-wrapper:hover svg, 
.voltage-button-wrapper:hover .dots {
    opacity: 1;
}

/* SVG positionné derrière/autour du bouton */
.voltage-button-wrapper svg {
    display: block;
    position: absolute;
    top: -15px; /* Ajusté pour centrer autour du bouton */
    left: -5px; /* Ajusté pour centrer autour du bouton */
    width: calc(100% + 10px); /* Un peu plus large que le bouton */
    height: calc(100% + 30px); /* Un peu plus haut que le bouton */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
    transition-delay: 0.1s;
    z-index: -1; /* Derrière le bouton */
}

.voltage-button-wrapper svg path {
    stroke-dasharray: 100;
    filter: url('#glow');
}

.voltage-button-wrapper svg path.line-1 {
    stroke: #f6de8d;
    stroke-dashoffset: 0;
    animation: spark-1 3s linear infinite;
}

.voltage-button-wrapper svg path.line-2 {
    stroke: #6bfeff;
    stroke-dashoffset: 500;
    animation: spark-2 3s linear infinite;
}

.voltage-button-wrapper .dots {
    opacity: 0;
    transition: opacity 0.3s;
    transition-delay: 0.4s;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.voltage-button-wrapper .dot {
    width: 1rem;
    height: 1rem;
    background: white;
    border-radius: 100%;
    position: absolute;
    opacity: 0;
}

.voltage-button-wrapper .dot-1 {
    top: 0;
    left: 20%;
    animation: fly-up 3s linear infinite;
}

.voltage-button-wrapper .dot-2 {
    top: 0;
    left: 55%;
    animation: fly-up 3s linear infinite;
    animation-delay: 0.5s;
}

.voltage-button-wrapper .dot-3 {
    top: 0;
    left: 80%;
    animation: fly-up 3s linear infinite;
    animation-delay: 1s;
}

.voltage-button-wrapper .dot-4 {
    bottom: 0;
    left: 30%;
    animation: fly-down 3s linear infinite;
    animation-delay: 2.5s;
}

.voltage-button-wrapper .dot-5 {
    bottom: 0;
    left: 65%;
    animation: fly-down 3s linear infinite;
    animation-delay: 1.5s;
}

@keyframes spark-1 {
    to {
        stroke-dashoffset: -1000;
    }
}

@keyframes spark-2 {
    to {
        stroke-dashoffset: -500;
    }
}

@keyframes fly-up {
    0% { opacity: 0; transform: translateY(0) scale(0.2); }
    5% { opacity: 1; transform: translateY(-1.5rem) scale(0.4); }
    10%, 100% { opacity: 0; transform: translateY(-3rem) scale(0.2); }
}

@keyframes fly-down {
    0% { opacity: 0; transform: translateY(0) scale(0.2); }
    5% { opacity: 1; transform: translateY(1.5rem) scale(0.4); }
    10%, 100% { opacity: 0; transform: translateY(3rem) scale(0.2); }
}

/* --- Services Section --- */
.services {
    background-color: rgba(255, 255, 255, 0.85); /* Plus transparent pour voir le fond */
    backdrop-filter: blur(8px); /* Flou pour la lisibilité */
    position: relative;
    z-index: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.icon-box {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(248, 249, 250, 1);
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.icon-box i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- About Section --- */
.about {
    background-color: rgba(248, 249, 250, 0.85); /* Semi-transparent */
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-intro {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.about-text strong {
    color: var(--primary-color);
}

.philosophy {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.philosophy-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.philosophy-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.philosophy-item span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Animation de rotation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.about-logo-img {
    max-width: 60%; /* Réduit un peu pour que ça ne soit pas gigantesque en tournant */
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
    animation: spin 20s linear infinite; /* Rotation lente de 20 secondes */
}

.about-logo-img:hover {
    animation-play-state: paused; /* S'arrête si on passe la souris dessus (optionnel) */
}

/* --- Contact Section --- */
.contact {
    background-color: rgba(255, 255, 255, 0.85); /* Semi-transparent */
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-white);
}

.contact-info {
    background: var(--gradient-primary);
    padding: 40px;
    color: white;
}

.contact-info h3 {
    color: white;
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 40px;
    opacity: 0.9;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1rem;
}

.info-item i {
    margin-right: 15px;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.contact-form {
    padding: 40px;
    background: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-family: var(--font-body);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* --- Footer --- */
.footer {
    background-color: rgba(26, 37, 47, 0.95); /* Footer légèrement transparent aussi */
    backdrop-filter: blur(5px);
    color: #ecf0f1;
    padding-top: 60px;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h4 {
    color: white;
    margin-bottom: 20px;
}

.logo-img-footer {
    max-height: 120px; /* Augmenté significativement à 120px */
    width: auto;
    margin-bottom: 15px;
    /* Si le logo est sombre sur fond sombre, on pourrait ajouter un filtre ici, 
       mais on suppose que le logo est lisible */
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bdc3c7;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #95a5a6;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .about-container,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .about-logo-img {
        max-width: 300px;
        margin-top: 30px;
    }

    .contact-info {
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav {
        position: fixed;
        top: 70px; /* Hauteur du header approx */
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    .nav.active {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 20px;
    }

    .hero {
        padding-top: 140px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-outline {
        margin-left: 0;
    }
}
