/* Réinitialisation et base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
  font-family: "solid";
  src: url("solid.ttf") format("truetype");
}

:root {
    --primary: #A02383;
    --secondary: #551346;
    --thirdy: #fe5ac2;
    --fourty: #ff00c0;
    --accent: #4fc3f7;
    --light: #f8f9fa;
    --dark: #343a40;
    --success: #28a745;
    --error: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #ffe5f9;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: -1;
}
h1 {
    font-family: 'Solid', sans-serif;
    color: var(--primary);
    text-align: center;
    margin-bottom: 20px;
    font-size: 2em;
}
h2 {
    color: var(--primary);
}

h3 {
    color: var(--dark);
}

h5 {
    color: var(--primary);
}

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
}

        .toast {
            visibility: hidden;
            min-width: 250px;
            background-color: #333;
            color: #fff;
            text-align: center;
            border-radius: 4px;
            padding: 16px;
            position: fixed;
            z-index: 1;
            right: 30px;
            top: 30px;
            font-size: 17px;
            will-change: transform, opacity;
        }
        .toast.show {
            visibility: visible;
            animation: fadein 0.5s, fadeout 0.5s 2.5s;
        }
        @keyframes fadein {
            from {top: 0; opacity: 0;}
            to {top: 30px; opacity: 1;}
        }
        @keyframes fadeout {
            from {top: 30px; opacity: 1;}
            to {top: 0; opacity: 0;}
        }

details > summary {
    color: var(--dark);
}

/* Boutons */
.btn, .btnrose, .btndec {
    display: inline-block;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 3px;
    transition: background-color 0.3s;
}

/* Variantes */
.btn {
    background-color: var(--primary);
}
.btn:hover {
    background-color: var(--secondary);
}
.btnrose {
    background-color: var(--thirdy);
}
.btnrose:hover {
    background-color: var(--fourty);
}

.btndec {
    background-color: var(--dark);
    font-weight: 800;
}
.btndec:hover {
    background-color: var(--error);
}


/* Conteneurs */
.login-container, .dashboard-container, .table-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
}
.login-form, .dotation-form {
    display: grid;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.dotation-info {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 16px;
}

.somme-info {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 16px;
}

.somme-info p {
    margin: 5px 0;
}

/* Champs de formulaire */
input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
}

.update-role-form .form-group-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 1rem;
}
.update-role-form select,
.update-role-form button {
    padding: 8px 12px;
    font-size: 1rem;
}

/* Tableaux */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}
th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: var(--primary);
    color: white;
}
tr:nth-child(even) {
    background-color: #f8f9fa;
}
tr:hover {
    background-color: #e9ecef;
}

/* Messages */
.error {
    color: var(--error);
    background-color: #f8d7da;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}
.success {
    color: var(--success);
    background-color: #d4edda;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

footer {
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    text-align: center;
    padding: 2px;
    position: fixed;  /* Fixe le footer en bas */
    bottom: 0;  /* Le place tout en bas */
    left: 0;    /* Garantir que le footer prend toute la largeur */
    width: 100%; 
    font-family: Arial, sans-serif;
    font-size: 10px;
    display: flex;
    justify-content: center;  /* Centre horizontalement */
    align-items: center;      /* Centre verticalement */
    height: 20px;             /* Ajuste la hauteur du footer selon tes besoins */
    z-index: 1000; /* Ajouter un z-index pour s'assurer qu'il reste au-dessus des autres éléments */
}

footer a {
    color: #1e90ff;  /* Liens en bleu */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    margin: 20px 0;
}

.panel {
  padding: 0 18px;
  background-color: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .login-form, .dotation-form {
        padding: 1rem;
    }
    table {
        display: block;
        overflow-x: auto;
    }
    th, td {
        padding: 0.5rem;
    }
}
@media (max-width: 480px) {
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    .btndec {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}
