/* CSS Plugin Célébrité & Flyer - Version Finale */

/* Couleurs globales */
:root {
    --primary-color: #222c64;
    --primary-hover: #1e2759;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #2d3748;
    --text-muted: #6c757d;
}

/* Styles généraux admin */
.wrap {
    margin: 20px 0;
}

.celebrite-admin-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 25px;
    margin: 20px 0;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(34, 44, 100, 0.2);
}

.celebrite-admin-header h1 {
    margin: 0 0 10px 0;
    color: white !important;
    text-shadow: none;
    font-size: 28px;
}

.celebrite-admin-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Formulaires */
.form-section {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-section h2 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 12px;
    margin-bottom: 25px;
    font-size: 22px;
}

.form-table th {
    color: var(--text-dark);
    font-weight: 600;
    padding: 15px 0;
}

.form-table td {
    padding: 15px 0;
}

/* Boutons primaires */
.button-primary,
.button.button-primary {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    text-shadow: none !important;
    box-shadow: 0 2px 5px rgba(34, 44, 100, 0.2) !important;
}

.button-primary:hover,
.button.button-primary:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-1px);
}

.button-hero {
    padding: 12px 30px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
}

/* Navigation par onglets */
.nav-tab-wrapper {
    margin: 20px 0 0 0;
    border-bottom: none;
}

.nav-tab {
    border: 2px solid #ccc;
    color: var(--text-muted);
    padding: 12px 20px;
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
}

.nav-tab-active,
.nav-tab:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.tab-content {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 0 8px 8px 8px;
    padding: 25px;
    margin-bottom: 20px;
}

/* Tables d'administration */
.wp-list-table {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.wp-list-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    font-weight: 600;
    padding: 15px;
    border: none;
}

.wp-list-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
}

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

/* Cartes de statistiques */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(34, 44, 100, 0.2);
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
    color: #ffd700;
}

.stat-card .stat-label {
    opacity: 0.9;
    font-size: 14px;
}

/* Grille des célébrités */
.celebrites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.celebrite-stat-card {
    padding: 25px;
    border-radius: 12px;
    border: 2px solid;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.celebrite-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.celebrite-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
}

.celebrite-stat-card.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.celebrite-stat-card.warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.celebrite-stat-card.danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Styles pour les liens */
.links-grid {
    display: grid;
    gap: 20px;
    margin: 25px 0;
}

.link-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.2s ease;
}

.link-card:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.link-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.link-card-title {
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.link-card-stats {
    font-size: 12px;
    color: var(--text-muted);
    margin: 5px 0;
}

.link-card-url {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    word-break: break-all;
    color: #666;
    border: 1px solid #e2e8f0;
    margin: 10px 0;
}

.link-card-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

/* Boutons d'action */
.btn-copy {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-copy:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3);
}

.btn-view {
    background: var(--info-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-view:hover {
    background: #138496;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(23, 162, 184, 0.3);
}

/* Zone de partage */
.share-section {
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f8ff 100%);
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid #b3d9ff;
}

.share-section h4 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 18px;
}

.share-textarea {
    width: 100%;
    height: 200px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    background: white;
    resize: vertical;
    line-height: 1.4;
}

.share-textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 44, 100, 0.1);
}

/* Upload logo */
.logo-upload-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-preview {
    width: 150px;
    height: 80px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f9fa;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-logo-placeholder {
    color: #999;
    font-size: 14px;
    text-align: center;
}

/* Notifications */
.copy-notification {
    position: fixed;
    top: 50px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

/* Gagnants */
.gagnants-list {
    display: grid;
    gap: 15px;
}

.gagnant-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid var(--success-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
}

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

.gagnant-position {
    background: var(--success-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.gagnant-info h4 {
    margin: 0;
    color: var(--success-color);
    font-size: 16px;
}

.gagnant-details {
    margin: 5px 0 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* Loader */
.stats-loader {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.stats-loader::before {
    content: '⟳';
    font-size: 32px;
    animation: spin 1s linear infinite;
    display: block;
    margin-bottom: 15px;
    color: var(--primary-color);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Inputs et selects */
.regular-text,
select.regular-text,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"] {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.regular-text:focus,
select.regular-text:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="number"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 44, 100, 0.1);
}

/* Notices WordPress */
.notice.notice-success {
    border-left-color: var(--success-color);
    background: #d4edda;
}

.notice.notice-error {
    border-left-color: var(--danger-color);
    background: #f8d7da;
}

.notice.notice-warning {
    border-left-color: var(--warning-color);
    background: #fff3cd;
}

/* Responsive */
@media (max-width: 768px) {
    .celebrite-admin-header {
        padding: 20px 15px;
        margin: 10px 0;
    }
    
    .celebrite-admin-header h1 {
        font-size: 22px;
    }
    
    .form-section {
        padding: 20px;
        margin: 15px 0;
    }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .celebrites-grid {
        grid-template-columns: 1fr;
    }
    
    .link-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .link-card-actions {
        justify-content: center;
        width: 100%;
    }
    
    .logo-upload-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tab-content {
        padding: 20px 15px;
    }
    
    .nav-tab {
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .gagnant-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
}
