/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00a8ff;
    --primary-dark: #0080cc;
    --secondary: #0080cc;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-dark: #1a1a2e;
    --bg-light: #f8f9fa;
    --text-dark: #333;
    --text-light: #666;
    --border: #e0e0e0;
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
}

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

/* ==================== HEADER & NAV ==================== */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

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

.logo-img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
}

.btn-logout {
    background: var(--error);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

/* ==================== HERO SECTION ==================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(45deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,168,255,0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid white;
}

.btn-secondary:hover {
    background: transparent;
    color: white;
}

.btn-light {
    background: white;
    color: var(--primary);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==================== SECTIONS ==================== */
.about, .features, .services, .process, .contact {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto;
}

/* ==================== FEATURES ==================== */
.features {
    background: var(--bg-light);
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* ==================== SERVICES ==================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(0,168,255,0.2);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.service-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-features {
    list-style: none;
    margin-top: 1.5rem;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

/* ==================== PROCESS ==================== */
.process {
    background: var(--bg-light);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.process-step {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.process-step h3 {
    margin-bottom: 0.5rem;
}

/* ==================== CTA ==================== */
.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

/* ==================== CONTACT ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.contact-icon {
    font-size: 2rem;
}

.contact-item h3 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
}

/* ==================== FORMS ==================== */
.contact-form-wrapper, .login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
    background-color: white;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-group select:hover {
    border-color: var(--primary);
    background-color: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.1);
}

.form-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==================== LOGIN ==================== */
.login {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: var(--bg-light);
}

.login-wrapper {
    max-width: 450px;
    width: 100%;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ==================== ADMIN DASHBOARD ==================== */
.admin-dashboard {
    padding: 3rem 0;
    min-height: 80vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.stat-nouveau { border-left: 4px solid #ffc107; }
.stat-en-cours { border-left: 4px solid #17a2b8; }
.stat-traite { border-left: 4px solid #28a745; }

.contacts-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contacts-section h2 {
    margin-bottom: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.contacts-table th {
    background: var(--bg-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.contacts-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.contacts-table tr:hover {
    background: #f8f9fa;
}

.subject-badge {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.message-cell details {
    cursor: pointer;
}

.message-content {
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: var(--bg-light);
    border-radius: 5px;
}

.no-message {
    color: var(--text-light);
    font-style: italic;
}

.status-select {
    padding: 0.5rem 2rem 0.5rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    appearance: none;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23666' d='M8.293 2.293L5 5.586 1.707 2.293A1 1 0 00.293 3.707l4 4a1 1 0 001.414 0l4-4a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 10px;
}

.status-select:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,168,255,0.15);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,168,255,0.1);
}

.status-nouveau { 
    border-color: #ffc107; 
    background-color: #fff8e1; 
    color: #856404;
}

.status-nouveau:hover {
    background-color: #fff3cd;
}

.status-en-cours { 
    border-color: #17a2b8; 
    background-color: #e1f5f8;
    color: #0c5460;
}

.status-en-cours:hover {
    background-color: #d1ecf1;
}

.status-traité { 
    border-color: #28a745; 
    background-color: #e8f5e9;
    color: #155724;
}

.status-traité:hover {
    background-color: #d4edda;
}

.status-archivé { 
    border-color: #6c757d; 
    background-color: #f5f5f5;
    color: #495057;
}

.status-archivé:hover {
    background-color: #e9ecef;
}

.status-en-attente { 
    border-color: #ffc107; 
    background-color: #fff8e1; 
    color: #856404;
}

.status-en-attente:hover {
    background-color: #fff3cd;
}

.status-payée { 
    border-color: #28a745; 
    background-color: #e8f5e9;
    color: #155724;
}

.status-payée:hover {
    background-color: #d4edda;
}

.status-annulée { 
    border-color: #dc3545; 
    background-color: #ffebee;
    color: #721c24;
}

.status-annulée:hover {
    background-color: #f8d7da;
}

.status-remboursée { 
    border-color: #6c757d; 
    background-color: #f5f5f5;
    color: #495057;
}

.status-remboursée:hover {
    background-color: #e9ecef;
}

.date-cell, .time-cell {
    display: block;
}

.time-cell {
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn-delete {
    background: var(--error);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #c82333;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* ==================== LEGAL PAGES ==================== */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
}

.legal-content {
    padding: 3rem 0;
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.legal-section h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.legal-section ul {
    margin-left: 2rem;
    margin-top: 0.5rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-description {
    color: rgba(255,255,255,0.7);
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}

/* ==================== PARTNERS ==================== */
.partners {
    padding: 5rem 0;
    background: var(--bg-light);
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.partner-card {
    background: white;
    padding: 2rem 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 250px;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.partner-logo {
    max-width: 180px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0%);
    transition: filter 0.3s ease;
}

.partner-card:hover .partner-logo {
    filter: grayscale(0%) brightness(1.1);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .contact-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .process-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
    }
}
