/* style.css : Feuille de style principale */

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

body {
    line-height: 1.6;
    background: #f0f2f5;
    color: #1a1a1a;
}

/* HEADER & LOGO */
header {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    text-align: center;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.logo {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
}
.logo::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: #ffffff;
    border-radius: 2px;
}

/* NAVBAR */
nav {
    background: #2c3e50;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}
nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}
nav a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* SECTIONS */
.section {
    display: block;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 800px;
    animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* BUTTONS */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 5px;
}
.btn:hover {
    background: linear-gradient(45deg, #2980b9, #2c3e50);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

/* FORMS */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}
.form-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
    outline: none;
    background: #ffffff;
}

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}
th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}
th {
    background: #f8fafc;
    font-weight: 600;
    color: #2c3e50;
}

/* CENTERED CONTENT */
.centered-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

/* MESSAGES */
.error-message {
    background: #fff5f5;
    color: #e53e3e;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #e53e3e;
    font-size: 0.9rem;
}
.success-message {
    background: #f0fff4;
    color: #27ae60;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #27ae60;
    font-size: 0.9rem;
}

/* PAYMENT BUTTONS */
.payment-methods {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}
.payment-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.payment-btn.especes {
    background: #27ae60;
    color: white;
}
.payment-btn.cb {
    background: #2980b9;
    color: white;
}
.payment-btn.cheque {
    background: #8e44ad;
    color: white;
}
.payment-btn:hover {
    transform: translateY(-2px);
    filter: brightness(110%);
}

/* FOOTER */
footer {
    margin-top: 40px;
}
.transactions-container {
    border: 1px solid #ccc;
    padding: 10px;
    max-width: 400px;
    margin: 20px auto;
    border-radius: 5px;
    background-color: #f9f9f9;
}

#toggle-transactions {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

#toggle-transactions:hover {
    background-color: #0056b3;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin: 5px 0;
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

li:last-child {
    border-bottom: none;
}
.search-form {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.clients-container {
    margin-top: 20px;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.clients-table th, .clients-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.clients-table th {
    background-color: #007bff;
    color: white;
}

.clients-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.clients-table tr:hover {
    background-color: #ddd;
}
.status {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    text-align: center;
    width: 100px;
}

.status.en_cours {
    background-color: #ffcccc; /* Rouge clair */
    color: #d60000; /* Rouge foncé */
    border: 1px solid #d60000;
}

.status.restitue {
    background-color: #ccffcc; /* Vert clair */
    color: #008000; /* Vert foncé */
    border: 1px solid #008000;
}

.status-text {
    margin-left: 5px;
}

.centered-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Espacement uniforme entre les boutons */
    margin: 20px 0;
}

.centered-content .btn {
    flex: 1;
    max-width: 220px; /* Taille maximale pour éviter les boutons trop larges */
    text-align: center;
    padding: 15px 20px;
    font-size: 1rem;
}

/* Formulaire d'ajout de garage */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 3px rgba(52, 152, 219, 0.5);
    outline: none;
    background: #ffffff;
}

.clients-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}
.clients-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}
