/* Address Manager - Custom Styles */

:root {
    --am-primary: #0d6efd;
    --am-bg: #f7f8fb;
    --am-card-shadow: 0 2px 12px rgba(0,0,0,0.06);
    --am-card-shadow-hover: 0 4px 20px rgba(0,0,0,0.1);
}

body {
    background: var(--am-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Cards modernes */
.card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    box-shadow: var(--am-card-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--am-card-shadow-hover); }

.card-header {
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* Page headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.page-header h1 {
    font-weight: 700;
    margin: 0;
    font-size: 1.75rem;
}

/* Group badges */
.group-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    border-radius: 12px;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
}

/* Tables modernes */
.table {
    margin-bottom: 0;
}
.table > :not(caption) > * > * {
    padding: 0.75rem 1rem;
}
.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

/* Boutons */
.btn {
    border-radius: 8px;
    font-weight: 500;
}
.btn-icon {
    padding: 0.25rem 0.5rem;
}

/* Forms */
.form-label {
    font-weight: 500;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: #495057;
}
.form-control, .form-select {
    border-radius: 8px;
    border-color: #dee2e6;
}
.form-control:focus, .form-select:focus {
    border-color: var(--am-primary);
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

/* Liste de contacts (sélection cliquable) */
.selectable-row {
    cursor: pointer;
    transition: background-color 0.15s;
}
.selectable-row:hover {
    background-color: rgba(13,110,253,0.05);
}
.selectable-row.selected {
    background-color: rgba(13,110,253,0.12) !important;
    border-left: 4px solid var(--am-primary);
}
.selectable-row.selected td:first-child {
    border-left: none;
}

/* CSV Mapping */
.csv-mapping-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}
.csv-preview {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.85rem;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    max-height: 100px;
    overflow-y: auto;
}

/* Color picker */
.color-preview {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Stats */
.stat-card {
    text-align: center;
    padding: 1.25rem;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--am-primary);
}
.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Email template editor */
.template-editor {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.875rem;
    min-height: 400px;
}

.template-preview-frame {
    width: 100%;
    min-height: 500px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
}

/* Loading state */
.list-loading {
    opacity: 0.5;
    pointer-events: none;
}
