* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 15px;
}

h1 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 5px;
}

.subtitle {
    color: #888;
    font-size: 0.95em;
}

.form-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.form-group:last-of-type {
    border-bottom: none;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.required {
    color: #e74c3c;
}

input[type="text"],
input[type="email"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 2px solid #ddd;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
    background: transparent;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus {
    outline: none;
    border-bottom-color: #667eea;
}

input::placeholder {
    color: #bbb;
    font-size: 0.9em;
}

/* Ligne code postal + ville */
.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-top: 15px;
}

.form-field label {
    font-size: 0.85em;
    color: #555;
    margin-bottom: 5px;
}

/* Radio buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.radio-option:hover {
    background-color: #f8f9ff;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    flex-shrink: 0;
}

.radio-option span {
    color: #444;
    font-size: 0.95em;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.success-box {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
}

.success-box h3 {
    color: #28a745;
    margin-bottom: 15px;
}

.success-box p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

/* Bloc tarification */
.tarif-box {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f1ff 100%);
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 30px;
    margin-top: 25px;
}

.tarif-title {
    text-align: center;
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 20px;
}

.tarif-table {
    width: 100%;
    border-collapse: collapse;
}

.tarif-table th {
    background: #667eea;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-size: 0.9em;
}

.tarif-table th:first-child {
    border-radius: 5px 0 0 0;
}

.tarif-table th:last-child {
    border-radius: 0 5px 0 0;
}

.tarif-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95em;
}

.tarif-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.tarif-table .prix-promo {
    color: #28a745;
    font-weight: 700;
    font-size: 1.1em;
}

.tarif-table .prix-barre {
    color: #e74c3c;
    text-decoration: line-through;
    font-size: 1em;
    font-weight: 500;
}

.tarif-total td {
    border-bottom: none;
    padding-top: 15px;
    font-size: 1.05em;
}

.tarif-total td:last-child {
    color: #667eea;
    font-weight: 700;
    font-size: 1.15em;
}

.tarif-note {
    margin-top: 15px;
    font-size: 0.8em;
    color: #888;
    text-align: center;
    font-style: italic;
}

.tarif-demande {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #d0d0e0;
}

.tarif-contact {
    text-align: center;
    padding: 20px;
    color: #667eea;
    font-weight: 600;
    font-size: 1.1em;
}

/* Section Yousign signature électronique */
.yousign-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f5 100%);
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
}

.yousign-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.yousign-logo {
    width: 32px;
    height: 32px;
}

.yousign-header h3 {
    color: #667eea;
    margin: 0;
    font-size: 1.1em;
}

.yousign-info {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.yousign-section .form-group {
    margin-bottom: 15px;
    padding-bottom: 0;
    border-bottom: none;
}

.yousign-section input[type="text"] {
    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 12px;
    border-bottom: 2px solid #ddd;
}

.contact-choice {
    margin-bottom: 20px;
}

.contact-choice-label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

.contact-options {
    display: flex;
    gap: 30px;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.contact-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.contact-field {
    max-width: 400px;
}

.contact-field input[type="email"],
.contact-field input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.contact-field input[type="email"]:focus,
.contact-field input[type="tel"]:focus {
    outline: none;
    border-color: #667eea;
}

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #888;
}

.signature-info {
    font-size: 1em;
    color: #155724;
    margin-bottom: 15px;
    line-height: 1.6;
}

.signature-note {
    font-size: 0.85em;
    color: #666;
    margin-top: 10px;
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
    font-size: 0.85em;
    color: #666;
}

/* Loading animation */
.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

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

    h1 {
        font-size: 1.5em;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
