/* Color Definitions */
:root {
    --primary-color: #02041b; /* Very dark blue */
    --secondary-color: #ebee81; /* Yellow */
    --background-color: #02041b; /* Main background */
    --text-color: #ffffff; /* White */
    --cta-color: #ebee81; /* CTA button color */
    --border-radius: 30px; /* Element border radius */
    --primary-bg-color: #02041b; /* Main background */
}

/* General Style */
body {
    font-family: "Playfair Display", serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    text-align: center;
}

.top-homepage {
    min-height: 50vh;
    margin-top: 100px;
}

.maintitle-top-homepage {
    font-family: "Jersey 15", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 80pt !important;
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: var(--secondary-color);
}

.maintitle-top-homepage:hover {
    color: var(--primary-color);
    background-color: var(--secondary-color);
    content: "rogner";
}

.maintitle {
    font-family: "Jersey 15", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 50pt !important;
    color: var(--primary-color);
}

.maintitle:hover {
    color: var(--secondary-color);
    background-color: var(--background-color);
    content: "rogner";
}

.maintitle-footer {
    font-family: "Jersey 15", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 50pt !important;
    color: var(--text-color);
}

.maintitle-footer:hover {
    color: var(--primary-color);
    background-color: var(--secondary-color);
    content: "rogner";
}

.maintitle-intext {
    font-family: "Jersey 15", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16pt !important;
    color: var(--text-color);
}

.maintitle-intext:hover {
    color: var(--primary-color);
    background-color: var(--secondary-color);
    content: "rogner";
}

h1, h2 {
    color: var(--text-color);
    margin-bottom: 20px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container-compte h2 {
    color: var(--primary-color); /* Text in white */
}

/* Main Container */
.container {
    display: flex;
    flex-wrap: wrap;
    height: 100vh; /* Full height of the window */
    background-color: var(--primary-color); /* Main background */
    color: var(--text-color); /* Text in white */
    flex-direction: row; /* Stack elements vertically */
}

@media screen and (max-width: 768px) {
    .container {
        display: block !important;
        flex-direction: column !important; /* Stack elements vertically */
    }
}

/* Sidebar (Header/Left Menu) */
.sidebar {
    width: 20%;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column; /* Activate Flexbox */
    height: 100vh;
    margin: 0;
    padding: 0;
    position: fixed;
}

/* Navigation in the sidebar */
.sidebar nav {
    display: flex;
    flex-direction: column;
    color: var(--primary-color);
}

.sidebar nav a {
    color: var(--primary-color);
    font-size: 18pt;
    margin-bottom: 10px;
}

/* Footer in the sidebar */
.sidebar-footer-links {
    margin-top: auto; /* Ensures footer is at the bottom */
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    margin-left: 10%;
    margin-bottom: 10%;
}

.sidebar-footer-links a {
    display: block;
    color: var(--primary-color);
    font-size: 14px;
    text-decoration: none;
    text-align: left;
}

.sidebar-footer-links a:hover {
    color: var(--text-color);
}

@media screen and (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row; /* Transform sidebar into a horizontal bar */
        align-items: center;
        padding: 10px 20px;
        box-shadow: none;
       /*display: none !important; /* Hide sidebar by default */
        position: static;
    }

    .sidebar.active {
        display: flex; /* Show sidebar when active */
    }

    .sidebar nav {
        /*flex-direction: row; /* Horizontal navigation */
        justify-content: space-around; /* Equal spacing between items */
        width: 100%;
    }

    .sidebar nav a {
        margin: 0 10px; /* Horizontal spacing */
        font-size: 14pt;
        text-align: center;
    }

    /* Footer in the top bar */
    .sidebar-footer-links {
        display: none; /* Hide footer links in the top bar */
    }
    
    .user-email {
        display: none;
    }
}


.sidebar.active {
    left: 0; /* Affichée quand la classe active est ajoutée */
}


/* Main Content */
.content {
    margin-left: 20%;
    width: 80%;
    padding: 40px;
    background-color: var(--primary-bg-color);
    color: var(--text-color);
    overflow-y: auto;
}

@media screen and (max-width: 768px) {
    .content {
        width: auto; /* Occupy full width */
        padding: 1px; /* Reduce padding on mobile */
        margin: 0;
    }
}

.content h1, .content p {
    color: var(--text-color);
}

.content p {
    font-size: 16px;
    line-height: 1.5;
}

.don_info {
    font-size: 8pt;
    font-style: italic;
}

/* Forms */
form {
    max-width: 1300px;
    margin: 20px auto;
    padding: 20px;
    background: var(--text-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

form input, form button {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 16px;
}

form button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    margin-top: 20px;
}

table thead {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

table th, table td {
    padding: 12px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

table th:first-child, table td:first-child {
    width: 30%;
    text-align: left;
    padding-left: 15px;
}

table td:nth-child(3) {
    width: 30%;
    max-width: 150px;
    font-size: 10pt;
    line-break: anywhere;
}

table tr:nth-child(even) {
    /*background-color: #f9f9f9;*/
}

/* Buttons */
button, .edit-btn, .delete-btn, .copy-btn, .export-btn {
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.edit-btn {
    color: var(--primary-color);
    background-color: var(--secondary-color);
    padding: 1px 5px;
    margin: 20px 10px;
}

.edit-btn:hover {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.delete-btn {
    color: var(--primary-color);
    background-color: #d9534f;
    padding: 1px 5px;
    margin: 20px 10px;
}

.delete-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.copy-btn {
    margin-left: 10px;
    padding: 5px 10px;
    background-color: #9b9b9b;
    color: var(--primary-color);
    border: none;
    font-size: 12px;
}

.copy-btn:hover {
    background-color: #0f1c4c;
}

.export-btn {
    display: inline-block;
    margin: 10px auto;
    padding: 10px 20px;
    background-color: var(--cta-color);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 16px;
}

.export-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: solid 1px var(--secondary-color);
}

.infobtnmail {
    font-style: italic;
    font-size: 8pt;
}

/* Subtext */
.subdate {
    font-style: italic;
    font-size: 8pt;
    font-weight: 100;
    color: #9b9b9b;
}

input[type="color"] {
    width: 50px;
    height: 50px;
    border: none;
    cursor: pointer;
    border-radius: var(--border-radius);
    margin: 10px 0;
}

@media only screen and (max-width: 700px) {
    form, table {
        width: auto;
        margin: 2px;
        padding: 1px;
    }

    table th, table td {
        padding: 0;
    }

    .export-btn, .delete-btn {
        font-size: 12px;
        padding: 5px 10px;
    }

    .hide-mobile {
        display: none;
    }
    
    .edit-btn, .delete-btn, .copy-btn, .export-btn {
        margin-bottom: 15px;
    }
}

/* Toggle button for mobile */
.sidebar-toggle {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: none; /* Show toggle button on mobile */
    }
}
