/* ============================================
   MASTERCLASS "RÉPARER LES BRÈCHES"
   Charte graphique complète
   ============================================ */

/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f0e8;
    color: #2c3e4e;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------- CONTAINER ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- HEADER ---------- */
.header {
    background: white;
    padding: 1rem 2rem;
    border-radius: 16px;
    margin: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e0d8ca;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header h1 {
    font-size: 1.5rem;
    color: #2c3e4e;
    font-weight: 700;
}

.header h1 span {
    color: #b4653a;
}

.header p {
    font-size: 0.85rem;
    color: #8a9baa;
    margin: 0;
}

/* ---------- NAVIGATION LINKS (BOUTONS) ---------- */
.links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.links a {
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    background: #f5f0e8;
    color: #2c3e4e;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: inline-block;
}

.links a:hover {
    background: #b4653a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(180, 101, 58, 0.3);
}

.links a.active {
    background: #b4653a;
    color: white;
}

.links a.btn-inscription {
    background: #b4653a;
    color: white;
}

.links a.btn-inscription:hover {
    background: #8e4f2c;
}

.links a.btn-connexion {
    background: #2c3e4e;
    color: white;
}

.links a.btn-connexion:hover {
    background: #1a2a3a;
}

.links a.btn-deconnexion {
    background: #dc3545;
    color: white;
}

.links a.btn-deconnexion:hover {
    background: #bd2130;
}

.links a.btn-dashboard {
    background: #28a745;
    color: white;
}

.links a.btn-dashboard:hover {
    background: #1e7e34;
}

/* ---------- BOUTONS GÉNÉRIQUES ---------- */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #b4653a;
    color: white;
}

.btn-primary:hover {
    background: #8e4f2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(180, 101, 58, 0.3);
}

.btn-secondary {
    background: #2c3e4e;
    color: white;
}

.btn-secondary:hover {
    background: #1a2a3a;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #bd2130;
}

.btn-warning {
    background: #ffc107;
    color: #2c3e4e;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-outline {
    background: transparent;
    border: 2px solid #b4653a;
    color: #b4653a;
}

.btn-outline:hover {
    background: #b4653a;
    color: white;
}

/* ---------- CARTES ---------- */
.card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #e0d8ca;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e4e;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #b4653a;
}

/* ---------- FORMULAIRES ---------- */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e4e;
    margin-bottom: 0.3rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #ddd2bc;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: 0.2s;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #b4653a;
    box-shadow: 0 0 0 3px rgba(180, 101, 58, 0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.required {
    color: #b4653a;
    font-weight: 700;
}

/* ---------- GRILLES ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ---------- BADGES ---------- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-primary {
    background: #cce5ff;
    color: #004085;
}

/* ---------- TABLEAUX ---------- */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 0.8rem;
    border-bottom: 1px solid #e0d8ca;
    text-align: left;
}

table th {
    background: #f9f7f2;
    font-weight: 600;
}

table tr:hover {
    background: #f9f7f2;
}

/* ---------- VERSET ---------- */
.verset {
    background: #f9f7f2;
    padding: 1.2rem 1.5rem;
    border-left: 4px solid #b4653a;
    border-radius: 0 12px 12px 0;
    margin: 1rem 0;
    font-style: italic;
    font-size: 1.05rem;
}

.verset strong {
    color: #b4653a;
}

/* ---------- FOOTER ---------- */
.footer {
    text-align: center;
    padding: 2rem;
    color: #8a9baa;
    border-top: 1px solid #e0d8ca;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.footer a {
    color: #b4653a;
}

/* ---------- MESSAGES ---------- */
.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #721c24;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    color: #155724;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.info-message {
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid #17a2b8;
    color: #0c5460;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .links {
        justify-content: center;
        width: 100%;
    }
    
    .links a {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    
    .container {
        padding: 0 12px;
    }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ---------- UTILITAIRES ---------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }