/* ==========================================================================
   Azeris Web - Styles personnalisés (complément à Tailwind)
   ========================================================================== */

/* Ancres : compense la hauteur de l'en-tête fixe (80 px) */
[id] {
    scroll-margin-top: 5.5rem;
}

/* 1. Barre de progression (composée par le GPU : transform au lieu de width) */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #2563eb, #60a5fa, #3b82f6);
    transform-origin: 0 50%;
    transform: scaleX(0);
    z-index: 100;
}

/* 2. Dégradé du hero : statique par défaut, animé uniquement sur grand écran
      et si l'utilisateur n'a pas demandé de réduire les animations */
.animated-gradient {
    background: linear-gradient(-45deg, #0f172a, #1e3a8a, #172554, #0f172a);
    background-size: 400% 400%;
}

@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
    .animated-gradient {
        animation: gradientShift 12s ease infinite;
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 3. Conteneur des particules (canvas injecté en JS, desktop uniquement) */
#canvas-3d-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#canvas-3d-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* 4. Apparition au défilement.
      On utilise visibility pour que l'élément garde sa place dans la page (évite le bug de scroll) */
.reveal {
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, visibility 0.8s;
}

.reveal.active {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* 5. Cartes avec effet de survol. */
.card-hover-3d {
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.card-hover-3d.reveal {
    transition: opacity 0.8s ease-out, transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

@media (hover: hover) {
    .card-hover-3d:hover,
    .card-hover-3d.reveal.active:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 30px -10px rgba(37, 99, 235, 0.25);
        border-color: rgba(59, 130, 246, 0.4);
    }
}

/* 6. Boutons : micro-animations limitées aux boutons d'action */
.glow-effect,
button[type="submit"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

@media (hover: hover) {
    .glow-effect:hover,
    button[type="submit"]:not(:disabled):hover {
        transform: translateY(-2px);
    }
}

.glow-effect:active,
button[type="submit"]:not(:disabled):active {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.glow-effect {
    position: relative;
    z-index: 1;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #2563eb, #3b82f6, #60a5fa, #2563eb);
    border-radius: 0.6rem;
    z-index: -1;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.glow-effect:hover::before {
    opacity: 0.8;
}

/* 7. Comparateur avant / après
      - clip-path au lieu de width : le contenu ne se recompose pas pendant le glissement
      - iframes : on empêche l'iframe de capturer les clics de drag (pointer-events: none)
      - touch-action: pan-y : le défilement vertical de la page reste possible au doigt */
.comparison-wrapper {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    border-radius: 1.5rem;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    cursor: ew-resize;
    background: #0f172a;
}

.comparison-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.comparison-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.comparison-before {
    clip-path: inset(0 50% 0 0);
}

.comparison-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    margin-left: -1.5px;
    background: #3b82f6;
    z-index: 20;
    outline: none;
    cursor: ew-resize;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.8);
}

.comparison-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.7);
    transition: transform 0.15s ease, background 0.15s ease;
}

.comparison-handle:hover .comparison-button {
    background: #3b82f6;
    transform: translate(-50%, -50%) scale(1.08);
}

.comparison-handle:focus-visible .comparison-button {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

/* Étiquettes flottantes "Avant" / "Après" */
.comparison-label {
    position: absolute;
    top: 14px;
    z-index: 15;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.comparison-label--before {
    left: 14px;
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.comparison-label--after {
    right: 14px;
    background: rgba(59, 130, 246, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 640px) {
    .comparison-wrapper {
        height: 420px;
    }

    .comparison-label {
        font-size: 10px;
        padding: 4px 10px;
    }
}

/* ==========================================================================
   Micro-interactions (toutes neutralisées par prefers-reduced-motion en bas de fichier)
   ========================================================================== */

/* Liens de navigation : soulignement qui se dessine au survol et pour la section en cours */
.nav-link {
    position: relative;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: #60a5fa;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .nav-link:hover::after {
        transform: scaleX(1);
    }
}

.nav-link[aria-current="true"] {
    color: #93c5fd;
}

.nav-link[aria-current="true"]::after {
    transform: scaleX(1);
}

/* Cartes : la pastille numérotée réagit au survol de sa carte */
.card-hover-3d [data-badge] {
    transition: transform 0.35s ease, background-color 0.35s ease, color 0.35s ease;
}

@media (hover: hover) {
    .card-hover-3d:hover [data-badge] {
        transform: rotate(-6deg) scale(1.08);
        background-color: #2563eb;
        color: #ffffff;
    }
}

/* Cartes de tarifs et de services */
.lift-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.lift-card.reveal {
    transition: opacity 0.8s ease-out, transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

@media (hover: hover) {
    .lift-card:hover,
    .lift-card.reveal.active:hover {
        transform: translateY(-6px);
        box-shadow: 0 22px 34px -14px rgba(37, 99, 235, 0.35);
    }
}

/* Champs de formulaire */
input,
select,
textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field-invalid {
    border-color: #f87171 !important;
}

/* FAQ */
details[open] > summary ~ * {
    animation: detailsFade 0.3s ease;
}

@keyframes detailsFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

/* Retour tactile sur les boutons principaux */
.glow-effect:focus-visible,
button[type="submit"]:focus-visible {
    outline-offset: 3px;
}

/* ==========================================================================
   Démo interactive "Restauration" (assets/js/restaurant-demo.js)
   ========================================================================== */
.rdemo {
    min-height: 640px;
}

.rdemo-skeleton {
    display: grid;
    place-items: center;
    min-height: 640px;
    color: #cbd5e1;
    font-size: 0.875rem;
    border: 1px dashed #334155;
    border-radius: 1.5rem;
    padding: 1rem;
    text-align: center;
}

.rdemo-layout {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
    .rdemo-layout {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        align-items: start;
    }

    .rphone {
        position: sticky;
        top: 6.5rem;
    }
}

/* --- Carte --- */
.rmenu-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rmenu-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
}

.rbadge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.rfilters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rchip {
    appearance: none;
    min-height: 44px;
    padding: 0.5rem 1.1rem;
    border-radius: 9999px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
    .rchip:hover {
        border-color: #60a5fa;
        transform: translateY(-1px);
    }
}

.rchip:active {
    transform: scale(0.96);
}

.rchip[aria-pressed="true"] {
    background: #2563eb;
    border-color: #60a5fa;
    color: #ffffff;
    box-shadow: 0 8px 18px -8px rgba(37, 99, 235, 0.8);
}

.rchip--veg[aria-pressed="true"] {
    background: #047857;
    border-color: #34d399;
    box-shadow: 0 8px 18px -8px rgba(4, 120, 87, 0.8);
}

.rchip:focus-visible,
.rround:focus-visible,
.rbtn:focus-visible,
.rinput:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.rcount-note {
    margin: 1rem 0 0.75rem;
    font-size: 0.8125rem;
    color: #cbd5e1;
}

.rgrid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
    .rgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.rdish {
    --rx: 0deg;
    --ry: 0deg;
    --mx: 50%;
    --my: 50%;
    position: relative;
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid #1e293b;
    background: linear-gradient(160deg, #111c33, #0b1325);
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    animation: rdishIn 0.45s ease backwards;
    animation-delay: calc(var(--i, 0) * 45ms);
}

.rdish::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(240px circle at var(--mx) var(--my), rgba(96, 165, 250, 0.2), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.rdish-cat {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93c5fd;
    margin-bottom: 0.35rem;
}

.rdish-name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.rdish-desc {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.rdish-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.rdish-price {
    font-weight: 800;
    color: #bfdbfe;
    transition: transform 0.3s ease;
}

.rtag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.rempty {
    grid-column: 1 / -1;
    padding: 2rem 1rem;
    text-align: center;
    color: #cbd5e1;
    border: 1px dashed #334155;
    border-radius: 1rem;
}

.rnote {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #cbd5e1;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .rdish:hover {
        transform: perspective(900px) translateY(-6px) rotateX(var(--rx)) rotateY(var(--ry));
        border-color: #3b82f6;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.05) inset,
            0 18px 30px -12px rgba(0, 0, 0, 0.65),
            0 8px 18px -8px rgba(37, 99, 235, 0.4);
    }

    .rdish:hover::before {
        opacity: 1;
    }

    .rdish:hover .rdish-price {
        transform: translateZ(28px);
    }

    .rdish:hover .rdish-name {
        transform: translateZ(14px);
    }
}

@keyframes rdishIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
}

/* --- Réservation : cadre de téléphone --- */
.rphone {
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    padding: 0.75rem;
    border-radius: 2.25rem;
    border: 1px solid #1e293b;
    background: #0b1325;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(148, 163, 184, 0.08) inset;
}

.rscreen {
    display: flex;
    flex-direction: column;
    min-height: 580px;
    overflow: hidden;
    border-radius: 1.6rem;
    background: linear-gradient(180deg, #0f172a, #0b1220);
}

.rhead {
    padding: 1.1rem 1.25rem 0.9rem;
    border-bottom: 1px solid #1e293b;
}

.rhead-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rhead-brand {
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.rprogress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.9rem;
}

.rdots {
    display: flex;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rdot {
    width: 1.6rem;
    height: 0.4rem;
    border-radius: 9999px;
    background: #334155;
    transition: background-color 0.3s ease, width 0.3s ease;
}

.rdot.is-done {
    background: #3b82f6;
}

.rdot.is-current {
    width: 2.4rem;
    background: #93c5fd;
}

.rprogress-label {
    font-size: 0.75rem;
    color: #cbd5e1;
}

.rbody {
    flex: 1;
    padding: 1.25rem;
}

.rstep {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    animation: rstepIn 0.3s ease backwards;
}

.rstep--back {
    animation-name: rstepBack;
}

.rstep-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    outline: none;
}

.rstep-title--center {
    text-align: center;
}

.rstep-hint {
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.rstep-caption {
    text-align: center;
    color: #e2e8f0;
    font-weight: 600;
}

.rstepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.75rem 0 0.5rem;
}

.rround {
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    border: 1px solid #334155;
    background: #111c33;
    color: #ffffff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
    .rround:not(:disabled):hover {
        background: #1d4ed8;
        border-color: #60a5fa;
    }
}

.rround:not(:disabled):active {
    transform: scale(0.92);
}

.rround:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.rcount {
    min-width: 2ch;
    text-align: center;
    font-size: 3.75rem;
    font-weight: 800;
    color: #ffffff;
}

.rcount.bump {
    animation: rbump 0.25s ease;
}

.rchoice {
    position: relative;
    display: block;
}

.rchoice input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.rchoice input:disabled {
    cursor: not-allowed;
}

.rchoice-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 0.5rem 0.4rem;
    border-radius: 0.9rem;
    border: 1px solid #334155;
    background: #111c33;
    color: #e2e8f0;
    text-align: center;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rchoice-top {
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.rchoice-main {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
}

.rchoice-main--sm {
    font-size: 1.05rem;
}

.rchoice-bottom {
    font-size: 0.6875rem;
    color: #cbd5e1;
}

@media (hover: hover) {
    .rchoice input:not(:disabled):not(:checked):hover + .rchoice-face {
        border-color: #60a5fa;
        transform: translateY(-2px);
    }
}

.rchoice input:checked + .rchoice-face {
    background: #2563eb;
    border-color: #93c5fd;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, 0.9);
}

.rchoice input:checked + .rchoice-face .rchoice-top,
.rchoice input:checked + .rchoice-face .rchoice-bottom {
    color: #dbeafe;
}

.rchoice input:focus-visible + .rchoice-face {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.rchoice input:disabled + .rchoice-face {
    opacity: 0.45;
}

.rdates {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.35rem 0.25rem 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.rdates .rchoice {
    flex: 0 0 4.4rem;
    scroll-snap-align: start;
}

.rfieldset {
    margin: 1rem 0 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.rlegend {
    padding: 0;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #93c5fd;
}

.rtimes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.rfield {
    margin-top: 1rem;
}

.rlabel {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #e2e8f0;
}

.rinput {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid #475569;
    background: #0b1325;
    color: #ffffff;
    font-size: 1rem;
}

.rinput[aria-invalid="true"] {
    border-color: #f87171;
}

.rerror {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: #fca5a5;
}

.ractions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

.rbtn {
    min-height: 52px;
    padding: 0.75rem 1.25rem;
    border-radius: 0.9rem;
    border: 1px solid transparent;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.rbtn--primary {
    flex: 1;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, 0.9);
}

@media (hover: hover) {
    .rbtn--primary:not(:disabled):hover {
        background: #1d4ed8;
        transform: translateY(-1px);
    }
}

.rbtn--primary:disabled {
    background: #334155;
    color: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
}

.rbtn--ghost {
    background: transparent;
    border-color: #475569;
    color: #e2e8f0;
}

@media (hover: hover) {
    .rbtn--ghost:hover {
        border-color: #93c5fd;
    }
}

.rbtn:not(:disabled):active {
    transform: scale(0.97);
}

.rbtn--wide {
    width: 100%;
    margin-top: 1.25rem;
}

.rconfirm {
    animation: rstepIn 0.3s ease backwards;
}

.rcheck {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0.5rem auto 1rem;
    fill: none;
    stroke: #34d399;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rcheck-circle {
    stroke-dasharray: 158;
    stroke-dashoffset: 158;
    animation: rdraw 0.6s ease forwards;
}

.rcheck-mark {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: rdraw 0.35s 0.5s ease forwards;
}

.rticket {
    margin: 1.25rem 0 0;
    padding: 0.5rem 1.1rem;
    border-radius: 1rem;
    border: 1px dashed #475569;
    background: #111c33;
    text-align: left;
    animation: rrise 0.5s 0.55s ease backwards;
}

.rticket-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #1e293b;
    animation: rrise 0.4s ease backwards;
    animation-delay: calc(0.7s + var(--i, 0) * 0.08s);
}

.rticket-row:last-child {
    border-bottom: 0;
}

.rticket-key {
    font-size: 0.8125rem;
    color: #cbd5e1;
}

.rticket-val {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #ffffff;
    text-align: right;
}

.rref {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.1em;
    color: #bfdbfe;
}

@keyframes rstepIn {
    from { opacity: 0; transform: translateX(18px); }
}

@keyframes rstepBack {
    from { opacity: 0; transform: translateX(-18px); }
}

@keyframes rbump {
    50% { transform: scale(1.18); }
}

@keyframes rdraw {
    to { stroke-dashoffset: 0; }
}

@keyframes rrise {
    from { opacity: 0; transform: translateY(14px); }
}

/* 8. Accessibilité : focus clavier visible */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
}

/* 9. Accessibilité : respect de la préférence "réduire les animations" */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .rcheck-circle,
    .rcheck-mark {
        stroke-dashoffset: 0;
    }
}
/* ==========================================================================
   Maquettes interactives par métier (#demos) — assets/js/demos-metiers.js
   ========================================================================== */

/* --- Onglets --- */
.dm-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.dm-tab {
    appearance: none;
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
    border-radius: 9999px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    font-family: inherit;
}

@media (hover: hover) {
    .dm-tab:hover {
        border-color: #60a5fa;
        color: #ffffff;
        transform: translateY(-1px);
    }
}

.dm-tab.is-active {
    background: #2563eb;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 8px 20px -8px rgba(37, 99, 235, 0.8);
}

.dm-tab:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

/* --- Panneau --- */
.dm-panel {
    animation: dmFade 0.35s ease;
}

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

.dm-demo {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.dm-phone-wrapper {
    width: 100%;
    max-width: 360px;
}

/* --- Cadre téléphone --- */
.dm-phone {
    position: relative;
    background: #0b1325;
    border: 1px solid #1e293b;
    border-radius: 36px;
    padding: 12px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(148, 163, 184, 0.08) inset;
    overflow: hidden;
}

.dm-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 22px;
    background: #0b1325;
    border-radius: 9999px;
    z-index: 10;
    border: 1px solid #1e293b;
}

.dm-screen {
    position: relative;
    background: #0f172a;
    border-radius: 26px;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    flex-direction: column;
}

.dm-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 22px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #cbd5e1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dm-status-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dm-battery {
    display: inline-block;
    width: 22px;
    height: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    position: relative;
}

.dm-battery::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 70%;
    height: 7px;
    background: #cbd5e1;
    border-radius: 1px;
}

.dm-screen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px 18px 20px;
    overflow-y: auto;
}

/* --- RESTAURANT --- */
.dm-screen--resto .dm-screen-content {
    background: linear-gradient(180deg, #1a0f05 0%, #0a0a0a 60%);
}

.dm-resto-header {
    text-align: center;
    padding: 12px 0 18px;
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
    margin-bottom: 16px;
}

.dm-resto-eyebrow {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #c9a961;
    margin-bottom: 4px;
}

.dm-resto-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: #f5f0e8;
}

.dm-dish {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(201, 169, 97, 0.1);
}

.dm-dish-info {
    flex: 1;
}

.dm-dish-cat {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #c9a961;
    font-weight: 700;
    margin-bottom: 2px;
}

.dm-dish-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    color: #f5f0e8;
    margin-bottom: 2px;
}

.dm-dish-desc {
    font-size: 10px;
    color: #b8b0a0;
    font-style: italic;
    line-height: 1.3;
}

.dm-dish-price {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    color: #e5c88a;
    white-space: nowrap;
}

.dm-resto-cta {
    margin-top: 20px;
    background: #c9a961;
    color: #0a0a0a;
    border: 0;
    border-radius: 8px;
    padding: 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    font-family: inherit;
}

@media (hover: hover) {
    .dm-resto-cta:hover { background: #e5c88a; transform: translateY(-1px); }
}

.dm-resto-note {
    text-align: center;
    margin-top: 14px;
    font-size: 10px;
    color: #c9a961;
    letter-spacing: 0.2em;
}

.dm-resto-form-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: #f5f0e8;
    text-align: center;
    margin-bottom: 16px;
}

.dm-resto-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dm-resto-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #c9a961;
    margin-top: 10px;
    font-weight: 600;
}

.dm-resto-input {
    background: #0a0a0a;
    border: 1px solid rgba(201, 169, 97, 0.3);
    color: #f5f0e8;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    width: 100%;
}

.dm-resto-input:focus {
    outline: none;
    border-color: #c9a961;
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

.dm-resto-back {
    margin-top: 14px;
    background: transparent;
    border: 0;
    color: #b8b0a0;
    font-size: 11px;
    cursor: pointer;
    text-align: center;
    padding: 6px;
    font-family: inherit;
}

.dm-resto-back:hover { color: #f5f0e8; }

.dm-resto-check {
    color: #34d399;
    text-align: center;
    margin: 20px 0 12px;
    animation: dmPop 0.5s ease;
}

@keyframes dmPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.dm-resto-confirm-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    color: #f5f0e8;
    text-align: center;
    margin-bottom: 20px;
}

.dm-resto-ticket {
    background: rgba(201, 169, 97, 0.08);
    border: 1px dashed rgba(201, 169, 97, 0.4);
    border-radius: 10px;
    padding: 6px 14px;
}

.dm-resto-ticket-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(201, 169, 97, 0.15);
    font-size: 12px;
}

.dm-resto-ticket-row:last-child { border-bottom: 0; }

.dm-resto-ticket-key { color: #b8b0a0; }
.dm-resto-ticket-val { color: #f5f0e8; font-weight: 600; }

/* --- BOULANGERIE --- */
.dm-screen--boul .dm-screen-content {
    background: linear-gradient(180deg, #3b1a0a 0%, #1a0a04 60%);
}

.dm-boul-header {
    text-align: center;
    padding: 12px 0 18px;
    border-bottom: 1px solid rgba(251, 146, 60, 0.2);
    margin-bottom: 16px;
}

.dm-boul-eyebrow {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #fb923c;
    margin-bottom: 4px;
}

.dm-boul-title {
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: #fff5e6;
    font-style: italic;
}

.dm-boul-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.dm-boul-product {
    background: rgba(251, 146, 60, 0.08);
    border: 1px solid rgba(251, 146, 60, 0.25);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
    color: inherit;
}

@media (hover: hover) {
    .dm-boul-product:hover {
        background: rgba(251, 146, 60, 0.15);
        border-color: #fb923c;
        transform: translateY(-2px);
    }
}

.dm-boul-product:active { transform: scale(0.96); }

.dm-boul-emoji {
    font-size: 24px;
    margin-bottom: 4px;
    line-height: 1;
}

.dm-boul-name {
    font-size: 10px;
    font-weight: 600;
    color: #fff5e6;
    margin-bottom: 2px;
    line-height: 1.2;
}

.dm-boul-price {
    font-size: 11px;
    font-weight: 700;
    color: #fb923c;
}

.dm-boul-cart {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin-top: auto;
}

.dm-boul-cart-title {
    font-size: 11px;
    font-weight: 700;
    color: #fff5e6;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.dm-boul-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 11px;
    color: #fff5e6;
    border-bottom: 1px solid rgba(251, 146, 60, 0.15);
}

.dm-boul-line:last-of-type { border-bottom: 0; }

.dm-boul-line-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dm-boul-qty {
    color: #fb923c;
    font-weight: 700;
}

.dm-boul-remove {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 4px;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.dm-boul-order {
    width: 100%;
    margin-top: 12px;
    background: #fb923c;
    color: #1a0a04;
    border: 0;
    border-radius: 6px;
    padding: 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
}

.dm-boul-order:hover { background: #fdba74; }

.dm-boul-done {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-top: 16px;
    animation: dmFade 0.4s ease;
}

.dm-boul-done-title {
    font-size: 14px;
    font-weight: 700;
    color: #6ee7b7;
    margin-bottom: 4px;
}

.dm-boul-done-desc {
    font-size: 11px;
    color: #a7f3d0;
}

/* --- ARTISAN --- */
.dm-screen--art .dm-screen-content {
    background: linear-gradient(180deg, #0f172a 0%, #1e3a8a 200%);
}

.dm-art-header {
    text-align: center;
    padding: 12px 0 18px;
    border-bottom: 1px solid rgba(52, 211, 153, 0.2);
    margin-bottom: 16px;
}

.dm-art-eyebrow {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #34d399;
    margin-bottom: 4px;
}

.dm-art-title {
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: #d1fae5;
    font-style: italic;
}

.dm-art-form-title {
    font-family: Georgia, serif;
    font-size: 18px;
    color: #d1fae5;
    text-align: center;
    margin-bottom: 16px;
}

.dm-art-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #34d399;
    margin-top: 12px;
    margin-bottom: 4px;
    font-weight: 600;
}

.dm-art-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #f8fafc;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
}

.dm-art-input:focus {
    outline: none;
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

.dm-art-range {
    width: 100%;
    accent-color: #34d399;
    margin: 4px 0;
}

.dm-art-estimate {
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
    text-align: center;
}

.dm-art-est-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #34d399;
    margin-bottom: 4px;
}

.dm-art-est-price {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #d1fae5;
    margin-bottom: 2px;
}

.dm-art-est-note {
    font-size: 10px;
    color: #6ee7b7;
    font-style: italic;
}

.dm-art-next {
    width: 100%;
    margin-top: 16px;
    background: #10b981;
    color: #ffffff;
    border: 0;
    border-radius: 6px;
    padding: 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.dm-art-next:hover:not(:disabled) { background: #34d399; }
.dm-art-next:disabled { opacity: 0.4; cursor: not-allowed; }

.dm-art-back {
    width: 100%;
    margin-top: 10px;
    background: transparent;
    border: 0;
    color: #6ee7b7;
    font-size: 11px;
    cursor: pointer;
    padding: 6px;
    font-family: inherit;
    text-align: center;
}

.dm-art-check {
    color: #34d399;
    text-align: center;
    margin: 20px 0 12px;
    animation: dmPop 0.5s ease;
}

.dm-art-done-title {
    font-family: Georgia, serif;
    font-size: 20px;
    color: #d1fae5;
    text-align: center;
    margin-bottom: 8px;
}

.dm-art-done-desc {
    font-size: 11px;
    color: #a7f3d0;
    text-align: center;
    line-height: 1.5;
}

/* --- Accessibilité --- */
@media (prefers-reduced-motion: reduce) {
    .dm-tab,
    .dm-boul-product,
    .dm-resto-cta,
    .dm-art-next {
        transition: none !important;
    }
    .dm-panel,
    .dm-resto-check,
    .dm-art-check,
    .dm-boul-done {
        animation: none !important;
    }
}
@media (max-width: 768px) {
    #canvas-3d-container {
        display: none !important;
    }
    .animated-gradient {
        background: linear-gradient(135deg, #0f172a, #1e3a8a, #0f172a, #1e3a8a);
        background-size: 300% 300%;
        animation: mobileGradient 8s ease infinite;
    }
    @keyframes mobileGradient {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }
}

@media (max-width: 768px) {
    .comparison-wrapper {
        height: 400px;
        border-radius: 1rem;
    }
    .comparison-label {
        font-size: 9px;
        padding: 4px 8px;
        top: 10px;
    }
    .comparison-label--before { left: 10px; }
    .comparison-label--after { right: 10px; }
    .comparison-button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .comparison-handle {
        width: 4px;
    }
}

@media (max-width: 767px) {
    #tarifs .grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }
    #tarifs .bg-slate-800\/80,
    #tarifs .bg-gradient-to-b {
        padding: 1rem !important;
    }
    #tarifs .text-4xl {
        font-size: 1.5rem !important;
    }
    #tarifs .space-y-3 {
        font-size: 0.75rem !important;
    }
    #tarifs ul li {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
    }
    #tarifs .text-xs.font-mono {
        display: none !important; 
    }
}

@media (max-width: 768px) {
    .dm-phone-wrapper {
        max-width: 290px;
    }
    .dm-screen {
        min-height: 500px;
    }
    .dm-tabs {
        gap: 6px;
    }
    .dm-tab {
        padding: 8px 14px;
        font-size: 11px;
    }
    .dm-dish-name {
        font-size: 13px;
    }
    .dm-resto-title, .dm-boul-title, .dm-art-title {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .overflow-x-auto table {
        font-size: 11px;
    }
    .overflow-x-auto th,
    .overflow-x-auto td {
        padding: 0.5rem !important;
    }
}

@media (hover: none) {
    .card-hover-3d:active,
    .lift-card:active {
        transform: scale(0.97) !important;
        transition: transform 0.1s ease !important;
    }
    .glow-effect:active,
    .dm-tab:active {
        opacity: 0.8;
        transform: scale(0.96) !important;
    }
    header nav a:active {
        color: #60a5fa !important;
    }
    #mobile-menu a:active {
        background: rgba(255, 255, 255, 0.1);
        padding-left: 8px;
    }
}

@media (max-width: 768px) {
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    h1 {
        font-size: 2rem !important;
        line-height: 1.1 !important;
    }
    h2 {
        font-size: 1.5rem !important;
    }
    .text-base, p {
        font-size: 0.85rem !important;
    }
}
/* ==========================================================================
   CORRECTIONS COMPARATEUR MOBILE & PERFORMANCE
   ========================================================================== */

/* Sur mobile, on force le contenu des iframes à se comporter comme un petit téléphone */
@media (max-width: 768px) {
    .comparison-iframe {
        /* On réduit la taille virtuelle de l'écran pour que le texte soit lisible */
        width: 250% !important; 
        height: 250% !important;
        transform: scale(0.4);
        transform-origin: top left;
        /* On empêche le défilement interne pour que le doigt glisse bien le curseur */
        pointer-events: none; 
    }
    
    /* On ajuste les étiquettes Avant/Après */
    .comparison-label {
        font-size: 10px;
        padding: 3px 8px;
    }
}
/* --- ANIMATION DU MENU MOBILE (BURGER) --- */
#mobile-menu {
    /* On prépare l'animation (max-height à 0, invisible, opacité 0) */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
}

/* Quand le menu a la classe "is-open" (qu'on va ajouter en JS) */
#mobile-menu.is-open {
    max-height: 500px; /* Assez grand pour contenir tous les liens */
    opacity: 1;
}

/* Petit effet sur les liens du menu pour qu'ils apparaissent en douceur */
#mobile-menu a {
    transform: translateY(-10px);
    transition: transform 0.3s ease;
    opacity: 0;
}

#mobile-menu.is-open a {
    transform: translateY(0);
    opacity: 1;
}

/* On décale l'apparition de chaque lien (effet cascade) */
#mobile-menu.is-open a:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.is-open a:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.is-open a:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.is-open a:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.is-open a:nth-child(5) { transition-delay: 0.25s; }
#mobile-menu.is-open a:nth-child(6) { transition-delay: 0.3s; }
#mobile-menu.is-open a:nth-child(7) { transition-delay: 0.35s; }
#mobile-menu.is-open a:nth-child(8) { transition-delay: 0.4s; }
#mobile-menu.is-open a:nth-child(9) { transition-delay: 0.45s; }
/* --- CORRECTION DU SCROLL POUR LE MENU FIXE --- */
html {
    scroll-behavior: smooth;
}

/* On force une marge plus grande pour que le titre soit bien visible */
section[id], div[id] {
    scroll-margin-top: 120px; /* On augmente à 120px */
}

/* Sur mobile, on ajuste */
@media (max-width: 768px) {
    section[id], div[id] {
        scroll-margin-top: 100px;
    }
}