* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.5;
}

/* ==========================================
   BARRE DE NAVIGATION (HEADER)
   ========================================== */
.navbar {
    background-color: #162238; /* Bleu nuit du logo */
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    gap: 12px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.nav-links a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 4px;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================
   CONTAINER GLOBAL & FORMULAIRES
   ========================================== */
.container {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

h1 {
    margin-bottom: 20px;
    color: #162238;
    font-size: 1.3rem;
}

fieldset {
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    padding: 15px;
    background-color: #fafbfc;
    margin-bottom: 20px;
}

legend {
    font-weight: bold;
    color: #162238;
    padding: 0 8px;
    font-size: 0.95rem;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
}

.form-group input, .form-group select, textarea {
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    font-family: inherit;
}

.form-group input:focus, .form-group select:focus, textarea:focus {
    border-color: #00bcd4;
}

textarea {
    resize: vertical;
}

.btn-secondary {
    background-color: #edf2f7;
    color: #4a5568;
    border: 1px solid #cbd5e0;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #00bcd4;
    color: #162238;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
}

/* ==========================================
   STYLE DE LA FICHE CLIENT & TABLEAUX
   ========================================== */
.client-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.client-header {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.client-info-flex {
    display: flex;
    align-items: center;
    gap: 15px;
}

.client-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #162238;
    color: #00bcd4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.client-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 0.85rem;
    font-weight: 600;
    flex: 1;
    text-align: center;
}
.action-btn:hover { background: #e2e8f0; }

.section-box {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.section-box h2 {
    font-size: 1.1rem;
    color: #162238;
    margin-bottom: 15px;
    border-bottom: 2px solid #f4f7f6;
    padding-bottom: 8px;
}

.animal-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbfc;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 10px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 15px;
}

.pension-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

.pension-table th {
    background-color: #162238;
    color: white;
    padding: 10px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.pension-table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    color: #4a5568;
    white-space: nowrap;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
}
.badge-warning { background-color: #feebc8; color: #c05621; }
.badge-danger { background-color: #fed7d7; color: #9b2c2c; }
.badge-success { background-color: #c6f6d5; color: #22543d; }

.btn-add-res {
    background-color: #00bcd4;
    color: #162238;
    border: none;
    padding: 10px 15px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    width: 100%;
}
.btn-add-res:hover { background-color: #00acc1; }


/* ==========================================
   MEDIA QUERIES (PC / Tablettes)
   ========================================== */
@media (min-width: 768px) {
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 30px;
    }

    .logo-img {
        height: 45px;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 6px 15px;
    }

    .form-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .full-width {
        grid-column: span 2;
    }
}

@media (min-width: 900px) {
    .client-layout {
        display: grid;
        grid-template-columns: 350px 1fr;
        align-items: start;
    }

    .btn-add-res {
        width: auto;
    }
}

/* ==========================================
   STYLE DES CARTES ANIMAUX (Fiche Client)
   ========================================== */
.animal-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.animal-avatar-img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #cbd5e0;
}

.animal-info {
    flex-grow: 1;
}

.animal-info h3 {
    font-size: 1rem;
    color: #162238;
    margin-bottom: 2px;
}

.animal-info p {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.3;
}

.animal-actions-icons {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.animal-actions-icons a {
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
}


/* --- Styles de base et Dashboard --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

header h1 {
    color: #1a365d;
    margin: 0;
    font-size: 1.8rem;
}

.btn-logout {
    background-color: #e53e3e;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-logout:hover {
    background-color: #c53030;
}

.client-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.1s;
}

.client-card:hover {
    border-color: #cbd5e0;
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.client-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2b6cb0;
    text-decoration: none;
}

.client-name:hover {
    text-decoration: underline;
}

.badge {
    background-color: #edf2f7;
    color: #4a5568;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-vip {
    background-color: #feebc8;
    color: #c05621;
}

.client-info {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 12px;
}

.animals-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

.animals-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
}

.animal-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.animal-tag {
    background-color: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #a0aec0;
    font-style: italic;
}

/* --- Style Global PlaniPension --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8;
    margin: 0;
    padding: 0;
    color: #333;
}

/* Barre de navigation supérieure */
.navbar {
    background-color: #162238;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    color: white;
}

.nav-brand {
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-item {
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.nav-item:hover, .nav-item.active {
    background-color: #1e293b;
    color: white;
}

.btn-logout-nav {
    background-color: #ef4444;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Conteneur principal */
.main-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Grille des stats du haut */
.stats-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
}

/* Blocs Entrées / Sorties */
.grid-2cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.pension-box {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
}

.pension-box-header {
    background-color: #00bcd4; /* Bleu lagon du screen */
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pension-box-content {
    padding: 20px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    border: 1px solid #edf2f7;
}

/* Section Réservations en attente (Rouge/Orange) */
.pending-box {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
}

.pending-box-header {
    background-color: #e57373; /* Ton rouge/saumon du screen */
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
}

/* --- Styles de la page Gestion Clients --- */
.clients-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
    border: 1px solid #e2e8f0;
}

.btn-primary-custom {
    background-color: #00bcd4;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-primary-custom:hover {
    background-color: #00acc1;
}

.export-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.btn-icon:hover {
    background: #e2e8f0;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 12px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    padding: 5px;
    font-size: 0.9rem;
    width: 200px;
}

/* Tableau des clients */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    overflow-x: auto;
    border: 1px solid #e2e8f0;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.clients-table th {
    background-color: #1e293b;
    color: white;
    padding: 14px 16px;
    font-weight: 600;
}

.clients-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.clients-table tr:hover {
    background-color: #f8fafc;
}

.action-icons {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8rem;
    color: #334155;
}

.action-btn:hover {
    background: #e2e8f0;
}