.pf-wrap {
    font-family: inherit;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
}

/* Thèmes */
.pf-wrap.pf-light {
    color: #111827;
}

.pf-wrap.pf-dark {
    color: #ffffff;
}

/* Étapes */
.pf-step {
    display: none;
    flex-direction: row;
    gap: 32px;
    animation: pf-fade-in 0.4s ease;
    align-items: center;
    flex-wrap: wrap;
}

.pf-step.active {
    display: flex;
}

@keyframes pf-fade-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Label d'étape — effet code */
.pf-label {
    display: block;
    font-family: monospace;
    font-size: 0.75rem;
    opacity: 0.25;
    color: #fff;
}

.pf-label:has(+ .pf-step.active) {
    opacity: 1;
    color: #fff;
}

.pf-step.active {
    color: #ffffff;
}

/* Phrase principale */
.pf-sentence {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 400;
    line-height: 1.8;
    color: inherit;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 10px;
}

/* Inputs inline */
.pf-sentence input,
.pf-sentence textarea {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid currentColor !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    color: inherit;
    padding: 2px 4px;
    min-width: 80px;
    border-radius: 0 !important;
    -webkit-appearance: none;
    appearance: none;
}

.pf-sentence input::placeholder,
.pf-sentence textarea::placeholder {
    opacity: 0.45;
    font-weight: 400;
}

.pf-wrap.pf-dark .pf-sentence input::placeholder,
.pf-wrap.pf-dark .pf-sentence textarea::placeholder {
    color: #f9fafb;
}

.pf-sentence input[name="prenom"],
.pf-sentence input[name="nom"]        { width: 130px; }
.pf-sentence input[name="email"]      { width: 220px; }
.pf-sentence input[name="telephone"]  { width: 160px; }
.pf-sentence input[name="entreprise"] { width: 200px; }
.pf-sentence input[name="site_actuel"]{ width: 230px; }
.pf-sentence input[name="type_besoin"]{ width: 330px !important; }
.pf-sentence input[name="budget"]     { width: 135px !important; }

.pf-sentence textarea {
    display: block;
    width: 100%;
    resize: vertical;
    min-height: 80px;
    border: none;
    border-bottom: 2px solid currentColor;
    margin-top: 8px;
    font-size: 1.1rem;
}

/* Unité hors input */
.pf-unit {
    font-size: inherit;
    font-weight: 400;
    opacity: 0.6;
    margin-left: 2px;
}

/* Navigation */
.pf-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 8px;
}

.pf-wrap .pf-btn-next,
.pf-wrap .pf-btn-submit {
    position: relative !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 1.1rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    overflow: hidden !important;
    transition: color 0.4s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.pf-wrap .pf-btn-next::before,
.pf-wrap .pf-btn-submit::before {
    content: '' !important;
    position: absolute !important;
    bottom: -160% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: #fff !important;
    border-radius: 43% 57% 52% 48% / 38% 62% 48% 52% !important;
    transition: bottom 0.6s cubic-bezier(0.33, 1, 0.68, 1) !important;
    animation: pf-wave-spin 4s linear infinite !important;
}

.pf-wrap .pf-btn-next:hover::before,
.pf-wrap .pf-btn-submit:hover::before {
    bottom: -117% !important;
}

@keyframes pf-wave-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pf-wrap .pf-btn-next:hover,
.pf-wrap .pf-btn-submit:hover {
    color: #000 !important;
    background: transparent !important;
}

.pf-wrap .pf-btn-submit:disabled { opacity: 0.4 !important; cursor: not-allowed !important; }

.pf-wrap .pf-btn-back {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit !important;
    opacity: 0.35 !important;
    cursor: pointer !important;
    font-size: 0.85rem !important;
    padding: 0 !important;
    transition: opacity 0.2s !important;
}
.pf-wrap .pf-btn-back:hover { opacity: 0.7 !important; }

/* VS Code Editor */
.pf-editor {
    margin-top: clamp(16px, 4vw, 48px);
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    align-self: flex-start;
    min-height: 318px;
}

.pf-editor-bar {
    background: #323233;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pf-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.pf-editor-title {
    margin-left: 8px;
    color: #cccccc;
    font-size: 11px;
    font-family: inherit;
}

.pf-editor-body {
    display: flex;
    padding: 12px 0;
    min-height: 180px;
    max-height: 280px;
    overflow: hidden;
}

.pf-editor-lines {
    color: #4a4a55;
    text-align: right;
    padding: 0 12px 0 10px;
    user-select: none;
    min-width: 36px;
    line-height: 1.6;
    white-space: pre;
}

.pf-editor-code {
    flex: 1;
    padding-right: 12px;
    white-space: pre;
    overflow: hidden;
    color: #d4d4d4;
    line-height: 1.6;
}

.pf-editor-code .tok-keyword  { color: #569cd6; }
.pf-editor-code .tok-fn       { color: #dcdcaa; }
.pf-editor-code .tok-string   { color: #ce9178; }
.pf-editor-code .tok-comment  { color: #6a9955; }
.pf-editor-code .tok-tag      { color: #4ec9b0; }
.pf-editor-code .tok-attr     { color: #9cdcfe; }
.pf-editor-code .tok-punct    { color: #808080; }
.pf-editor-code .tok-num      { color: #b5cea8; }


.pf-dots {
    animation: pf-blink 1s step-end infinite;
}

@keyframes pf-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Overlay succès */
.pf-overlay {
    position: fixed;
    top: 0;
    left: -5%;
    width: 110%;
    height: 100%;
    background: #0f0f0f;
    transform: translateY(-105%);
    border-radius: 0 0 60% 60% / 0 0 40% 40%;
    transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1),
                border-radius 1s cubic-bezier(0.76, 0, 0.24, 1);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-overlay.pf-overlay-active {
    transform: translateY(0);
    border-radius: 0;
}

.pf-overlay-msg {
    color: #ffffff;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 400;
    line-height: 1.7;
    text-align: center;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease 0.75s, transform 0.5s ease 0.75s;
}

.pf-overlay.pf-overlay-active .pf-overlay-msg {
    opacity: 1;
    transform: translateY(0);
}

.pf-overlay-close {
    position: absolute;
    top: 8px;
    right: 168px;
    font-size: 12vw;
    line-height: 1;
    color: #0f0f0f;
    background: none;
    background-color: rgba(0, 0, 0, 0);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: all;
    user-select: none;
    z-index: 0;
}

.pf-overlay-close:hover {
    color: #1e1e1e;
    transform: rotate(90deg);
}

/* Progress */
.pf-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    opacity: 0.1;
    border-radius: 2px;
}

.pf-progress-bar {
    height: 100%;
    background: currentColor;
    opacity: 0.5;
    border-radius: 2px;
    transition: width 0.4s ease;
}


.pf-error-inline {
    font-size: 0.85rem;
    opacity: 0.5;
    margin-top: -16px;
    display: none;
    color: inherit;
}

@media (max-width: 600px) {
    .pf-sentence { flex-direction: column; gap: 10px; }
    .pf-sentence input { width: 100% !important; }
}
