/* ========================================
   WIZARD STYLES - VERSION NETTOYÉE
   ======================================== */

/* === STYLES GÉNÉRAUX === */

body {
    overflow-x: hidden;
}

input::placeholder {
    color: DarkGrey;
    opacity: 1;
}

input::-ms-input-placeholder {
    color: DarkGrey;
}

input[type="password"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

footer {
    padding: 10px 20px;
    background: #003143;
    color: white;
}

* {
    box-sizing: border-box;
}

/* === WIZARD CONTAINER === */

#wizard-container {
    max-width: 800px;
    margin: 10px auto;
    padding: 0 20px;
    width: 100%;
    overflow-x: hidden;
}

/* === PROGRESS BAR === */

#progress-container {
    margin-bottom: 20px;
}

#progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e4e4e4;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #89ccca 0%, #62a4a2 100%);
    width: 16.67%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

#progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 80px;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.progress-step.active,
.progress-step.completed {
    opacity: 1;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e4e4e4;
    color: #666;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background-color: #89ccca;
    color: white;
}

.step-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: #333;
}


header {
    overflow-x: hidden;
    min-height: auto;
    height: auto;
    padding: 5px 0;
}

header .wrapper {
    max-width: 800px;
    padding: 3px 20px;
    overflow-x: hidden;
}

#entete {
    min-height: auto;
    height: auto;
    padding: 3px 0;
}

#entete > div {
    padding: 0;
	 margin: 0;
}



/* === STEP CONTENT === */

#step-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    min-height: 300px;
    width: 100%;
}

.step-panel[data-step="1"] {
    padding: 30px 40px;
}

.step-panel {
    display: none;
    padding: 40px;
    animation: fadeIn 0.3s ease-in-out;
}

.step-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.step-header h2 {
    margin-bottom: 8px;
    color: #003143;
}

.step-header p {
    color: #666;
    font-size: 16px;
}

.welcome-content {
    text-align: center;
    padding: 10px 0; 
}

/* === FORMS === */

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e4e4e4;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #89ccca;
    box-shadow: 0 0 0 3px rgba(137, 204, 202, 0.2);
}

.form-group input.error {
    border-color: #e74c3c;
}

.form-group input.success {
    border-color: #27ae60;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.form-group.half {
    flex: 1;
    margin-bottom: 0;
}

/* === RADIO BUTTONS === */

.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.radio-label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    font-weight: normal !important;
    margin-bottom: 0 !important;
    padding: 8px 12px !important;
    border: 2px solid #e4e4e4 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    background-color: white !important;
}

.radio-label:hover {
    border-color: #89ccca !important;
    background-color: #f8f9fa !important;
}

.radio-label input[type="radio"] {
    display: none !important;
}

.radio-custom {
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #e4e4e4 !important;
    border-radius: 50% !important;
    margin-right: 8px !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #89ccca !important;
    background-color: #89ccca !important;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '' !important;
    width: 8px !important;
    height: 8px !important;
    background-color: white !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* Civilité - inline */
.civility-radio-group {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 8px;
}

.civility-radio-group .radio-label {
    padding: 8px 16px;
    min-width: auto;
    flex: 0 0 auto;
    width: auto;
}

/* Subscription radio */
.subscription-radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 8px;
}

.subscription-choice {
    display: flex !important;
    align-items: flex-start !important;
    padding: 20px !important;
    border: 2px solid #e4e4e4 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    background-color: white !important;
    font-weight: normal !important;
    margin-bottom: 0 !important;
}

.subscription-choice:hover {
    border-color: #89ccca !important;
    background-color: #f8f9fa !important;
}

.subscription-choice input[type="radio"] {
    display: none !important;
}

.subscription-choice .radio-custom {
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #e4e4e4 !important;
    border-radius: 50% !important;
    margin-right: 12px !important;
    margin-top: 2px !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
}

.subscription-choice input[type="radio"]:checked + .radio-custom {
    border-color: #89ccca !important;
    background-color: #89ccca !important;
}

.subscription-choice input[type="radio"]:checked + .radio-custom::after {
    content: '' !important;
    width: 8px !important;
    height: 8px !important;
    background-color: white !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.subscription-text {
    flex: 1 !important;
}

/* === CHECKBOXES === */

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal !important;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e4e4e4;
    border-radius: 4px;
    margin-right: 8px;
    margin-top: 2px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    border-color: #89ccca;
    background-color: #89ccca;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* === CONDITIONAL SECTIONS === */

.conditional-section {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #89ccca;
}

/* === STABLE FORMS === */

.stable-name-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stable-name-input {
    flex: 1;
}

.owner-fill-container {
    margin-top: 8px;
}

#owner-fill-btn {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#owner-fill-btn:hover {
    background-color: #545b62;
}

.stable-contact-title {
    margin-top: 30px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid #e4e4e4;
}

/* === VALIDATION & ERRORS === */

.required {
    color: #e74c3c;
    font-weight: bold;
}

.field-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 4px;
    display: none;
}

.field-error.show {
    display: block;
}

.validation-status {
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    display: none;
}

.validation-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.validation-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.validation-status.loading {
    background-color: #cce7ff;
    color: #004085;
    border: 1px solid #b3d9ff;
    display: block;
}

/* === HELP TEXT === */

.help-text {
    margin-top: 4px;
}

.help-text small {
    color: #666;
    font-style: italic;
}

.mandatory-note {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
}

.required-star {
    color: #e74c3c;
    font-weight: bold;
}

#no-subscription-help {
    margin: 20px 0;
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

#no-subscription-help .btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 15px auto 0;
    padding: 10px 15px;
    text-align: center;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

/* === NAVIGATION BUTTONS === */

#wizard-navigation {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
}

#btn-previous {
    position: absolute;
    left: 0;
}

#btn-next,
#btn-submit {
    margin-left: auto;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background-color: #89ccca;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #62a4a2;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #545b62;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === SUMMARY === */

#registration-summary {
    background-color: #f8f9fa;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.summary-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e4e4e4;
}

.summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-section h4 {
    color: #003143;
    margin-bottom: 8px;
}

.summary-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    gap: 4px;
}

.summary-field span {
    font-weight: 500;
    color: #666;
    font-size: 14px;
    margin-bottom: 2px;
}

.summary-field strong {
    text-align: left;
    color: #333;
    word-wrap: break-word;
    font-size: 14px;
    padding-left: 0;
    margin-left: 0;
}

/* === CAPTCHA & TERMS === */

.captcha-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.terms-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.terms-text {
    display: inline;
    line-height: 1.5;
}

.terms-text a {
    color: #89ccca;
    text-decoration: underline;
}

.terms-text a:hover {
    text-decoration: none;
    color: #62a4a2;
}

/* === SUCCESS PAGE === */

.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 64px;
    color: #27ae60;
    margin-bottom: 20px;
}

.app-download-btn {
    display: inline-block;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.app-download-btn:hover {
    transform: scale(1.05);
}

.app-download-btn img {
    display: block;
    border-radius: 8px;
}

/* === LOADING OVERLAY === */

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e4e4e4;
    border-top: 4px solid #89ccca;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === MESSAGES === */

#message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    max-width: 400px;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background-color: #cce7ff;
    color: #004085;
    border: 1px solid #b3d9ff;
}

.message-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========================================
   RESPONSIVE MOBILE (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
    header {
        overflow-x: hidden;
		padding: 8px 0;
    }
    
    header .wrapper {
        max-width: 100%;
        padding: 5px 15px;
        overflow-x: hidden;
    }
    
  
    /* Container */
    #wizard-container {
        max-width: 100%;
        margin: 20px auto;
        padding: 0 15px;
    }
    
	#step-content {
        min-height: 200px; 
    }
    
    .step-panel[data-step="1"] {
        padding: 15px 20px;
    }
	
    .welcome-content {
        padding: 5px 0;
    }
	
    .mandatory-note {
        margin-top: 15px;
        padding: 12px;
    }	
    /* Step panels */
    .step-panel {
        padding: 20px;
    }
    
    .step-header h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .step-header p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    /* Progress steps - 2 lignes de 4 */
    #progress-steps {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
    }
    
    .progress-step {
        padding: 8px 4px;
        margin: 0;
        min-width: 0;
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .step-label {
        font-size: 10px;
        line-height: 1.2;
    }
    
    /* Forms */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half {
        width: 100%;
        margin-bottom: 15px;
    }
    
    input, select, textarea {
        font-size: 16px;
        padding: 12px;
    }
    
    /* Radios */
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .civility-radio-group {
        gap: 15px;
        justify-content: flex-start;
    }
    
    .civility-radio-group .radio-label {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .subscription-radio-group .subscription-choice {
        margin-bottom: 12px;
    }
    
    /* Stable forms */
    .stable-name-input {
        margin-bottom: 10px;
    }
    
    #owner-fill-btn {
        width: 100%;
        padding: 10px;
    }
    
    .stable-contact-title {
        margin-top: 25px;
        margin-bottom: 15px;
        padding-top: 15px;
    }
    
    /* Summary */
    .summary-field span {
        min-width: auto;
        font-weight: 600;
    }
    
    .summary-field strong {
        margin-left: 10px;
        font-weight: normal;
    }
    
    /* Navigation */
    #wizard-navigation {
        position: static;
        padding: 15px;
        margin-top: 20px;
        border-top: 1px solid #e9ecef;
        gap: 10px;
    }
    
    #btn-previous {
        position: static;
        width: 40%;
        max-width: 120px;
        padding: 10px 8px;
        font-size: 13px;
    }
    
    #btn-next,
    #btn-submit {
        width: 40%;
        max-width: 120px;
        padding: 10px 8px;
        font-size: 13px;
        margin-left: auto;
    }
    
    /* Help text */
    #no-subscription-help {
        margin: 15px 0;
        padding: 12px;
    }
    
    #no-subscription-help p {
        font-size: 14px;
        line-height: 1.4;
    }
    
    #no-subscription-help .btn {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    /* Validation */
    .validation-status {
        font-size: 13px;
        padding: 8px;
        margin-top: 5px;
    }
    
    .field-error {
        font-size: 12px;
    }
    
    /* Messages */
    .message {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    #message-container {
        left: 15px;
        right: 15px;
        max-width: none;
    }
}