@import url('https://fonts.googleapis.com/css2?family=Newsreader:wght@400;600;700&family=Red+Hat+Display:wght@400;500;600;700&display=swap');

:root {
    --cvd3-primary: #667eea;
    --cvd3-secondary: #764ba2;
    --cvd3-background: #f9f9f9;
    --cvd3-text: #333333;
    --cvd3-border: #e0e0e0;
    --cvd3-error: #e74c3c;
    --cvd3-success: #27ae60;
}

.cvd3-formulaire {
    font-family: 'Red Hat Display', Arial, sans-serif;
    background: var(--cvd3-background);
    padding: 40px 20px;
    color: var(--cvd3-text);
    line-height: 1.6;
}

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

/* Barre de progression */
.cvd3-progress-container {
    padding: 20px 30px;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.cvd3-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.cvd3-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cvd3-primary), var(--cvd3-secondary));
    width: 50%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.cvd3-progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Formulaire */
form {
    padding: 30px;
}

.cvd3-form-section {
    display: none;
}

.cvd3-form-section[data-step="0"] {
    display: block;
}

.cvd3-form-section h2 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 28px;
    color: var(--cvd3-primary);
    margin: 0 0 25px 0;
    font-weight: 600;
}

.cvd3-form-section h3 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 22px;
    color: #333;
    margin: 30px 0 20px 0;
}

.cvd3-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

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

.cvd3-form-group input[type="text"],
.cvd3-form-group input[type="email"],
.cvd3-form-group input[type="tel"],
.cvd3-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--cvd3-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Red Hat Display', Arial, sans-serif;
    transition: all 0.3s ease;
}

.cvd3-form-group input:focus,
.cvd3-form-group textarea:focus {
    outline: none;
    border-color: var(--cvd3-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.cvd3-help-text {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

/* Choix des options */
.cvd3-options-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: stretch;
}

@media (min-width: 769px) {
    .cvd3-options-choice {
        grid-template-columns: 1fr 1fr !important;
    }
}

.cvd3-option-card {
    cursor: pointer;
    position: relative;
}

.cvd4-option-card {
    cursor: pointer;
    position: relative;
}

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

.cvd3-option-content {
    border: 3px solid var(--cvd3-border);
    border-radius: 12px;
    padding: 15px 12px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.cvd3-option-card:hover .cvd3-option-content,
.cvd4-option-card:hover .cvd4-option-content {
    border-color: var(--cvd3-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    cursor: pointer;
}

.cvd3-option-card input:checked ~ .cvd3-option-content,
.cvd4-option-card input:checked ~ .cvd4-option-content {
    border-color: var(--cvd3-primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.cvd3-option-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.cvd3-option-image {
    width: 100%;
    max-width: 300px;
    height: 120px;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
}

.cvd4-option-image {
    width: 100%;
    max-width: 300px;
    height: 120px;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
}

.cvd3-option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.cvd3-option-content h3 {
    font-size: 16px;
    margin: 6px 0 4px 0;
    color: #333;
    line-height: 1.3;
    font-weight: 600;
}

.cvd3-option-content p {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.3;
}

/* Upload de fichier */
.cvd3-file-upload {
    position: relative;
}

.cvd3-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cvd3-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    border: 3px dashed var(--cvd3-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.cvd3-file-label:hover {
    border-color: var(--cvd3-primary);
    background: rgba(102, 126, 234, 0.05);
}

.cvd3-file-icon {
    font-size: 32px;
}

.cvd3-file-text {
    font-weight: 500;
    color: #666;
}

.cvd3-file-preview {
    margin-top: 15px;
    text-align: center;
}

.cvd3-file-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Galerie */
.cvd3-galerie, .cvd4-galerie {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
    margin-bottom: 30px;
}

.cvd4-galerie-item {
    cursor: pointer;
    display: block !important;
}

.cvd4-galerie-item input[type="radio"] {
    display: none;
}

.cvd4-galerie-card {
    border: 3px solid var(--cvd3-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    height: 100%;
}

.cvd4-galerie-item:hover .cvd4-galerie-card {
    border-color: var(--cvd3-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.cvd4-galerie-item input:checked + .cvd4-galerie-card {
    border-color: var(--cvd3-primary);
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.cvd4-galerie-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cvd4-galerie-info {
    padding: 15px;
}

.cvd4-galerie-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.cvd4-galerie-prix {
    font-size: 20px;
    font-weight: 700;
    color: var(--cvd3-primary);
    margin: 0;
}

.cvd4-galerie-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: var(--cvd3-primary);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cvd4-galerie-item input:checked ~ .cvd4-galerie-card .cvd4-galerie-check {
    display: flex;
}

.cvd3-galerie-item {
    cursor: pointer;
}

.cvd3-galerie-item input[type="radio"] {
    display: none;
}

.cvd3-galerie-card {
    border: 3px solid var(--cvd3-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.cvd3-galerie-item:hover .cvd3-galerie-card {
    border-color: var(--cvd3-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.cvd3-galerie-item input:checked + .cvd3-galerie-card {
    border-color: var(--cvd3-primary);
    background: rgba(102, 126, 234, 0.05);
}

.cvd3-galerie-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}

.cvd3-galerie-image.cvd3-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.cvd3-galerie-info {
    padding: 15px;
}

.cvd3-galerie-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.cvd3-galerie-prix {
    font-size: 20px;
    font-weight: 700;
    color: var(--cvd3-primary);
    margin: 0;
}

.cvd3-galerie-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: var(--cvd3-primary);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cvd3-galerie-item input:checked + .cvd3-galerie-card .cvd3-galerie-check {
    display: flex;
}

/* Sections conditionnelles */
.cvd3-conditional-section {
    margin-top: 30px;
}

/* Messages d'erreur */
.cvd3-error-message {
    display: none;
    color: var(--cvd3-error);
    font-size: 14px;
    margin-top: 5px;
}

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

.cvd3-form-group input.error,
.cvd3-form-group textarea.error {
    border-color: var(--cvd3-error);
}

/* Boutons */
.cvd3-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Red Hat Display', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cvd3-btn-primary {
    background: linear-gradient(135deg, var(--cvd3-primary), var(--cvd3-secondary));
    color: white;
}

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

.cvd3-btn-secondary {
    background: white;
    color: var(--cvd3-primary);
    border: 2px solid var(--cvd3-primary);
}

.cvd3-btn-secondary:hover {
    background: var(--cvd3-primary);
    color: white;
}

.cvd3-btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--cvd3-primary), var(--cvd3-secondary));
    color: white;
    font-size: 18px;
    padding: 16px;
    margin-top: 20px;
}

.cvd3-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Navigation */
.cvd3-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.cvd3-navigation .cvd3-btn {
    flex: 1;
}

/* Message de succès */
.cvd3-success-message {
    display: none;
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

.cvd3-success-message.show {
    display: block;
}

/* Récapitulatif */
.cvd4-recap-container {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.cvd4-recap-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--cvd3-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cvd4-recap-section:last-child {
    margin-bottom: 0;
}

.cvd4-recap-section h3 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 20px;
    color: var(--cvd3-primary);
    margin: 0 0 15px 0;
    font-weight: 600;
}

.cvd4-recap-section p {
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.cvd4-recap-section p strong {
    color: #666;
    font-weight: 600;
    min-width: 120px;
    display: inline-block;
}

.cvd4-recap-section p span {
    color: #333;
}

.cvd4-recap-image {
    max-width: 300px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

    form {
        padding: 20px;
    }

    .cvd3-form-row {
        grid-template-columns: 1fr;
    }

    .cvd3-options-choice {
        grid-template-columns: 1fr;
    }

    .cvd3-galerie {
        grid-template-columns: 1fr;
    }

    .cvd3-navigation {
        flex-direction: column-reverse;
    }
}
