/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Variables CSS */
:root {
    --color-primary: #DC143C;
    --color-black: #000000;
    --color-text: #2c3e50;
    --color-light: #f8f9fa;
    --color-border: #e9ecef;
    --font-size-h1: 3rem;
    --font-size-h2: 2.5rem;
    --font-size-h3: 1.8rem;
    --font-size-base: 1rem;
    --container-max: 1200px;
}

/* Layout de base */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-light {
    background-color: var(--color-light);
}

/* Header */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Logo Header - Version corrigée */
.site-logo {
    display: inline-block;
    text-decoration: none;
    max-width: 180px;
}

.logo-image {
    height: auto;
    width: 100%;
    max-width: 180px;
    max-height: 60px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.site-logo:hover .logo-image {
    opacity: 0.8;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 10px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.current {
    color: var(--color-primary);
}

.cta-button {
    background: var(--color-primary);
    color: white;
    padding: 12px 25px;
    border: none;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
    display: inline-block;
}

.cta-button:hover {
    background: #B22222;
    color: white;
}

/* Toaster de confirmation */
.toaster {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.5s ease;
}

.toaster.show {
    transform: translateX(0);
}

.toaster-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.toaster-error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.toaster-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
}

.toaster-close:hover {
    opacity: 1;
}

/* Main content */
.main-content {
    margin-top: 80px;
}

/* Styles pour le contenu des pages */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: #555;
}

.page-content h1 {
    color: var(--color-text);
    font-size: 2.5em;
    margin-bottom: 30px;
    font-weight: 300;
}

.page-content h2 {
    color: var(--color-primary);
    font-size: 1.8em;
    margin-top: 50px;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid var(--color-light);
    padding-bottom: 10px;
}

.page-content h3 {
    color: var(--color-text);
    font-size: 1.4em;
    margin-top: 35px;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-content h4 {
    color: var(--color-text);
    font-size: 1.2em;
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.page-content ul {
    margin: 20px 0;
    padding-left: 30px;
}

.page-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.page-content strong {
    color: var(--color-text);
    font-weight: 600;
}

/* Styles spécifiques pour les informations de contact */
.page-content p:has(strong) {
    background: var(--color-light);
    padding: 15px;
    border-left: 4px solid var(--color-primary);
    margin: 25px 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    text-align: center;
	position: relative;
    overflow: hidden; /* ESSENTIEL pour masquer les particules aux bords */
	position: relative;
}

.hero .container {
    position: relative;
    z-index: 2; /* Texte au premier plan */
}

.hero h1 {
    font-size: var(--font-size-h1);
    color: var(--color-text);
    margin-bottom: 20px;
    font-weight: 300;
}

.hero .highlight {
    color: var(--color-primary);
    font-weight: 600;
}

.hero p {
    font-size: 1.3em;
    color: #7f8c8d;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Conteneur des particules pour la gestion par JS/CSS */
#particles-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1; /* Place les particules sous le contenu */
	pointer-events: none; /* Les particules ne doivent pas bloquer les clics */
}

/* Contenu de la Punch Line (doit rester au-dessus) */
.content {
	position: relative;
	z-index: 2;
	width: 600px;
	margin: 0 auto; /* C'est la ligne magique pour le centrage horizontal */
}

/* --- Styles des Particules et Keyframes --- */
.particle {
	position: absolute; /* ESSENTIEL pour le positionnement top/left */
	display: block;
	border-radius: 50%; /* Pour faire des ronds */
	z-index: 1;
	background-color: rgba(200, 200, 200, 0.7); /* Gris très léger */
	opacity: 0;
	
	/* La suite de l'animation est gérée par JS */
	animation-name: fade; 
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
	will-change: transform, opacity;
}

/* Keyframe A : Mouvement diagonal et léger grossissement */
@keyframes move-A {
	0% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(var(--dx) / 2, var(--dy) / 2) scale(1.1); } /* Léger mouvement à mi-chemin */
	100% { transform: translate(var(--dx), var(--dy)) scale(1); }
}

/* Keyframe B : Mouvement en S ou courbe */
@keyframes move-B {
	0% { transform: translate(0, 0) rotate(0deg); }
	30% { transform: translate(var(--dx) * 0.5, var(--dy) * -0.5) rotate(10deg); }
	70% { transform: translate(var(--dx) * 0.8, var(--dy) * 0.2) rotate(-10deg); }
	100% { transform: translate(var(--dx), var(--dy)) rotate(0deg); }
}

/* Keyframe: Pulsation de l'opacité (reste inchangée) */
@keyframes fade {
	0%, 100% { opacity: 0; }
	50% { opacity: 0.8; }
}

/* --- Accessibilité --- */
@media (prefers-reduced-motion: reduce) {
	.punch-line-banner {
		animation: none;
	}
	.particle {
		display: none; /* Cache les particules pour les utilisateurs sensibles au mouvement */
	}
}

/* Boutons */
.btn {
    padding: 18px 40px;
    border: none;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 10px;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: #B22222;
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
}

/* Grilles */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.grid-4-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin: 50px 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 60px;
    margin: 50px 0;
}

/* Cards */
.card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-bordered {
    border-left: 5px solid var(--color-primary);
}

/* Resulte Cards */
.result-card {
    background: linear-gradient(135deg, var(--color-primary), #B22222);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

/* Stats */
.stat-card {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--color-primary), #B22222);
    color: white;
    border-radius: 10px;
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Styles uniformes pour les select */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px !important; /* Espace pour la flèche custom */
    cursor: pointer;
}

/* Pour les navigateurs qui supportent focus-visible */
select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Fallback pour les anciens navigateurs */
select:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-color: var(--color-primary);
}

/* Footer */
.site-footer {
    background: var(--color-text);
    color: white;
    text-align: center;
    padding: 40px 0;
}

/* Logo Footer - Version corrigée */
.footer-logo {
    height: auto;
    width: 100%;
    max-width: 200px;
    max-height: 40px;
    object-fit: contain;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 10px;
}


/* Responsive */
@media (max-width: 768px) {
    :root {
        --font-size-h1: 2rem;
        --font-size-h2: 1.8rem;
    }
    
    .header-content {
        flex-wrap: nowrap;
        justify-content: space-between; /* Répartit les éléments sur toute la largeur */
        align-items: center;
    }
    
    /* Menu burger à gauche */
    .menu-toggle {
        display: block;
        order: 2;
        flex-shrink: 0;
    }
    
    /* Logo au centre */
    .site-logo {
        max-width: 150px;
        order: 1;
        flex-shrink: 0;
        /* Centrage automatique grâce à justify-content: space-between */
    }
    
    .logo-image {
        max-width: 150px;
        max-height: 50px;
    }
    
    /* CTA à droite, plus petit */
    .cta-button {
        order: 3;
        padding: 8px 15px; /* Padding réduit */
        font-size: 14px;   /* Police plus petite */
        flex-shrink: 0;
        white-space: nowrap; /* Évite le retour à la ligne */
    }
    
	select {
        background-position: right 8px center;
        background-size: 14px;
        padding-right: 35px !important;
    }
	
    .footer-logo {
        max-width: 120px;
        max-height: 25px;
    }
    
    /* Navigation déroulante */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 1000;
        width: 100%; /* Prend toute la largeur */
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
    }
    
    .main-nav li {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-nav a {
        display: block;
        padding: 15px 20px;
        color: #333;
        text-decoration: none;
    }
    
    .main-nav a:hover {
        background: #f8f9fa;
        color: var(--color-primary);
    }
    
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
	
	.grid-4-results {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
	
	.toaster {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .toaster.show {
        transform: translateY(0);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
	
	/* Grille des cas clients en mode mobile */
    .card div[style*="display: grid"][style*="grid-template-columns: 2fr 1fr 1fr"] {
        display: block !important;
        grid-template-columns: none !important;
        gap: 15px !important;
    }
    
    /* Colonnes d'informations client en mobile */
    .card div[style*="display: grid"] > div {
        margin-bottom: 15px;
    }
    
    /* Texte plus petit pour éviter les débordements */
    .card div[style*="font-size: 1.1em"] {
        font-size: 1em !important;
    }
    
    /* Assurer que le contenu ne déborde pas */
    .card {
        overflow-x: hidden;
        word-wrap: break-word;
    }
	
	.page-content {
        padding: 0 10px;
    }
    
    .page-content h1 {
        font-size: 2em;
    }
    
    .page-content h2 {
        font-size: 1.5em;
        margin-top: 35px;
    }
    
    .page-content ul {
        padding-left: 20px;
    }
}

/* Pour les très petits écrans */
@media (max-width: 480px) {
    /* Logo à gauche - plus petit */
    .site-logo {
        max-width: 120px;
        order: 1;
        flex-shrink: 0;
    }
    
    .logo-image {
        max-width: 120px;
        max-height: 40px;
    }
    
    /* Menu burger au milieu */
    .menu-toggle {
        display: block;
        order: 2;
    }
	
	.grid-4-results {
        grid-template-columns: 1fr;
    }
    
    /* CTA à droite - encore plus compact */
    .cta-button {
        order: 3;
        padding: 6px 12px;  /* Plus petit que sur tablette */
        font-size: 12px;    /* Police encore réduite */
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .footer-logo {
        max-width: 100px;
        max-height: 20px;
    }
	
	/* Police encore plus petite sur très petits écrans */
    .card div[style*="font-size: 1.1em"] {
        font-size: 0.9em !important;
    }
    
    /* Réduire les marges */
    .card div[style*="margin: 5px 0"] {
        margin: 3px 0 !important;
    }
}