/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.logo-section {
    flex: 1;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-email {
    font-size: 0.8rem;
    opacity: 0.8;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .user-section {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Main */
.main {
    flex: 1;
    padding: 3rem 0;
}

/* Sections */
.add-site-section, .sites-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.add-site-section h2, .sites-section h2 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Section de configuration */
.config-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.config-section h2 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-group label {
    font-weight: 500;
    color: white;
    opacity: 0.9;
}

.recurrence-control {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.recurrence-control select {
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.recurrence-control select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.recurrence-control select option {
    background: #4a5568;
    color: white;
}

.config-info {
    margin-top: 0.5rem;
}

.status-text {
    font-size: 0.9rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-text.success {
    opacity: 1;
    color: #c6f6d5;
}

.status-text.test {
    opacity: 1;
    color: #fef5e7;
    animation: pulse 2s infinite;
}

.status-text.error {
    opacity: 1;
    color: #fed7d7;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Barre de progression */
.progress-container {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #68d391);
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
    animation: progressGlow 2s ease-in-out infinite alternate;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.8;
}

#currentSite {
    font-style: italic;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#progressTime {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

@keyframes progressGlow {
    0% { box-shadow: 0 0 5px rgba(72, 187, 120, 0.5); }
    100% { box-shadow: 0 0 15px rgba(72, 187, 120, 0.8); }
}

/* Compteur prochaine analyse */
.next-analysis-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.next-analysis-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.next-analysis-header i {
    font-size: 1rem;
}

.next-analysis-countdown {
    text-align: center;
}

#countdownDisplay {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    animation: countdownPulse 2s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Style spécifique pour la progression des analyses individuelles */
.individual-progress {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-left: 4px solid #2563eb;
}

.individual-progress .progress-bar {
    background: rgba(255, 255, 255, 0.2);
}

.individual-progress .progress-fill {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.individual-progress .progress-header {
    color: white;
}

.individual-progress .progress-details {
    color: rgba(255, 255, 255, 0.9);
}

.individual-progress #individualCurrentPage {
    font-weight: 500;
    color: #dbeafe;
}

/* Formulaire - ancien style supprimé */

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Boutons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Ancien style bouton supprimé */

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

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

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-success:disabled {
    background: #a0aec0;
    color: #718096;
    cursor: not-allowed;
}

.btn-success:disabled:hover {
    background: #a0aec0;
    transform: none;
    box-shadow: none;
}

.btn-warning {
    background: #ed8936;
    color: white;
}

.btn-warning:hover {
    background: #dd6b20;
}

/* Liste des sites */
.sites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.site-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.site-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.site-card h3 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.site-card .url {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.specific-urls {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.specific-urls small {
    color: #4a5568;
    line-height: 1.4;
}

.specific-urls i {
    width: 16px;
    margin-right: 0.5rem;
    color: #667eea;
}

.site-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #718096;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-meta .last-analysis {
    color: #48bb78;
    font-weight: 500;
}

.site-meta .no-analysis {
    color: #ed8936;
    font-style: italic;
}

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

.site-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Score d'accessibilité */
.accessibility-score {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.score-excellent {
    background: #c6f6d5;
    color: #22543d;
}

.score-good {
    background: #fed7aa;
    color: #7c2d12;
}

.score-poor {
    background: #fed7d7;
    color: #742a2a;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.modal-header h3 {
    margin: 0;
    color: #2d3748;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
    padding: 0.5rem;
}

.close-btn:hover {
    color: #2d3748;
}

.modal-body {
    padding: 1.5rem;
}

/* Amélioration du scroll dans le modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* Résultats d'analyse - Accordéon */
.analysis-session {
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.session-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.session-header:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.session-header.active {
    background: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
}

.session-info h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-count {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: normal;
}

.session-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.session-meta .accessibility-score {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.session-meta .analysis-time {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.session-toggle {
    transition: transform 0.3s ease;
}

.session-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.session-content.active {
    max-height: 5000px;
    padding: 1.5rem;
}

/* Grille des pages */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.page-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-header {
    background: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.page-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.page-info {
    flex: 1;
    min-width: 0;
}

.page-url {
    margin: 0;
    font-size: 0.95rem;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-score {
    margin-top: 0.25rem;
}

.page-details {
    padding: 1rem;
}

.full-url {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #edf2f7;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.full-url small {
    color: #4a5568;
    word-break: break-all;
}

.excellent-score {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Recommandations en accordéon */
.recommendations-summary {
    margin-top: 0.75rem;
}

.recommendations-header {
    background: #fdf2e9;
    border: 1px solid #f6ad55;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.recommendations-header:hover {
    background: #fed7aa;
}

.recommendations-count {
    color: #c05621;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-icon {
    transition: transform 0.2s ease;
    color: #c05621;
}

.recommendations-list {
    border: 1px solid #f6ad55;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
    overflow: hidden;
}

.recommendation {
    padding: 1rem;
    border-bottom: 1px solid #f7fafc;
}

.recommendation:last-child {
    border-bottom: none;
}

.recommendation.critical {
    border-left: 4px solid #f56565;
    background: #fef5f5;
}

.recommendation.minor {
    border-left: 4px solid #f6ad55;
    background: #fffbf5;
}

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

.rec-header h6 {
    margin: 0;
    color: #2d3748;
    font-size: 0.9rem;
    flex: 1;
}

.recommendation p {
    color: #4a5568;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.impact {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.impact.critical {
    background: #feb2b2;
    color: #742a2a;
}

.impact.minor {
    background: #fbd38d;
    color: #744210;
}

/* Responsive */
/* ====================================
   🔧 OPTIMISATIONS MOBILE
   ==================================== */

@media (max-width: 768px) {
    /* === CONTENEUR ET MISE EN PAGE === */
    .container {
        padding: 0 15px;
    }
    
    .main {
        padding: 1.5rem 0;
    }
    
    /* === HEADER === */
    .header {
        padding: 1.5rem 0;
    }
    
    .logo {
        font-size: 1.8rem;
        gap: 0.375rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .tagline {
        font-size: 0.95rem;
    }
    
    /* === SECTIONS === */
    .add-site-section, 
    .sites-section, 
    .config-section {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        border-radius: 8px;
    }
    
    .add-site-section h2, 
    .sites-section h2,
    .config-section h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    /* === CONFIGURATION === */
    .recurrence-control {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .recurrence-control select {
        min-width: auto;
        width: 100%;
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .progress-container {
        padding: 0.875rem;
        border-radius: 6px;
    }
    
    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    /* === FORMULAIRES === */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .add-site-form {
        padding: 1.25rem;
    }
    
    .form-field input {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    .form-info {
        padding: 0.875rem;
        font-size: 0.8rem;
    }
    
    .btn-submit {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }
    
    /* === SITES LIST === */
    .sites-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .site-card {
        padding: 1.25rem;
    }
    
    .site-card h3 {
        font-size: 1.1rem;
    }
    
    .site-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .site-actions .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.875rem;
        min-width: 120px;
    }
    
    .specific-urls {
        display: none; /* Masquer les URLs détaillées sur mobile */
    }
    
    /* === MODALES === */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 5% auto;
        max-height: 90vh;
        padding: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
        margin: -1rem -1rem 1rem -1rem;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .close-btn {
        font-size: 1.5rem;
        width: 32px;
        height: 32px;
    }
    
    .modal-body {
        padding: 0 0.25rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.25rem;
        padding-top: 1.25rem;
    }
    
    .modal-actions button {
        width: 100%;
        padding: 0.875rem;
    }
    
    /* === PAGES D'ANALYSE === */
    .pages-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .page-card {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .page-number {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .page-info {
        min-width: auto;
    }
    
    .page-url {
        font-size: 0.8rem;
    }
    
    .page-score {
        font-size: 1.25rem;
        padding: 0.5rem;
        min-width: 50px;
    }
    
    .session-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .session-header {
        padding: 1rem;
    }
    
    .session-info h3 {
        font-size: 1.1rem;
    }
    
    /* === RECOMMANDATIONS === */
    .rec-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .recommendation {
        padding: 0.875rem;
    }
    
    .rec-header h6 {
        font-size: 0.9rem;
    }
    
    .recommendation p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .impact {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* === ÉDITION DE SITE === */
    .edit-site-form {
        gap: 1.25rem;
    }
    
    .edit-site-form .form-field input {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    /* === BOUTONS GÉNÉRAUX === */
    .btn {
        font-size: 0.85rem;
        padding: 0.625rem 1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-success,
    .btn-danger,
    .btn-warning {
        min-height: 42px; /* Taille tactile confortable */
    }
    
    /* === BADGES ET SÉLECTEURS === */
    .recurrence-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.625rem;
    }
    
    .recurrence-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .recurrence-selector select,
    .recurrence-selector .btn {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* === ALERTES === */
    .alert {
        padding: 0.875rem;
        font-size: 0.9rem;
        border-radius: 6px;
    }
    
    /* === FOOTER === */
    .footer {
        padding: 1.25rem 0;
        font-size: 0.9rem;
    }
    
    /* === ÉTATS DE CHARGEMENT === */
    .status-text {
        font-size: 0.85rem;
    }
    
    .next-analysis-container,
    .progress-container {
        margin-top: 1rem;
    }
    
    #countdownDisplay {
        font-size: 1.25rem;
    }
}

/* === MOBILE TRÈS PETIT (< 480px) === */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header {
        padding: 1rem 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 1.25rem;
    }
    
    .add-site-section,
    .sites-section,
    .config-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .site-actions .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        min-width: 100px;
    }
    
    .modal-content {
        width: 98%;
        margin: 2% auto;
    }
    
    .form-field input {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* ====================================
   🎨 STYLES SUPPLÉMENTAIRES
   ==================================== */

/* États de chargement */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

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

/* Messages d'alerte */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border-color: #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border-color: #feb2b2;
}

.alert-info {
    background: #bee3f8;
    color: #2a4365;
    border-color: #90cdf4;
}

.alert-warning {
    background: #fef5e7;
    color: #744210;
    border-color: #f6e05e;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
}

/* Badge de récurrence */
.recurrence-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recurrence-badge.manuel {
    background: #e2e8f0;
    color: #4a5568;
}

.recurrence-badge.quotidien {
    background: #c6f6d5;
    color: #22543d;
}

.recurrence-badge.hebdomadaire {
    background: #bee3f8;
    color: #2a4365;
}

.recurrence-badge.mensuel {
    background: #fed7aa;
    color: #7c2d12;
}

.recurrence-badge:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

/* Sélecteur de récurrence inline */
.recurrence-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.recurrence-selector select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.75rem;
    background: white;
}

.recurrence-selector .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Formulaire d'ajout de site - Version propre */
.add-site-form {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-field label i {
    color: #6366f1;
    width: 16px;
}

.form-field input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-field input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-info {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.4;
}

.form-info i {
    color: #6366f1;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.btn-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    background: #5850ec;
}

.btn-submit:active {
    background: #4f46e5;
}

/* Styles pour le modal d'édition */
.edit-site-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.edit-site-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.edit-site-form .form-field label {
    font-weight: 500;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-site-form .form-field input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.edit-site-form .form-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
} 