/* ========================================
   AMOUR COURTOIS - STYLES PAGES SECONDAIRES
   Auth & Admin
   ======================================== */

/* ========================================
   PAGE AUTH
   ======================================== */
.auth-page {
    min-height: 100vh;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--color-bg-dark);
    position: relative;
}

.auth-header .back-link {
    position: absolute;
    left: 1.5rem;
    color: var(--color-cream);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-header .back-link:hover {
    color: var(--color-gold);
}

.auth-header h1 {
    font-family: 'Cormorant Unicase', serif;
    font-size: 1.5rem;
    color: var(--color-cream);
    margin: 0;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    background: var(--color-bg);
    border-radius: 8px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.5);
}

.tab-btn.active {
    background: white;
    color: var(--color-text);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-gold);
}

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

.status-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.status-option {
    position: relative;
}

.status-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.status-label {
    display: block;
    padding: 0.75rem;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-option input:checked + .status-label {
    border-color: var(--color-gold);
    background: rgba(214, 167, 88, 0.1);
}

.status-label .status-name {
    display: block;
    font-weight: 500;
    color: var(--color-text);
}

.status-label .status-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 2px;
}

.error-message {
    color: var(--color-terracotta);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.btn-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--color-terracotta);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: #a8554a;
    transform: translateY(-1px);
}

/* ========================================
   PAGE ADMIN
   ======================================== */
.admin-page {
    min-height: 100vh;
    background: var(--color-bg);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--color-bg-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h1 {
    font-family: 'Cormorant Unicase', serif;
    font-size: 1.3rem;
    color: var(--color-cream);
    margin: 0;
}

.admin-header .back-link {
    color: var(--color-cream);
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-header .back-link:hover {
    color: var(--color-gold);
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--color-cream);
    color: var(--color-cream);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--color-cream);
    color: var(--color-bg-dark);
}

.admin-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.admin-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.admin-section h2 {
    font-family: 'Cormorant Unicase', serif;
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-gold);
}

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

.form-separator {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.form-separator::before,
.form-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

.form-message {
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.form-message.success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.form-message.error {
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: var(--color-terracotta);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #a8554a;
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--color-terracotta);
    color: var(--color-terracotta);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.historical-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.historical-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 8px;
}

.historical-item-name {
    font-weight: 600;
    color: var(--color-text);
}

.historical-item-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* Liste générique admin */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 8px;
}

.list-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.list-item-name {
    font-weight: 600;
    color: var(--color-text);
}

.list-item-meta {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.btn-edit {
    padding: 0.5rem 1rem;
    background: var(--color-cream);
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--color-text);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit:hover {
    background: var(--color-green);
    color: white;
    border-color: var(--color-green);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--color-cream);
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--color-text);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--color-gray);
    color: white;
}

/* ========================================
   PAGE EDITOR
   ======================================== */
.editor-page {
    min-height: 100vh;
    background: var(--color-bg);
}

.editor-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.editor-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.editor-card h2 {
    font-family: 'Cormorant Unicase', serif;
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.editor-form textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.8;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
}

.editor-form textarea:focus {
    outline: none;
    border-color: var(--color-gold);
}

/* ========================================
   SCRAPER SECTION
   ======================================== */
.scraper-info {
    background: rgba(214, 167, 88, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.scraper-info p {
    margin: 0.5rem 0;
}

.scraper-info a {
    color: var(--color-terracotta);
}

.scraper-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.scraper-actions button i {
    margin-right: 0.5rem;
}

.scraper-result {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.scraper-result h4 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.scraper-success {
    color: #27ae60;
}

.scraper-success i {
    margin-right: 0.5rem;
}

.scraper-error {
    color: #c0392b;
}

.scraper-error i {
    margin-right: 0.5rem;
}

.scraper-stats {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.scraper-stats .stat {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    min-width: 100px;
}

.scraper-stats .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-green);
}

.scraper-stats .stat-label {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.scraper-events-list,
.scraper-errors-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.scraper-events-list li {
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.scraper-errors-list li {
    padding: 0.5rem;
    background: rgba(192, 57, 43, 0.1);
    border-radius: 4px;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 600px) {
    .auth-header .back-link {
        position: static;
        margin-right: auto;
    }
    
    .auth-header h1 {
        flex: 1;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .status-options {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .admin-section {
        padding: 1rem;
    }
    
    .scraper-stats {
        gap: 1rem;
    }
    
    .scraper-stats .stat {
        flex: 1;
        min-width: 80px;
    }
}
