/**
 * Styles du formulaire de sponsoring
 */

/* Container principal */
.gmf-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
}

/* Formulaire */
.gmf-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sections */
.gmf-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.gmf-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.gmf-section h3 {
    font-size: 1.5em;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #c41e3a;
}

/* Lignes de formulaire */
.gmf-form-row {
    margin-bottom: 15px;
}

.gmf-form-row-2col {
    display: flex;
    gap: 20px;
}

.gmf-form-row-2col .gmf-form-field {
    flex: 1;
}

/* Champs */
.gmf-form-field {
    display: flex;
    flex-direction: column;
}

.gmf-form-field label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 1em;
}

.gmf-form-field input[type="text"],
.gmf-form-field input[type="email"],
.gmf-form-field input[type="tel"],
.gmf-form-field input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gmf-form-field input:focus {
    border-color: #c41e3a;
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.2);
    outline: none;
}

.gmf-form-field .required {
    color: #dc3232;
}

/* Erreurs de validation */
.gmf-field-error {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.2) !important;
}

.gmf-field-error-msg {
    display: block;
    color: #dc3232;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Tableau des offres */
.gmf-table-responsive {
    overflow-x: auto;
}

.gmf-offers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.gmf-offers-table th,
.gmf-offers-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.gmf-offers-table thead th {
    background: #f7f7f7;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.gmf-offers-table .col-label {
    width: 80px;
}

.gmf-offers-table .col-description {
    width: auto;
}

.gmf-offers-table .col-price,
.gmf-offers-table .col-total {
    width: 140px;
    text-align: right;
    white-space: nowrap;
}

.gmf-offers-table .col-quantity {
    width: 100px;
    text-align: center;
}

.gmf-offer-row:hover {
    background-color: #f9f9f9;
}

/* Input quantité */
.gmf-quantity-input {
    width: 70px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 1em;
}

.gmf-quantity-input:focus {
    border-color: #c41e3a;
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.2);
    outline: none;
}

/* Totaux */
.gmf-row-total {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.gmf-grand-total-row {
    background-color: #fdf2f4;
}

.gmf-grand-total-row td {
    border-top: 2px solid #c41e3a;
    padding: 15px;
}

.gmf-grand-total-label {
    text-align: right;
}

.gmf-grand-total-value {
    text-align: right;
    font-size: 1.1em;
    color: #c41e3a;
    white-space: nowrap;
}

/* RGPD */
.gmf-gdpr-field {
    margin-bottom: 20px;
}

.gmf-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.gmf-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    margin-right: 10px;
    flex-shrink: 0;
}

.gmf-checkbox-text {
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
}

/* Bouton envoyer */
.gmf-submit-container {
    text-align: center;
}

.gmf-submit-button {
    background-color: #c41e3a;
    color: #fff;
    border: none;
    padding: 15px 50px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.gmf-submit-button:hover {
    background-color: #a01830;
}

.gmf-submit-button:active {
    transform: scale(0.98);
}

.gmf-submit-button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.gmf-submit-button.loading {
    position: relative;
    color: transparent;
}

.gmf-submit-button.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: gmf-spin 0.8s linear infinite;
}

@keyframes gmf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.gmf-messages {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    font-size: 0.95em;
}

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

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

/* Message pas d'offres */
.gmf-no-offers {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .gmf-form-container {
        padding: 10px;
    }

    .gmf-form {
        padding: 20px 15px;
    }

    .gmf-form-row-2col {
        flex-direction: column;
        gap: 15px;
    }

    .gmf-offers-table th,
    .gmf-offers-table td {
        padding: 10px 8px;
        font-size: 0.9em;
    }

    .gmf-offers-table .col-description {
        min-width: 150px;
    }

    .gmf-quantity-input {
        width: 60px;
        padding: 6px 8px;
    }

    .gmf-submit-button {
        width: 100%;
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .gmf-section h3 {
        font-size: 1.1em;
    }

    .gmf-offers-table {
        font-size: 0.85em;
    }

    .gmf-offers-table th,
    .gmf-offers-table td {
        padding: 8px 5px;
    }

    .gmf-grand-total-value {
        font-size: 1em;
    }
}
