.jdt-super-container {
    margin: auto;
    max-width: 1200px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    font-family: system-ui, sans-serif;
}

.jdt-super-container * {
    box-sizing: border-box;
}

.jdt-surtitle{
	margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ea580c;
}

.jdt-intro{
	margin-bottom: 10px;
	color:#000;
}

.jdt-mega-title{
	margin: 0 0 10px;
    font-size: 3rem;
    line-height: 1.2;
    color: #111827;
}

.jdt-super-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 2rem;
    color: #1e293b;
}

.jdt-gpx-upload-area {
    display: block;
    margin-bottom: 20px;
    padding: 30px;
    text-align: center;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jdt-gpx-upload-area:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.jdt-gpx-upload-area input[type="file"] {
    display: none;
}

.jdt-gpx-btn {
    display: inline-block;
    width: auto;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.jdt-gpx-btn:hover {
    background: #2563eb;
}

.jdt-gpx-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.jdt-print-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #10b981;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.jdt-print-btn:hover {
    background: #059669;
}

.jdt-print-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.jdt-gpx-results {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.jdt-gpx-card {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f1f5f9;
    text-align: center;
}

.jdt-gpx-card-reference{
	background: #fff7ed;
}

.jdt-gpx-val {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
}

.jdt-gpx-label {
    
    color: #64748b;
    text-transform: uppercase;
}

.jdt-chart-wrapper {
    display: none;
    width: 100%;
    height: 250px;
    margin-bottom: 30px;
}

.jdt-loading {
    display: none;
    margin: 10px 0;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-weight: 500;
}

.jdt-error {
    display: none;
    margin: 12px 0 20px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
}

.jdt-step2 {
    display: none;
    padding-top: 24px;
    border-top: 2px solid #f1f5f9;
}

.jdt-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.jdt-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #334155;
    font-weight: 500;
}

.jdt-input,
.jdt-select {
    padding: 10px 12px !important;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    font-size: 1.3rem;
}

.jdt-input:focus,
.jdt-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.jdt-time-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jdt-time-inputs input {
    width: 80px;
}

.jdt-step3 {
    display: none;
    margin-top: 30px;
    padding: 24px;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

.jdt-step3 h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    color: #1e293b;
    font-size: 1.3rem;
}

.jdt-step3 table,
.jdt-sections-preview table {
    width: 100%;
    margin-top: 15px;
    margin-bottom: 25px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.jdt-step3 th,
.jdt-sections-preview th {
    padding: 12px;
    border-bottom: 2px solid #cbd5e1;
    background-color: #e2e8f0;
    color: #0f172a;
    text-align: left;
    font-weight: 600;
}

.jdt-step3 td,
.jdt-sections-preview td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: top;
}

.jdt-step3 ul {
    margin-bottom: 20px;
    padding-left: 0;
    list-style: none;
}

.jdt-step3 li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.jdt-sections-preview {
    display: none;
    margin-bottom: 20px;
}

.jdt-helper-text {
    font-size: 1.4rem;
	margin-bottom: 5px;
}

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

.jdt-segments-preview {
    display: none;
    margin-top: 24px;
    margin-bottom: 20px;
}

/* ── Timeline segments ─────────────────────────────────────────────── */

.jdt-timeline {
    display: flex;
    flex-direction: column;
    margin: 8px 0;
}

.jdt-tl-item {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.jdt-tl-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 18px;
}

.jdt-tl-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    z-index: 1;
}

.jdt-tl-dot--start {
    background: #3b82f6;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #3b82f6;
}

.jdt-tl-dot--ravito {
    background: #10b981;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #10b981;
    margin-top: auto;
}

.jdt-tl-dot--end {
    background: #f59e0b;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #f59e0b;
    margin-top: auto;
}

.jdt-tl-line {
    width: 2px;
    flex: 1;
    background: #e2e8f0;
    margin: 4px 0;
}

.jdt-tl-right {
    flex: 1;
    padding-bottom: 24px;
    min-width: 0;
}

.jdt-tl-point-label {
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 6px;
    padding: 2px 8px;
    background: #eff6ff;
    border-radius: 4px;
    display: inline-block;
}

.jdt-tl-point-label--end {
    color: #f59e0b;
    background: #fffbeb;
    margin-top: 6px;
    margin-bottom: 0;
}

.jdt-tl-segment-body {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jdt-tl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.jdt-tl-meta span {
    color: #475569;
    background: #e2e8f0;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

.jdt-tl-type {
    color: #1e293b !important;
    background: #dbeafe !important;
    font-weight: 600;
}

.jdt-tl-time {
    color: #1e293b !important;
    background: #dcfce7 !important;
    font-weight: 700 !important;
}

.jdt-tl-needs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.jdt-tl-needs span {
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ── Plan header ───────────────────────────────────────────────────── */

.jdt-plan-header {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jdt-plan-pacing {
    color: #0f172a;
}

.jdt-plan-diag {
    font-weight: 700;
    text-transform: capitalize;
}

.jdt-plan-diag-detail {
    color: #475569;
}

.jdt-plan-advice {
    color: #334155;
    font-style: italic;
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
    margin-top: 2px;
}

/* ── Boutons bas du plan ───────────────────────────────────────────── */

.jdt-step3-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.jdt-regen-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #6366f1;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.jdt-regen-btn:hover {
    background: #4f46e5;
}

.jdt-reset-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.jdt-reset-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* ── Ravito chips ──────────────────────────────────────────────────── */

.jdt-ravitos-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 36px;
    align-items: center;
}

.jdt-ravito-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    font-size: 1.3rem;
    font-weight: 500;
}

.jdt-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #bbf7d0;
    color: #166534;
    
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.jdt-chip-remove:hover {
    background: #4ade80;
    color: #14532d;
}

/* ── Bouton "Ajouter un ravito" dans le tableau ────────────────────── */

.jdt-add-ravito-cell {
    white-space: nowrap;
    text-align: right;
}

.jdt-add-ravito-btn {
    padding: 3px 8px;
    border: 1px dashed #86efac;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    align-self: flex-start;
}

.jdt-add-ravito-btn:hover {
    background: #3dbf65;
    border-color: #4ade80;
}

/* ── Formulaire inline dans la cellule ────────────────────────────── */

.jdt-inline-add-form {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.jdt-inline-km-input {
    width: 80px !important;
    padding: 5px 8px !important;
   
}

.jdt-inline-km-unit {
   
    color: #64748b;
}

.jdt-confirm-ravito-btn,
.jdt-cancel-ravito-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.jdt-confirm-ravito-btn {
    background: #10b981;
    color: #ffffff;
}

.jdt-confirm-ravito-btn:hover {
    background: #059669;
}

.jdt-cancel-ravito-btn {
    background: #e2e8f0;
    color: #475569;
}

.jdt-cancel-ravito-btn:hover {
    background: #cbd5e1;
}

@media (max-width: 640px) {
    .jdt-super-container {
        padding: 16px;
    }

    .jdt-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .jdt-time-inputs {
        flex-wrap: wrap;
    }

    .jdt-time-inputs input {
        width: 72px;
    }

    .jdt-step3-actions {
        flex-direction: column;
    }

    .jdt-step3 table,
    .jdt-sections-preview table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .jdt-gpx-val {
        font-size: 1.5rem;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    .jdt-super-container,
    .jdt-super-container * {
        visibility: visible;
    }

    .jdt-super-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
		width:100%;
    }

    .jdt-gpx-upload-area,
    .jdt-step2,
    .jdt-print-btn,
    .jdt-super-title:first-of-type,
    .jdt-error {
        display: none !important;
    }

    .jdt-step3 {
        margin-top: 0;
        padding: 0;
        border: none;
        background: transparent;
    }

    .jdt-chart-wrapper {
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
}