/**
 * Artisan Subscribe - Frontend CSS
 * Styles pour les formulaires et le dashboard utilisateur
 */

/* ==========================================================================
   PAGE MON COMPTE - FULL WIDTH
   ========================================================================== */

/* Force la page mon-compte en pleine largeur via classe body ajoutée par le plugin */
body.artisan-full-width .site-content,
body.artisan-full-width .content-area,
body.artisan-full-width main,
body.artisan-full-width article,
body.artisan-full-width .entry-content,
body.artisan-mon-compte .site-content,
body.artisan-mon-compte .content-area,
body.artisan-mon-compte main,
body.artisan-mon-compte article,
body.artisan-mon-compte .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
}

/* Masquer la sidebar sur la page mon-compte */
body.artisan-full-width .sidebar,
body.artisan-full-width .widget-area,
body.artisan-full-width aside,
body.artisan-full-width #secondary,
body.artisan-mon-compte .sidebar,
body.artisan-mon-compte .widget-area,
body.artisan-mon-compte aside,
body.artisan-mon-compte #secondary {
    display: none !important;
}

/* Container principal en full width */
body.artisan-full-width .container,
body.artisan-full-width .site-main,
body.artisan-mon-compte .container,
body.artisan-mon-compte .site-main {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

/* Support thèmes populaires - Astra */
body.artisan-full-width .ast-container,
body.artisan-mon-compte .ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Support thèmes populaires - GeneratePress */
body.artisan-full-width .inside-article,
body.artisan-mon-compte .inside-article {
    max-width: 100% !important;
    padding: 0 !important;
}

/* Support thèmes populaires - OceanWP */
body.artisan-full-width #content-wrap .container,
body.artisan-mon-compte #content-wrap .container {
    max-width: 100% !important;
    width: 100% !important;
}

/* Support thèmes populaires - Flavor (flavor theme que vous utilisez peut-être) */
body.artisan-full-width .flavor-content-wrap,
body.artisan-mon-compte .flavor-content-wrap,
body.artisan-full-width .flavor-container,
body.artisan-mon-compte .flavor-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Ajuster le contenu artisan pour prendre toute la largeur */
.artisan-dashboard,
.artisan-form-container,
.artisan-plan-selection {
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 40px 30px !important;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 768px) {
    .artisan-dashboard,
    .artisan-form-container,
    .artisan-plan-selection {
        padding: 20px 15px !important;
    }
}

/* ==========================================================================
   FIN FULL WIDTH
   ========================================================================== */

/* Variables */
:root {
    --as-primary: #2c3e50;
    --as-primary-light: #3498db;
    --as-success: #28a745;
    --as-warning: #ffc107;
    --as-danger: #dc3545;
    --as-gray: #6c757d;
    --as-light: #f8f9fa;
    --as-border: #dee2e6;
    --as-radius: 8px;
    --as-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Container */
.artisan-auth-container,
.artisan-dashboard,
.artisan-form-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Auth Box */
.artisan-auth-box {
    max-width: 450px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: var(--as-radius);
    box-shadow: var(--as-shadow);
}

.artisan-auth-box h2 {
    margin: 0 0 10px;
    color: var(--as-primary);
}

.artisan-auth-subtitle {
    color: var(--as-gray);
    margin: 0 0 30px;
}

.artisan-auth-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--as-border);
    text-align: center;
    color: var(--as-gray);
}

.artisan-auth-footer a {
    color: var(--as-primary-light);
    text-decoration: none;
}

/* Dashboard */
.artisan-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--as-border);
}

.artisan-dashboard-header h2 {
    margin: 0;
    color: var(--as-primary);
}

.artisan-dashboard-actions {
    display: flex;
    gap: 10px;
}

.artisan-section {
    background: #fff;
    padding: 30px;
    border-radius: var(--as-radius);
    box-shadow: var(--as-shadow);
    margin-bottom: 30px;
}

.artisan-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.artisan-section-header h3 {
    margin: 0;
    color: var(--as-primary);
}

.artisan-quota {
    color: var(--as-gray);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Cards Grid */
.artisan-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.artisan-card {
    background: #fff;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.artisan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--as-shadow);
}

.artisan-card.is-featured {
    border-color: var(--as-warning);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.artisan-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 1;
}

.artisan-badge-gold {
    background: var(--as-warning);
    color: #000;
}

.artisan-card-image {
    height: 150px;
    background: var(--as-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.artisan-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artisan-card-placeholder {
    color: var(--as-border);
}

.artisan-card-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.artisan-card-content {
    padding: 20px;
}

.artisan-card-content h4 {
    margin: 0 0 10px;
    color: var(--as-primary);
}

.artisan-card-location,
.artisan-card-phone {
    margin: 5px 0;
    font-size: 14px;
    color: var(--as-gray);
}

.artisan-card-location .dashicons,
.artisan-card-phone .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 5px;
}

.artisan-card-status {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.artisan-card-status.status-publish {
    background: #d4edda;
    color: var(--as-success);
}

.artisan-card-status.status-pending {
    background: #fff3cd;
    color: #856404;
}

.artisan-card-status.status-draft {
    background: var(--as-light);
    color: var(--as-gray);
}

.artisan-card-actions {
    padding: 15px 20px;
    background: var(--as-light);
    border-top: 1px solid var(--as-border);
    display: flex;
    gap: 10px;
}

/* Empty State */
.artisan-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--as-gray);
}

.artisan-empty-state .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.artisan-empty-state p {
    margin: 0 0 20px;
}

/* Form Styles */
.artisan-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.artisan-form-header h2 {
    margin: 0;
    color: var(--as-primary);
}

.artisan-form-section {
    background: #fff;
    padding: 30px;
    border-radius: var(--as-radius);
    box-shadow: var(--as-shadow);
    margin-bottom: 20px;
}

.artisan-form-section h3 {
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--as-border);
    color: var(--as-primary);
    font-size: 18px;
}

.artisan-form-row {
    margin-bottom: 20px;
}

.artisan-form-row:last-child {
    margin-bottom: 0;
}

.artisan-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--as-primary);
}

.artisan-form-row label .required {
    color: var(--as-danger);
}

.artisan-form-row input[type="text"],
.artisan-form-row input[type="email"],
.artisan-form-row input[type="tel"],
.artisan-form-row input[type="url"],
.artisan-form-row input[type="password"],
.artisan-form-row input[type="number"],
.artisan-form-row select,
.artisan-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.artisan-form-row input:focus,
.artisan-form-row select:focus,
.artisan-form-row textarea:focus {
    outline: none;
    border-color: var(--as-primary-light);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.artisan-form-row textarea {
    min-height: 150px;
    resize: vertical;
}

.artisan-form-row .description {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--as-gray);
}

.artisan-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.artisan-form-row-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Checkboxes */
.artisan-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.artisan-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    transition: background 0.2s;
}

.artisan-checkbox:hover {
    background: var(--as-light);
}

.artisan-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Image Upload */
.artisan-field-image .image-preview {
    width: 150px;
    height: 150px;
    border: 2px dashed var(--as-border);
    border-radius: var(--as-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: var(--as-light);
    overflow: hidden;
}

.artisan-field-image .image-preview.has-image {
    border-style: solid;
}

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

/* Buttons */
.artisan-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--as-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.artisan-btn-primary {
    background: var(--as-primary);
    color: #fff;
}

.artisan-btn-primary:hover {
    background: #1a252f;
    color: #fff;
}

.artisan-btn-outline {
    background: transparent;
    border: 1px solid var(--as-border);
    color: var(--as-primary);
}

.artisan-btn-outline:hover {
    background: var(--as-light);
    color: var(--as-primary);
}

.artisan-btn-danger {
    background: var(--as-danger);
    color: #fff;
}

.artisan-btn-danger:hover {
    background: #c82333;
}

.artisan-btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.artisan-btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.artisan-btn-block {
    width: 100%;
    justify-content: center;
}

.artisan-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Actions */
.artisan-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--as-border);
}

/* Messages */
.artisan-form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: var(--as-radius);
}

.artisan-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.artisan-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Notices */
.artisan-notice {
    padding: 15px 20px;
    border-radius: var(--as-radius);
    margin-bottom: 20px;
}

.artisan-notice-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.artisan-notice-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.artisan-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.artisan-notice a {
    color: inherit;
    font-weight: 600;
}

/* Links */
.artisan-link-small {
    font-size: 13px;
    color: var(--as-gray);
    text-decoration: none;
}

.artisan-link-small:hover {
    color: var(--as-primary-light);
}

/* Responsive */
@media (max-width: 768px) {
    .artisan-form-grid {
        grid-template-columns: 1fr;
    }
    
    .artisan-dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .artisan-dashboard-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .artisan-form-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .artisan-form-actions {
        flex-direction: column;
    }
    
    .artisan-auth-box {
        padding: 25px;
    }
    
    .artisan-section {
        padding: 20px;
    }
    
    .artisan-form-section {
        padding: 20px;
    }
    
    .artisan-checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .artisan-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .artisan-card-actions {
        flex-wrap: wrap;
    }
}

/* Word Count */
#word-count {
    font-weight: bold;
    color: var(--as-primary);
}

/* Business Hours / Horaires d'ouverture */
.artisan-businesshours {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.artisan-businesshours-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: var(--as-light);
    border-radius: var(--as-radius);
}

.artisan-businesshours-day {
    min-width: 100px;
}

.artisan-businesshours-day strong {
    color: var(--as-primary);
}

.artisan-businesshours-times {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.artisan-businesshours-closed {
    min-width: 80px;
}

.artisan-businesshours-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.artisan-businesshours-inputs input[type="time"] {
    width: 130px;
    padding: 8px 12px;
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius);
    font-size: 14px;
}

.artisan-businesshours-inputs span {
    color: var(--as-gray);
}

@media (max-width: 768px) {
    .artisan-businesshours-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .artisan-businesshours-times {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
    
    .artisan-businesshours-inputs {
        width: 100%;
    }
    
    .artisan-businesshours-inputs input[type="time"] {
        flex: 1;
    }
}
