/* Style général */

html, body {
  width: 100%;
}

html {
  background-color: white;
  overflow-x: hidden;
  overflow-y: scroll;
}
	
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: white;
  color: #333;
}

/* Liens */
a {
  color: #d3167d;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 100px 5px;
  flex-wrap: wrap; /* Permet au contenu de passer à la ligne sur petit écran */
}

.header_logo img {
    max-width: 367px;   /* Ne dépasse jamais la largeur réelle de l'image */
    height: auto;      /* Conserve les proportions */
    display: block;    /* Supprime l'espace blanc en dessous de l'image */
}

/* 🔽 Responsive : sur petits écrans */
@media (max-width: 600px) {
    .header_logo {
        flex-direction: column;      /* Met le logo au-dessus */
        align-items: center;         /* Centre le tout */
        text-align: center;
    }

    .espace-utilisateur {
        margin-top: 10px;            /* Un peu d’espace sous le logo */
    }
}
  
/* body variable de la page */  
main {
  text-align: center;
  min-height: 100%;
  margin: 0;
  padding: 20px 100px 5px;
}

/* Pied de page */
footer {
  color: white; 
  margin: 0px 0px;
  padding: 0px 0px;
  position: absolute; 
  /*bottom: 0px;*/
  /*height: 100px;*/
}

footer img {
  max-width: 100%;
  height: auto;
}

h2 {
    color: #c4157e;
    margin-bottom: 20px;
}

.intro {
    background: #c4157e;
    color: white;
    padding: 15px 40px 15px;
    text-align: left;
}

/***********************************************************
VUES FORMULAIRES
************************************************************/

/* Formulaire de saisie */
.form-box {
    width: 70%;
    margin: 50px auto;
    background: white;
    padding: 10px 40px 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.form-box-large {
    width: 70%;
}

.login-box {
    width: 400px;
}

/* Titre du formulaire */
.form-box h2 {
    color: #c4157e;
    margin-bottom: 20px;
}

/* Label rose et aligné à gauche */
.form-box label {
    display: block;
    text-align: left;
    /*font-weight: bold;*/
    margin-top: 15px;
    color: #c4157e;
}

.form-box label.required::after {
    content: " *";
    color: red; /* couleur spécifique de l'astérisque */
    font-weight: bold;
}

/* Champ de saisie stylisé */
.form-box input[type="text"],
.form-box input[type="password"],
.form-box input[type="email"],
.form-box select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
	border-color: #c4157e;
    box-sizing: border-box;
}

.form-box input[type="date"],
.form-box input[type="datetime-local"]
 {
    width: 150px;
    padding: 10px;
    padding-right: 30px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
	border-color: #c4157e;
}

.row {
    display: flex;
    gap: 15px;
}

.code_postal,
.num_tel {
    width: 150px;
}

.ville {
    margin-left: 5px;
    display: block;
    width: 100%;
}

/* Bouton de connexion */
.form-box button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #c4157e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    /*box-shadow: 0 5px 15px rgba(196, 21, 126, 0.4);*/
    transition: background-color 0.3s ease;
}

.form-box button:hover {
    background-color: #a81269;
}

/* Lien "mot de passe oublié" */
.form-box .forgot-password {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
    color: #c4157e;
    text-decoration: none;
}

.form-box .forgot-password:hover {
    text-decoration: underline;
}

/***********************************************************
VUES ACCUEIL
************************************************************/
.accueil {
  text-align: center;
  padding: 40px 20px;
}


/***********************************************************
VUES TEMPLATE
************************************************************/
.profile-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
}

.profile-menu {
    display: block;
    position: absolute;
    right: 100px;           /* Ajuste la position horizontale */
    top: 130px;             /* Affiche le menu plus bas sous l'icône */
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 250px;          /* Plus large */
    padding: 10px 0;
}

.profile-menu a {
    display: block;
    padding: 10px 30px;
    color: #C21875;
    text-decoration: none;
    font-size: 14px;
    line-height: 6px;
}

.profile-menu a:hover {
  text-decoration: underline;
}

.menu-header {
    font-weight: bold;
    color: #C21875;
    padding: 10px 20px;
}

/***********************************************************
VUE LISTE ADHERENT
************************************************************/

/* Titre du formulaire */
.title {
    color: #c4157e;
    margin-bottom: 20px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    background-color: #C5207E;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color:#C5207E ;
}

.card p {
    margin: 0.5rem 0;
    color:#C5207E ;
    font-size: 0.95rem;
}

.card p strong {
    color:#C5207E ;
}

.card:hover h3,
.card:hover p,
.card:hover strong {
    color: #ffffff;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    font-family: 'Arial', sans-serif;
    color: #d70079;
}

.filters input[type="text"],
.filters select {
    border: 1px solid #d70079;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    color: #d70079;
    background-color: white;
    outline: none;
    min-width: 300px;
}

.filters input::placeholder {
    color: #d70079;
    opacity: 0.7;
}

.filters select:focus,
.filters input:focus {
    box-shadow: 0 0 0 2px rgba(215, 0, 121, 0.2);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #d70079;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    accent-color: #d70079;
    width: 16px;
    height: 16px;
}

.container_checkbox{
  display: flex;
  flex-direction: column;
}

.full_page {
    display: grid;
    grid-template-columns: 1fr auto auto; /* gauche = flexible, photo et boutons = taille automatique */
    gap: 15px;
    align-items: start;
}

.main-content {
    flex: 1;
}

.photo {
    width: 200px;
    height: 200px;
    display: flex;            /* centrage image */
    align-items: flex-start;
    justify-content: center;
}

.photo img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.videoPresentation {
    width: 320px;
    height: 280px;
    display: flex 1;            /* centrage image */
    align-items: flex-start;
    justify-content: center;
}

.videoPresentation label {
    display: block;
    text-align: left;
    margin-top: 15px;
    color: #c4157e;
}

.videoPresentation img {
    display: block; 
    margin: 20px auto; 
    border: 1px solid #ccc; 
    border-radius: 8px;
    width: 320px;
    height: 280px;
}

.videoPresentation video {
    display: none;
    width: 320px;
    height: 280px;
    margin: 20px auto; 
    border: 1px solid #ccc; 
    border-radius: 8px;
}




.btn-conteneur {
    display: flex;
    flex-direction: column;
    align-items: center; /* vertical centering */
    justify-content: center;
    margin-top: 1rem;
}

.button-commande {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color:#C5207E;
    color: white;
    font-size: 40px;
    border-radius: 10px;
    width: 50px;
    height: 50px;
    cursor: pointer;           /* Curseur main */
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;         /* <== Ajoute ceci */
    outline: none; 
}

.button-commande:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
    background-color: #C56D9C;
}

.button-checked {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white !important;
    color: #C5207E;
    font-size: 40px;
    border-radius: 10px;
    width: 50px;
    height: 50px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid #C5207E !important;
    outline: none;
}

.button-check {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white !important;
    color: #C5207E;
    font-size: 40px;
    border-radius: 10px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid #C5207E !important;
    outline: none;
}

.button-check:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

/***********************************************************
VUE NOUVELLE MISSION: CHAMP VIDEO
************************************************************/

.upload-wrapper {
    position: relative;
    display: block; 
    width: 100%;    /* prend 100% de la largeur de son parent */
}

.upload-text {
    width: 100%;                /* occupe 100% de la largeur */
    padding-right: 45px;        /* laisse l’espace pour l’image à droite */
    box-sizing: border-box;     /* inclut le padding dans la largeur */
    height: 40px;               
    line-height: 40px;          
    font-size: 16px;            
}

.upload-button-img {
    position: absolute;
    right: 3px;
    top: 7px;
    width: 36px;
    height: 35px;
    cursor: pointer;
}

.upload-button-img:hover {
    opacity: 0.7;
}

.upload-button {
    right: 2px;
    top: 1px;
    width: 32px;
    height: 32px;
    background-color: #c4157e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    /*box-shadow: 0 5px 15px rgba(196, 21, 126, 0.4);*/
    transition: background-color 0.3s ease;
}

.upload-hidden-input {
    display: none;
}

/****************************************************************
VUE DETAIL MISSION _ BENEVOLE
****************************************************************/

.checkbox_inscription_mission {
    appearance: none;
    -webkit-appearance: none;
    width: 50px;
    height: 50px;
    border: 2px solid ;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
   
}

.checkbox_inscription_mission:checked {
    background-color: #C4157E;
    border-color: #C4157E;
}

.checkbox_inscription_mission:checked::after {
    content: '';
    position: absolute;
    top: 13px;
    left: 15px;
    width: 8px;
    height: 10px;
    border: solid white;
    border-width: 0 7px 7px 0;
    transform: rotate(45deg);
}

.checkbox_inscription_mission:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}



/******************************************************
Actions
*******************************************************/

.h3-Actions {
    text-align: left;
    margin-left: 1rem;
    color: #C4157E;
}

.actions-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.actions-header h3 {
    margin: 0;
}

.actions-header .filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}

/*******************************************************
Popup Modale pour afficher un message
*******************************************************/
.modal.hidden {
    display: none;
}

.modal-hidden {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* fond masquant */
    z-index: 1000; /* au-dessus du reste */
    display: none; /* caché par défaut */
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 1rem;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    position: relative;
    max-width: 500px;
    width: 90%;
    box-sizing: border-box;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color:#C5207E ;
}

.modal-content p{
    color: #c4157e;
}
.modal-form-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 1000px;
    width: 90%;
    box-sizing: border-box;
    max-height: 90vh; /* Empêche la modale de dépasser la hauteur visible */
    overflow: auto;
}

.close {
    position: absolute;
    top: 5px;
    right: 20px;
    font-size: 40px;
    cursor: pointer;
    color: #c4157e;
}

.modal-content .modal-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap; /* pour empiler en responsive */
}

.modal-content .modal-buttons form {
    flex: 1 1 45%;
}

.modal-content .modal-buttons form button {
    width: 100%;
    padding: 0.75rem;
    background-color: #c4157e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.separateur {
    width: 50%;                 /* largeur de la ligne */
    height: 2px;                /* épaisseur de la ligne */
    background-color: #ddd;      /* couleur de base de la ligne */
    margin: 2rem auto;          /* espace au-dessus et en dessous + centrage */
    border-radius: 2px;         /* bords arrondis (plus doux) */
    box-shadow: 0 2px 6px rgba(0,0,0,0.15); /* ombrage proche des cards */
}

/*******************************************************
Chat
*******************************************************/
.chat-container { 
    display: flex;  
    height: 78vh; 
    border: 1px solid #ccc;
    background: white;
}

.contacts-panel { 
    width: 30%; 
    border-right: 1px solid #ccc; 
    overflow-y: auto; 
}

.contact-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: left;
    justify-content: left;
    margin: 1rem 0;
    font-family: 'Arial', sans-serif;
    color: #d70079;
}

.contact-filters input[type="text"],
.contact-filters select {
    border: 1px solid #d70079;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    color: #d70079;
    background-color: white;
    outline: none;
    width: 40%;
}

.contact-filters input::placeholder {
    color: #d70079;
    opacity: 0.7;
}

.contact-filters select:focus,
.contact-filters input:focus {
    box-shadow: 0 0 0 2px rgba(215, 0, 121, 0.2);
}


/***********************************************************
VOLET DES CONTACTS DU CHAT
************************************************************/
/* --- Structure générale du contact --- */
.contact {
    display: flex;
    align-items: left;
    padding: 5px;
    cursor: pointer;
    overflow-y: auto;
    border-right: 1px solid #ddd;
    color: #C5207E;
}

.contact:hover {
    background-color: #C5207E;
    color: #ffffff;
}

/* --- Photo de profil --- */
.contact img.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

/* --- Bloc contenant le texte --- */
.contact-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* --- Ligne 1 : Nom + Statut + Date --- */
.contact-header {
    display: grid;
    grid-template-columns: 1fr auto 80px; /* nom | statut | date */
    align-items: center;
    margin-bottom: 2px;
}

/* Nom du contact (aligné à gauche) */
.contact-header .name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

/* Statut connecté/déconnecté (centré) */
.contact-header .status {
    font-size: 16px;
}

/* Date du dernier message (aligné à droite) */
.contact-header .date_last_message {
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

/* --- Ligne 2 : aperçu du dernier message --- */
.contact-preview {
    display: block;
    text-align: left;
}

.contact-preview .last-message {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
    font-size: 0.9em;
    margin-left: 2px;

}

/* --- État sélectionné (facultatif, si tu veux surbrillance du contact actif) --- */
.contact.active {
    background-color: #f0f0f0;
}



/***********************************************************
VOLET DES MESSAGES DU CHAT
************************************************************/
.messages-panel {
    flex: 1;
    width: 70%; 
    display: flex; 
    flex-direction: column;
    border-left: 1px solid #ddd;
}

#messages-header {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #ddd;
    background: #C5207E;
    color: #ffffff;
}

.header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%; /* cercle */
    object-fit: cover;
    margin-right: 10px;
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: left;
}

.contact-name {
    font-size: 18px;
    font-weight: 600;
}

.contact-status {
    font-size: 13px;
    font-style: italic;
}

#messages-container { 
    flex: 1; 
    overflow-y: auto; 
    padding: 10px; 
    display: flex;
    flex-direction: column;
}

/* Conteneur pour grouper la date + bulle */
.msg-wrapper {
    margin: 10px;
    display: flex;
    flex-direction: column;
    clear: both;
}

/* Position des messages selon l’expéditeur */
.msg-wrapper.me {
    align-items: flex-end; /* aligne à droite */
}

.msg-wrapper.him {
    align-items: flex-start; /* aligne à gauche */
}

/* Style de la date (au-dessus de la bulle) */
.msg-date {
    font-size: 11px;
    font-style: italic;
    color: #C5207E; /* rose */
    margin-bottom: 3px;
}

/* Bulle commune */
.msg {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
}

/* Bulle côté moi */
.msg.me {
    background-color: #C5207E; /* rose */
    color: #ffffff; /* texte blanc */
    border-top-right-radius: 0px;
}

/* Bulle côté lui */
.msg.him {
    background-color: #f1f0f0; /* gris clair */
    color: #C5207E; /* texte rose */
    border-top-left-radius: 0px;
}

#message-form {
    display: flex; 
    padding: 10px; 
    border-top: 1px solid #ddd;
}

/* Conteneur de la zone de saisie et de l'icône */
.message-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Style pour l'icône de trombone */
.trombone-icon {
    width: 30px;  /* Ajuste la taille selon ton icône */
    height: 30px;
    cursor: pointer;
}

.trombone-icon.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none; /* Empêche les clics */
}

/* Style du label (icône trombone) */
.file-label {
    cursor: pointer;
    font-size: 1.2em;
    padding: 4px;
    color: #555;
}
  
#message-input { 
    flex: 1; 
    padding: 8px; 
    border: 1px solid #ccc;
    outline: none;
}

#send-button { 
    margin-left: 10px; 
    padding: 10px 20px; 
    background-color: #C5207E;
    color: white; 
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#send-button:hover:not(:disabled) {
    background-color: #d81b60; /* un peu plus foncé au survol si actif */
}

#send-button:disabled {
    background-color: #f8bcd0; /* rose clair quand inactif */
    cursor: not-allowed;
    opacity: 0.7; /* effet visuel de "grisé" */
}


/* Style pour les miniatures des pièces jointes */
.attachment-thumbnail {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    margin: 5px 0;
    object-fit: cover;
}

/* Style pour les pièces jointes */
.attachment {
    margin: 5px 0;
    padding: 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
    display: inline-block;
}

/* Style pour les messages avec pièces jointes */
.msg-wrapper {
    margin-bottom: 10px;
}