/* ========================================
   CONFIRMATION DE VISITE - STYLES
   Agence Immo Transac Reunion
   ======================================== */

/* Variables */
:root {
    --primary: #FF1B8D;
    --primary-dark: #d4177a;
    --secondary: #7B2CBF;
    --accent: #00F5FF;
    --gold: #fbbf24;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0F172A;
    --dark-light: #1e293b;
    --text: #374151;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg: #f3f4f6;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border: #e5e7eb;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --gradient: linear-gradient(135deg, #FF1B8D 0%, #7B2CBF 100%);
    --gradient-dark: linear-gradient(135deg, #d4177a 0%, #5b1d9e 100%);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ========== HEADER ========== */
.doc-header {
    position: relative;
    background: var(--dark);
    overflow: hidden;
}

.header-gradient {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0.9;
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.header-logo img {
    height: 70px;
    filter: brightness(0) invert(1);
}

.header-info {
    flex: 1;
}

.header-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin-top: 4px;
}

.header-ref {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    text-align: center;
}

.ref-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.ref-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-top: 2px;
    font-family: 'Poppins', sans-serif;
}

/* ========== MAIN ========== */
.doc-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* ========== INFO BANNER ========== */
.info-banner {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--secondary);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 30px;
}

.info-banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
}

.info-banner-text strong {
    display: block;
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 4px;
}

.info-banner-text p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========== COMMERCIAL MESSAGE SECTION ========== */
.commercial-message-section {
    margin-bottom: 30px;
}

.commercial-message-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    border-left: 4px solid var(--primary);
}

.commercial-avatar {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(255, 27, 141, 0.3);
}

.commercial-initial {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
}

.commercial-message-content {
    flex: 1;
}

.commercial-message-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.commercial-message-header .commercial-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.commercial-message-header .commercial-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.commercial-message-text p {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 10px;
}

.commercial-message-text p:last-child {
    margin-bottom: 0;
}

.commercial-message-text .commercial-signature {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-style: italic;
    color: var(--text-light);
}

.commercial-message-text .commercial-signature strong {
    color: var(--primary);
    font-style: normal;
}

/* Responsive Commercial Message */
@media (max-width: 768px) {
    .commercial-message-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px;
    }

    .commercial-avatar {
        width: 60px;
        height: 60px;
    }

    .commercial-initial {
        font-size: 1.5rem;
    }

    .commercial-message-header {
        align-items: center;
    }

    .commercial-message-text .commercial-signature {
        text-align: center;
    }
}

/* ========== SECTIONS ========== */
.doc-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
}

.section-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.section-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

.section-content {
    padding: 28px;
}

/* ========== INFO GRID ========== */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-item {
    padding: 14px 18px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}

.info-value.highlight {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 700;
}

/* ========== PROPERTY CARD ========== */
.property-card-preview {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: start;
}

.property-image-container {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.property-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
    background: var(--bg-light);
}

/* ========== RDV DETAILS ========== */
.rdv-details {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.rdv-date-block {
    flex-shrink: 0;
    text-align: center;
}

.rdv-calendar {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    overflow: hidden;
    width: 120px;
    box-shadow: 0 4px 12px rgba(255, 27, 141, 0.15);
}

.rdv-month {
    background: var(--gradient);
    color: var(--white);
    padding: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rdv-day {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--dark);
    padding: 8px 0 4px;
    font-family: 'Poppins', sans-serif;
}

.rdv-year {
    font-size: 0.85rem;
    color: var(--text-light);
    padding-bottom: 10px;
    font-weight: 600;
}

.rdv-time {
    margin-top: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.rdv-time i {
    color: var(--primary);
}

.rdv-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========== LEGAL SECTION ========== */
.doc-section-legal .section-content {
    padding: 28px;
}

.legal-intro {
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin-bottom: 28px;
}

.legal-intro p {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.7;
}

.legal-articles {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.legal-article {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.legal-article:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.article-number {
    display: inline-block;
    background: var(--gradient);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 0 0 8px 0;
}

.article-title {
    padding: 14px 20px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
}

.article-content {
    padding: 12px 20px 20px;
}

.article-content p {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 10px;
}

.article-content ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.article-content ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.6;
}

.article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--gradient);
    border-radius: 50%;
}

.article-note {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.85rem !important;
    color: var(--text-light) !important;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
}

.article-note i {
    color: var(--secondary);
    margin-top: 2px;
    flex-shrink: 0;
}

/* ========== VALIDATION SECTION ========== */
.doc-section-validation .section-content {
    padding: 28px;
}

.validation-box {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

/* Custom Checkboxes */
.checkbox-group {
    margin-bottom: 18px;
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: var(--white);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.custom-checkbox:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(255, 27, 141, 0.1);
}

.custom-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 1px;
}

.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: transparent;
    transition: color 0.2s ease;
}

.custom-checkbox input:checked + .checkmark {
    background: var(--gradient);
    border-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark::after {
    color: var(--white);
}

.custom-checkbox input:checked ~ .checkbox-text {
    color: var(--dark);
}

.checkbox-text {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    transition: color 0.3s ease;
}

/* Signature Section */
.signature-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.signature-section h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.signature-instruction {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.signature-pad-container {
    position: relative;
    background: var(--white);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.signature-pad-container canvas {
    display: block;
    width: 100%;
    height: 200px;
    cursor: crosshair;
}

.btn-clear-signature {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: var(--text-light);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.btn-clear-signature:hover {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

/* Validate Button */
.btn-validate {
    width: 100%;
    padding: 18px 32px;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 27, 141, 0.3);
}

.btn-validate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 27, 141, 0.4);
}

.btn-validate:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-validate:active:not(:disabled) {
    transform: translateY(0);
}

.validation-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.validation-note i {
    color: var(--secondary);
}

/* ========== REFONTE 24/05/2026 : 2 boutons confirme/refuse ========== */
.validation-intro {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary, #475569);
    text-align: center;
}

.validation-actions {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.btn-confirm-visit,
.btn-refuse-visit {
    flex: 1 1 240px;
    min-height: 60px;
    padding: 18px 24px;
    border: none;
    border-radius: 14px;
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 0.2px;
    text-transform: none;
}

.btn-confirm-visit {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.32);
}

.btn-confirm-visit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.42);
}

.btn-confirm-visit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-confirm-visit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.btn-refuse-visit {
    background: #ffffff;
    color: #DC2626;
    border: 2px solid #FECACA;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

.btn-refuse-visit:hover:not(:disabled) {
    background: #FEF2F2;
    border-color: #DC2626;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.18);
}

.btn-refuse-visit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-refuse-visit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-confirm-visit i,
.btn-refuse-visit i {
    font-size: 20px;
}

/* Mobile : empile les 2 boutons */
@media (max-width: 540px) {
    .validation-actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn-confirm-visit,
    .btn-refuse-visit {
        flex: 0 0 auto;
        width: 100%;
        min-height: 54px;
        font-size: 15px;
    }
}

/* ========== MODAL REFUS DE VISITE ========== */
.refuse-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: refuseOverlayFadeIn 0.2s ease;
}

@keyframes refuseOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.refuse-modal {
    background: #ffffff;
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.38);
    animation: refuseModalSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes refuseModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.refuse-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: #F1F5F9;
    border: none;
    border-radius: 50%;
    color: #64748B;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    z-index: 2;
}

.refuse-modal-close:hover {
    background: #E2E8F0;
    color: #0F172A;
    transform: rotate(90deg);
}

.refuse-modal-header {
    padding: 38px 30px 22px;
    text-align: center;
    border-bottom: 1px solid #F1F5F9;
}

.refuse-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFEDD5 0%, #FFE4B5 100%);
    border: 3px solid #FB923C;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C2410C;
    font-size: 30px;
}

.refuse-modal-header h2 {
    margin: 0 0 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    color: #0F172A;
    font-weight: 700;
}

.refuse-modal-header p {
    margin: 0;
    font-size: 14px;
    color: #64748B;
    line-height: 1.55;
}

.refuse-modal-body {
    padding: 26px 30px 14px;
}

.refuse-modal-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.refuse-modal-textarea {
    width: 100%;
    min-height: 110px;
    padding: 14px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: #0F172A;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.refuse-modal-textarea:focus {
    outline: none;
    border-color: #FB923C;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.12);
}

.refuse-modal-hint {
    margin: 12px 0 0;
    padding: 12px 14px;
    background: #FFFBEB;
    border-left: 3px solid #F59E0B;
    border-radius: 0 8px 8px 0;
    font-size: 12.5px;
    color: #78350F;
    line-height: 1.55;
}

.refuse-modal-hint i {
    color: #D97706;
    margin-right: 5px;
}

.refuse-modal-actions {
    padding: 18px 30px 28px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-refuse-cancel,
.btn-refuse-confirm {
    flex: 1 1 180px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-refuse-cancel {
    background: #F1F5F9;
    color: #475569;
}

.btn-refuse-cancel:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.btn-refuse-confirm {
    background: linear-gradient(135deg, #FB923C 0%, #EA580C 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(251, 146, 60, 0.32);
}

.btn-refuse-confirm:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.42);
}

.btn-refuse-confirm:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Mobile : empile boutons modal */
@media (max-width: 540px) {
    .refuse-modal-actions {
        flex-direction: column-reverse;
    }
}

/* ========== CONFIRMED SECTION ========== */
.doc-section-confirmed {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.confirmed-content {
    text-align: center;
    padding: 60px 40px;
}

.confirmed-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 20px;
}

.confirmed-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.confirmed-content > p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.confirmed-details {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.confirmed-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-light);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--dark);
}

.confirmed-item i {
    color: var(--primary);
}

.confirmed-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ========== FOOTER ========== */
.doc-footer {
    background: var(--dark);
    padding: 30px 20px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-logo img {
    height: 40px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.footer-info p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.footer-info strong {
    color: rgba(255, 255, 255, 0.9);
}

.footer-info i {
    color: var(--primary);
    margin-right: 4px;
}

.footer-legal {
    margin-top: 8px;
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay[style*="display: none"] {
    display: none !important;
}

.loading-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 50px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.loading-spinner-ring {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

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

.loading-box p {
    font-weight: 600;
    color: var(--dark);
}

/* ========== MODALS ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay[style*="display: none"] {
    display: none !important;
}

.modal-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

.modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.modal-icon.success {
    color: var(--success);
}

.modal-icon.error {
    color: var(--danger);
}

.modal-box h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.modal-box > p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.modal-details {
    text-align: left;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 24px;
}

.modal-details p {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-details p:last-child {
    margin-bottom: 0;
}

.modal-details i {
    color: var(--primary);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.btn-modal-close {
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-modal-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 27, 141, 0.3);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .header-ref {
        width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .property-card-preview {
        grid-template-columns: 1fr;
    }

    .property-image-container {
        width: 100%;
        height: 180px;
    }

    .rdv-details {
        flex-direction: column;
        align-items: center;
    }

    .rdv-info {
        width: 100%;
    }

    .confirmed-details {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .doc-main {
        padding: 20px 12px 40px;
    }

    .section-content {
        padding: 20px;
    }

    .info-banner {
        flex-direction: column;
        text-align: center;
    }

    .validation-box {
        padding: 20px;
    }

    .custom-checkbox {
        padding: 12px 14px;
    }

    .modal-box {
        padding: 30px 24px;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.3rem;
    }

    .section-header h2 {
        font-size: 1.1rem;
    }

    .btn-validate {
        font-size: 0.95rem;
        padding: 16px 24px;
    }
}

/* ========== BOUTON VOIR BIEN ========== */
.section-header {
    position: relative;
}

.btn-voir-bien {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 27, 141, 0.3);
}

.btn-voir-bien:hover {
    transform: translateY(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 27, 141, 0.4);
}

.btn-voir-bien i {
    font-size: 0.9rem;
}

/* ========== PROPERTY TITLE ========== */
.property-title-row {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.property-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    display: block;
}

/* ========== PROPERTY IMAGE OVERLAY ========== */
.property-image-container {
    cursor: pointer;
    position: relative;
}

.property-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-image-container:hover .property-image-overlay {
    opacity: 1;
}

.property-image-overlay i {
    font-size: 2rem;
    color: var(--white);
}

/* ========== MODAL BIEN IMMOBILIER ========== */
.modal-bien-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-bien-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-bien-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-bien-overlay.active .modal-bien-container {
    transform: scale(1) translateY(0);
}

/* Header */
.modal-bien-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--gradient);
    color: var(--white);
}

.modal-bien-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-bien-close {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-bien-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* Info Bar */
.modal-bien-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    gap: 20px;
}

.modal-bien-info-left {
    flex: 1;
}

.modal-bien-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.modal-bien-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-bien-badge.type {
    background: var(--gradient);
    color: var(--white);
}

.modal-bien-titre {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.modal-bien-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.modal-bien-location i {
    color: var(--primary);
}

.modal-bien-info-right {
    text-align: right;
    flex-shrink: 0;
}

.modal-bien-prix {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.modal-bien-specs {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    font-size: 0.9rem;
    color: var(--text-light);
}

.modal-bien-specs span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-bien-specs i {
    color: var(--primary);
}

/* Photo Section */
.modal-bien-photo-section {
    padding: 0 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-bien-main-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    margin: 16px 0;
}

.modal-bien-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.modal-bien-main-photo img.visible {
    display: block;
}

.modal-bien-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    background: var(--bg-light);
}

.modal-bien-photo-placeholder i {
    font-size: 3rem;
    opacity: 0.5;
}

.modal-bien-photo-placeholder span {
    font-size: 0.9rem;
}

/* Details Grid */
.modal-bien-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 24px 16px;
}

.modal-bien-detail-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.modal-bien-detail-item:hover {
    background: var(--bg);
    border-color: var(--primary);
}

.modal-bien-detail-item i {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: 10px;
    color: var(--white);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.modal-bien-detail-item div {
    display: flex;
    flex-direction: column;
}

.modal-bien-detail-item .detail-value {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.95rem;
}

.modal-bien-detail-item .detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Commercial */
.modal-bien-commercial {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
    border-top: 1px solid #fcd34d;
    border-bottom: 1px solid #fcd34d;
}

.modal-bien-commercial-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.modal-bien-commercial-info {
    display: flex;
    flex-direction: column;
}

.modal-bien-commercial-info .commercial-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.modal-bien-commercial-info .commercial-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 1rem;
}

/* Footer */
.modal-bien-footer {
    padding: 20px 24px;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
}

.modal-bien-btn-close {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 27, 141, 0.3);
}

.modal-bien-btn-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 27, 141, 0.4);
}

/* Responsive Modal Bien */
@media (max-width: 768px) {
    .btn-voir-bien {
        position: static;
        transform: none;
        margin-left: auto;
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .btn-voir-bien span {
        display: none;
    }

    .btn-voir-bien i {
        margin: 0;
    }

    .section-header {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .modal-bien-info-bar {
        flex-direction: column;
        gap: 12px;
    }

    .modal-bien-info-right {
        text-align: left;
        width: 100%;
    }

    .modal-bien-specs {
        justify-content: flex-start;
    }

    .modal-bien-details {
        grid-template-columns: 1fr;
    }

    .modal-bien-container {
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .modal-bien-overlay {
        padding: 10px;
    }

    .modal-bien-header {
        padding: 14px 18px;
    }

    .modal-bien-info-bar {
        padding: 16px 18px;
    }

    .modal-bien-photo-section {
        padding: 0 18px;
    }

    .modal-bien-details {
        padding: 0 18px 12px;
    }

    .modal-bien-commercial {
        padding: 14px 18px;
    }

    .modal-bien-footer {
        padding: 16px 18px;
    }

    .modal-bien-titre {
        font-size: 1.1rem;
    }

    .modal-bien-prix {
        font-size: 1.4rem;
    }
}

/* Print styles */
@media print {
    .doc-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .btn-validate,
    .btn-clear-signature,
    .loading-overlay,
    .modal-overlay,
    .modal-bien-overlay,
    .btn-voir-bien {
        display: none !important;
    }

    .doc-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
    }
}
