/**
 * KozaPartaz Login - Styles CSS
 * Version: 1.0.0
 */

/* ============================================
   FORMULAIRE PRINCIPAL
   ============================================ */

.kozapartaz-login-container {
    max-width: 450px;
    margin: 40px auto;
    padding: 0 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #00a86b;
}

/* En-tête */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 28px;
    color: #2b2d42;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.login-header p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* Formulaire */
.kozapartaz-login-form {
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: #2b2d42;
    margin-bottom: 8px;
    font-size: 14px;
}

.label-icon {
    margin-right: 5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #00a86b;
    box-shadow: 0 0 0 3px rgba(0, 168, 107, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

/* Checkbox */
.form-group-checkbox {
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #00a86b;
}

.checkbox-text {
    color: #495057;
    font-size: 14px;
}

/* Bouton de connexion */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00a86b 0%, #00c97a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', -apple-system, sans-serif;
}

.btn-login:hover {
    background: linear-gradient(135deg, #008c5a 0%, #00a86b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 107, 0.3);
}

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

/* Footer du formulaire */
.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    font-size: 14px;
}

.login-link {
    color: #00a86b;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.login-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.login-separator {
    margin: 0 10px;
    color: #dee2e6;
}

/* Message d'info */
.login-info {
    margin-top: 20px;
    padding: 20px;
    background: #f0f9f5;
    border-radius: 8px;
    border-left: 4px solid #00a86b;
}

.login-info p {
    margin: 0;
    font-size: 14px;
    color: #495057;
    line-height: 1.6;
}

.info-icon {
    margin-right: 5px;
}

/* ============================================
   ÉTAT CONNECTÉ
   ============================================ */

.kozapartaz-login-success {
    max-width: 500px;
    margin: 40px auto;
    padding: 0 20px;
}

.login-success-content {
    background: linear-gradient(135deg, #00a86b 0%, #00d084 100%);
    padding: 50px 40px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 30px rgba(0, 168, 107, 0.2);
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.login-success-content h3 {
    font-size: 28px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.login-success-content p {
    font-size: 16px;
    margin: 0 0 30px 0;
    opacity: 0.95;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.success-actions .btn {
    min-width: 250px;
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.success-actions .btn-green {
    background: white;
    color: #00a86b;
}

.success-actions .btn-green:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.success-actions .btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.success-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-text {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
    margin-top: 10px;
    display: inline-block;
    transition: opacity 0.3s;
}

.btn-text:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ============================================
   FORMULAIRE COMPACT
   ============================================ */

.login-compact-widget {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.compact-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
}

.compact-input:focus {
    outline: none;
    border-color: #00a86b;
}

.compact-submit {
    width: 100%;
    padding: 10px;
    background: #00a86b;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.compact-submit:hover {
    background: #008c5a;
}

.compact-footer {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
}

.compact-footer a {
    color: #00a86b;
    text-decoration: none;
}

.compact-footer a:hover {
    text-decoration: underline;
}

/* État connecté compact */
.login-compact-success {
    background: #f0f9f5;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.login-compact-success p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #2b2d42;
}

.btn-logout-compact {
    display: inline-block;
    padding: 8px 15px;
    background: #00a86b;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-logout-compact:hover {
    background: #008c5a;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .login-header h2 {
        font-size: 24px;
    }
    
    .login-success-content {
        padding: 40px 25px;
    }
    
    .success-actions .btn {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .kozapartaz-login-container {
        padding: 0 15px;
    }
    
    .login-box {
        padding: 25px 15px;
    }
    
    .btn-login {
        font-size: 15px;
        padding: 12px;
    }
}

/* ============================================
   MESSAGES D'ERREUR ET DE SUCCÈS v2
   ============================================ */

.login-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

.login-message .message-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.error-message {
    background: #fff5f5;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.success-message {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.info-message {
    background: #d1ecf1;
    border-left: 4px solid #0077b6;
    color: #0c5460;
}

.login-message ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.login-message li {
    margin: 5px 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LIEN "CRÉER UN COMPTE" VISIBLE
   ============================================ */

.login-info .info-link {
    color: #00a86b;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.3s;
}

.login-info .info-link:hover {
    color: #008c5a;
}

/* ============================================
   FORMULAIRE D'INSCRIPTION
   ============================================ */

.form-hint {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

.form-group-checkbox a {
    color: #00a86b;
    text-decoration: underline;
}

.form-group-checkbox a:hover {
    color: #008c5a;
}

/* ============================================
   DASHBOARD MON COMPTE
   ============================================ */

.kozapartaz-account-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* En-tête du compte */
.account-header {
    background: linear-gradient(135deg, #00a86b 0%, #00c97a 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.account-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.account-avatar {
    flex-shrink: 0;
}

.account-avatar img {
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.account-info h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: white;
}

.account-email {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.account-member-since {
    margin: 5px 0 0 0;
    opacity: 0.8;
    font-size: 13px;
}

.account-rating {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.account-rating .star-full {
    color: #ffc107;
    font-size: 18px;
}

.account-rating .star-empty {
    color: rgba(255,255,255,0.3);
    font-size: 18px;
}

.account-rating .rating-text {
    margin-left: 5px;
    font-size: 14px;
    opacity: 0.9;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid white;
    display: inline-block;
}

.btn-logout:hover {
    background: white;
    color: #00a86b;
}

/* Statistiques */
.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.stat-icon {
    font-size: 40px;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #00a86b;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
}

/* Actions rapides */
.account-quick-actions {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.account-quick-actions h3 {
    margin: 0 0 20px 0;
    color: #2b2d42;
    font-size: 20px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    gap: 8px;
}

.quick-action-card:hover {
    border-color: #00a86b;
    background: #f8fffe;
    transform: translateY(-3px);
}

.action-icon {
    font-size: 32px;
    line-height: 1;
}

.action-title {
    font-weight: 600;
    color: #2b2d42;
    font-size: 15px;
}

.action-desc {
    font-size: 12px;
    color: #6c757d;
}

/* Sections */
.account-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h3 {
    margin: 0;
    color: #2b2d42;
    font-size: 22px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-green {
    background: linear-gradient(135deg, #00a86b 0%, #00c97a 100%);
    color: white;
    border: none;
}

.btn-green:hover {
    background: linear-gradient(135deg, #008c5a 0%, #00b368 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 168, 107, 0.3);
}

/* Liste des items */
.account-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.account-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #00a86b;
    transition: all 0.3s;
}

.account-item:hover {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.account-item.item-draft {
    border-left-color: #ffc107;
    opacity: 0.8;
}

.item-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    font-size: 32px;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #2b2d42;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.item-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-draft, .status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-open {
    background: #d4edda;
    color: #155724;
}

.status-closed {
    background: #f8d7da;
    color: #721c24;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #6c757d;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.urgency-high {
    color: #dc3545;
    font-weight: 600;
}

.urgency-medium {
    color: #ffc107;
    font-weight: 600;
}

.urgency-low {
    color: #28a745;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.btn-action {
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-view {
    background: #0077b6;
    color: white;
}

.btn-view:hover {
    background: #005a8c;
}

.btn-edit {
    background: #6c757d;
    color: white;
}

.btn-edit:hover {
    background: #545b62;
}

.btn-close {
    background: #ffc107;
    color: #000;
}

.btn-close:hover {
    background: #e0a800;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    margin: 0 0 10px 0;
    color: #2b2d42;
    font-size: 20px;
}

.empty-state p {
    margin: 0 0 20px 0;
    color: #6c757d;
}

/* Login redirect */
.login-redirect {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .account-header {
        padding: 20px;
    }
    
    .account-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .account-actions {
        width: 100%;
    }
    
    .btn-logout {
        width: 100%;
        text-align: center;
    }
    
    .account-stats {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .account-item {
        flex-direction: column;
    }
    
    .item-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .item-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .btn-action {
        flex: 1;
        min-width: 120px;
    }
}
