/**
 * Composants UI
 * Boutons, cards, alertes, badges, formulaires
 */

/* ==========================================================================
   BOUTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Bouton primaire */
.btn-primary {
    background: var(--main-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--main-dark);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

/* Bouton secondaire */
.btn-secondary {
    background: var(--bg-light);
    color: var(--text-title);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-title);
}

/* Bouton blanc (sur fond coloré) */
.btn-white {
    background: var(--white);
    color: var(--main-color);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--main-color);
}

/* Bouton outline */
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    color: var(--white);
}

/* Bouton ghost */
.btn-ghost {
    background: transparent;
    color: var(--white);
    padding: 12px 20px;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

/* Bouton danger */
.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
    color: var(--white);
}

/* Tailles */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* États */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 35px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.card-icon {
    width: 65px;
    height: 65px;
    background: var(--main-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-color);
    font-size: 28px;
    margin-bottom: 25px;
    transition: var(--transition);
}

.card:hover .card-icon {
    background: var(--main-color);
    color: var(--white);
    transform: scale(1.1);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-text {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
}

/* ==========================================================================
   ALERTES
   ========================================================================== */

.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: var(--success-light);
    color: #1e8449;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.alert-error {
    background: var(--error-light);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.alert-warning {
    background: var(--warning-light);
    color: #9a7b0a;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.alert-info {
    background: var(--info-light);
    color: #2471a3;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* ==========================================================================
   BADGES / STATUS
   ========================================================================== */

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.status-success {
    background: var(--success-light);
    color: #1e8449;
}

.status-warning {
    background: var(--warning-light);
    color: #9a7b0a;
}

.status-error {
    background: var(--error-light);
    color: #c0392b;
}

.status-info {
    background: var(--info-light);
    color: #2980b9;
}

.status-muted {
    background: rgba(149, 165, 166, 0.1);
    color: #7f8c8d;
}

/* ==========================================================================
   FORMULAIRES
   ========================================================================== */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-title);
}

.form-label.required::after {
    content: ' *';
    color: var(--error);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px var(--main-light);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--error);
}

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

.form-hint {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}

.form-error {
    font-size: 13px;
    color: var(--error);
    margin-top: 6px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

/* ==========================================================================
   FEATURE LIST (pour tarifs)
   ========================================================================== */

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-icon {
    width: 24px;
    height: 24px;
    background: var(--main-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon .lnr {
    font-size: 12px;
    color: var(--main-color);
}

/* Feature avec sous-texte */
.feature-list li.has-subtext {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.feature-list .feature-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-list .feature-subtext {
    margin-left: 36px;
    opacity: 0.65;
    font-style: italic;
    font-size: 13px;
    margin-top: -2px;
}

/* ==========================================================================
   DASHBOARD SECTIONS
   ========================================================================== */

.dashboard-section {
    margin-bottom: 50px;
}

.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
}

.dashboard-section-header.theme-purple {
    border-bottom-color: #ede9fe;
}

.dashboard-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-section-title .lnr {
    font-size: 24px;
}

.dashboard-section-title h2 {
    margin: 0;
    font-size: 20px;
}

.dashboard-section-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Stats cards (pas de hover transform) */
.stat-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--main-color);
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card-label {
    color: var(--text-light);
    font-size: 13px;
    margin-top: 5px;
}

/* Alert flex responsive */
.alert-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

/* Info box (pour les messages contextuels) */
.info-box {
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.info-box-content {
    flex: 1;
    min-width: 200px;
}
