/*
 * =============================================================
 * Variables CSS (COULEURS HARMONISÉES)
 * =============================================================
 */
:root {
    --primary-color-red: #e54b4b; /* Couleur rouge-rose du logo */
    --primary-color-blue: #4b6be5; /* Couleur bleu-gris du logo */
    --accent-color-orange: #ffa500; /* Orange existant pour le dégradé */
    --text-color-dark: #2a2a2a; /* Texte plus foncé */
    --text-color-light: #fff;
    --background-light: #f9f9fc; /* Fond très clair */
    --background-white: #fff;
    --border-light: #eee;
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08); /* Ombre douce */
}


/*
 * =============================================================
 * CSS Global
 * =============================================================
 */

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-color-dark);
}

/*
 * =============================================================
 * Header et Navigation
 * =============================================================
 */

header {
    /* Dégradé ajusté pour utiliser les couleurs du logo */
    background: linear-gradient(135deg, var(--primary-color-red), var(--primary-color-blue));
    color: var(--text-color-light);
    padding: 2rem 0;
    text-align: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
}

.logo-link {
    display: flex; 
    align-items: center;
    text-decoration: none;
}

.logo-link img {
    height: 200px; /* LOGO AGRANDI */
    width: auto;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
}

nav a {
    color: var(--text-color-light);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color-orange);
}

.notification-badge {
    background-color: var(--primary-color-red);
    color: var(--text-color-light);
    font-size: 12px;
    padding: 3px 7px;
    border-radius: 50%;
    position: relative;
    top: -8px;
    left: 5px;
}

.button-link {
    background-color: var(--background-white); /* Blanc */
    color: var(--primary-color-red); /* Couleur du logo */
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.button-link:hover {
    background-color: #eee;
}

/* Ajustement pour les boutons du hero/cta pour les icônes */
.button-link i {
    margin-right: 10px;
}


/*
 * =============================================================
 * Section d'accueil (Hero)
 * =============================================================
 */

.hero {
    padding: 5rem 0;
    text-align: center;
    background-color: var(--background-white);
    color: var(--text-color-dark);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color-red);
    /* Ligne pour le soulignement moderne */
    position: relative;
    padding-bottom: 15px;
}

.hero h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color-red);
    border-radius: 5px;
}


/*
 * =============================================================
 * Styles pour les sections principales (Features & Points)
 * =============================================================
 */

main {
    padding: 2rem 5%;
}

.points-section, .features {
    padding: 4rem 5%;
    text-align: center;
    background-color: var(--background-light);
}

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

.points-section h2, .features h2 {
    font-size: 2.5rem;
    color: var(--primary-color-blue);
    margin-bottom: 3rem;
}

.description-subtext {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 3rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

/* Cadre général pour les points (était .points-cadre, maintenant plus générique) */
.points-cadre {
    background-color: var(--background-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    max-width: 900px;
    margin: 0 auto;
    border-top: 5px solid var(--primary-color-red);
}

/* Style des cartes modernes (Modern Card) */
.feature-item.modern-card {
    background-color: var(--background-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    border-top: 5px solid var(--primary-color-red);
    transition: all 0.3s ease;
    text-align: left;
}

.feature-item.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    color: var(--primary-color-blue);
    margin-bottom: 15px;
}

.feature-item h3 {
    color: var(--text-color-dark);
    font-size: 1.4rem;
    margin-top: 0;
}

/* Grille pour les points et features */
.feature-grid, .points-grid {
    display: grid;
    gap: 20px;
    margin-top: 2rem;
}

.grid-3-cols {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4-cols {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Styles spécifiques au système de points */
.point-item {
    background-color: var(--background-light);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.point-item i {
    font-size: 2.5rem;
    color: var(--primary-color-red);
    margin-bottom: 10px;
}

.point-item h4 {
    color: var(--text-color-dark);
    margin: 0;
}

.points-title {
    color: var(--primary-color-red);
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.6rem;
    text-align: center;
}

/* Style des témoignages */
.testimonial {
    background-color: var(--primary-color-blue);
    color: var(--text-color-light);
    padding: 4rem 5%;
    text-align: center;
}

blockquote {
    max-width: 800px;
    margin: 0 auto;
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.6;
    border: none;
    padding: 0;
    position: relative;
}

blockquote i.fa-quote-left {
    color: var(--accent-color-orange);
    font-size: 2rem;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

blockquote cite {
    display: block;
    margin-top: 1.5rem;
    font-style: normal;
    font-weight: bold;
    color: var(--accent-color-orange);
}


/* NOUVELLE SECTION CTA (Call To Action) */
.cta-section {
    padding: 5rem 5%;
    text-align: center;
    background-color: var(--primary-color-red); /* Rouge vif pour attirer l'attention */
    color: var(--text-color-light);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-section h3 {
    font-size: 2.5rem;
    margin-top: 0;
}

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

.cta-button {
    background-color: var(--text-color-light);
    color: var(--primary-color-red);
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}

.cta-button:hover {
    background-color: #f0f0f0;
}


/*
 * =============================================================
 * Formulaires (Connexion, Inscription, Recherche)
 * =============================================================
 */

.inscription-page, .recherche-page {
    max-width: 800px;
    margin: 50px auto;
    padding: 2rem;
    background-color: var(--background-white);
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    color: var(--text-color-dark);
}

.inscription-page h2, .recherche-page h2 {
    text-align: center;
    color: var(--primary-color-red);
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    color: var(--text-color-dark);
}

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color-red);
    color: var(--text-color-light);
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: #e55a5a;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.search-form .form-group {
    flex: 1 1 200px;
}

.resultats-recherche {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.profile-result-card {
    background-color: var(--background-white);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease;
    text-decoration: none;
    color: var(--text-color-dark);
}

.profile-result-card:hover {
    transform: translateY(-5px);
}

.profile-result-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color-red);
}

/*
 * =============================================================
 * Page de Profil
 * =============================================================
 */

.profile-page {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.profile-card {
    background-color: var(--background-white);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    text-align: center;
    overflow: hidden;
    margin-top: 2rem;
    color: var(--text-color-dark);
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color-red), var(--primary-color-blue));
    color: var(--text-color-light);
    padding: 3rem 2rem;
}

#profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--background-white);
    margin-bottom: 1.5rem;
}
.profile-card h1 {
    font-size: 2.8rem;
    margin: 0;
}

.profile-details {
    padding: 2rem;
    text-align: left;
}

.profile-details h3 {
    color: var(--primary-color-red);
    border-bottom: 2px solid var(--primary-color-red);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

/*
 * =============================================================
 * Page de Messages
 * =============================================================
 */
/* ... (Les styles de messages restent les mêmes, mais je les conserve ici pour la complétude) ... */

.messages-page {
    max-width: 1000px;
    margin: 40px auto;
}

.messages-container {
    display: flex;
    background-color: var(--background-white);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-height: 600px;
    overflow: hidden;
}

.conversations-list {
    flex: 1;
    border-right: 1px solid var(--border-light);
    padding: 20px;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    text-decoration: none;
    color: #555;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: background-color 0.3s ease;
}

.conversation-item:hover, .conversation-item.active {
    background-color: #ffe8e8; /* Nuance claire du rouge du logo */
}

.conversation-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color-dark);
    flex-grow: 1;
}

.conv-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.conv-name {
    font-weight: bold;
}

.view-profile-link {
    font-size: 0.8rem;
    color: var(--primary-color-red);
    text-decoration: none;
    padding: 5px;
    border: 1px solid var(--primary-color-red);
    border-radius: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.view-profile-link:hover {
    background-color: var(--primary-color-red);
    color: var(--text-color-light);
}

.chat-area {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.message-list {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

.message-bubble {
    padding: 12px 18px;
    border-radius: 20px;
    margin-bottom: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.message-bubble.sent {
    background-color: var(--primary-color-red);
    color: var(--text-color-light);
    align-self: flex-end;
}

.message-bubble.received {
    background-color: #f0f0f0;
    color: var(--text-color-dark);
    align-self: flex-start;
}

.timestamp {
    display: block;
    font-size: 0.75rem;
    text-align: right;
    color: #999;
    margin-top: 5px;
}

.message-form {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--border-light);
}

.message-form textarea {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
    resize: none;
}


/*
 * =============================================================
 * Footer
 * =============================================================
 */

footer {
    text-align: center;
    padding: 1.5rem 0;
    background-color: var(--text-color-dark);
    color: var(--text-color-light);
    margin-top: 2rem;
}

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

/*
 * =============================================================
 * Autres liens / utilitaires
 * =============================================================
 */

.forgot-password-link {
    text-align: center;
    margin-top: 15px;
}

.forgot-password-link a {
    color: var(--primary-color-red);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.forgot-password-link a:hover {
    color: var(--accent-color-orange);
}


/*
 * =============================================================
 * Media Queries pour le Responsive Design
 * =============================================================
 */

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem 5%;
    }

    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    /* Le grid passe en colonne unique sur mobile */
    .feature-grid, .points-grid, .grid-3-cols, .grid-4-cols {
        grid-template-columns: 1fr;
    }

    .inscription-page, .recherche-page {
        margin: 20px;
        padding: 1.5rem;
    }
    
    .messages-container {
        flex-direction: column;
        min-height: auto;
    }
    
    .conversations-list {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }

    .view-profile-link {
        font-size: 0.7rem;
    }

    .message-bubble {
        max-width: 90%;
    }
}
/* =============================================================
 * Styles pour la Pop-up photo
 * =============================================================
 */
/* Style de la pop-up (modal) */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.9); 
    justify-content: center;
    align-items: center;
}

/* Contenu du modal (l'image) */
.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
}

/* Le bouton de fermeture */
.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}