/**
 * SkiMounting Module - Front CSS
 * Version: 1.3.0 - Design amélioré
 */

/* ========================================
   BOUTON FICHE PRODUIT
   ======================================== */

.skm-edit-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #255ba6;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.skm-edit-btn:hover {
    background: #ff7234;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.skm-edit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.skm-edit-btn i {
    margin-right: 8px;
    vertical-align: middle;
    font-size: 18px;
}

/* ========================================
   MODAL - OVERLAY ET CONTENEUR
   ======================================== */

.skm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.skm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

.skm-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* Header du modal - DÉGRADÉ BLEU */
.skm-modal-header {
    background: linear-gradient(135deg, #255ba6 0%, #1a4580 100%);
    padding: 20px 25px;
    position: relative;
    border-bottom: 3px solid #ff7234;
}

.skm-modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.skm-modal-header h3 i {
    font-size: 26px;
}

/* Croix de fermeture dans le header UNIQUEMENT */
.skm-modal-header > .skm-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 36px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1;
    padding: 0 !important;
    margin: 0 !important;
    text-indent: 0 !important;
    overflow: visible !important;
    font-family: Arial, sans-serif !important;
    min-width: 40px !important;
    max-width: 40px !important;
}

.skm-modal-header > .skm-modal-close::before,
.skm-modal-header > .skm-modal-close::after {
    content: none !important;
    display: none !important;
}

.skm-modal-header > .skm-modal-close:hover {
    color: #ffffff !important;
    transform: scale(1.15);
    background: transparent !important;
}

/* Corps du modal */
.skm-modal-body {
    padding: 30px 25px;
    overflow-y: auto;
    max-height: calc(90vh - 180px);
}

/* Footer du modal */
.skm-modal-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* ========================================
   QUESTION PRINCIPALE
   ======================================== */

.skm-question {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #255ba6;
}

.skm-question-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
    color: #333333;
    margin-bottom: 15px;
}

.skm-question-label i {
    color: #255ba6;
    font-size: 22px;
}

/* ========================================
   GROUPES DE FORMULAIRE
   ======================================== */

.skm-form-group {
    margin-bottom: 25px;
}

.skm-field-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #333333;
    margin-bottom: 10px;
}

.skm-field-label i {
    color: #255ba6;
    font-size: 20px;
}

.skm-field-label .required {
    color: #dc3545;
    margin-left: 3px;
}

/* ========================================
   RADIO BUTTONS
   ======================================== */

.skm-radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.skm-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.skm-radio:hover {
    border-color: #255ba6;
    background: #f0f9fb;
}

.skm-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #255ba6;
}

.skm-radio input[type="radio"]:checked + span {
    font-weight: 600;
    color: #255ba6;
}

.skm-radio span {
    font-size: 14px;
    color: #333333;
}

/* ========================================
   CHAMPS DE FORMULAIRE
   ======================================== */

.skm-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #333333;
    transition: all 0.3s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.skm-form-control:focus {
    outline: none;
    border-color: #255ba6;
    box-shadow: 0 0 0 3px rgba(47, 181, 210, 0.1);
}

.skm-form-control:hover {
    border-color: #255ba6;
}

select.skm-form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

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

/* ========================================
   CHECKBOX PERSONNALISÉE
   ======================================== */

.skm-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.skm-checkbox-wrapper:hover {
    background: #e8f4f8;
    border-color: #255ba6;
}

.skm-checkbox-wrapper input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
    cursor: pointer;
    accent-color: #255ba6;
    margin-top: 2px;
}

.skm-checkbox-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.skm-checkbox-label strong {
    color: #333333;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skm-checkbox-label strong i {
    color: #255ba6;
    font-size: 18px;
}

.skm-checkbox-label small {
    color: #666666;
    font-size: 13px;
    line-height: 1.4;
}

/* ========================================
   CHAMP POINTURE
   ======================================== */

.skm-shoe-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skm-shoe-input input {
    margin-bottom: 0;
}

.skm-shoe-units {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.skm-unit-btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 15px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #666666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skm-unit-btn:hover {
    border-color: #255ba6;
    background: #f0f9fb;
}

.skm-unit-btn.active {
    background: #255ba6;
    border-color: #255ba6;
    color: #ffffff;
}

/* ========================================
   BOUTONS
   ======================================== */

.skm-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.skm-btn i {
    font-size: 18px;
}

.skm-modal-footer .skm-btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.skm-modal-footer .skm-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.skm-btn-primary {
    background: #255ba6;
    color: #ffffff;
}

.skm-btn-primary:hover {
    background: #255ba6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(47, 181, 210, 0.3);
}

.skm-btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   MESSAGES D'ERREUR
   ======================================== */

.skm-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skm-error::before {
    content: "⚠";
    font-size: 18px;
}

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

@media (max-width: 768px) {
    .skm-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .skm-modal-header {
        padding: 15px 20px;
    }
    
    .skm-modal-header h3 {
        font-size: 18px;
    }
    
    .skm-modal-body {
        padding: 20px 15px;
    }
    
    .skm-modal-footer {
        padding: 15px;
        flex-direction: column;
    }
    
    .skm-btn {
        width: 100%;
        justify-content: center;
    }
    
    .skm-radio-group {
        flex-direction: column;
    }
    
    .skm-radio {
        width: 100%;
    }

    .skm-shoe-units {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .skm-modal-header h3 {
        font-size: 16px;
    }
    
    .skm-field-label {
        font-size: 14px;
    }
    
    .skm-edit-btn {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   UTILITAIRES
   ======================================== */

body.skm-modal-open {
    overflow: hidden;
}

.skm-text-muted {
    color: #6c757d;
    font-size: 13px;
}

.skm-text-danger {
    color: #dc3545;
}

.skm-text-success {
    color: #28a745;
}