/* style1.css - Styles Fusionnés, Nettoyés et Réorganisés */
/* Version: 2025-04-30 (Inclut Styles Recherche Simple, ModifFiche, Index, Détail Messages) */

/* =========================================== */
/* --- Styles Globaux & Réinitialisation Base --- */
/* =========================================== */

body {
    margin: 0;
    font-family: sans-serif;
    min-height: 100vh; /* IMPORTANT : S'assure que le body prend toute la hauteur de la vue */
    overflow-y: auto; /* Empêche le défilement du body si le menu est très long et scrollable */
}

body.with-fixed-menu {
    padding-top: 46px; /* Espace SI le menu est fixe */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #0665e6;
    text-decoration: none;
}
a:hover {
    color: #000;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #444;
    line-height: 1.3;
}

/* Masquer éléments pour accessibilité */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}


/* =========================================== */
/* --- Conteneurs Principaux & Mise en Page --- */
/* =========================================== */

.main-container {
	background-color: #bdd2e2;
    max-width: 1200px; /* Largeur max par défaut */
    margin: 1.5rem auto; /* Marge haut/bas + centrage */
    padding: 10px 15px; /* Espace côtés mobile */
	border-radius: 10px;
    box-sizing: border-box;
}
.main-container.dashboard { max-width: 1200px; background-color: #bdd2e2; }
.main-container.profile-detail { max-width: 1200px; }
.main-container.search-results { max-width: 1200px; }
.main-container.search-form-container { max-width: 960px; } /* Largeur pour formulaire */
.homepage-container { /* Conteneur spécifique accueil */
    max-width: 1200px;
	background-color: #bdd2e2;
}
.message-detail-container {
    max-width: 800px; /* Limiter largeur pour lecture message détail */
}

/* Conteneur pour liste de cartes (messages, résultats recherche) */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 0 0;
    padding: 0;
}
/* Survol carte dans container */
.cards-container > .card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}
.cards-container > .card.visible:hover {
    transform: translateY(-3px);
}

/* Grille pour les formulaires */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem 1rem;
}
.form-grid .full-width {
    grid-column: 1 / -1; /* Pleine largeur dans grille */
}
form[name="form"] .form-grid { /* Grille spécifique modiffiche */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Colonnes un peu plus larges */
    gap: 1rem 1.5rem; /* Espace vertical et horizontal */
}
.login-form .login-grid { /* Grille spécifique pour login */
    display: grid;
    grid-template-columns: 1fr; /* Une colonne par défaut */
    gap: 0.8rem; /* Espace entre champs */
}

/* Grille derniers membres (Accueil) */
.latest-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 1rem; /* Espace entre les membres */
    justify-content: center; /* Centre la grille si moins d'éléments */
}

/* Grille détails profil */
.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Liste détails profil */
.details-list {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.6rem 1rem;
    font-size: 0.9rem;
}
.details-list dt {
    font-weight: bold;
    color: #555;
    grid-column: 1;
    padding-right: 1em;
}
.details-list dd {
    margin: 0;
    color: #333;
    grid-column: 2;
    word-break: break-word;
}

img {
    max-width: 100%;
    height: auto;
}
	
/* =========================================== */
/* --- Composants Communs --- */
/* =========================================== */

/* --- Boutons --- */
.btn, .btn-outline {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 40px;
    text-decoration: none !important;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
    margin: 0.25rem;
    line-height: 1.4;
    vertical-align: middle;
}
.btn { /* Bouton plein */
    background-color: #007BFF;
    color: #fff;
    border-color: #007BFF;
}
.btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #fff;
}
.btn-outline { /* Bouton contour */
    background-color: transparent;
    border-color: #007BFF;
    color: #007BFF;
	border-radius: 20px;
}
.btn-outline:hover {
    background-color: #007BFF;
    color: #fff;
}
/* Bouton spécifique tableau de bord */
.btn.btn-read-msg {
    background: #0665e6;
    color: white !important;
    padding: 8px 14px;
    font-weight: bold;
    font-size: 0.95rem;
    margin-left: 10px;
}
.btn.btn-read-msg:hover {
    background: #0051b8;
    color: white !important;
}
/* Bouton supprimer */
.btn-delete {
    border-color: #dc3545; /* Rouge */
   
}
.btn-delete:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
/* Style bouton inscription page accueil */
.btn.btn-primary.btn-large {
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    /* Styles .btn sont hérités */
}
/* Bouton retour profil */
.profile-return-button {
    text-align: center; /* Centre le bouton retour */
    margin-top: 2rem; /* Espace avant */
    margin-bottom: 1rem; /* Espace après */
}

/* --- Cartes (Cards) --- */
.card {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    /* Padding ajouté dans contextes spécifiques ou via .card > a */

    /* Styles animation apparition */
    opacity: 1;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.3s ease-out;
}
.card.visible {
    opacity: 1;
    transform: translateY(0);
}
.card-title {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #2eb74c;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.75rem;
    /* Ajustement si padding sur .card */
    margin-left: -1.5rem; /* Compense padding parent si titre pleine largeur */
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.card-title-small {
    font-size: 1rem;
    color: #0056b3;
    text-align: left;
    border-bottom: none;
    margin-bottom: 0.75rem;
    font-weight: bold;
}
/* Style lien couvrant carte (Résultats Recherche) */
.card > a.result-card-link,
.card > a:not(.btn):not(.btn-outline) { /* Cible les liens non-boutons enfants directs */
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 8px; /* Pour effet hover */
    transition: background-color 0.2s ease-out; /* Pour effet hover */
}
.card > a.result-card-link:hover,
.card > a:not(.btn):not(.btn-outline):hover {
    text-decoration: none;
    background-color: #f9f9f9; /* Léger fond au survol */
}

/* --- Formulaires (Général) --- */
.form-group { /* Conteneur pour label + input */ }
/* Labels dans les formulaires */
form label, .form-group label {
    display: inline;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}
/* Champs de formulaire */
form select, form input[type="text"], form input[type="number"], form input[type="email"], form input[type="password"], .form-group select, .form-group input[type="text"], form textarea {
    width: 100%;
    padding: 0.7rem;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    height: auto; /* Pour textarea */
    margin-bottom: 0.25rem; /* Pour espacement si pas dans grille */
    font-family: inherit;
}
form select[multiple] {
    /*min-height: 8rem; */ /* Hauteur min pour voir options */
    background-color: #fff;
    /*height: auto; */ /* Override si hérité */
}
form textarea { /* Styles spécifiques textarea */
    min-height: 120px; /* Hauteur minimum */
    resize: vertical; /* Permet redimensionnement vertical */
}
/* Pseudo statique (Modif Fiche) */
.static-pseudo {
    font-size: 1rem; /* Correspond à la taille de police input */
    padding: 0.7rem 0; /* Alignement vertical approx */
    color: #555;
    font-weight: bold;
    min-height: calc(1.4em + 1.4rem + 2px); /* Hauteur similaire aux inputs pour alignement grille */
    box-sizing: border-box;
    display: block;
}
/* Groupe de selects Date de Naissance */
.dob-select-group {
    display: flex;
    gap: 0.5rem; /* Espace entre Jour/Mois/Année */
    align-items: center;
}
.dob-select-group select {
    flex: 1; /* Prend l'espace disponible */
    min-width: 60px; /* Empêche d'être trop petit */
}
/* Actions Formulaire (générique) */
.form-grid .actions {
    grid-column: 1 / -1; /* Pleine largeur */
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}
.actions button, /* Pour submit */
.actions a.btn, /* Pour liens Annuler/Supprimer */
.actions a.btn-outline {
    margin: 0.5rem;
    /* Les styles .btn / .btn-outline sont appliqués via les classes */
}
form[name="form"] .actions { /* Cible spécifique ModifFiche */
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem auto;
    padding: 0 1rem;
    max-width: 900px;
}
.pagination-simple {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}
.pagination-new-search {
    text-align: center;
    width: 100%;
}

/* --- Messages d'information / Erreur / Absence de résultats --- */
.no-results, .no-messages {
    grid-column: 1 / -1; /* S'étend sur toute la grille parente */
    text-align: center;
    padding: 2rem;
    background-color: #f0f0f0;
    border-radius: 6px;
    color: #666;
    border: 1px dashed #ccc;
    margin: 1rem 0;
}
.error-message.card { /* Erreur dans profil */
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    text-align: center;
    padding: 1rem;
}
.payment-required-message { /* Message non-membre (recherche) */
    background: #e9d8fd;
    padding: 1.5rem;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #bd94f7;
    margin-top: 1rem;
}
.payment-required-message p {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #581c87;
}
.payment-required-message p b {
    color: #7e22ce;
}


/* =========================================== */
/* --- Composants Spécifiques Page --- */
/* =========================================== */

/* --- Accueil (index.php) --- */
.homepage-header {
    text-align: center; 
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 1.5rem;
}
.homepage-header .imglogo {
    max-width: 300px;
    height: auto;
    margin: 0 auto 1rem auto;
    display: block;
}
.homepage-header h1 {
    font-size: 1.4rem;
    color: #c508ee;
    margin-bottom: 0.5rem;
}
.homepage-header p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0 !important;
    padding-bottom: 0;
}
.login-section.card {
	background: #e6f7ff;
    max-width: 425px;
    margin-left: auto;
    margin-top: 0;
    margin-right: auto;
	padding: 0.5rem 1rem;
}
.login-section .card-title-small {
    text-align: center;
    color: #333;
    font-size: 1.1rem;
}
.login-form .form-group { margin-bottom: 0; }
.login-form .form-actions { margin-top: 0.5rem; }
.login-form .form-actions .btn { width: 100%; }
.login-links {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
}
.login-links a { color: #666; }
.latest-members-section {
    border-top: 1px solid #eee;
	margin-top: 1.5rem;
}
.latest-members-section h2 {
    text-align: center;
    font-size: 1.4rem;
    color: #444;
    margin-bottom: 1.5rem;
}
.latest-member-item { text-align: center; }
.latest-member-item a { text-decoration: none; color: inherit; display: block; }
.latest-member-item .photo-wrapper.preview-photo,
.latest-member-item .photo-placeholder.small-placeholder {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.5rem auto;
    border-radius: 50%;
    background-color: #eee;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative; /* Pour statut en ligne */
}
.latest-member-item .photo-placeholder.small-placeholder { font-size: 10px; color: #777; }
.latest-member-item .member-pseudo {
    font-size: 0.85rem; color: #333; display: block; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.latest-member-item a:hover .member-pseudo { color: #0665e6; text-decoration: underline; }
.latest-member-item a:hover .photo-wrapper { transform: scale(1.05); box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.latest-member-item .member-details {
    font-size: 0.75rem; color: #777; margin-top: 0.2rem; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%; min-height: 1em;
}
.latest-member-item .member-details .detail-separator { margin: 0 0.2em; color: #bbb; }
.latest-member-item .status-dot {
    display: block; position: absolute; bottom: 2px; right: 2px;
    width: 12px; height: 12px; border-radius: 50%;
    background-color: #ccc; border: 2px solid white;
    box-shadow: 0 0 3px rgba(0,0,0,0.5); z-index: 2;
}
.latest-member-item .status-dot.online { background-color: #28a745; }
.registration-cta.card {
    text-align: center; background-color: #e6f7ff; border: 1px solid #b3e0ff;
    padding: 0.5rem 0.2rem ;max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}
.registration-cta h2 { color: #0056b3; font-size: 1.5rem; }
.registration-cta p { color: #333; margin-bottom: 1.5rem; }
.registration-cta .actions { margin-top: 0; border-top: none; padding-top: 0; }
.public-cta.card { /* CTA Public hors connexion */
    background-color: #e6f7ff; border-color: #b3e0ff; text-align: center;
    margin-top: 2rem; padding: 1.5rem 1rem;
}
.public-cta p { margin-bottom: 1.5rem; font-size: 1.1rem; color: #333; }
.public-cta .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.site-stats { /* Section statistiques */
	margin-left: auto;
    margin-right: auto;
	margin-top: 2rem;
	border-radius: 8px;
	background: #e6f7ff; 
	white-space: nowrap;
	display: flex; 
	flex-wrap: nowrap;
	justify-content: space-around; gap: 1rem; text-align: center; padding: 0.5rem 0.2rem;
	max-width: 450px;
    border-top: 1px solid #eee; 
	border-bottom: 1px solid #eee;
    
}
.site-stats .stat-item { flex: 1; padding: 0.5rem 0.5rem; white-space: nowrap;}
.site-stats .stat-value { display: block; font-size: 0.85rem; font-weight: bold; color: #0056b3; line-height: 1.2; }
.site-stats .stat-label { display: block; font-size: 0.85rem; color: #555; margin-top: 0.2rem; }
.pub-section { text-align: center; margin: 2rem 0; }
.main-footer {
    text-align: center; margin-top: 3rem; padding-top: 1.5rem;
    border-top: 1px solid #ddd; font-size: 0.85rem; color: #666;
}
.main-footer p { margin: 0; }
.main-footer a { color: #555; }
.main-footer a:hover { color: #000; }

/* --- Tableau de Bord (Dashboard) --- */
.welcome-header { text-align: center; margin-bottom: 1.5rem; font-size: 1.3rem; color: #444; }
.welcome-header h3 { margin: 0; }
.message-info.card { text-align: center; font-size: 1.1rem; color: #333; line-height: 1.6; padding: 1rem; }
.message-info strong { color: #0056b3; }
.last-registered.card { padding: 1rem 1.5rem; }
.inscrits-list { display: grid; grid-template-columns: 1fr 1fr; /* Force 2 colonnes */ gap: 1rem 1.5rem; padding: 0; }
.inscrits-list ul { list-style: none; padding-left: 0; margin: 0; overflow: hidden; }
.inscrits-list ul li:first-child { font-weight: bold; margin-bottom: 0.5rem; font-size: 1rem; color: #333; padding-bottom: 0.3rem; border-bottom: 1px solid #eee; }
.inscrits-list li { margin: 0.3rem 0; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.welcome-text.card { padding: 1rem 1.5rem; }
.welcome-text p { margin-bottom: 0.8rem; line-height: 1.6; }
.welcome-text p:last-child { margin-bottom: 0; }
.welcome-text .action-buttons { margin-top: 1.5rem; text-align: center; }
.welcome-text .action-buttons .btn-outline { margin: 0.3rem; }
.forum-preview.card { padding: 1rem 1.5rem; }
.forum-preview .forum-content { overflow-x: auto; padding: 1px; margin: -1px; }
.forum-preview .forum-content table { width: 100%; max-width: none; box-shadow: none; border-radius: 0; margin: 0; border-collapse: collapse; border: 1px solid #eee; }
.forum-preview .forum-content th, .forum-preview .forum-content td { padding: 0.5rem; border: 1px solid #eee; font-size: 0.9rem; text-align: left; }
.forum-preview .action-buttons { text-align: center; margin-top: 1rem; }

/* --- Liste / Détail Messages --- */
.message-card {
    padding: 0;
    border-left: 4px solid transparent;
}
.message-card.unread { border-left-color: #8e63c3; background-color: #fffafb; }
.message-card.sent-message { /* Style spécifique message envoyé */ }
.message-card .card-header { display: flex; align-items: center; gap: 1rem; padding: 1rem; }
/* Styles photo/placeholder (dernière version) */
.message-card .photo-wrapper,
.message-card .photo-placeholder {
    width: 70px; height: 70px; background-color: #e0e0e0; border-radius: 50%;
    /* display: flex; */ align-items: center; justify-content: center; text-align: center;
    flex-shrink: 0; font-size: 10px; font-weight: bold; color: #666;
    overflow: hidden; line-height: 1.1; box-sizing: border-box;
}
.message-card .photo-wrapper img { display: block; width: 100%; height: 100%; object-fit: cover; }
.message-card .card-info { display: flex; flex-direction: column; justify-content: center; gap: 0.2rem; flex-grow: 1; min-width: 0; }
.message-card .pseudo { font-weight: bold; font-size: 1.1rem; color: #333; display: flex; align-items: center; gap: 0.5rem; word-break: break-word; }
/* .message-card .pseudo::before { content: "👤"; font-size: 1rem; margin-right: 0.2em; } */
.message-card .recipient-label, .message-card .sender-label { font-size: 0.8em; color: #666; margin-bottom: -0.2em; }
.message-card .details { font-size: 0.85rem; color: #666; display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; }
.message-card .replied, .message-card .not-replied, .message-card span.unread { font-size: 0.85rem; font-weight: bold; white-space: nowrap; }
.message-card .replied { color: #28a745; }
.message-card .not-replied { color: #dc3545; }
/* Statut Lu/Non Lu (Messages envoyés) */
.message-card .read-status span.read { background-color: #eaf1f5; color: #345c75; padding: 0.1em 0.4em; border-radius: 3px; }
.message-card .read-status span.unread { background-color: #fef3c7; color: #92400e; padding: 0.1em 0.4em; border-radius: 3px; font-weight: bold; }
/* Styles spécifiques carte non lue (important pour forcer couleurs) */
.message-card.unread .pseudo, .message-card.unread .details, .message-card.unread .subject strong, .message-card.unread .body { color: #333 !important; }
.message-card.unread .replied { color: #28a745 !important; }
.message-card.unread .not-replied { color: #dc3545 !important; }
.message-card.unread span.unread { color: #dc3545 !important; }
/* Zone checkbox selection message */
.message-card .message-select-action { margin-left: auto; padding-left: 0.5rem; align-self: center; }
.message-card .message-select-action .checkbox-label { display: inline-block; padding: 5px; cursor: pointer; }
.message-card .message-select-action input[type="checkbox"] { transform: scale(1.3); cursor: pointer; vertical-align: middle; }
/* Objet du message */
.message-card .subject { padding: 0.75rem 1rem; border-top: 1px solid #f0f0f0; margin-top: 0.5rem; font-size: 1rem; color: #333; font-weight: normal; text-align: center; }
.message-card .subject strong { font-weight: bold; text-align: center; color: #555; margin-right: 0.5em; }
.message-card .subject a { text-decoration: none; font-weight: normal; }
.message-card .subject a:hover { color: #0665e6; text-decoration: underline; }
/* Corps du message */
.message-card .body { padding: 1rem; line-height: 1.6; word-wrap: break-word; white-space: pre-line; color: #333; background-color: #fff; }
.cards-container .message-card .body { background-color: #fafafa; } /* Historique détail */
.message-card .body.message-body { /* Corps page détail */ padding: 1.5rem; background-color: #fff; line-height: 1.7; word-wrap: break-word; }
/* Actions bas de carte message */
.message-card .actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-top: 1px solid #eee; background-color: #f9f9f9; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.message-card .actions label { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem; cursor: pointer; font-size: 0.9rem; color: #555; border-radius: 4px; transition: background-color 0.2s; margin: 0; }
.message-card .actions label:hover { background-color: #eee; }
.message-card .actions input[type="checkbox"] { transform: scale(1.3); cursor: pointer; margin: 0 0.5rem 0 0; }
.message-card .actions .btn { flex-grow: 0; padding: 0.5rem 1rem; font-size: 0.9rem; margin: 0; }
.message-card .actions.message-actions { justify-content: center; } /* Actions page détail */
.message-actions form { display: inline; margin: 0; }
/* Filtres/Tri liste messages */
.filters, .sort { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; padding: 1rem; background-color: #f0f0f0; border-radius: 6px; align-items: center; }
.filters .filter, .sort .filter { display: flex; align-items: center; gap: 0.5rem; flex-grow: 1; flex-basis: 200px; }
.filters label, .sort label { font-weight: bold; font-size: 0.95rem; color: #333; margin-bottom: 0; white-space: nowrap; }
.filters select, .sort select { padding: 0.5rem 0.8rem; font-size: 0.95rem; border: 1px solid #ccc; border-radius: 4px; background: #fff; cursor: pointer; transition: border-color 0.2s; flex-grow: 1; min-width: 120px; }
.filters select:hover, .filters select:focus, .sort select:hover, .sort select:focus { border-color: #007BFF; outline: none; }
.sort a { text-decoration: none; color: #007BFF; font-size: 0.95rem; }
.sort a.current { font-weight: bold; color: #000; }
/* Actions de masse (Tout cocher...) */
.select-all { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1.5rem; padding: 0.5rem 0; }
.select-all .btn-outline { font-size: 0.9rem; padding: 0.6rem 1rem; }

/* --- Détail Profil --- */
.profile-header.card { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; padding: 1.5rem; }
.profile-header .photo { flex-shrink: 0; text-align: center; }
.profile-header .photo img { display: block; width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.2); margin: 0 auto; }
.profile-header .photo img.photo-placeholder-img { border-radius: 8px; object-fit: contain; background-color: #eee; padding: 10px; box-sizing: border-box; }
.profile-header .secret-album-link { margin-top: 0.5rem; font-size: 0.85rem; }
.profile-header .secret-album-link a { color: #666; }
.profile-header .key-info { flex-grow: 1; }
.profile-header .key-info h1 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.8rem; color: #333; }
.profile-header .key-info p { margin-bottom: 0.4rem; line-height: 1.5; color: #555; font-size: 0.95rem; }
.profile-header .key-info .basic-details { font-size: 1.1rem; color: #444; }
.profile-header .key-info .location { /* Style lieu */ }
.profile-header .key-info .last-visit { font-style: italic; color: #777; font-size: 0.9rem; }
.profile-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 1.5rem; padding: 1rem 0; border-bottom: 1px solid #eee; }
.profile-actions .btn, .profile-actions .btn-outline { font-size: 0.9rem; padding: 0.5rem 1rem; }
.description-section.card { padding: 1rem 1.5rem; }
.description-section .description-content { line-height: 1.7; color: #444; }
.description-section .description-content p:last-child { margin-bottom: 0; }
.seeking-section.card { padding: 1rem 1.5rem; }
.seeking-details p { margin-bottom: 0.5rem; font-size: 1rem; line-height: 1.5; }
.seeking-details p:last-child { margin-bottom: 0; }
.seeking-details .seeking-who, .seeking-details .seeking-what { color: #555; margin-right: 0.5em; }
.seeking-details strong { color: #0056b3; font-weight: bold; }
.details-card.card { padding: 1rem; }
/* Formulaire message profil */
.message-form-section.card { padding: 1rem 1.5rem; }
.message-form .form-group { margin-bottom: 1rem; }
/* .message-form label, input, textarea styles hérités des styles généraux */
.message-form .form-actions { text-align: center; margin-top: 1.5rem; }
.message-form .form-actions .btn { padding: 0.8rem 2rem; }

/* --- Modification Fiche Profil --- */
.search-form-container, /* Réutiliser style container recherche */
.profile-edit-form-container {
    padding: 2rem; border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); margin-top: 1rem;
    max-width: 1200px; box-sizing: border-box;
}
.profile-edit-form-container h1 {
    color: #333; font-size: 1.5rem; text-align: center;
    margin-bottom: 1.5rem; border-bottom: 1px solid #eee; padding-bottom: 1rem;
}
/* Utilise .form-grid[name="form"] pour la grille */
/* Utilise les styles généraux pour label, input, select, textarea, actions */

/* --- Résultats Recherche --- */
.search-results .card { padding: 0; }
.search-results .card > a.result-card-link { padding: 1rem; }
.search-results .card .card-header { display: flex; align-items: center; gap: 1rem; padding: 0; border-bottom: none; }
.search-results .card .photo-wrapper,
.search-results .card .photo-placeholder {
    width: 90px; height: 90px; /* Taille spécifique résultats */
    flex-shrink: 0; border-radius: 50%; background-color: #e0e0e0;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    padding: 0; border: none; box-sizing: border-box; font-size: 11px; color: #666;
    text-align: center; line-height: 1.2;
}
.search-results .card .photo-wrapper img { display: block; width: 100%; height: 100%; object-fit: cover; }
.search-results .card .card-info { display: flex; flex-direction: column; justify-content: center; flex-grow: 1; min-width: 0; gap: 0.1rem; }
.search-results .card .pseudo { font-weight: bold; font-size: 1.1rem; color: #333; margin-bottom: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results .card .details { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; font-size: 0.9rem; color: #666; line-height: 1.5; }
.search-results .card .details span { margin-right: 0.3em; }
.search-results .card .details .detail-location + .detail-country { margin-left: -0.5em; }
.search-results .card .details .detail-country { color: #777; }
.search-results .card .details .detail-seeking { flex-basis: 100%; font-size: 0.85rem; color: #888; white-space: normal; margin-top: 0.2rem; font-style: italic; margin-right: 0; }
.results-count { text-align: center; margin-bottom: 1.5rem; font-size: 1.1rem; color: #555; }
.card.highlight-retour {
    outline: 2px solid orange; /* Ou une autre couleur et style de votre choix */
    box-shadow: 0 0 10px orange;
    transition: outline 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
/* --- Formulaire Recherche (Spécifique) --- */
.search-form-container h1 { text-align: center; color: #000000; font-size: 1.4rem; margin-bottom: 1rem; border-bottom: 1px solid #eee; padding-bottom: 0.5rem; }
.search-form-container .note { text-align: center; font-size: 0.9rem; color: #666; margin-bottom: 2rem; }
/* Utilise .form-grid générique */
/* Utilise les styles généraux label, input, select */
.age-range-selector { display: flex; gap: 0.5rem; align-items: center; }
.age-range-selector select { flex: 1; }
.age-range-selector span { flex-shrink: 0; font-size: 0.9rem; color: #555; }
/* Sliders âge */
.age-range-slider-group { margin-top: 0.5rem; padding: 0.5rem 0; }
.age-range-slider-group label.sr-only { /* Style .sr-only hérité */ }
.age-range-slider-group input[type="range"] { width: 40%; height: 6px; cursor: pointer; accent-color: #007BFF; background: #ddd; border-radius: 5px; outline: none; opacity: 0.8; transition: opacity .2s; margin-bottom: 0.75rem; padding: 0; appearance: none; -webkit-appearance: none; }
.age-range-slider-group input[type="range"]:hover { opacity: 1; }
.age-range-slider-group input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: #0056b3; border-radius: 50%; cursor: pointer; }
.age-range-slider-group input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; background: #0056b3; border-radius: 50%; cursor: pointer; border: none; }
label span#valMin, label span#valMax { display: inline-block; min-width: 2em; text-align: right; font-weight: bold; color: #0056b3; background-color: #f0f0f0; padding: 0.1em 0.4em; border-radius: 3px; margin-left: 0.3em; }
/* Option Mémoriser */
.memorize-option { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.memorize-option label { margin-bottom: 0; font-weight: normal; display: inline-flex; align-items: center; cursor: pointer; font-size: 0.9rem; }
.memorize-option input[type="checkbox"] { margin-right: 0.5em; width: auto; height: auto; transform: scale(1.1); accent-color: #007BFF; cursor: pointer; padding: 5px; margin: -5px 0.5em -5px -5px; }
/* Utilise .actions générique pour boutons */


/* =========================================== */
/* --- Responsive Général --- */
/* =========================================== */

/* --- Tablette (max-width: 768px) --- */
@media (max-width: 768px) {
    .main-container { margin: 0rem auto; padding: 13px 10px; }
    .card { padding: 1rem; }
    .card-title { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
    .welcome-header { font-size: 1.2rem; }
    /* Profil Detail Tablette */
    .profile-header.card { padding: 1rem; } /* Moins de padding */
    .profile-header .photo { margin-bottom: 1rem; width: 100%; display: flex; flex-direction: column; align-items: center; }
    .profile-header .key-info { text-align: center; }
    .profile-header .key-info .location { justify-content: center; }
    .profile-details-grid { gap: 1rem; }
    /* Résultats Recherche Tablette */
    .search-results .card > a.result-card-link { padding: 1rem; }
    /* Formulaires Tablette */
    .search-form-container, .profile-edit-form-container { padding: 1.5rem; }
}

/* --- Téléphone (max-width: 600px) --- */
@media (max-width: 600px) {
    h2, .card-title { font-size: 1.1rem; }
    .card { padding: 0.75rem; }
    .card-title { margin-left: -0.75rem; margin-right: -0.75rem; padding-left: 0.75rem; padding-right: 0.75rem; }

    /* Accueil Mobile */
    .homepage-header h1 { font-size: 1.3rem; }
    .homepage-header p { font-size: 0.95rem; }
    .latest-members-grid { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 0.8rem; }
    .latest-member-item .photo-wrapper.preview-photo,
    .latest-member-item .photo-placeholder.small-placeholder { width: 50px; height: 50px; }
    .latest-member-item .member-pseudo { font-size: 0.8rem; }
    .latest-member-item .member-details { font-size: 0.7rem; }
    .latest-member-item .status-dot { width: 8px; height: 8px; border-width: 1px; bottom: 1px; right: 1px; }
    .registration-cta h2 { font-size: 1.3rem; }
    .btn.btn-primary.btn-large { font-size: 1rem; padding: 0.7rem 1.5rem; }
    .site-stats { padding: 0.75rem 0.5rem; margin: 1.5rem 0; gap: 0.5rem; }
    .site-stats .stat-value { font-size: 0.8rem; }
    .site-stats .stat-label { font-size: 0.8rem; }

    /* Dashboard Mobile */
    .inscrits-list { gap: 0.75rem 1rem; }
    .inscrits-list li { font-size: 0.85rem; }
    .btn.btn-read-msg { display: block; margin-left: 0; margin-top: 0.75rem; text-align: center; }
    .welcome-text .action-buttons .btn-outline { display: block; margin: 0.5rem auto; max-width: 250px; }

    /* Message List & Detail Mobile */
    .message-card .card-header { padding: 0.75rem; gap: 0.75rem; align-items: flex-start; }
    .message-card .photo-wrapper, .message-card .photo-placeholder { width: 60px; height: 60px; font-size: 9px;}
    .message-card .pseudo { font-size: 1rem; }
    .message-card .details { font-size: 0.8rem; }
    .message-card .recipient-label { display: none; } /* Masquer "À :" */
    .message-card .message-select-action { align-self: flex-start; padding-top: 0.2rem;}
    .message-card .subject { margin-top: 0.25rem; padding: 0.5rem 0.75rem; font-size: 0.95rem;}
    .message-card .body { padding: 0.75rem; font-size: 0.95rem; }
    .message-card .actions { padding: 0.75rem; gap: 0.5rem; }
    .message-card .actions .btn { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
    .select-all { gap: 0.75rem; margin-bottom: 1rem; }
    .select-all .btn-outline { font-size: 0.85rem; padding: 0.5rem 0.8rem; }
    .filters, .sort { gap: 0.75rem; padding: 0.75rem; }
    .filters label, .sort label, .filters select, .sort select { font-size: 0.9rem; }

    /* Profil Detail Mobile */
    .profile-header.card { padding: 1rem; gap: 1rem; }
    .profile-header .key-info h1 { font-size: 1.5rem; }
    .profile-header .key-info p { font-size: 0.9rem; }
    .profile-header .key-info .basic-details { font-size: 1rem; }
    .profile-actions { gap: 0.5rem; }
    .profile-actions .btn, .profile-actions .btn-outline { flex-grow: 1; flex-basis: calc(50% - 1rem); font-size: 0.85rem; }
    .details-list { grid-template-columns: 1fr; gap: 0.1rem 0; }
    .details-list dt { font-size: 0.8rem; color: #777; margin-bottom: 0.1rem; padding-right: 0; }
    .details-list dd { font-size: 0.9rem; margin-bottom: 0.6rem; }

    /* Search Results Mobile */
    .results-count { font-size: 1rem; }
    .cards-container { gap: 1rem; margin-top: 1rem; }
    .search-results .card > a.result-card-link { padding: 0.75rem; }
    .search-results .card .card-header { gap: 0.75rem; }
    .search-results .card .photo-wrapper,
    .search-results .card .photo-placeholder { width: 60px; height: 60px; flex-shrink: 0; font-size: 10px;}
    .search-results .card .pseudo { font-size: 1rem; }
    .search-results .card .details span { font-size: 0.85rem; }
    .search-results .card .details .detail-seeking { font-size: 0.8rem; }
    .pagination { margin: 1.5rem auto; }
    .pagination-simple { gap: 0.5rem; }
    .pagination .btn, .pagination .btn-outline { font-size: 0.9rem; padding: 0.5rem 1rem; }

    /* Formulaires (Recherche & ModifFiche) Mobile */
    .search-form-container, .profile-edit-form-container { padding: 1rem; } 
    .search-form-container h1, .profile-edit-form-container h1 { font-size: 1.2rem; }
    .form-grid { grid-template-columns: 1fr; gap: 1rem; } /* Appliqué à tous les .form-grid */
    form select, form input[type="text"], form textarea { padding: 0.6rem; font-size: 0.9rem; } /* Simplifié */
    .dob-select-group { /* Optionnel: empiler D/M/Y ? */ /* flex-wrap: wrap; */ }
    .actions button, .actions .btn, .actions a.btn, .actions a.btn-outline {
        display: block; width: 90%; max-width: 300px; margin: 0.75rem auto;
    }
}
/* =========================================== */
/* --- Styles Spécifiques Liste Amis --- */
/* =========================================== */

/* Arrondir l'image de l'ami */
.friends-list .card .photo-wrapper img {
    display: block; 
    width: 80px;    /* Doit correspondre à redimage2(..., 80, 80, ...) */
    height: 80px;   /* Doit correspondre à redimage2(..., 80, 80, ...) */
    border-radius: 50%; /* !! La règle pour l'arrondi !! */
    object-fit: cover; /* Pour que l'image remplisse bien le cercle */
    border: 1px solid #ddd; /* Optionnel : petite bordure */
}

/* Arrondir le conteneur de la photo */
.friends-list .card .photo-wrapper {
   width: 80px;
   height: 80px;
   border-radius: 50%; /* Appliquer aussi ici */
   overflow: hidden;  /* Cache les coins si l'image dépasse */
   flex-shrink: 0;   /* Empêche de rétrécir dans flexbox */
   background-color: #eee; /* Fond si image transparente */
}

/* Arrondir le placeholder "Pas de photo" */
.friends-list .card .photo-wrapper .photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f0f0f0; 
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8em; 
    line-height: 1.2;
    box-sizing: border-box; 
}
.friends-list .card .card-info .details {
    display: flex;         /* Active Flexbox */
    flex-wrap: wrap;       /* Permet aux éléments de passer à la ligne */
    gap: 0.3rem 0.8rem;    /* Espacement vertical et horizontal entre les spans */
    font-size: 0.9rem;     /* Taille de police pour les détails */
    color: #666;          /* Couleur de texte */
    line-height: 1.4;      /* Hauteur de ligne */
    margin-top: 0.4rem;    /* Espace au-dessus du bloc détails */
}

/* Style de base pour les spans dans ce conteneur */
.friends-list .card .card-info .details span {
   /* Pas besoin de display: block/inline-block ici car flex s'en charge */
   /* On peut ajouter des styles communs si besoin */
}

.details span {
    display: inline-flex; /* Assure que chaque span est un élément flexible */
    align-items: center; /* Aligne le contenu verticalement si tu as des icônes par exemple */
}

/* Assure-toi qu'il n'y a pas de styles sur `a` génériques qui forcent un `display: block` */
.detail-lastconnec a {
    white-space: nowrap; /* Répète nowrap sur le lien lui-même pour plus de robustesse */
    text-decoration: none; /* Exemple: si tu veux retirer le soulignement */
    color: inherit; /* Exemple: pour hériter la couleur du parent */
}
/* Forcer certains spans (longs ou que l'on veut seuls) à prendre toute la largeur */
.friends-list .card .card-info .details .detail-seeking,
.friends-list .card .card-info .details .detail-lastconnec {
    flex-basis: 100%; /* Prend toute la largeur disponible */
    margin-top: 0.2rem; /* Petit espace au-dessus */
    
}

/* Styles spécifiques optionnels */
.friends-list .card .card-info .details .detail-seeking {
   font-style: italic;
   font-size: 0.85rem; /* Un peu plus petit */
   color: #777;
}
.friends-list .card .card-info .details .detail-lastconnec {
   font-size: 0.85rem;
   color: #888;
   white-space: nowrap;
}
/* Style pour les messages de retour AJAX */
.add-friend-feedback {
    padding: 0.5rem;
    margin-top: 1rem;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    display: block; /* Assurez-vous qu'il prend de la place */
    min-height: 1.5em; /* Pour éviter sauts de page quand vide */
}
.feedback-success { color: #155724; background-color: #d4edda; border: 1px solid #c3e6cb; }
.feedback-error { color: #721c24; background-color: #f8d7da; border: 1px solid #f5c6cb; }
.feedback-limit_reached, .feedback-already_exists { color: #004085; background-color: #cce5ff; border: 1px solid #b8daff; }
.feedback-loading { color: #555; } /* Style pour "Ajout en cours..." */

/* Style optionnel pour bouton désactivé/succès */
.btn-add-friend:disabled, .btn-add-friend.btn-success {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    opacity: 0.65;
    cursor: not-allowed;
}
/* --- Styles Spécifiques Liste Noire --- */

/* Arrondir l'image */
.blacklist-page .card .photo-wrapper img {
    display: block; 
    width: 80px;    /* Taille de l'image */
    height: 80px;   /* Taille de l'image */
    border-radius: 50%; 
    object-fit: cover; 
    border: 1px solid #ddd; 
}

/* Arrondir le conteneur */
.blacklist-page .card .photo-wrapper {
   width: 80px;
   height: 80px;
   border-radius: 50%; 
   overflow: hidden;  
   flex-shrink: 0;   
   background-color: #eee; 
}

/* Arrondir le placeholder */
.blacklist-page .card .photo-wrapper .photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f0f0f0; 
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8em; 
    line-height: 1.2;
    box-sizing: border-box; 
}

/* =========================================== */
/* --- Styles Spécifiques "Qui est en Ligne ?" --- */
/* =========================================== */

/* Agencement de l'en-tête de carte (photo à gauche, infos à droite) */
.online-users-page .card .card-header {
    display: flex;
    align-items: center; /* Centre verticalement la photo et le bloc texte */
    gap: 1rem;           /* Espace entre la photo et le bloc texte */
    padding: 1rem;       /* Espace intérieur du header de carte */
    /* border-bottom: none; /* Si vous voulez enlever une bordure héritée */
}

/* S'assurer que la photo ne rétrécit pas et a la bonne taille */
.online-users-page .card .photo-wrapper {
   width: 80px;    /* Taille de la photo */
   height: 80px;   /* Taille de la photo */
   border-radius: 50%; /* Pour l'arrondi */
   overflow: hidden;  /* Cache les coins si l'image n'est pas carrée */
   flex-shrink: 0;   /* Empêche de rétrécir dans le layout flex */
   background-color: #eee; /* Fond si l'image est transparente ou en chargement */
}

.online-users-page .card .photo-wrapper img {
    display: block; 
    width: 100%;    /* L'image prend toute la place du wrapper */
    height: 100%;   /* L'image prend toute la place du wrapper */
    object-fit: cover; /* Remplit le cercle en rognant si besoin, sans déformer */
    /* border-radius: 50%; Inutile si le wrapper a déjà overflow:hidden et border-radius */
}

/* Placeholder si pas de photo */
.online-users-page .card .photo-wrapper .photo-placeholder {
    width: 100%;
    height: 100%;
    /* border-radius: 50%; Inutile si le wrapper a déjà overflow:hidden et border-radius */
    background-color: #f0f0f0; 
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8em; 
    line-height: 1.2;
    box-sizing: border-box; 
}

/* Permettre au bloc d'info de prendre l'espace restant */
.online-users-page .card .card-info {
    flex-grow: 1;
    min-width: 0; /* Important pour la gestion du dépassement de texte */
}

/* Affichage des détails dans le bloc .card-info */
.online-users-page .card .card-info .details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.8rem; /* Espacement vertical et horizontal entre les détails */
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin-top: 0.4rem; /* Espace au-dessus du bloc de détails */
}

/* Forcer certains détails (plus longs) à prendre toute la largeur et passer à la ligne */
.online-users-page .card .card-info .details .detail-seeking,
.online-users-page .card .card-info .details .detail-connexion-depuis,
.online-users-page .card .card-info .details .detail-user-status {
    flex-basis: 100%; /* Prend toute la largeur disponible */
    margin-top: 0.2rem; /* Petit espace au-dessus */
}

/* Styles spécifiques optionnels pour les détails */
.online-users-page .card .card-info .details .detail-seeking {
   font-style: italic;
   font-size: 0.85rem;
   color: #777;
}
.online-users-page .card .card-info .details .detail-user-status {
   /* Styles déjà dans le HTML, mais on pourrait les mettre ici */
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
}
.modal-content textarea {
  width: 100%;
  padding: 4px;
  margin-bottom: 1em;
}
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.btn, .btn-delete, .btn-cancel {
  padding: 8px 16px;
  cursor: pointer;
}
.modal-message {
    text-align: center;
    padding: 10px 15px; /* Un peu de padding horizontal */
    margin: 0 15px 15px 15px; /* Marges pour l'intégrer dans le flux de la modale si besoin */
    border-radius: 4px;
    border: 1px solid transparent;
}

.modal-success-message {
    color: #155724; /* Vert foncé texte */
    background-color: #d4edda; /* Vert clair fond */
    border-color: #c3e6cb; /* Vert bordure */
}

.modal-error-message {
    color: #721c24; /* Rouge foncé texte */
    background-color: #f8d7da; /* Rouge clair fond */
    border-color: #f5c6cb; /* Rouge bordure */
}

.modale-overlay {
    display: none; /* <<< CORRECTION CLÉ : UNIQUEMENT display:none ICI */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Fond noir semi-transparent */
    /* Supprimez le display:flex qui était en double ici */
    justify-content: center; /* Ces propriétés flex s'appliqueront quand display:flex sera défini par .active */
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.modale-overlay.active {
    display: flex; /* Affiche la modale */
    opacity: 1; /* Animation d'apparition */
}

.modale-content {
    background-color: #ffffff; /* Fond blanc de la boîte de dialogue */
    padding: 30px;
    border-radius: 10px; /* Coins arrondis */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* Ombre douce */
    max-width: 450px; /* Largeur maximale */
    width: 90%; /* S'adapte à la largeur de l'écran */
    text-align: center; /* Centre le texte interne */
    transform: translateY(-20px); /* Pour l'animation de slide-in */
    transition: transform 0.3s ease-out;
}

.modale-overlay.active .modale-content {
    transform: translateY(0); /* Animation de slide-in */
}

.modale-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.modale-content p {
    font-size: 1.0em;
    color: #555;
    margin-bottom: 25px;
}

.modale-actions {
    display: flex;
    justify-content: center; /* Centre les boutons */
    gap: 15px; /* Espace entre les boutons */
    flex-wrap: wrap; /* Permet aux boutons de passer à la ligne sur petits écrans */
}

/* Conteneur pour les toasts, fixé en bas au centre */
#toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Style d'un toast individuel */
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 6px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-family: Verdana, sans-serif;
    font-size: 0.95rem;
    max-width: 360px;
    opacity: 0; /* Caché par défaut */
    transform: translateY(20px); /* Position initiale pour l'animation */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Style pour un toast de succès */
.toast.success {
    background-color: #27ae60; /* Vert */
}

/* Style pour un toast d'erreur */
.toast.error {
    background-color: #e74c3c; /* Rouge */
}

/* Classe pour faire apparaître le toast */
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast button.close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 0 0 10px;
    line-height: 1;
}
@keyframes fadein {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 0.95; transform: translateY(0); }
}

@keyframes fadeout {
  from { opacity: 0.95; }
  to { opacity: 0; }
}

/* =========================================== */
/* --- Styles pour le Message d'Anniversaire --- */
/* =========================================== */

.anniversary-card {
    /* Fond avec un dégradé de couleurs joyeuses */
    background: linear-gradient(135deg, #fce043 0%, #fc6767 100%); /* Jaune/orange vers rouge vif */
    border-radius: 15px; /* Coins bien arrondis */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* Ombre prononcée */
    padding: 25px; /* Espacement interne */
    text-align: center; /* Centrage du texte */
    color: white; /* Texte blanc pour contraster avec le dégradé */
    max-width: 450px; /* Largeur maximale de la carte */
    margin: 2rem auto; /* Centrage horizontal et marge verticale */
    font-family: 'Segoe UI', sans-serif; /* Police moderne */
    animation: fadeInScale 0.8s ease-out; /* Animation d'apparition */
    position: relative;
    overflow: hidden; /* Important pour les pseudo-éléments de décoration */
}

/* Pseudo-éléments pour une touche "fun" (confettis/ballons) */
.anniversary-card::before {
    content: '🎉'; /* Caractère confetti */
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 2em;
    opacity: 0.8;
}
.anniversary-card::after {
    content: '🎈'; /* Caractère ballon */
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 2em;
    opacity: 0.8;
}

.anniversary-image {
    max-width: 150px; /* Taille maximale de l'image du gâteau */
    height: auto; /* Maintien des proportions */
    margin-bottom: 20px; /* Espace sous l'image */
    border-radius: 50%; /* Rendre l'image du gâteau ronde */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Ombre sur l'image */
    border: 3px solid rgba(255, 255, 255, 0.8); /* Bordure blanche lumineuse */
}

.anniversary-message-main {
    font-size: 1.8rem; /* Taille du texte principal */
    font-weight: 700; /* Gras */
    margin: 0; /* Pas de marge par défaut */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); /* Ombre sur le texte pour le faire ressortir */
}

.anniversary-message-sub {
    font-size: 1.1rem; /* Taille du texte secondaire */
    font-style: italic; /* Italique */
    margin-top: 10px; /* Espace au-dessus */
    opacity: 0.9; /* Légèrement transparent */
}

/* Animation d'apparition pour la carte */
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}