/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* En-tête */
header {
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(46, 204, 113, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.logo img {
    height: 40px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    position: relative;
    z-index: 2;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #3498db;
}

/* Pied de page */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 90%, rgba(52, 152, 219, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 10%, rgba(46, 204, 113, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3498db;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

/* Sections communes */
section {
    padding: 2rem 0;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.btn-link {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Page d'accueil - Hero */
.hero {
    background: 
        linear-gradient(135deg, rgba(26, 42, 58, 0.9) 0%, rgba(44, 62, 80, 0.9) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%231a2a3a" width="1200" height="800"/><g fill="%232496e6" opacity="0.03"><circle cx="200" cy="200" r="80"/><circle cx="800" cy="400" r="120"/><circle cx="1000" cy="150" r="60"/><circle cx="400" cy="600" r="100"/></g><g fill="%2327ae60" opacity="0.02"><rect x="300" y="100" width="200" height="200" rx="20"/><rect x="700" y="500" width="150" height="150" rx="15"/><rect x="100" y="400" width="120" height="120" rx="10"/></g></svg>'),
        #1a2a3a;
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 50%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(46, 204, 113, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Section témoignages */
.testimonials {
    background: 
        linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%23667eea" width="1200" height="800"/><g fill="%23ffffff" opacity="0.05"><path d="M200,200 Q300,150 400,200 T600,200" stroke-width="2"/><path d="M800,400 Q900,350 1000,400 T1200,400" stroke-width="2"/><path d="M100,600 Q200,550 300,600 T500,600" stroke-width="2"/></g></svg>');
    padding: 80px 0;
    color: white;
    text-align: center;
    position: relative;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.testimonials h2 {
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 300;
    position: relative;
    z-index: 2;
}

.testimonials-slider {
    overflow: hidden;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-track {
    display: flex;
    animation: scroll 40s linear infinite;
    gap: 30px;
}

.testimonial {
    flex: 0 0 320px;
    background: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.testimonial:hover {
    transform: translateY(-5px);
}

.testimonial p {
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 16px;
}

.testimonial span {
    font-weight: 600;
    color: #f8f9fa;
    font-size: 14px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-320px * 20 - 30px * 19));
    }
}

.testimonials-slider:hover .testimonial-track {
    animation-play-state: paused;
}

/* Features section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    padding: 4rem 0;
    background: 
        linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%23f8f9fa" width="1200" height="800"/><g fill="%233498db" opacity="0.03"><circle cx="150" cy="150" r="50"/><circle cx="1000" cy="200" r="80"/><circle cx="800" cy="600" r="60"/><circle cx="300" cy="500" r="70"/></g><g fill="%232c3e50" opacity="0.02"><rect x="600" y="100" width="100" height="100" rx="10"/><rect x="200" y="300" width="80" height="80" rx="8"/><rect x="900" y="400" width="120" height="120" rx="12"/></g></svg>');
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.feature h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

/* Formulaires */
.form-section {
    max-width: 600px;
    margin: 2rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    background-image: 
        radial-gradient(circle at 100% 100%, rgba(52, 152, 219, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 0% 0%, rgba(46, 204, 113, 0.03) 0%, transparent 50%);
}

.form-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
    font-weight: 300;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafbfc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
    background: white;
}

/* Tableau de bord */
.dashboard h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 300;
}

.account-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.account-summary::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.balance {
    font-size: 2rem;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.recent-transactions {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.recent-transactions h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 300;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

table th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: #2c3e50;
}

.positive {
    color: #27ae60;
    font-weight: 600;
}

.negative {
    color: #e74c3c;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-buttons, .quick-actions {
        flex-direction: column;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
        margin-top: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .testimonial-track {
        animation: scroll-mobile 40s linear infinite;
    }
    
    .testimonial {
        flex: 0 0 280px;
    }
    
    @keyframes scroll-mobile {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-280px * 20 - 30px * 19));
        }
    }
}

/* === FORMULAIRES AVANCÉS === */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.form-group {
    margin-bottom: 1.5rem;
    padding: 0 15px;
    flex: 1 0 100%;
}

@media (min-width: 768px) {
    .form-group.col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .form-group.col-md-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
    .form-group.col-md-2 {
        flex: 0 0 16.666%;
        max-width: 16.666%;
    }
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
    background: white;
}

.custom-file {
    position: relative;
    display: block;
}

.custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(2.25rem + 2px);
    margin: 0;
    opacity: 0;
}

.custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(2.25rem + 2px);
    padding: 0.5rem 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fafbfc;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

.custom-file-label::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    height: calc(2.25rem + 2px);
    padding: 0.5rem 1rem;
    line-height: 1.5;
    color: #495057;
    content: "Parcourir";
    background-color: #e9ecef;
    border-left: 1px solid #e1e5e9;
    border-radius: 0 6px 6px 0;
}

/* === BOUTONS AVANCÉS === */
.btn-block {
    display: block;
    width: 100%;
}

/* === MEDIA QUERIES AMÉLIORÉES === */
@media (max-width: 768px) {
    .form-section {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonials {
        padding: 60px 0;
    }
}

/* ===== HEADER MODERNE ===== */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.1);
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    align-items: center;
}

nav li {
    margin: 0;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

nav a:hover::before {
    left: 100%;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Style spécial pour les boutons de connexion/inscription */
nav a[href*="connexion"],
nav a[href*="inscription"] {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

nav a[href*="connexion"]:hover,
nav a[href*="inscription"]:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Style pour le bouton de déconnexion */
nav a[href*="logout"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 59, 59, 0.3);
    color: #ff6b6b;
}

nav a[href*="logout"]:hover {
    background: rgba(255, 59, 59, 0.2);
    color: #ff4757;
}

/* Widget de traduction */
#google_translate_element {
    margin-left: 20px;
}

.goog-te-gadget {
    color: white !important;
    font-family: 'Roboto', sans-serif !important;
}

.goog-te-gadget-simple {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 20px !important;
    padding: 8px 16px !important;
    backdrop-filter: blur(10px) !important;
}

.goog-te-gadget-simple .goog-te-menu-value span {
    color: white !important;
}

.goog-te-gadget-simple .goog-te-menu-value span:first-child {
    color: white !important;
}

.goog-te-gadget-simple .goog-te-menu-value span:last-child {
    display: none !important;
}

/* ===== FOOTER MODERNE ===== */
footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #007bff, #00b4d8);
    border-radius: 2px;
}

.footer-section p {
    color: #b0b0b0;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: #007bff;
    transform: translateX(5px);
}

.footer-section a[href^="mailto"] {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a[href^="mailto"]:hover {
    color: #00b4d8;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
        padding: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    nav a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    #google_translate_element {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-direction: column;
        width: 100%;
    }
    
    nav a {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    .logo {
        justify-content: center;
    }
}

/* Animation d'entrée */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header {
    animation: slideDown 0.5s ease-out;
}

/* Indicateur de page active */
nav a[href*="<?php echo basename($_SERVER['PHP_SELF']); ?>"] {
    background: rgba(255, 255, 255, 0.25);
    font-weight: 600;
}

/* Ajoutez à votre CSS existant */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Amélioration du contraste pour l'accessibilité */
.btn {
    font-weight: 600;
}

.feature h3 {
    color: #2d3748; /* Contraste amélioré */
}

/* Focus visible pour la navigation au clavier */
nav a:focus,
.btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}


@media (max-width: 768px) {
    header {
        position: relative !important;
        height: auto;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 5px;
    }
}