/* ============================================================
   Profil Olfactif — « La Composition »
   Direction artistique immersive (cahier §6)
   ============================================================ */
:root {
    --po-ink: #191622;
    --po-ink-2: #221d2e;
    --po-parchment: #F7F4EE;
    --po-gold: #B0894C;
    --po-rose: #B9787E;
    --po-line: #E2DACB;
    --po-reactive: #7FA8A0;
    --po-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --po-sans: 'Inter', system-ui, sans-serif;
}

.po-body { background: var(--po-ink); }

/* ----------------------- scène immersive ----------------------- */
.po {
    position: relative;
    min-height: calc(100vh - 80px);
    overflow: hidden;
    background:
        radial-gradient(1200px 800px at 50% -10%, rgba(176, 137, 76, 0.10), transparent 60%),
        radial-gradient(900px 700px at 80% 110%, rgba(185, 120, 126, 0.08), transparent 60%),
        var(--po-ink);
    color: var(--po-parchment);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 5rem) 1.25rem;
}

.po-ambient {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ----------------------- stages ----------------------- */
.po-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1), filter 600ms ease;
    filter: blur(6px);
}
.po-stage.is-active { opacity: 1; transform: none; filter: blur(0); }
.po-results { max-width: 1200px; }

/* ----------------------- typographie ----------------------- */
.po-eyebrow, .po-q-eyebrow {
    font-family: var(--po-sans);
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 0.72rem;
    color: var(--po-gold);
    margin: 0 0 1.2rem;
}
.po-q-eyebrow { margin-bottom: 0.8rem; }
.po-title {
    font-family: var(--po-serif);
    font-weight: 600;
    font-size: clamp(2.6rem, 7vw, 4.6rem);
    line-height: 1.02;
    margin: 0 0 1.2rem;
    color: var(--po-parchment);
}
.po-title em { font-style: italic; color: var(--po-gold); }
.po-lede {
    font-family: var(--po-serif);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-style: italic;
    color: rgba(247, 244, 238, 0.82);
    max-width: 30ch;
    margin: 0 auto 2.4rem;
    line-height: 1.5;
}
.po-foot-note {
    font-family: var(--po-sans);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: rgba(247, 244, 238, 0.5);
    margin-top: 1.8rem;
}

/* ----------------------- CTA ----------------------- */
.po-cta {
    font-family: var(--po-sans);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: var(--po-ink);
    background: var(--po-gold);
    border: none;
    border-radius: 999px;
    padding: 1rem 2.6rem;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 300ms ease, background 200ms ease;
    box-shadow: 0 10px 40px rgba(176, 137, 76, 0.25);
}
.po-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 50px rgba(176, 137, 76, 0.4); background: #c69c58; }

/* ----------------------- progression (pyramide) ----------------------- */
.po-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 420px;
    margin: 0 auto 2.6rem;
}
.po-progress-label {
    font-family: var(--po-sans);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    color: var(--po-gold);
    min-width: 3.2em;
    text-align: right;
}
.po-progress-track {
    flex: 1;
    height: 2px;
    background: rgba(247, 244, 238, 0.15);
    border-radius: 2px;
    overflow: hidden;
}
.po-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--po-reactive), var(--po-gold));
    transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1), background 600ms ease;
}
.po-progress-count {
    font-family: var(--po-sans);
    font-size: 0.74rem;
    color: rgba(247, 244, 238, 0.5);
    min-width: 3.4em;
    text-align: left;
}

/* ----------------------- questions ----------------------- */
.po-q-title {
    font-family: var(--po-serif);
    font-weight: 600;
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    line-height: 1.1;
    margin: 0 0 0.6rem;
}
.po-q-sub {
    font-family: var(--po-sans);
    font-size: 0.92rem;
    color: rgba(247, 244, 238, 0.55);
    margin: 0 0 2rem;
}
.po-question-wrap.po-anim-in { animation: poDiffuseIn 460ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes poDiffuseIn {
    from { opacity: 0; transform: translateY(10px); filter: blur(5px); }
    to { opacity: 1; transform: none; filter: blur(0); }
}

.po-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin: 0 auto 1rem;
    max-width: 560px;
}
.po-chip {
    position: relative;
    font-family: var(--po-sans);
    font-size: 0.95rem;
    color: var(--po-parchment);
    background: rgba(247, 244, 238, 0.04);
    border: 1px solid rgba(247, 244, 238, 0.18);
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 220ms ease, color 220ms ease, transform 140ms ease;
}
.po-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--po-gold);
    transform: scale(0);
    transform-origin: center;
    border-radius: inherit;
    transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}
.po-chip:hover { border-color: var(--po-gold); transform: translateY(-1px); }
.po-chip.is-active { color: var(--po-ink); border-color: var(--po-gold); font-weight: 600; }
.po-chip.is-active::before { transform: scale(1.05); }
.po-chip:active { transform: scale(0.97); }

/* ----------------------- sliders ----------------------- */
.po-slider-wrap { max-width: 460px; margin: 1.4rem auto 0; }
.po-slider-ends {
    display: flex;
    justify-content: space-between;
    font-family: var(--po-sans);
    font-size: 0.85rem;
    color: rgba(247, 244, 238, 0.6);
    margin-bottom: 0.9rem;
}
.po-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--po-reactive), var(--po-gold));
    outline: none;
}
.po-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--po-parchment);
    border: 3px solid var(--po-gold);
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(176, 137, 76, 0.5);
    animation: poPulse 2.4s infinite;
}
.po-slider::-moz-range-thumb {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--po-parchment);
    border: 3px solid var(--po-gold);
    cursor: pointer;
}
@keyframes poPulse {
    0% { box-shadow: 0 0 0 0 rgba(176, 137, 76, 0.45); }
    70% { box-shadow: 0 0 0 14px rgba(176, 137, 76, 0); }
    100% { box-shadow: 0 0 0 0 rgba(176, 137, 76, 0); }
}
.po-slider-val {
    font-family: var(--po-serif);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--po-gold);
    margin-top: 1rem;
}

/* ----------------------- nav quiz ----------------------- */
.po-quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 420px;
    margin: 2.6rem auto 0;
}
.po-nav-btn {
    font-family: var(--po-sans);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    border-radius: 999px;
    transition: all 200ms ease;
}
.po-prev {
    background: none;
    border: none;
    color: rgba(247, 244, 238, 0.55);
    padding: 0.6rem 0.8rem;
}
.po-prev:hover { color: var(--po-parchment); }
.po-next {
    background: var(--po-gold);
    color: var(--po-ink);
    border: none;
    font-weight: 600;
    padding: 0.85rem 2.2rem;
}
.po-next:hover:not(:disabled) { background: #c69c58; transform: translateY(-1px); }
.po-next:disabled { opacity: 0.35; cursor: not-allowed; }

/* ----------------------- composition (attente) ----------------------- */
.po-compose { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.po-compose-orb {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, var(--po-reactive), transparent 70%),
                radial-gradient(circle at 50% 60%, var(--po-gold), transparent 72%);
    filter: blur(6px);
    animation: poBreathe 2.6s ease-in-out infinite;
}
@keyframes poBreathe {
    0%, 100% { transform: scale(0.85); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
}
.po-compose-text {
    font-family: var(--po-serif);
    font-style: italic;
    font-size: 1.5rem;
    color: rgba(247, 244, 238, 0.85);
    letter-spacing: 0.02em;
}

/* ----------------------- résultats ----------------------- */
.po-results-title { margin-bottom: 2.6rem; }
.po-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
    margin-bottom: 3rem;
}
.po-card {
    position: relative;
    background: rgba(247, 244, 238, 0.04);
    border: 1px solid rgba(247, 244, 238, 0.12);
    border-radius: 18px;
    overflow: hidden;
    text-align: left;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    filter: blur(8px);
    animation: poReveal 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--i) * 140ms + 200ms);
}
@keyframes poReveal {
    to { opacity: 1; transform: none; filter: blur(0); }
}
.po-card.is-top {
    border-color: var(--po-gold);
    box-shadow: 0 0 0 1px var(--po-gold), 0 20px 60px rgba(176, 137, 76, 0.18);
}
.po-card-badge {
    position: absolute;
    top: 14px; left: 14px;
    z-index: 2;
    background: var(--po-gold);
    color: var(--po-ink);
    font-family: var(--po-sans);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}
.po-card-media {
    position: relative;
    aspect-ratio: 4 / 5;
    background: linear-gradient(160deg, #2a2436, #191622);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.po-card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
}
/* Le logo de repli reste contenu (pas étiré) */
.po-card-media img.po-img-fallback { object-fit: contain; opacity: 0.5; padding: 2.6rem; }
.po-seal {
    position: absolute;
    right: 12px; bottom: 12px;
    width: 80px; height: 80px;
    display: grid;
    place-items: center;
}
.po-seal svg { position: absolute; inset: 0; }
.po-seal-num {
    font-family: var(--po-serif);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--po-parchment);
}
.po-card-body { padding: 1.3rem 1.4rem 1.6rem; }
.po-card-brand {
    font-family: var(--po-sans);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.7rem;
    color: var(--po-gold);
    margin: 0 0 0.3rem;
}
.po-card-name {
    font-family: var(--po-serif);
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.1;
    margin: 0 0 0.8rem;
    color: var(--po-parchment);
}
.po-accords { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.po-accord {
    font-family: var(--po-sans);
    font-size: 0.72rem;
    color: rgba(247, 244, 238, 0.75);
    background: rgba(247, 244, 238, 0.06);
    border: 1px solid rgba(247, 244, 238, 0.12);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}
.po-card-desc {
    font-family: var(--po-sans);
    font-size: 0.86rem;
    line-height: 1.5;
    color: rgba(247, 244, 238, 0.62);
    margin: 0 0 0.9rem;
}
.po-card-why {
    font-family: var(--po-serif);
    font-style: italic;
    font-size: 1.02rem;
    line-height: 1.45;
    color: var(--po-parchment);
    border-left: 2px solid var(--po-gold);
    padding-left: 0.8rem;
    margin: 0 0 1rem;
}
.po-card-meta {
    font-family: var(--po-sans);
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    color: rgba(247, 244, 238, 0.45);
    margin: 0 0 1rem;
}
.po-card-select {
    width: 100%;
    font-family: var(--po-sans);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--po-parchment);
    background: transparent;
    border: 1px solid rgba(247, 244, 238, 0.28);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.po-card-select:hover { border-color: var(--po-gold); }
.po-card-select.is-selected {
    background: var(--po-gold);
    border-color: var(--po-gold);
    color: var(--po-ink);
}
.po-card.po-selected {
    border-color: var(--po-gold);
    box-shadow: 0 0 0 2px var(--po-gold), 0 18px 50px rgba(176, 137, 76, 0.22);
}
.po-convert-choice {
    font-family: var(--po-sans);
    font-size: 0.92rem;
    color: rgba(247, 244, 238, 0.7);
    margin: 0 0 1.2rem;
}
.po-convert-choice strong { color: var(--po-gold); }

/* ----------------------- conversion ----------------------- */
.po-convert {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    background: rgba(247, 244, 238, 0.04);
    border: 1px solid rgba(247, 244, 238, 0.12);
    border-radius: 18px;
    padding: 2.2rem 1.6rem;
}
.po-convert-title {
    font-family: var(--po-serif);
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    color: var(--po-parchment);
}
.po-convert-sub {
    font-family: var(--po-sans);
    font-size: 0.9rem;
    color: rgba(247, 244, 238, 0.6);
    margin: 0 0 1.4rem;
}
.po-convert-form { display: flex; flex-direction: column; gap: 0.6rem; max-width: 420px; margin: 0 auto 0.8rem; }
.po-convert-form input {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(247, 244, 238, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--po-parchment);
    font-family: var(--po-sans);
    font-size: 0.92rem;
}
.po-convert-form input::placeholder { color: rgba(247, 244, 238, 0.5); }
.po-convert-form input:focus {
    outline: none;
    border-color: var(--po-gold);
    box-shadow: 0 0 0 3px rgba(176, 137, 76, 0.18);
}
.po-convert-form .newsletter-btn {
    width: 100%;
    background: var(--po-gold);
    color: var(--po-ink);
    border: none;
    border-radius: 8px;
    padding: 0.95rem 1.6rem;
    font-weight: 600;
    font-family: var(--po-sans);
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}
.po-convert-form .newsletter-btn:hover { background: #c69c58; }
.po-convert-form .newsletter-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.po-lead-feedback { font-family: var(--po-sans); font-size: 0.86rem; min-height: 1.2em; margin: 0 0 1.2rem; }
.po-convert-actions { display: flex; gap: 1.4rem; justify-content: center; }
.po-share, .po-restart {
    background: none;
    border: none;
    color: rgba(247, 244, 238, 0.65);
    font-family: var(--po-sans);
    font-size: 0.88rem;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
    transition: color 200ms ease;
}
.po-share:hover, .po-restart:hover { color: var(--po-gold); }
.po-mentions {
    font-family: var(--po-sans);
    font-size: 0.74rem;
    color: rgba(247, 244, 238, 0.4);
    text-align: center;
    margin-top: 2rem;
}

/* ----------------------- responsive ----------------------- */
@media (max-width: 820px) {
    .po-cards { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 560px) {
    .po-convert-form { flex-direction: column; }
    .po-progress-label { display: none; }
}

/* ----------------------- composition du titre (mot à mot) ----------------------- */
.po-compose-title .po-w {
    display: inline-block;
    opacity: 0;
    transform: translateY(18px);
    filter: blur(8px);
    animation: poWordIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.po-compose-title .po-w:nth-child(1) { animation-delay: 0.15s; }
.po-compose-title .po-w:nth-child(2) { animation-delay: 0.32s; }
.po-compose-title em.po-w {
    animation-delay: 0.52s;
    text-shadow: 0 0 0 rgba(176, 137, 76, 0);
    animation-name: poWordIgnite;
}
@keyframes poWordIn {
    to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes poWordIgnite {
    0% { opacity: 0; transform: translateY(18px); filter: blur(10px); text-shadow: 0 0 0 rgba(176, 137, 76, 0); }
    60% { opacity: 1; transform: none; filter: blur(0); }
    100% { opacity: 1; transform: none; filter: blur(0); text-shadow: 0 0 34px rgba(176, 137, 76, 0.55); }
}

/* ----------------------- grain argentique ----------------------- */
.po::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------- reduced motion ----------------------- */
@media (prefers-reduced-motion: reduce) {
    .po-stage, .po-question-wrap.po-anim-in, .po-card, .po-compose-title .po-w { transition: none !important; animation: none !important; filter: none !important; opacity: 1 !important; transform: none !important; text-shadow: none !important; }
    .po-compose-orb { animation: none; }
    .po-slider::-webkit-slider-thumb { animation: none; }
    .po-chip::before { transition: none; }
    .po-ambient { display: none; }
    .po { background:
        radial-gradient(1000px 700px at 50% -10%, rgba(176,137,76,0.12), transparent 60%),
        var(--po-ink); }
}
