/**
 * Fichier: assets/css/frontend.css
 * Styles pour le frontend
 */

/* Formulaire d'inscription */
.ftm-registration-form {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ftm-registration-form h3 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
    font-size: 24px;
}

.ftm-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ftm-form-group {
    margin-bottom: 20px;
    flex: 1;
}

.ftm-form-group.ftm-half {
    flex: 0 0 calc(50% - 10px);
}

.ftm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.ftm-form-group input,
.ftm-form-group textarea,
.ftm-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.ftm-form-group input:focus,
.ftm-form-group textarea:focus,
.ftm-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.ftm-form-group input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* SIRET avec autocomplétion */
#siret-container {
    position: relative;
}

.siret-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.siret-suggestion {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.siret-suggestion:hover {
    background-color: #f8f9fa;
}

.siret-suggestion:last-child {
    border-bottom: none;
}

/* Checkboxes personnalisées */
.ftm-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ftm-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.ftm-checkbox:hover {
    border-color: #007cba;
    background-color: #f8f9fa;
}

.ftm-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.ftm-checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

/* Boutons */
.ftm-form-actions {
    text-align: center;
    margin-top: 30px;
}

.ftm-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ftm-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.ftm-btn-primary {
    background: #007cba;
}

.ftm-btn-secondary {
    background: #6c757d;
}

/* Messages */
.ftm-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-weight: 500;
}

.ftm-message-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.ftm-message-error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* Accès aux produits */
.ftm-login-required,
.ftm-authorization-required {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 15px 0;
}

.ftm-login-required p,
.ftm-authorization-required p {
    margin-bottom: 15px;
    color: #6c757d;
}

/* Modal */
.ftm-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ftm-modal-content {
    background-color: #fff;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: ftm-modal-slide-in 0.3s ease;
}

@keyframes ftm-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ftm-modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ftm-modal-header h3 {
    margin: 0;
    color: #333;
}

.ftm-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}

.ftm-modal-close:hover {
    color: #000;
}

.ftm-modal-body {
    padding: 20px;
}

.ftm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Badges pour les catégories */
.ftm-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ftm-badge-rad {
    background-color: #dc3545;
    color: #fff;
}

.ftm-badge-trp {
    background-color: #28a745;
    color: #fff;
}

.ftm-badge-trv {
    background-color: #007bff;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .ftm-registration-form {
        margin: 10px;
        padding: 20px;
    }

    .ftm-form-row {
        flex-direction: column;
        gap: 0;
    }

    .ftm-form-group.ftm-half {
        flex: 1;
    }

    .ftm-checkboxes {
        gap: 8px;
    }

    .ftm-checkbox {
        padding: 10px;
    }

    .ftm-modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* Boutons WooCommerce personnalisés */
.ftm-request-auth {
    background-color: #ff9800 !important;
    color: #fff !important;
    border: none !important;
}

.ftm-request-auth:hover {
    background-color: #f57c00 !important;
}

/* Switch Toggle pour le rôle gestionnaire */
.ftm-manager-toggle {
    display: block;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.ftm-toggle-header h4 {
    margin: 0 0 5px 0;
    color: #212529;
}

.ftm-toggle-description {
    color: #6c757d;
    font-size: 14px;
    margin: 0 0 15px 0;
}

.ftm-toggle-switch {
    margin-top: 10px;
}

.ftm-switch-input {
    display: none;
}

.ftm-switch-label {
    display: inline-block;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ftm-switch-label .ftm-switch-inner {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 100px;
    transition: 0.3s;
}

.ftm-switch-label .ftm-switch-switch {
    display: block;
    width: 24px;
    height: 24px;
    margin: 3px;
    background: white;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 100px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.ftm-switch-input:checked + .ftm-switch-label {
    background: #2271b1;
}

.ftm-switch-input:checked + .ftm-switch-label .ftm-switch-switch {
    left: calc(100% - 27px);
}

#manager-comment-section {
    padding: 15px;
    background: white;
    border-radius: 4px;
    border-left: 4px solid #2271b1;
}