/* ===========================
   PR4 - Navigation Styles (WeTransfer Style)
   =========================== */

/* Page Content Management */
.page-content {
    display: none;
    min-height: calc(100vh - 140px);
}

.page-content.active {
    display: block;
}

.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding-left: 0px;
    padding-right: 0px;
    padding-bottom: 140px;
    padding-top: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px 32px;
    min-height: calc(100vh - 300px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.empty-state-icon {
    color: var(--primary-color);
    margin-bottom: 8px;
    opacity: 0.7;
}

.empty-state-title {
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.empty-state-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 14px 28px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(18, 96, 168, 0.25);
}

.empty-state-cta:hover {
    background: #0F4F8A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(18, 96, 168, 0.3);
}

.empty-state-cta:active {
    transform: translateY(0);
}

.page-title {
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 0px;
    font-weight: 400;
}

.empty-message {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.empty-subtitle {
    font-size: 14px;
    color: var(--text-tertiary);
    margin: 0;
    font-weight: 400;
}

/* Floating Add Button - WeTransfer Style */
/* Floating Buttons Container */
.floating-buttons-container {
    position: fixed;
    bottom: 105px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 999;
}

/* Floating Paste Button */
.floating-paste-btn {
    width: 56px;
    height: 56px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    flex-shrink: 0;
    animation: pastePulse 2s ease-in-out infinite;
}

.floating-paste-btn svg {
    width: 26px;
    height: 26px;
    color: var(--primary-color);
}

.floating-paste-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    box-shadow: 0 8px 24px rgba(18, 96, 168, 0.3);
}

.floating-paste-btn:hover svg {
    color: white;
}

.floating-paste-btn:active {
    transform: scale(0.95);
}

.floating-buttons-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

@keyframes pastePulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 4px 16px rgba(18, 96, 168, 0.3); }
}

/* Floating Add Button (always visible) */
.floating-add-btn {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(18, 96, 168, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.floating-add-btn svg {
    width: 36px;
    height: 36px;
    color: white;
}

.floating-add-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(18, 96, 168, 0.3);
    background: #0F4F8A;
}

.floating-add-btn:active {
    transform: scale(0.98);
}

/* Floating Connect Button (Fichiers tab) */
.floating-connect-btn {
    position: fixed;
    bottom: 105px;
    right: 24px;
    z-index: 1001;
}

/* Floating Geo Button (Où Imprimer tab) */
.floating-geo-btn {
    position: fixed;
    bottom: 105px;
    right: 24px;
    z-index: 1001;
}

@media (max-width: 768px) {
    .floating-connect-btn,
    .floating-geo-btn {
        bottom: 115px;
        right: 16px;
        width: 70px;
        height: 70px;
    }

    .floating-connect-btn svg,
    .floating-geo-btn svg {
        width: 32px;
        height: 32px;
    }
}

/* Floating Print Pill (toggle + print button fused) */
.floating-send-pill {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--success-color, #0F8A4F);
    border-radius: 40px;
    box-shadow: 0 8px 24px rgba(15, 138, 79, 0.35);
    overflow: hidden;
    animation: slideInFromLeft 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.floating-send-pill::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 46px;
    border: 2px solid var(--success-color, #0F8A4F);
    opacity: 0;
    animation: sendBtnPulse 2s ease-out infinite 0.6s;
    pointer-events: none;
}

/* --- Etat desactive (decoché) --- */
.floating-send-pill.pill-disabled {
    background: #9CA3AF;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.floating-send-pill.pill-disabled::before {
    animation: none;
    opacity: 0;
}

.floating-send-pill.pill-disabled .pill-printer-icon {
    opacity: 0.4;
}

@keyframes sendBtnPulse {
    0% { opacity: 0.5; inset: -6px; }
    100% { opacity: 0; inset: -18px; }
}

/* --- Toggle zone (left side) --- */
.pill-rgpd {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 2px 0 10px;
    cursor: pointer;
    height: 80px;
}

/* Hide native checkbox */
.pill-rgpd input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom toggle track */
.pill-toggle {
    position: relative;
    width: 32px;
    height: 18px;
    background: rgba(255,255,255,0.3);
    border-radius: 9px;
    flex-shrink: 0;
    transition: background 0.2s ease;
    cursor: pointer;
}

/* Toggle knob */
.pill-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Checked state */
.pill-rgpd input:checked ~ .pill-toggle {
    background: rgba(255,255,255,0.5);
}

.pill-rgpd input:checked ~ .pill-toggle .pill-toggle-knob {
    transform: translateX(14px);
}

/* Unchecked state */
.pill-rgpd input:not(:checked) ~ .pill-toggle {
    background: rgba(0,0,0,0.25);
}

/* --- CGU link --- */
.pill-rgpd-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
    min-width: 24px;
    min-height: 44px;
    justify-content: center;
}

.pill-rgpd-link:hover {
    color: white;
}

.pill-rgpd-link svg {
    width: 16px;
    height: 16px;
}

.pill-cgu-text {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* --- Print button zone (right side) --- */
.pill-print-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: transparent;
    border: none;
    border-left: 2px solid rgba(255,255,255,0.35);
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.pill-print-btn:hover {
    background: rgba(0,0,0,0.1);
}

.pill-print-btn:active {
    background: rgba(0,0,0,0.2);
}

.pill-printer-icon {
    width: 32px;
    height: 32px;
    transition: opacity 0.3s ease;
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-20px) scale(0.8); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes rgpdShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ── Upload fullscreen overlay ── */
.upload-overlay {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: uploadFadeIn 0.4s ease;
}

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

.upload-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.upload-ring-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
}

.upload-ring-svg {
    width: 200px;
    height: 200px;
}

.upload-ring-progress {
    transition: stroke-dashoffset 0.3s ease;
}

.upload-center-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #FF8C00;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(255, 140, 0, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.upload-center-btn:hover {
    background: #cc3333;
    transform: translate(-50%, -50%) scale(1.06);
}

.upload-center-btn .upload-btn-printer {
    width: 48px;
    height: 48px;
}

.upload-center-btn .upload-btn-cancel {
    width: 32px;
    height: 32px;
    display: none;
}

.upload-center-btn:hover .upload-btn-printer {
    display: none;
}

.upload-center-btn:hover .upload-btn-cancel {
    display: block;
}

.upload-cancel-link {
    background: none;
    border: none;
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: color 0.2s ease;
}

.upload-cancel-link:hover {
    color: #cc3333;
}

.upload-status {
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary, #666);
}

.upload-percent {
    font-family: 'Calibri', Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #FF8C00;
}

/* Bottom Navigation - WeTransfer Style */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: #8e9199;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Calibri', Arial, sans-serif;
}

.nav-item svg {
    width: 36px;
    height: 36px;
    stroke-width: 2;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--primary-color);
}

.nav-item:hover svg {
    stroke: var(--primary-color);
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active svg {
    stroke: var(--primary-color);
}

.nav-item span {
    font-size: 14px;
    font-weight: 400;
}

/* Saved Documents List */
.saved-documents-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.saved-document-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.saved-document-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.saved-document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.saved-document-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Calibri', Arial, sans-serif;
}

.saved-document-code {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Calibri', Arial, monospace;
    letter-spacing: 2px;
}

.saved-document-info {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.saved-document-actions {
    display: flex;
    gap: 8px;
}

.document-action-btn {
    padding: 8px 16px;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.document-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Points List */
.points-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.point-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}

.point-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.point-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Calibri', Arial, sans-serif;
    margin-bottom: 8px;
}

.point-address {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.point-distance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(18, 96, 168, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.point-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(37, 211, 102, 0.1);
    color: var(--success-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 8px;
}

.point-status.closed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 36px;
    }

    .page-subtitle {
        font-size: 16px;
        margin-bottom: 0px;
    }

    .empty-state {
        padding: 32px 20px 24px;
    }

    .empty-state-title {
        font-size: 24px;
    }

    .floating-buttons-container {
        bottom: 115px;
        right: 16px;
        gap: 8px;
    }

    .floating-add-btn {
        width: 70px;
        height: 70px;
    }

    .floating-add-btn svg {
        width: 32px;
        height: 32px;
    }

    .pill-rgpd {
        height: 70px;
        padding: 0 2px 0 8px;
    }

    .pill-print-btn {
        width: 70px;
        height: 70px;
    }

    .pill-printer-icon {
        width: 28px;
        height: 28px;
    }

    .pill-toggle {
        width: 34px;
        height: 20px;
    }

    .pill-toggle-knob {
        width: 16px;
        height: 16px;
    }

    .pill-rgpd input:checked ~ .pill-toggle .pill-toggle-knob {
        transform: translateX(14px);
    }

    .nav-item svg {
        width: 36px;
        height: 36px;
    }

    .nav-item span {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding-left: 0px;
        padding-right: 0px;
        padding-bottom: 160px;
        padding-top: 10px;
    }

    .saved-document-header {
        flex-direction: column;
        gap: 8px;
    }

    .saved-document-actions {
        width: 100%;
    }

    .document-action-btn {
        flex: 1;
    }
}
