/* Variables de couleurs */
:root {
    --background: #0E172F;
    --text-primary: #FEFEFF;
    --text-secondary: #656C7B;
    --cta-gradient-start: #00BFFE;
    --cta-gradient-end: #0B74FD;
    --cta-hover: #0884FA;
    --section-light: #121D3A;
    --section-dark: #0A1223;
    --card-bg: #1A2540;
    --input-bg: #1E2A4A;
    --border-color: #2A3A5A;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 20px;
    line-height: 1.3;
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
}

h2 {
    font-size: 2.2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.6rem;
    font-weight: 600;
}

p {
    margin-bottom: 15px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Animations CSS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.site-header {
    background-color: var(--section-dark);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.header-hidden {
    transform: translateY(-100%);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.main-nav {
    flex: 0 0 auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    align-items: center;
}

.main-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1rem;
    white-space: nowrap;
    padding: 5px 0;
    position: relative;
}

.main-nav a:not(.cta-button):after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, var(--cta-gradient-start), var(--cta-gradient-end));
    transition: width 0.3s ease;
}

.main-nav a:not(.cta-button):hover:after {
    width: 100%;
}

.main-nav a:hover {
    color: var(--cta-gradient-start);
}

@media (max-width: 992px) {
    .main-nav ul {
        gap: 20px;
    }
    
    .main-nav a {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Boutons CTA */
.cta-button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--cta-gradient-start), var(--cta-gradient-end));
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 11, 116, 0.2);
}

.cta-button.large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.cta-button.small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.cta-button.center {
    display: block;
    margin: 30px auto;
    max-width: 300px;
}

/* Hero section */
.hero {
    position: relative;
    padding: 120px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.9) contrast(1.1) saturate(1.2);
    animation: subtle-zoom 25s infinite alternate ease-in-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(14, 23, 47, 0.75) 0%, rgba(14, 23, 47, 0.9) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

@keyframes subtle-zoom {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero .intro {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 40px;
    color: var(--text-primary);
}

/* Sections générales */
section {
    padding: 100px 0;
}

.section-light {
    background-color: var(--section-light);
}

.section-dark {
    background-color: var(--section-dark);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--cta-gradient-start), var(--cta-gradient-end));
    margin: 20px auto 0;
    border-radius: 2px;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Grille des auto-écoles */
.auto-ecoles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.auto-ecole-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.auto-ecole-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.auto-ecole-card h3 {
    color: var(--cta-gradient-start);
    margin-bottom: 15px;
}

.auto-ecole-card p {
    flex-grow: 1;
    margin-bottom: 20px;
}

.auto-ecole-card .cta-button {
    align-self: flex-start;
}

/* Boîtes d'information */
.info-box {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    margin: 40px 0;
    border-left: 5px solid var(--cta-gradient-start);
}

/* Tableau des formations */
.table-container {
    margin: 40px 0;
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.formations-table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.03);
}

.formations-table th,
.formations-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.formations-table th {
    background-color: rgba(0, 191, 254, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

.formations-table tr:last-child td {
    border-bottom: none;
}

.formations-table tr:hover {
    background-color: rgba(0, 191, 254, 0.05);
}

.table-legend {
    font-style: italic;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* Responsive pour les tableaux */
@media (max-width: 768px) {
    .table-container {
        margin: 30px -15px;
        width: calc(100% + 30px);
        border-radius: 0;
    }
    
    .formations-table th,
    .formations-table td {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    
    .formations-table th {
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    /* Tableau responsive avec data-labels */
    @media (max-width: 600px) {
        .formations-table thead {
            display: none;
        }
        
        .formations-table, 
        .formations-table tbody, 
        .formations-table tr, 
        .formations-table td {
            display: block;
            width: 100%;
        }
        
        .formations-table tr {
            margin-bottom: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            overflow: hidden;
        }
        
        .formations-table td {
            text-align: right;
            position: relative;
            padding-left: 50%;
        }
        
        .formations-table td::before {
            content: attr(data-label);
            position: absolute;
            left: 15px;
            top: 15px;
            font-weight: 600;
            color: var(--text-primary);
            text-align: left;
        }
    }
}

/* Critères */
.criteria-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.criteria-box {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    height: 100%;
}

.criteria-box h3 {
    color: var(--cta-gradient-start);
    margin-bottom: 15px;
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
}

.faq-item h3 {
    color: var(--cta-gradient-start);
    margin-bottom: 15px;
}

/* Section Contact */
.section-contact {
    background: linear-gradient(to bottom, var(--section-dark), var(--background));
    padding: 100px 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-form {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23ffffff' 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 15px center;
    background-size: 15px;
    padding-right: 40px;
}

.form-group select:focus {
    outline: none;
    border-color: var(--cta-gradient-start);
    box-shadow: 0 0 0 2px rgba(0, 191, 254, 0.2);
}

.form-group select option {
    background-color: #0E172F;
    color: var(--text-primary);
    padding: 10px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cta-gradient-start);
    box-shadow: 0 0 0 2px rgba(0, 191, 254, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

.form-message .success {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    padding: 10px;
    border-radius: 5px;
}

.form-message .error {
    color: #F44336;
    background-color: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    padding: 10px;
    border-radius: 5px;
}

.form-message .loading {
    color: var(--text-primary);
    text-align: center;
    padding: 10px;
}

.contact-info {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
}

.contact-info h3 {
    color: var(--cta-gradient-start);
    margin-bottom: 20px;
}

.contact-info a {
    color: var(--cta-gradient-start);
}

.contact-info a:hover {
    text-decoration: underline;
}

.map-container {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
    }
}

/* Icône de contact flottante */
.contact-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00BFFE, #0B74FD);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #FEFEFF;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.contact-float i {
    font-size: 28px;
}

/* Animation de pulsation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }
}

.contact-float.pulse {
    animation: pulse 1s ease;
}

@media (max-width: 768px) {
    .contact-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .contact-float i {
        font-size: 24px;
    }
}

/* Footer */
.site-footer {
    background-color: var(--section-dark);
    padding: 60px 0 20px;
}

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

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
}

.footer-links h3,
.footer-contact h3,
.footer-legal h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links ul,
.footer-legal ul {
    list-style: none;
    padding: 0;
}

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

.footer-links a,
.footer-contact a,
.footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-contact a:hover,
.footer-legal a:hover {
    color: var(--cta-gradient-start);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    h1 {
        font-size: 2.4rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        margin: 5px 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: 150px 0 80px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .auto-ecoles-grid {
        grid-template-columns: 1fr;
    }
    
    .criteria-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .cta-button.large {
        width: 100%;
    }
}

/* Styles pour les pages légales */
.legal-hero {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: url('Dreux_ville_auto_ecole.avif');
    background-size: cover;
    background-position: center;
    color: var(--text-primary);
}

.legal-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(14, 23, 47, 0.8), rgba(14, 23, 47, 0.9));
    z-index: 1;
}

.legal-hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.legal-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.legal-section {
    padding: 60px 0;
    background-color: var(--bg-primary);
}

.legal-content {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.legal-content h2 {
    color: var(--cta-gradient-start);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.legal-content h3 {
    color: var(--text-primary);
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.legal-content p, .legal-content ul, .legal-content li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.legal-content ul {
    padding-left: 20px;
}

.legal-content a {
    color: var(--cta-gradient-start);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-content a:hover {
    color: var(--cta-gradient-end);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-hero {
        min-height: 250px;
    }
    
    .legal-hero h1 {
        font-size: 2rem;
    }
    
    .legal-section {
        padding: 40px 15px;
    }
    
    .legal-content {
        padding: 20px;
    }
}
