/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
    position: relative;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #3498db;
}

/* Section Hero avec image de fond et largeur réduite */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; /* Centrage horizontal */
    min-height: 100vh;
    padding: 100px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    overflow: hidden;
}

/* Image de fond */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://i.ibb.co/8grN0mHn/imagessss.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
    z-index: 1;
}

/* Overlay sombre pour améliorer la lisibilité */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.8) 0%, rgba(52, 152, 219, 0.6) 100%);
    z-index: 2;
}

.hero-content {
    max-width: 500px; /* Largeur réduite */
    text-align: left;
    position: relative;
    z-index: 3;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 10px;
    color: #9f0e0e;
    white-space: nowrap; /* empêche le retour automatique à la ligne */
}

.hero-content h2 {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #ffffff;
    white-space: nowrap; /* empêche le retour automatique à la ligne */
}

.hero-content p {
    font-size: 2rem;
    margin-bottom: 50px;
    color: #ecf0f1;
    line-height: 1.6;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    display: none;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    border: 2px solid #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 80px 0;
}

.search-section, .about-section {
    background-color: #f8f9fa;
    border-top: 1px solid #eaeaea;
}

.search-section h2, .about-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: #2c3e50;
    font-weight: 600;
}

.about-section p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    color: #7f8c8d;
    line-height: 1.8;
}

/* Boîte de recherche */
.search-box {
    display: flex;
    max-width: 500px; /* Largeur réduite */
    margin: 0 auto 40px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #2980b9;
}

/* Résultats */
.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.cv-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f1f1f1;
}

.cv-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cv-card h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.cv-card p {
    margin-bottom: 6px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.cv-card .cv-link {
    display: inline-block;
    margin-top: 12px;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.cv-card .cv-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Administration */
.admin-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    border: 1px solid #eaeaea;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* Tableau des CV */
.cv-list {
    margin-top: 40px;
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f1f1;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.cv-list table {
    width: 100%;
    border-collapse: collapse;
}

.cv-list th, .cv-list td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eaeaea;
}

.cv-list th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cv-list tr:hover {
    background-color: #f8f9fa;
}

/* Boutons d'action */
.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.view-btn {
    background-color: #3498db;
    color: white;
}

.view-btn:hover {
    background-color: #2980b9;
}

.edit-btn {
    background-color: #27ae60;
    color: white;
}

.edit-btn:hover {
    background-color: #219a52;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* Lien de téléchargement */
.download-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.download-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Formulaire CV */
.cv-form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border: 1px solid #f1f1f1;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cv-form-container h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f1f1;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer p {
    margin-bottom: 10px;
    color: #ecf0f1;
}

.design-credit {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 80px 20px;
        text-align: center;
        min-height: 70vh;
    }
    
    .hero-content {
        text-align: center;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .nav-menu {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .admin-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 5px;
        max-width: 300px;
    }
    
    .search-box input, .search-box button {
        border-radius: 0;
        width: 100%;
    }
    
    section {
        padding: 60px 0;
    }
    
    .results-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Version desktop avec largeur contrôlée */
@media (min-width: 1200px) {
    .hero-content {
        margin-left: 100px; /* Décalage depuis la gauche */
    }
}

/* Style spécifique pour le bouton déconnexion */
#logoutBtn {
    background-color: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    margin-left: 10px;
}

#logoutBtn:hover {
    background-color: #c0392b;
}

/* Cacher le bouton déconnexion sur la page de login */
.admin-login #logoutBtn {
    display: none !important;
}

/* Styles pour le select */
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
    transition: border-color 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Badges pour le type de personne */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-membre {
    background-color: #3498db;
    color: white;
}

.badge-prestataire {
    background-color: #e67e22;
    color: white;
}

/* Filtres par type */
.type-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.type-filter-btn {
    padding: 8px 16px;
    border: 2px solid #3498db;
    border-radius: 20px;
    background: white;
    color: #3498db;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.type-filter-btn.active {
    background: #3498db;
    color: white;
}

.type-filter-btn:hover {
    transform: translateY(-2px);
}

/* ==================== NOUVELLE SECTION TOUS LES CV ==================== */

.all-cvs-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin: 0;
}

.cv-count {
    background: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn.active,
.filter-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

.sort-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    color: #2c3e50;
    font-size: 0.9rem;
}

/* Grid pour l'affichage des CV */
.cv-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.cv-card-grid {
    background: white;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f1f1f1;
    overflow: hidden;
}

.cv-card-grid:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.cv-card-header {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
}

.cv-card-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2rem;
    font-weight: 300;
}

.cv-card-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.cv-card-title {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

.cv-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.cv-card-content {
    padding: 25px;
}

.cv-card-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #5a6c7d;
}

.cv-card-info i {
    width: 20px;
    color: #3498db;
    margin-right: 10px;
}

.cv-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-card {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-view {
    background: #3498db;
    color: white;
}

.btn-view:hover {
    background: #2980b9;
}

.btn-contact {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #eaeaea;
}

.btn-contact:hover {
    background: #e9ecef;
}

/* Bouton Voir tous les CV */
.view-all-container {
    text-align: center;
    margin: 30px 0;
}

.btn-outline {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* Animation de chargement */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .cv-grid-container {
        grid-template-columns: 1fr;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .cv-card-actions {
        flex-direction: column;
    }
    
    .cv-card-header {
        padding: 20px;
    }
    
    .cv-card-content {
        padding: 20px;
    }
}

/* Effet de fade in */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}