/* LOGIN PAGE*/
/* Style général */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #1e1e1e;
    color: #f0f0f0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Conteneur de connexion */
.login-container {
    max-width: 400px;
    margin: auto;
    padding: 2rem;
    background-color: #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Champs du formulaire */
form label {
    display: block;
    margin: 0.5rem 0 0.2rem;
    color: #ccc;
}

form input {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: none;
    border-radius: 5px;
    background-color: #444;
    color: #fff;
}

.cv-container form input {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}


form button {
    width: 100%;
    padding: 0.7rem;
    background-color: #3498db;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

form button:hover {
    background-color: #2980b9;
}

/* Lien d'inscription */
form li a {
    display: block;
    margin-top: 1rem;
    color: #aaa;
    text-align: center;
    text-decoration: none;
}

form li a:hover {
    text-decoration: underline;
}

/* Message d'erreur */
.error {
    background-color: #e74c3c;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

/* Footer */
footer {
    margin-top: auto;
    text-align: center;
    padding: 1rem;
    background-color: #111;
    color: #888;
    font-size: 0.9rem;
}
/* FIN LOGIN PAGE*/



/* HOME PAGE */

/* Conteneur principal */
.home-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

/* Titres */
.home-container h1 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.home-container h2 {
    color: #3498db;
    margin-top: 2rem;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

/* Groupe utilisateur */
.home-container p {
    margin-top: 0.5rem;
    color: #ccc;
}

/* Grille de services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.service-card {
    background-color: #333;
    border: 1px solid #555;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.service-card:hover {
    transform: scale(1.02);
}

.service-card h3 {
    margin-top: 0;
    color: #3498db;
}

.service-card p {
    color: #ddd;
    white-space: pre-wrap;
}

/* Groupe de boutons */
.button-group {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

.button-group form {
    margin: 0;
}

.button-group button {
    padding: 0.6rem 1.2rem;
    background-color: #3498db;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.button-group button:hover {
    background-color: #2980b9;
}

/* Grille des services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 0 1rem; /* marges à gauche/droite pour éviter que ça touche les bords */
}

/* Carte de service */
.service-card {
    background-color: #333;
    border: none;
    padding: 1rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Image dans la carte */
.image-container {
    width: 100%;
    height: auto;
    overflow: hidden; /* important pour éviter les débordements en cas de zoom */
    padding: 0;
    margin: 0;
    background-color: transparent;
}

.service-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border: none; /* supprime le cadre */
    margin: 0;
    padding: 0;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.service-image:hover {
    transform: scale(1.05);
    box-shadow: none; /* ou un effet discret si tu veux */
}



/* Titre et description */
.service-card h3 {
    margin: 0.5rem 0;
    color: #3498db;
}

.service-card p {
    color: #ddd;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-image:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}


#banniere-message {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(30, 30, 50, 0.9); /* bleu-gris sombre avec transparence */
    border-top: 1px solid #444;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 999;
    border: 2px solid #555;         /* bordure sombre */
    border-radius: 8px;             /* coins arrondis */
    margin: 10px auto;              /* un peu d'espace autour */
    max-width: 600px;               /* largeur maximale */
    background-color: rgba(40, 40, 60, 0.95); /* renforce la boîte */
}

#banniere-message a {
    color: #a8d0ff;
    text-decoration: underline;
    margin-left: 10px;
}

#banniere-message a:hover {
    color: #d0e6ff;
}



/* FIN HOME */



/* MESSAGERIE */

/* === MESSAGERIE MODERNE === */

/* Mise en page générale */
.messagerie-layout {
    display: flex;
    background-color: #1e1e1e;
    color: #f0f0f0;
}

/* Colonne des contacts */
.contacts-column {
    width: 250px;
    border-right: 1px solid #333;
    background-color: #2a2a2a;
    padding: 1rem;
    overflow-y: auto;
    max-height: 80vh;
}
.contacts-column h2 {
    margin-bottom: 1rem;
    color: #3498db;
}
.contact {
    border-bottom: 1px solid #444;
}
.contact a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    color: #ccc;
    text-decoration: none;
}
.contact:hover {
    background-color: #3a3a3a;
}
.contact.active {
    background-color: #444;
}
.contact.unread span:first-child {
    font-weight: bold;
}
.unread-count {
    background-color: #e74c3c;
    color: #fff;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 0.8em;
}

/* Colonne de conversation */
.conversation-column {
    flex: 1;
    padding: 1rem;
}
.conversation-column h2 {
    color: #3498db;
}

/* Zone des messages */
#conversation-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 1rem 0;
    max-height: 50vh;
    overflow-y: auto;
}

.message {
    max-width: 65%;
    word-wrap: break-word;
}
.message.sent {
    align-self: flex-end;
}
.message.received {
    align-self: flex-start;
}
.message-content {
    background-color: #3a3a3a;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    color: #f0f0f0;
}
.message.sent .message-content {
    background-color: #1a3d4f;
}
.message.received .message-content {
    background-color: #333;
}
.message-info {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 4px;
}
.message.sent .message-info {
    text-align: right;
}
.message.received .message-info {
    text-align: left;
}

/* Formulaire de message */
form.message-form {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
form.message-form textarea {
    background-color: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 0.8rem;
    border-radius: 6px;
    resize: vertical;
}
form.message-form button {
    align-self: flex-end;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}
form.message-form button:hover {
    background-color: #2980b9;
}

/* Boutons de navigation */
.messagerie-actions .button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #3498db;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin: 0 0.5rem;
}
.messagerie-actions .button:hover {
    background-color: #555;
}



/* FIN MESSAGERIE */



/* ADMIN-CONTACT */
.contact-container {
    max-width: 800px;
    margin: auto;
    padding: 2rem;
    background-color: #2a2a2a;
    border-radius: 10px;
    box-sizing: border-box;
}

.contact-entry {
    border: 1px solid #444;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    background-color: #1e1e1e;
    box-sizing: border-box;
}

.contact-entry h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.btn-retour {
    margin-top: 2rem;
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-retour:hover {
    background-color: #2980b9;
}

.contact-item {
    background-color: #2a2a2a;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.contact-item pre {
    background-color: #1e1e1e;
    color: #ccc;
    padding: 0.5rem;
    border-radius: 5px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.contact-item form {
    align-self: flex-start;
    margin: 0;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* FIN ADMIN-CONTACT */

/* ADMIN-PANEL */

body {
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    color: #f0f0f0;
    font-family: Arial, sans-serif;
}

.admin-container {
    max-width: 1000px;
    margin: auto;
    padding: 2rem;
    background-color: #2a2a2a;
    border-radius: 10px;
}

h1, h2, h3 {
    color: #ffffff;
    margin-top: 1.5rem;
}

.success {
    background-color: #2ecc71;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: bold;
}

/* Tableau des utilisateurs */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
}

table th, table td {
    padding: 0.8rem;
    border-bottom: 1px solid #444;
    text-align: left;
}

table th {
    background-color: #333;
    color: #fff;
}

table tr:hover {
    background-color: #2e2e2e;
}

/* Formulaires */
form {
    margin-bottom: 1.5rem;
}

input, select {
    padding: 0.6rem;
    margin: 0.3rem 0.5rem 0.5rem 0;
    border-radius: 5px;
    border: none;
    background-color: #444;
    color: white;
}

button {
    padding: 0.6rem 1rem;
    background-color: #3498db;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    margin-top: 0.5rem;
}

button:hover {
    background-color: #2980b9;
}

a {
    color: #1abc9c;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
    padding-left: 1rem;
}

/* Boutons d'action (danger) */
a[href*="supprimer"], a[href*="delgroup"] {
    color: #e74c3c;
    margin-left: 0.5rem;
}

a[href*="supprimer"]:hover, a[href*="delgroup"]:hover {
    text-decoration: underline;
}


/* FIN ADMIN-PANEL */


/* ADMIN-SERVICE */

body {
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    color: #f0f0f0;
    font-family: Arial, sans-serif;
}

.admin-container {
    max-width: 1000px;
    margin: auto;
    padding: 2rem;
    background-color: #2a2a2a;
    border-radius: 10px;
}

/* Titres */
h1, h2 {
    margin-top: 1rem;
    color: #ffffff;
}

/* Message de succès */
.success {
    background-color: #2ecc71;
    color: white;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: bold;
}

/* Formulaire d’ajout */
form {
    margin-bottom: 2rem;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 0.6rem;
    margin: 0.5rem 0;
    border-radius: 5px;
    border: none;
    background-color: #444;
    color: white;
}

button {
    padding: 0.6rem 1.2rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background-color: #2980b9;
}

/* Tableau des services */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 0.8rem;
    border-bottom: 1px solid #444;
    text-align: left;
}

th {
    background-color: #333;
    color: white;
}

tr:hover {
    background-color: #2c2c2c;
}

/* Liens d'action */



a {
    color: #1abc9c;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}


a.supprimer {
    color: #e74c3c;
}

a.supprimer:hover {
    text-decoration: underline;
    color: #c0392b;
}


/* Footer */
footer {
    margin-top: 3rem;
    text-align: center;
    padding: 1rem;
    background-color: #111;
    color: #888;
    font-size: 0.9rem;
}

/* FIN ADMIN-SERVICE */



/* CV-CONTAINER */

/* === STYLE POUR LA PAGE CV === */

body.body-cv {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 2rem;
    background-color: #1e1e1e;
    font-family: Arial, sans-serif;
    color: #f0f0f0;
    box-sizing: border-box;
}

.cv-container {
    background-color: #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
}

.cv-container h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.cv-frame {
    display: block;
    width: 100%;
    height: 90vh;
    border: none;
    margin: 0 auto 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

/* Bouton retour */
.cv-container form {
    margin-top: 1rem;
}

.cv-container button {
    padding: 0.8rem 1.5rem;
    background-color: #3498db;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cv-container button:hover {
    background-color: #2980b9;
}

.btn-pdf-mobile {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    margin-bottom: 2rem;
    transition: background-color 0.3s;
}

.btn-pdf-mobile:hover {
    background-color: #2980b9;
}

.cv-frame {
    display: block;
    width: 100%;
    height: 90vh;
    border: none;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

/* FIN CV-CONTAINER */



/* RESPONSIVE MOBILE */


/* === RESPONSIVE POUR MOBILE === */
@media (max-width: 768px) {

    body {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .login-container,
    .home-container,
    .messagerie-container,
    .contact-container,
    .admin-container,
    .cv-container {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        margin: 1rem auto;
        border-radius: 8px;
        box-sizing: border-box;
    }

    .login-container {
        font-size: 1.1rem;
    }

    form,
    form input,
    form button,
    form select,
    form textarea {
        width: 100%;
        font-size: 1rem;
        padding: 0.9rem;
        box-sizing: border-box;
    }

    .services-grid {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 1rem;
    }

    .service-card {
        padding: 1rem;
        text-align: center;
    }

    .service-image {
        height: auto;
        max-height: 200px;
    }

    table {
        font-size: 0.9rem;
        display: block;
        overflow-x: auto;
    }

    .button-group {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .btn-pdf-mobile,
    .btn-retour,
    .btn-danger,
    button {
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }

    footer {
        padding: 1rem;
        font-size: 0.8rem;
    }
}



