/* CHU Appointment Form - Modern Redesign
   CHU Agadir Brand Colors
   ================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Exo:wght@400;600;700&family=Roboto:wght@400;500&display=swap');

/* CSS Variables - CHU Brand Palette */
:root {
    --chu-primary: #3B8E92;
    /* Agadir Teal - Primary */
    --chu-primary-dark: #2d7275;
    --chu-primary-light: rgba(59, 142, 146, 0.1);
    --chu-accent: #E09633;
    /* Souss Gold - Accent/Warning */
    --chu-accent-light: rgba(224, 150, 51, 0.15);
    --chu-bg: #F8FAFC;
    /* Clinical White - Background */
    --chu-text-dark: #1E293B;
    /* Slate Dark - Text */
    --chu-text-muted: #64748b;
    --chu-border: #e2e8f0;
    --chu-success: #22c55e;
    --chu-error: #ef4444;
    --chu-shadow: 0 4px 20px rgba(30, 41, 59, 0.08);
    --chu-shadow-hover: 0 8px 30px rgba(30, 41, 59, 0.12);
    --chu-radius: 12px;
    --chu-transition: all 0.3s ease;
}

/* ================================================== 
   HEADER PRENDRE RDV BUTTON
   ================================================== */
.chu-rdv-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3B8E92 0%, #2d7275 100%);
    color: white !important;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: 'Exo', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 20px;
    box-shadow: 0 4px 15px rgba(59, 142, 146, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chu-rdv-header-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.chu-rdv-header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 142, 146, 0.5);
    background: linear-gradient(135deg, #E09633 0%, #c47f28 100%);
}

.chu-rdv-header-btn:hover::before {
    left: 100%;
}

.chu-rdv-icon {
    font-size: 16px;
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.chu-rdv-text {
    position: relative;
}

/* Responsive - Adjust on smaller screens */
@media (max-width: 991px) {
    .chu-rdv-header-btn {
        padding: 10px 15px;
        margin-left: 10px;
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .chu-rdv-header-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 9999;
        padding: 15px 20px;
        border-radius: 50px;
        box-shadow: 0 4px 20px rgba(59, 142, 146, 0.5);
    }
}

/* Main Container */
.chu-appointment-wrapper {
    font-family: 'Roboto', sans-serif;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Override Elementor parent container padding */
.elementor-widget-container:has(.chu-appointment-wrapper),
.elementor-element:has(.chu-appointment-wrapper),
.elementor-section:has(.chu-appointment-wrapper),
.elementor-container:has(.chu-appointment-wrapper),
.elementor-column:has(.chu-appointment-wrapper),
.elementor-widget:has(.chu-appointment-wrapper) {
    padding: 0 !important;
    margin: 0 !important;
}

/* Fallback for browsers without :has() support */
.chu-appointment-wrapper-section {
    padding: 0 !important;
    margin: 0 !important;
}

/* Progress Stepper */
.chu-progress-container {
    margin-bottom: 25px;
    padding: 0 15px;
}

.chu-progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    position: relative;
}

.chu-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 200px;
}

.chu-step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--chu-bg);
    border: 3px solid var(--chu-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Exo', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--chu-text-muted);
    transition: var(--chu-transition);
    position: relative;
    z-index: 2;
}

.chu-step.active .chu-step-number {
    background: var(--chu-primary);
    border-color: var(--chu-primary);
    color: white;
    box-shadow: 0 0 20px rgba(59, 142, 146, 0.4);
    animation: pulse 2s infinite;
}

.chu-step.completed .chu-step-number {
    background: var(--chu-primary);
    border-color: var(--chu-primary);
    color: white;
}

.chu-step.completed .chu-step-number::after {
    content: '✓';
    font-size: 20px;
}

.chu-step.completed .chu-step-number span {
    display: none;
}

.chu-step-label {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--chu-text-muted);
    text-align: center;
    transition: var(--chu-transition);
}

.chu-step.active .chu-step-label,
.chu-step.completed .chu-step-label {
    color: var(--chu-primary);
    font-weight: 600;
}

/* Progress Line */
.chu-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 25px;
    left: calc(50% + 30px);
    width: calc(100% - 60px);
    height: 3px;
    background: var(--chu-border);
    z-index: 1;
}

.chu-step.completed:not(:last-child)::after {
    background: var(--chu-primary);
}

/* Form Card - Full Width */
.chu-form-card {
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    transition: var(--chu-transition);
    width: 100%;
    max-width: 100%;
}

/* Step Panels */
.chu-step-panel {
    display: none;
    padding: 40px;
    animation: fadeSlideIn 0.4s ease;
}

.chu-step-panel.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Headers */
.chu-section {
    margin-bottom: 30px;
}

.chu-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--chu-primary-light);
}

.chu-section-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--chu-primary), var(--chu-primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.chu-section-icon svg {
    fill: none;
    /* User Request: Fill needs to be empty */
    stroke: currentColor;
    stroke-width: 2;
}

.chu-section-title {
    font-family: 'Exo', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--chu-text-dark);
    margin: 0;
}

/* Form Grid */
.chu-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chu-form-grid.single-column {
    grid-template-columns: 1fr;
}

@media (max-width: 600px) {
    .chu-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Groups */
.chu-form-group {
    position: relative;
}

.chu-form-group.full-width {
    grid-column: 1 / -1;
}

.chu-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--chu-text-dark);
    margin-bottom: 8px;
}

.chu-label .required {
    color: var(--chu-error);
    margin-left: 2px;
}

/* Input Styles */
.chu-input,
.chu-select,
.flatpickr-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    border: 2px solid var(--chu-border);
    border-radius: 8px;
    background: white !important;
    color: var(--chu-text-dark);
    transition: var(--chu-transition);
    box-sizing: border-box;
}

.chu-input:focus,
.chu-select:focus {
    outline: none;
    border-color: var(--chu-primary);
    box-shadow: 0 0 0 4px var(--chu-primary-light);
}

.chu-input::placeholder {
    color: #999;
}

.chu-input.error,
.chu-select.error {
    border-color: var(--chu-error);
}

.chu-error-message {
    display: none;
    font-size: 12px;
    color: var(--chu-error);
    margin-top: 6px;
}

.chu-form-group.has-error .chu-error-message {
    display: block;
}

/* Input Hints */
.chu-input-hint {
    display: block;
    font-size: 11px;
    color: var(--chu-text-muted);
    margin-top: 4px;
    font-style: italic;
}

.chu-form-group.has-error .chu-input-hint {
    display: none;
}

/* Valid input state */
.chu-input.valid,
.chu-select.valid {
    border-color: var(--chu-success);
}

.chu-input.valid:focus,
.chu-select.valid:focus {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

/* Input validation icon indicators */
.chu-form-group.has-success .chu-input,
.chu-form-group.has-success .chu-select {
    border-color: var(--chu-success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2322c55e' d='M13.5 2L6 9.5 2.5 6 1 7.5l5 5 9-9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.chu-form-group.has-error .chu-input,
.chu-form-group.has-error .chu-select {
    border-color: var(--chu-error);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23ef4444' d='M8 0a8 8 0 100 16A8 8 0 008 0zm1 12H7v-2h2v2zm0-4H7V4h2v4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Native Select Styling */
.chu-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

.chu-select:disabled {
    background-color: var(--chu-bg);
    color: var(--chu-text-muted);
    cursor: not-allowed;
}

.chu-select option {
    padding: 10px;
    background: white;
    color: var(--chu-text-dark);
}

.chu-select option:checked {
    background: var(--chu-primary-light);
}

/* File Upload */
.chu-file-upload {
    position: relative;
}

.chu-file-dropzone {
    border: 2px dashed var(--chu-border);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--chu-transition);
    background: var(--chu-bg);
}

.chu-file-dropzone:hover,
.chu-file-dropzone.dragover {
    border-color: var(--chu-primary);
    background: var(--chu-primary-light);
}

.chu-file-dropzone input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.chu-file-icon {
    font-size: 40px;
    color: var(--chu-primary);
    margin-bottom: 10px;
}

.chu-file-icon svg {
    fill: none;
    stroke: currentColor;
}

.chu-file-text {
    font-size: 14px;
    color: var(--chu-text-muted);
}

.chu-file-text strong {
    color: var(--chu-primary);
}

.chu-file-preview {
    display: none;
    margin-top: 15px;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--chu-border);
    align-items: center;
    gap: 10px;
}

.chu-file-preview.show {
    display: flex;
}

.chu-file-preview-icon {
    color: var(--chu-primary);
    font-size: 24px;
}

.chu-file-preview-name {
    flex: 1;
    font-size: 14px;
    color: var(--chu-text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chu-file-remove {
    background: none;
    border: none;
    color: var(--chu-error);
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: var(--chu-transition);
}

.chu-file-remove:hover {
    transform: scale(1.2);
}

/* Buttons */
.chu-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--chu-border);
}

.chu-btn {
    flex: 1;
    padding: 16px 30px;
    font-family: 'Exo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--chu-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chu-btn-primary {
    background: linear-gradient(135deg, var(--chu-primary), var(--chu-primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 142, 146, 0.4);
}

.chu-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 142, 146, 0.5);
}

.chu-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chu-btn-secondary {
    background: white;
    color: var(--chu-text-dark);
    border: 2px solid var(--chu-border);
}

.chu-btn-secondary:hover {
    border-color: var(--chu-primary);
    color: var(--chu-primary);
}


/* Confirmation Panel - Redesigned */
.chu-review-card {
    background: white;
    border: 1px solid var(--chu-border);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--chu-shadow);
    transition: var(--chu-transition);
}

.chu-review-card:hover {
    box-shadow: var(--chu-shadow-hover);
    transform: translateY(-2px);
}

.chu-review-header {
    background: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid var(--chu-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chu-review-icon {
    font-size: 20px;
}

.chu-review-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--chu-text-dark);
    flex: 1;
}

.chu-edit-link {
    background: none;
    border: none;
    color: var(--chu-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: var(--chu-transition);
}

.chu-edit-link:hover {
    background: var(--chu-primary-light);
}

.chu-review-body {
    padding: 20px;
}

.chu-review-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.chu-review-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.chu-review-label {
    color: var(--chu-text-muted);
    font-size: 14px;
    font-weight: 500;
}

.chu-review-value {
    color: var(--chu-text-dark);
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    max-width: 60%;
}


/* Document Preview Cards (Confirmation) */
.chu-docs-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
}

.chu-doc-card {
    background: white;
    border: 1px solid var(--chu-border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--chu-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chu-doc-card:hover {
    box-shadow: var(--chu-shadow-hover);
    transform: translateY(-2px);
}

.chu-doc-card-preview {
    height: 400px;
    background-color: #f1f5f9;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--chu-border);
    overflow: hidden;
    position: relative;
}

.chu-doc-card-preview.is-file {
    background-color: #e2e8f0;
}

.chu-doc-card-preview.is-empty {
    color: var(--chu-text-muted);
    font-size: 13px;
    font-style: italic;
    height: 150px;
    /* Smaller height if empty */
}

.chu-doc-icon-large {
    font-size: 60px;
    opacity: 0.5;
}

.chu-doc-card-info {
    padding: 15px;
    background: white;
    border-top: 1px solid var(--chu-border);
}

.chu-doc-card-info strong {
    display: block;
    font-size: 13px;
    color: var(--chu-text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 600;
}

.chu-doc-card-info span {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--chu-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading Panel */
.chu-loading-panel {
    text-align: center;
    padding: 60px 40px;
}

.chu-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid var(--chu-primary-light);
    border-top-color: var(--chu-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

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

.chu-loading-text {
    font-size: 18px;
    color: var(--chu-text-dark);
    font-weight: 500;
}

.chu-loading-subtext {
    font-size: 14px;
    color: var(--chu-text-muted);
    margin-top: 10px;
}

/* Success Panel */
.chu-success-panel {
    text-align: center;
    padding: 50px 40px;
}

.chu-success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--chu-success), #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.chu-success-icon svg {
    width: 50px;
    height: 50px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    /* Ensure empty */
}

.chu-success-title {
    font-family: 'Exo', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--chu-text-dark);
    margin-bottom: 15px;
}

.chu-success-message {
    font-size: 16px;
    color: var(--chu-text-muted);
    margin-bottom: 35px;
    line-height: 1.6;
}

/* Tracking Code Box */
.chu-tracking-box {
    background: linear-gradient(135deg, var(--chu-primary), var(--chu-primary-dark));
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.chu-tracking-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.chu-tracking-code {
    font-family: 'Exo', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: white;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.chu-copy-btn {
    background: white;
    color: var(--chu-primary);
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--chu-transition);
}

.chu-copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.chu-copy-btn.copied {
    background: var(--chu-success);
    color: white;
}

/* Warning Alert - Souss Gold */
.chu-warning-alert {
    background: var(--chu-accent-light);
    border: 2px solid var(--chu-accent);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: row;
    /* Ensure row layout */
    align-items: center;
    /* Center vertically */
    gap: 20px;
    text-align: left;
    margin-top: 30px;
}

/* Status Result Icons */
.chu-status-info-icon svg {
    fill: none;
    stroke: currentColor;
}

.chu-warning-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    /* Ensure empty fill */
    stroke: currentColor;
}

.chu-warning-content {
    flex: 1;
}

.chu-warning-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #b47522;
    /* Darker gold for text */
    font-weight: 700;
}

.chu-warning-content p {
    margin: 0;
    font-size: 14px;
    color: #8a5814;
    line-height: 1.4;
}

.chu-warning-content h4 {
    font-family: 'Exo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #92610f;
    margin: 0 0 8px;
}

.chu-warning-content p {
    font-size: 14px;
    color: #92610f;
    margin: 0;
    line-height: 1.5;
}

/* Pulse Animation - Agadir Teal */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 142, 146, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(59, 142, 146, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 142, 146, 0);
    }
}

/* Responsive - Tablets */
@media (max-width: 992px) {
    .chu-step-panel {
        padding: 30px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .chu-step-panel {
        padding: 20px 15px;
    }
}

/* ========================================
   SVG ICONS STYLING
   ======================================== */
.chu-section-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.chu-warning-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--chu-accent);
}

.chu-file-icon svg {
    stroke: var(--chu-primary);
}

.chu-file-preview-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--chu-primary);
}

/* ========================================
   ENHANCED CHECKBOX "IS MINOR"
   ======================================== */
.chu-checkbox-container {
    display: flex;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border: 2px solid var(--chu-border);
    border-radius: var(--chu-radius);
    cursor: pointer;
    transition: var(--chu-transition);
    user-select: none;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.chu-checkbox-container:hover {
    border-color: var(--chu-primary);
    background: var(--chu-primary-light);
}

/* Hide default checkbox */
.chu-checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Checkbox/Toggle Design */
.chu-checkbox-container::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid var(--chu-text-muted);
    border-radius: 6px;
    margin-right: 15px;
    transition: var(--chu-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: white;
}

/* Checked State */
.chu-checkbox-container:has(input:checked) {
    border-color: var(--chu-primary);
    background: rgba(59, 142, 146, 0.05);
    box-shadow: 0 4px 15px rgba(59, 142, 146, 0.1);
}

.chu-checkbox-container:has(input:checked)::before {
    background-color: var(--chu-primary);
    border-color: var(--chu-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Fallback for older browsers if :has is not supported */
.chu-checkbox-container input:checked+.chu-checkbox-label {
    color: var(--chu-primary);
    font-weight: 600;
}

.chu-checkbox-label {
    font-family: 'Exo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--chu-text-dark);
    display: flex;
    flex-direction: column;
}

.chu-checkbox-label::after {
    content: 'Cochez cette case si le patient a moins de 18 ans';
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    color: var(--chu-text-muted);
    font-weight: 400;
    margin-top: 4px;
}

.chu-step-label {
    font-size: 11px;
}

.chu-step-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.chu-section-header {
    flex-wrap: wrap;
}

.chu-section-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
}

.chu-section-title {
    font-size: 17px;
}

.chu-tracking-code {
    font-size: 22px;
    letter-spacing: 2px;
}

.chu-btn-group {
    flex-direction: column;
}

.chu-btn {
    padding: 14px 20px;
    font-size: 14px;
}

.chu-confirm-grid {
    grid-template-columns: 1fr;
}

.chu-success-title {
    font-size: 22px;
}

.chu-success-icon {
    width: 80px;
    height: 80px;
}

.chu-warning-alert {
    flex-direction: column;
    text-align: center;
}


/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .chu-progress-container {
        margin-bottom: 15px;
    }

    .chu-step-panel {
        padding: 15px 10px;
    }

    .chu-step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }


    .chu-step-label {
        font-size: 10px;
    }

    .chu-step:not(:last-child)::after {
        top: 17px;
        left: calc(50% + 22px);
        width: calc(100% - 44px);
    }

    .chu-section {
        margin-bottom: 20px;
    }

    .chu-section-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .chu-form-grid {
        gap: 12px;
    }

    .chu-input,
    .chu-select {
        padding: 12px;
        font-size: 14px;
    }

    .chu-file-dropzone {
        padding: 20px 15px;
    }

    .chu-file-icon {
        font-size: 30px;
    }

    .chu-tracking-box {
        padding: 20px 15px;
    }

    .chu-tracking-code {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .chu-copy-btn {
        padding: 8px 20px;
        font-size: 13px;
    }

    .chu-loading-panel,
    .chu-success-panel {
        padding: 30px 15px;
    }

    .chu-spinner {
        width: 60px;
        height: 60px;
    }

    /* Native select responsive adjustments */
    .chu-select {
        background-position: right 12px center;
        padding-right: 35px;
    }
}

/* ========================================
   HERO TRACKING SECTION - TOP OF PAGE
   ======================================== */
.chu-hero-tracker {
    background: linear-gradient(135deg, #f0fdfa 0%, #e0f7fa 50%, #f0fdf4 100%);
    border: 2px solid var(--chu-primary);
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(59, 142, 146, 0.15);
    position: relative;
    overflow: hidden;
}

.chu-hero-tracker::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 142, 146, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.chu-hero-tracker-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.chu-hero-icon-wrap {
    flex-shrink: 0;
}

.chu-hero-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--chu-primary), var(--chu-primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chu-hero-icon svg {
    stroke: white;
}

.chu-hero-icon.pulse-ring::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: 2px solid var(--chu-primary);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.chu-hero-text h3 {
    font-family: 'Exo', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--chu-text-dark);
    margin: 0 0 8px 0;
}

.chu-hero-text p {
    font-size: 14px;
    color: var(--chu-text-muted);
    margin: 0;
    line-height: 1.5;
}

.chu-hero-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--chu-accent), #c47f28);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: 'Exo', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(224, 150, 51, 0.4);
    flex-shrink: 0;
}

.chu-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(224, 150, 51, 0.5);
}

.chu-hero-btn svg {
    stroke: white;
}

/* ========================================
   TRACKER MODAL
   ======================================== */
.chu-tracker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(5px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.chu-tracker-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.chu-tracker-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 550px;
    width: 100%;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chu-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--chu-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.chu-modal-close:hover {
    background: var(--chu-error);
}

.chu-modal-close:hover svg {
    stroke: white;
}

.chu-modal-close svg {
    stroke: var(--chu-text-muted);
}

.chu-modal-header {
    background: #f8fafc !important;
    padding: 35px 30px 25px;
    text-align: center;
    color: var(--chu-text-dark) !important;
    position: relative;
    border-bottom: 4px solid var(--chu-border);
}

.chu-modal-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.chu-modal-icon svg {
    stroke: white;
}

.chu-modal-header h2 {
    font-family: 'Exo', sans-serif;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--chu-text-dark) !important;
}

.chu-modal-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.chu-tracker-form-wrap {
    padding: 25px 30px;
    /* Reduced padding */
    background: var(--chu-bg);
}

.chu-tracking-input-group {
    display: flex;
    gap: 12px;
}

.chu-track-input {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Exo', sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
}

.chu-tracking-input-group .chu-input {
    flex: 1;
}

.chu-tracking-input-group .chu-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
}

.chu-tracking-input-group .chu-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

/* Status Result */
.chu-status-result {
    padding: 0 30px 30px;
}

.chu-status-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 40px;
    color: var(--chu-text-muted);
}

.chu-spinner-small {
    width: 30px;
    height: 30px;
    border: 3px solid var(--chu-primary-light);
    border-top-color: var(--chu-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Status Info Box */
.chu-status-info-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 25px;
    animation: fadeSlideIn 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.chu-status-info-box.status-PENDING {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border: 2px solid #f59e0b;
}

.chu-status-info-box.status-APPROVED,
.chu-status-info-box.status-VALIDATED {
    background: linear-gradient(135deg, #d1fae5 0%, #dcfce7 100%);
    border: 2px solid var(--chu-success);
}

.chu-status-info-box.status-REFUSED,
.chu-status-info-box.status-REJECTED {
    background: #fff1f2 !important;
    border: 2px solid #e11d48 !important;
    color: #e11d48 !important;
    /* Force red text/icon color */
}

.chu-status-info-box.status-ARCHIVED,
.chu-status-info-box.status-ESCALATED {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #f97316;
}

.chu-status-info-box.status-COMPLETED {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #22c55e;
}

.chu-status-info-box.status-CANCELLED {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #6b7280;
}

.chu-status-info-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chu-status-info-box.status-PENDING .chu-status-info-icon {
    background: #f59e0b;
}

.chu-status-info-box.status-APPROVED .chu-status-info-icon,
.chu-status-info-box.status-VALIDATED .chu-status-info-icon {
    background: var(--chu-success);
}

.chu-status-info-box.status-REFUSED .chu-status-info-icon,
.chu-status-info-box.status-REJECTED .chu-status-info-icon {
    background: #e11d48;
}

.chu-status-info-box.status-ARCHIVED .chu-status-info-icon,
.chu-status-info-box.status-ESCALATED .chu-status-info-icon {
    background: #f97316;
}

.chu-status-info-box.status-COMPLETED .chu-status-info-icon {
    background: var(--chu-primary);
}

.chu-status-info-box.status-CANCELLED .chu-status-info-icon {
    background: #6b7280;
}

.chu-status-info-icon svg {
    stroke: white;
    fill: none;
    /* Ensure empty */
}

.chu-status-info-text {
    flex: 1;
}

.chu-status-badge {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    font-family: 'Exo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    color: #ffffff !important;
    background: #64748b !important;
    /* Fixed solid grey fallback */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.chu-status-badge.status-PENDING {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.chu-status-badge.status-APPROVED,
.chu-status-badge.status-VALIDATED {
    background: linear-gradient(135deg, var(--chu-success), #16a34a);
}

.chu-status-badge.status-REFUSED,
.chu-status-badge.status-REJECTED {
    background: linear-gradient(135deg, #e11d48, #be123c) !important;
    color: #ffffff !important;
}

.chu-status-badge.status-ARCHIVED,
.chu-status-badge.status-ESCALATED {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.chu-status-badge.status-COMPLETED {
    background: linear-gradient(135deg, var(--chu-primary), var(--chu-primary-dark));
}

.chu-status-badge.status-CANCELLED {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.chu-status-message {
    font-size: 15px;
    color: var(--chu-text-dark);
    margin: 0;
    line-height: 1.6;
    text-align: center;
}

/* Status Details */
.chu-status-details {
    background: white;
    border-radius: var(--chu-radius);
    border: 1px solid var(--chu-border);
    overflow: hidden;
}

.chu-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--chu-border);
    gap: 15px;
}

.chu-status-row:last-child {
    border-bottom: none;
}

.chu-status-label {
    font-size: 14px;
    color: var(--chu-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.chu-status-value {
    font-size: 14px;
    color: var(--chu-text-dark);
    font-weight: 600;
    text-align: right;
}

/* Tips Box */
.chu-status-tips {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #3b82f6;
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 20px;
}

.chu-tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.chu-tip-text {
    font-size: 13px;
    color: #1e40af;
    line-height: 1.6;
}

/* Error State */
.chu-status-error {
    text-align: center;
    padding: 40px 30px;
    animation: fadeSlideIn 0.4s ease;
}

.chu-error-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.chu-error-icon svg {
    stroke: var(--chu-error);
}

.chu-status-error h4 {
    font-family: 'Exo', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--chu-error);
    margin: 0 0 10px 0;
}

.chu-status-error p {
    font-size: 14px;
    color: var(--chu-text-muted);
    margin: 0;
}

/* ========================================
   RESPONSIVE - HERO & MODAL
   ======================================== */
@media (max-width: 768px) {
    .chu-hero-tracker {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .chu-hero-tracker-left {
        flex-direction: column;
    }

    .chu-hero-icon {
        width: 50px;
        height: 50px;
    }

    .chu-hero-text h3 {
        font-size: 16px;
    }

    .chu-hero-btn {
        width: 100%;
        justify-content: center;
    }

    .chu-tracker-modal-content {
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
    }

    .chu-modal-header {
        padding: 30px 20px 25px;
    }

    .chu-modal-header h2 {
        font-size: 20px;
    }

    .chu-tracker-form-wrap {
        padding: 20px;
    }

    .chu-tracking-input-group {
        flex-direction: column;
    }

    .chu-tracking-input-group .chu-btn {
        width: 100%;
        justify-content: center;
    }

    .chu-status-result {
        padding: 0 20px 20px;
    }

    .chu-status-info-box {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .chu-status-row {
        flex-direction: column;
        gap: 5px;
        text-align: left;
    }

    .chu-status-label {
        flex: none;
    }
}