/* Variables CSS */
:root {
    --primary-color: #0056b3; /* Bleu primaire */
    --secondary-color: #007bff; /* Bleu plus clair pour les accents */
    --text-color: #333;
    --light-text-color: #f8f9fa;
    --background-color: #ffffff;
    --light-background-color: #f8f9fa;
    --border-color: #dee2e6;
    --focus-outline-color: #0056b3;
    --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
}

/* Accessibilité */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--light-text-color);
    padding: 8px;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Conteneur */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-sans);
    margin-bottom: 0.5em;
    color: var(--primary-color);
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease, border-color 0.3s ease;
}

a:hover,
a:focus {
    color: var(--primary-color);
    text-decoration: underline;
    outline-offset: 2px;
}

/* Boutons */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.primary-button {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border-color: var(--primary-color);
}

.primary-button:hover,
.primary-button:focus {
    background-color: #004494; /* Un peu plus foncé */
    border-color: #004494;
    color: var(--light-text-color);
    text-decoration: none;
}

.secondary-button {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.secondary-button:hover,
.secondary-button:focus {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    text-decoration: none;
}

/* Header */
.site-header {
    background-color: var(--background-color);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-link {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    margin-right: 1rem;
}

.site-logo {
    height: 40px;
    width: auto;
    margin-right: 0.5rem;
    fill: var(--primary-color); 
}

.site-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text-color);
    font-weight: bold;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a:focus::after,
.main-nav a[aria-current="page"]::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 200;
}

.icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: 0.4s;
}

/* Hero Section */
.hero-section,
.page-hero {
    background-color: var(--light-background-color);
    padding: 4rem 0;
    text-align: center;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

.hero-section .container,
.page-hero .container {
    max-width: 800px;
}

.hero-section h2,
.page-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero-section p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

/* Sections de contenu */
.content-section,
.features-section,
.cta-section {
    padding: 3rem 0;
}

.content-section h3,
.features-section h3,
.cta-section h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.text-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.text-content ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1em;
}

.text-content li {
    margin-bottom: 0.5em;
}

/* Features Section */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--light-background-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    fill: var(--primary-color);
}

.feature-item h4 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* CTA Section */
.cta-section {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 4rem 0;
}

.cta-section h3 {
    color: var(--light-text-color);
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-section .button.secondary-button {
    background-color: var(--light-text-color);
    color: var(--primary-color);
    border-color: var(--light-text-color);
}

.cta-section .button.secondary-button:hover,
.cta-section .button.secondary-button:focus {
    background-color: #e0e0e0;
    border-color: #e0e0e0;
}

/* Tarifs Page */
.price-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.price-category {
    background-color: var(--light-background-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.price-category h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.price-category ul {
    list-style: none;
    padding: 0;
}

.price-category li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.price-category li:last-child {
    border-bottom: none;
}

.price-category li span {
    font-weight: normal;
    color: #6c757d;
    font-size: 0.9em;
}

.note {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #ffeeba;
    border: 1px solid #ffc107;
    border-radius: 5px;
    color: #856404;
    font-size: 0.9em;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-info,
.contact-form-info {
    background-color: var(--light-background-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.contact-info h3,
.contact-form-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-info address {
    font-style: normal;
    margin-bottom: 1.5rem;
}

.contact-info ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.contact-info ul li {
    margin-bottom: 0.5rem;
}

.contact-form-info .button {
    margin-top: 1rem;
}

.form-note {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 1rem;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.site-footer p {
    margin: 0;
    font-size: 0.9rem;
}

.site-footer nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.site-footer nav a {
    color: var(--light-text-color);
    font-size: 0.9rem;
}

.site-footer nav a:hover,
.site-footer nav a:focus {
    color: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .site-header h1 {
        font-size: 1.3rem;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        flex-basis: 100%;
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease-in-out, opacity 0.3s ease-in-out;
        opacity: 0;
        visibility: hidden;
    }

    .main-nav.active {
        height: auto; /* Adjusted by JS for content height */
        opacity: 1;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
        background-color: var(--background-color);
        border-top: 1px solid var(--border-color);
    }

    .main-nav li {
        margin: 0.5rem 0;
    }

    .main-nav a {
        display: block;
        padding: 0.8rem 0;
    }

    .hero-section h2,
    .page-hero h2 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .content-section h3,
    .features-section h3,
    .cta-section h3 {
        font-size: 1.75rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .price-list {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .site-footer .container {
        flex-direction: column;
    }

    .site-footer nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (min-width: 769px) {
    .main-nav {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
    }
}

/* Focus states for accessibility */
:focus {
    outline: 2px solid var(--focus-outline-color);
    outline-offset: 2px;
}
