/**
 * Styles pour le formulaire de commande front-end
 */

.astro-order-form {
    max-width: 700px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.astro-order-form h2 {
    color: #738B83;
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.astro-order-form .intro-text {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

/* Choix du produit */
.product-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.product-option {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.product-option:hover {
    border-color: #738B83;
    box-shadow: 0 2px 8px rgba(115,139,131,0.2);
}

.product-option input[type="radio"] {
    display: none;
}

.product-option input[type="radio"]:checked + label {
    background: #738B83;
    color: white;
}

.product-option label {
    cursor: pointer;
    display: block;
    padding: 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.product-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    color: #D9BEC9;
    margin: 10px 0;
}

.product-description {
    font-size: 13px;
    color: #666;
}

/* Formulaire */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #738B83;
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E8E8E8;
}

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

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

.form-group label .required {
    color: #d32f2f;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #738B83;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group .description {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Adresse de livraison (cachée par défaut) */
#shipping-address-section {
    display: none;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

#shipping-address-section.show {
    display: block;
}

/* Bouton de soumission */
.submit-section {
    text-align: center;
    margin-top: 30px;
}

.submit-button {
    background: #738B83;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: #5f756e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(115,139,131,0.3);
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.astro-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
}

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

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

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #738B83;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .astro-order-form {
        padding: 25px;
        margin: 20px;
    }
    
    .product-choice {
        grid-template-columns: 1fr;
    }
    
    .product-icon {
        font-size: 36px;
    }
    
    .product-name {
        font-size: 16px;
    }
    
    .product-price {
        font-size: 20px;
    }
}
