/**
 * Styles pour le module Gestion Clients & Licences v6.57.0
 */

/* Container principal */
.gestion-clients-licences {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #F7B500;
}

.header-left h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0;
}

.header-left .subtitle {
    font-size: 0.9rem;
    color: #6B7280;
    margin-top: 0.25rem;
}

.header-right .btn-primary {
    background: #F7B500;
    color: #2C2C2C;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.header-right .btn-primary:hover {
    background: #FFC933;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 181, 0, 0.3);
}

/* Onglets */
.tabs-navigation {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #2C2C2C;
}

.tab-btn.active {
    color: #F7B500;
    border-bottom-color: #F7B500;
}

.tab-btn .badge {
    background: #E5E7EB;
    color: #6B7280;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tab-btn.active .badge {
    background: #F7B500;
    color: #2C2C2C;
}

/* Contenu des onglets */
.tabs-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Liste des cartes */
.liste-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Carte établissement */
.etablissement-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.etablissement-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-title {
    flex: 1;
}

.card-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 0.5rem 0;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: #F5F5F5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #F7B500;
    color: white;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6B7280;
    font-size: 0.9rem;
}

.info-row i {
    color: #F7B500;
    width: 20px;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6B7280;
}

.empty-state i {
    font-size: 4rem;
    color: #E5E7EB;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #2C2C2C;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Tableau */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.data-table thead {
    background: #F5F5F5;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2C2C2C;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.data-table td {
    padding: 1rem;
    border-top: 1px solid #E5E7EB;
}

.data-table tbody tr:hover {
    background: #F9FAFB;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F7B500;
    color: #2C2C2C;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 600;
    color: #2C2C2C;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid #F7B500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6B7280;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #F5F5F5;
    color: #2C2C2C;
}

.modal-body {
    padding: 2rem;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    background: #F9FAFB;
}

.modal-footer .btn-secondary {
    order: 1;
}

.modal-footer .btn-primary {
    order: 2;
}

/* Formulaire */
.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #F7B500;
    box-shadow: 0 0 0 3px rgba(247, 181, 0, 0.1);
}

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

.info-box {
    background: #EFF6FF;
    border-left: 4px solid #3B82F6;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.info-box i {
    color: #3B82F6;
    font-size: 1.25rem;
}

.info-box strong {
    color: #1E40AF;
    display: block;
    margin-bottom: 0.25rem;
}

.info-box p {
    color: #1E3A8A;
    font-size: 0.9rem;
    margin: 0;
}

/* Boutons */
.btn-primary {
    background: #F7B500;
    color: #2C2C2C;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #FFC933;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 181, 0, 0.3);
}

.btn-primary:disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #F5F5F5;
    color: #2C2C2C;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #E5E7EB;
}

/* Modal succès */
.modal-success .modal-header {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border-bottom: none;
}

.modal-success .modal-header h2 {
    color: white;
}

.identifiants-box {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 1.5rem;
}

.identifiants-box h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 1rem;
}

.identifiant-item {
    margin-bottom: 1rem;
}

.identifiant-item label {
    display: block;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.identifiant-value {
    display: flex;
    gap: 0.5rem;
}

.identifiant-value input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    background: white;
}

.btn-copy {
    background: #F7B500;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: #2C2C2C;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-copy:hover {
    background: #FFC933;
}

.warning-box {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.warning-box i {
    color: #F59E0B;
    font-size: 1.25rem;
}

.warning-box strong {
    color: #92400E;
    display: block;
    margin-bottom: 0.25rem;
}

.warning-box p {
    color: #92400E;
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
}
