/* ============================================================================
   The Landlord — Online Check-in v2
   Design system mobile-first. Marque : encre #191614, émeraude #2FB787,
   forêt #1B4332, sauge #E8EFE9. Titres Cormorant Garamond, UI Poppins.
   ========================================================================= */

:root {
    --ink: #191614;
    --ink-soft: #4a4642;
    --muted: #857f78;
    --emerald: #245D4F;
    --emerald-soft: #E3EDE9;
    --forest: #1D4B40;
    --forest-deep: #16352D;
    --sage: #E8EFE9;
    --paper: #ffffff;
    --line: #e3e0db;
    --danger: #b3372f;
    --danger-soft: #fbeceb;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-ui: 'Poppins', -apple-system, 'Segoe UI', Roboto, sans-serif;

    --radius: 14px;
    --radius-pill: 999px;
    --shadow-card: 0 10px 40px rgba(25, 22, 20, 0.08);
    --pad: clamp(16px, 4vw, 28px);
}

/* ---- Reset minimal ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--sage);
    min-height: 100dvh;
}
img, video { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
a { color: var(--forest); }
button { font: inherit; cursor: pointer; }

/* ============================================================================
   Structure de page : carte centrée (desktop) / pleine largeur (mobile)
   ========================================================================= */
.shell {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 0 48px;
}
@media (min-width: 720px) {
    .shell { padding: 32px 20px 64px; }
}
.card {
    background: var(--paper);
    padding: var(--pad);
}
@media (min-width: 720px) {
    .card {
        border-radius: 24px;
        box-shadow: var(--shadow-card);
    }
}

/* ---- Header commun ---- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--pad);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) {
    .site-header {
        background: transparent;
        border-bottom: 0;
        padding: 0 4px 18px;
    }
}
.site-header__logo img { height: 46px; width: auto; }
.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
}
.lang-switch__item { color: var(--muted); text-decoration: none; padding: 4px 2px; }
.lang-switch__item.is-active {
    color: var(--forest-deep);
    border-bottom: 2px solid var(--emerald);
}
.lang-switch__sep { color: var(--line); }

/* ---- Progression « Check-in 1/2 » ---- */
.progress-head { padding: 18px var(--pad) 0; }
@media (min-width: 720px) { .progress-head { padding: 18px 0 0; } }
.progress-head__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--forest);
    margin-bottom: 8px;
}
.progress-head__bar {
    height: 5px;
    border-radius: var(--radius-pill);
    background: var(--line);
    overflow: hidden;
}
.progress-head__bar span {
    display: block;
    height: 100%;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--emerald), var(--forest));
    transition: width .4s ease;
}

/* ---- Flash ---- */
.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px var(--pad) 0;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 14px;
}
@media (min-width: 720px) { .flash { margin: 14px 0 0; } }
.flash svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.flash--error { background: var(--danger-soft); color: var(--danger); }
.flash--success { background: var(--emerald-soft); color: var(--forest-deep); }

/* ============================================================================
   Typo display + sections
   ========================================================================= */
.display-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(30px, 7vw, 42px);
    line-height: 1.08;
    color: var(--ink);
}
.section {
    padding-top: 26px;
    margin-top: 26px;
    border-top: 1px solid var(--line);
}
.section:first-of-type { border-top: 0; margin-top: 0; }
.section__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 24px;
    color: var(--ink);
    margin-bottom: 4px;
}
.section__hint { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }

/* ============================================================================
   Champs
   ========================================================================= */
.field { margin-bottom: 16px; }
.field__label,
.field > label:not(.checkbox) {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.input {
    width: 100%;
    padding: 13px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
    min-height: 48px;
}
.input:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px var(--emerald-soft);
}
.input--select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857f78' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}
input[type="date"].input { min-height: 48px; }
.field--invalid .input { border-color: var(--danger); }
.field-error {
    margin: 6px 2px 0;
    font-size: 12.5px;
    color: var(--danger);
}
.field-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: -6px 0 16px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--sage);
    color: var(--forest-deep);
    font-size: 13px;
}
.field-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* Grille 2 colonnes (préfixe+tél, codes…) */
.field-grid { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.field-grid .field { margin-bottom: 16px; }

/* ---- Radio pills (créneaux, motif, oui/non, CIN/passeport) ---- */
.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    min-height: 44px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: 14px;
    color: var(--ink-soft);
    background: var(--paper);
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
}
.radio-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.radio-pill:has(input:checked) {
    background: var(--forest-deep);
    border-color: var(--forest-deep);
    color: #fff;
    font-weight: 500;
}
.radio-pill:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--emerald-soft); }

/* ---- Checkbox (CGV) ---- */
.checkbox {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
}
.checkbox input { position: absolute; opacity: 0; }
.checkbox__box {
    flex: none;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    border: 1.5px solid var(--line);
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: transparent;
    background: var(--paper);
    transition: all .15s ease;
}
.checkbox__box svg { width: 14px; height: 14px; }
.checkbox:has(input:checked) .checkbox__box {
    background: var(--emerald);
    border-color: var(--emerald);
    color: #fff;
}
.checkbox:has(input:focus-visible) .checkbox__box { box-shadow: 0 0 0 3px var(--emerald-soft); }
.checkbox__label { font-size: 14px; color: var(--ink-soft); }
.checkbox__label a { color: var(--forest); font-weight: 500; }

/* ---- Upload / capture identité ---- */
.file-input { width: 100%; font-size: 14px; }
.upload-zone {
    border: 1.5px dashed var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: #fbfaf8;
}
.upload-zone .file-input { margin-top: 4px; }
.upload-preview {
    margin-top: 12px;
    display: none;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 260px;
}
.upload-preview.is-visible { display: block; }
.upload-preview img { width: 100%; object-fit: contain; max-height: 260px; background: var(--sage); }
.btn-webcam { margin-top: 4px; }

/* ============================================================================
   Boutons
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 14px 26px;
    border: 0;
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:active { transform: scale(.985); }
.btn--primary {
    width: 100%;
    background: var(--forest-deep);
    color: #fff;
}
.btn--primary:hover { background: var(--forest); }
.btn--emerald { background: var(--emerald); color: #fff; }
.btn--emerald:hover { filter: brightness(1.05); }
.btn--ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1.5px solid var(--line);
}
.btn--ghost:hover { border-color: var(--ink-soft); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 12.5px; }
.btn svg { width: 18px; height: 18px; }
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
}
.form-actions .btn--back { align-self: center; }

/* ============================================================================
   Landing
   ========================================================================= */
.landing {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(15, 24, 20, .55) 0%, rgba(15, 24, 20, .35) 45%, rgba(22, 53, 45, .84) 100%),
        url('../img/home.jpg') center / cover no-repeat;
}
.landing__topbar {
    display: flex;
    justify-content: flex-end;
    padding: 18px 22px;
}
.landing__topbar .lang-switch__item { color: rgba(255, 255, 255, .75); }
.landing__topbar .lang-switch__item.is-active { color: #fff; border-bottom-color: var(--emerald); }
.landing__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: #fff;
}
.landing__logo { height: 110px; width: auto; margin-bottom: 24px; }
.landing__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(32px, 7.5vw, 50px);
    line-height: 1.08;
    max-width: 24ch;
    text-wrap: balance;
}
.landing__divider {
    width: 56px;
    height: 3px;
    border-radius: var(--radius-pill);
    background: var(--emerald);
    margin: 22px 0;
}
.landing__intro {
    max-width: 52ch;
    font-size: 15px;
    color: rgba(255, 255, 255, .85);
    margin-bottom: 30px;
}
.landing__form { width: 100%; max-width: 420px; }
.landing__form .input {
    text-align: center;
    font-size: 17px;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, .96);
    border-color: transparent;
    min-height: 56px;
}
.landing__form .field { margin-bottom: 12px; }
.landing__form .field__label { display: none; }
.landing__form .field-error { color: #ffd9d5; text-align: center; }
.landing__form .flash { margin: 0 0 12px; }
.landing__form .btn--primary { background: var(--emerald); }
.landing__form .btn--primary:hover { background: #1D4B40; }

/* ============================================================================
   Photos du logement
   ========================================================================= */
.property-hero {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 var(--pad) 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.property-hero::-webkit-scrollbar { display: none; }
@media (min-width: 720px) {
    .property-hero { padding: 0 0 4px; border-radius: 18px 18px 0 0; overflow: hidden; }
}
.property-hero__photo {
    flex: 0 0 78%;
    scroll-snap-align: center;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background-color: var(--sage);
    object-fit: cover;
    width: 78%;
}
@media (min-width: 720px) {
    .property-hero__photo { flex: 1 1 0; border-radius: 0; aspect-ratio: 4 / 3; }
    .property-hero__photo:first-child { flex: 2 1 0; }
    .property-hero__photo:nth-child(n+4) { display: none; }
}

/* ---- Intro d'écran ---- */
.screen-intro { padding: 18px 0 4px; }
.screen-intro .display-title { margin-bottom: 6px; }
.screen-intro__sub { color: var(--muted); font-size: 14px; }
.screen-intro__property {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    background: var(--sage);
    color: var(--forest-deep);
    font-size: 13px;
    font-weight: 500;
}

/* ============================================================================
   Services (transfert, snack, conciergerie)
   ========================================================================= */
.service-note {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--sage);
    color: var(--forest-deep);
    font-size: 13.5px;
    margin: 12px 0 16px;
}
.service-note strong { font-weight: 600; }
.upsell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}
.upsell__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    background: var(--sage);
    color: var(--forest-deep);
    font-size: 13.5px;
    font-weight: 500;
}
.upsell__item svg { width: 15px; height: 15px; }
.concierge-line { font-size: 14px; color: var(--ink-soft); }
.concierge-line a { font-weight: 600; color: var(--forest-deep); text-decoration: none; }

/* ============================================================================
   Signature
   ========================================================================= */
.terms-box {
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: #fbfaf8;
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--ink-soft);
}
.sign-box { margin: 4px 0 6px; }
.sign-box__canvas {
    width: 100%;
    height: 200px;
    border: 1.5px dashed var(--line);
    border-radius: var(--radius);
    background: #fbfaf8;
    touch-action: none;
}
.sign-box__tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
}

/* ============================================================================
   Succès + Instructions jour J
   ========================================================================= */
.success-hero {
    text-align: center;
    padding: 34px var(--pad) 8px;
}
.success-hero__badge {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--emerald-soft);
    color: var(--forest);
}
.success-hero__badge svg { width: 34px; height: 34px; }
.success-hero__sub { color: var(--muted); font-size: 14.5px; max-width: 46ch; margin: 8px auto 0; }

.gate-card {
    margin-top: 22px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--sage);
    color: var(--forest-deep);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
}
.gate-card svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.gate-card strong { display: block; font-weight: 600; margin-bottom: 2px; }

/* ---- Compte à rebours jusqu'au check-in ---- */
.checkin-cta {
    margin-top: 18px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--sage);
    color: var(--forest-deep);
    text-align: center;
}
.checkin-cta.is-open { background: var(--emerald-soft); }
.checkin-cta__lead,
.checkin-cta__open {
    font-size: 14px;
    max-width: 46ch;
    margin: 0 auto;
}
.checkin-cta__open { font-weight: 600; }
.checkin-cta__lead strong { font-weight: 600; }
.checkin-cta__note {
    margin: 12px auto 0;
    max-width: 46ch;
    font-size: 12.5px;
    color: var(--forest);
    opacity: .85;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 14px;
    /* Une durée est une suite de nombres, pas de la prose : sans ça, en RTL les
       colonnes s'inversent et les jours passent à droite. Les chiffres, eux, ne
       s'inversent jamais (bidi les classe « European Number »). */
    direction: ltr;
}
.countdown__cell {
    padding: 10px 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .72);
}
.countdown__num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(24px, 7vw, 30px);
    font-weight: 600;
    line-height: 1.05;
    color: var(--forest-deep);
    /* lining-nums est indispensable ici : Cormorant Garamond sert des chiffres
       ELZÉVIRIENS par défaut (hauteurs inégales, jambages sous la ligne), pensés
       pour se fondre dans du texte courant. Sur un compteur qu'on lit d'un coup
       d'œil, « 18 » se lisait « ı8 ». La police embarque les deux jeux, on ne
       fait que demander le bon. tabular-nums fige la chasse pour que les
       secondes ne fassent pas trembler la tuile. */
    font-variant-numeric: lining-nums tabular-nums;
}
.countdown__unit {
    display: block;
    margin-top: 2px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--forest);
}
/* Les libellés arabes sont des mots entiers : ni capitales ni interlettrage. */
html[lang="ar"] .countdown__unit {
    text-transform: none;
    letter-spacing: 0;
    font-size: 11.5px;
}

.insn-block { margin-top: 24px; }
.insn-block__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.insn-block__title svg { width: 20px; height: 20px; color: var(--emerald); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-tile {
    padding: 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}
.info-tile__label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}
.info-tile__value { font-size: 17px; font-weight: 600; color: var(--ink); word-break: break-word; }

.wifi-card {
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    justify-content: space-between;
}
.wifi-card__net { min-width: 0; }
.wifi-card__ssid { font-weight: 600; font-size: 15px; word-break: break-all; }
.wifi-card__label { font-size: 12px; color: var(--muted); }
.wifi-card__pass {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 14px;
    background: var(--sage);
    border-radius: 10px;
    padding: 7px 10px;
    word-break: break-all;
}
.copy-btn {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: var(--paper);
    color: var(--forest);
}
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn.is-copied { background: var(--emerald); color: #fff; }

.media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 560px) { .media-grid { grid-template-columns: 1fr 1fr; } }
.media-grid video {
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 420px;
    border-radius: var(--radius);
    background: #000;
    object-fit: contain;
}
.media-grid--photos { grid-template-columns: repeat(2, 1fr); }
.media-grid--photos img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
}
.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--forest-deep);
    text-decoration: none;
    margin: 0 8px 8px 0;
}
.doc-link svg { width: 16px; height: 16px; }
.insn-notes {
    white-space: pre-line;
    font-size: 14px;
    color: var(--ink-soft);
    background: #fbfaf8;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
}

/* ============================================================================
   Dialogs natifs
   ========================================================================= */
dialog.sheet {
    width: min(94vw, 640px);
    max-height: 86dvh;
    border: 0;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 30px 80px rgba(25, 22, 20, .3);
}
dialog.sheet::backdrop { background: rgba(25, 22, 20, .5); }
.sheet__head {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.sheet__title { font-family: var(--font-display); font-weight: 600; font-size: 21px; }
.sheet__close {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--sage);
    color: var(--ink-soft);
}
.sheet__close svg { width: 16px; height: 16px; }
.sheet__body { padding: 18px 20px 24px; overflow-y: auto; font-size: 14px; color: var(--ink-soft); }
.sheet__body ol { padding-left: 20px; }
.sheet__body iframe { width: 100%; height: 62dvh; border: 0; border-radius: 10px; }
.sheet__body video { width: 100%; border-radius: 10px; background: #000; }

/* Utils */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }
@media (max-width: 719px) { .desktop-only { display: none !important; } }
@media (min-width: 720px) { .mobile-only { display: none !important; } }

/* ============================================================================
   Arabe (RTL) — Cormorant/Poppins n'ont pas de glyphes arabes : Tajawal partout.
   Flex/grid suivent la direction ; on ne corrige que l'asymétrique.
   ========================================================================= */
html[lang="ar"] {
    --font-ui: 'Tajawal', -apple-system, 'Segoe UI', Tahoma, sans-serif;
    --font-display: 'Tajawal', Tahoma, sans-serif;
}
html[lang="ar"] .display-title { font-weight: 700; }
html[lang="ar"] .btn,
html[lang="ar"] .progress-head__label { letter-spacing: 0; }
[dir="rtl"] .input--select {
    background-position: left 12px center;
    padding-right: 14px;
    padding-left: 40px;
}
/* Données techniques toujours en LTR (codes, tél, dates, WiFi, n° de vol) */
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="date"],
[dir="rtl"] input[type="url"],
[dir="rtl"] .wifi-card__pass,
[dir="rtl"] .info-tile__value {
    direction: ltr;
    text-align: right;
}
[dir="rtl"] .form-actions .btn svg { transform: scaleX(-1); }

/* ============================================================================
   Identité v2 : deux boutons d'action, un aperçu
   ========================================================================= */
.upload-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.visually-hidden-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.upload-preview__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(25, 22, 20, .62);
    color: #fff;
    font-size: 17px;
    line-height: 1;
}
[dir="rtl"] .upload-preview__remove { right: auto; left: 8px; }


/* ============================================================================
   Heures d'arrivée/départ — tuiles glass sur dégradé de marque
   ========================================================================= */
.stay-times {
    display: grid;
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 20px;
    background:
        radial-gradient(120% 160% at 8% 0%, rgba(36, 93, 79, .16), transparent 55%),
        radial-gradient(110% 150% at 100% 100%, rgba(36, 93, 79, .22), transparent 60%),
        linear-gradient(135deg, var(--sage), #f4f8f5 55%, var(--emerald-soft));
}
@media (min-width: 560px) {
    .stay-times { grid-template-columns: 1fr 1fr; align-items: start; }
    .stay-times > .field-error { grid-column: span 1; margin-top: -6px; }
}
.time-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .55);
    border: 1px solid rgba(255, 255, 255, .75);
    box-shadow: 0 8px 28px rgba(25, 22, 20, .07), inset 0 1px 0 rgba(255, 255, 255, .6);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    cursor: pointer;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.time-tile:active { transform: scale(.985); }
.time-tile:focus-within {
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px var(--emerald-soft), 0 8px 28px rgba(25, 22, 20, .07);
}
.time-tile--invalid { border-color: var(--danger); }
.time-tile__icon {
    flex: none;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--forest-deep);
    color: #fff;
}
.time-tile__icon svg { width: 22px; height: 22px; }
.time-tile__icon--out { background: var(--emerald); }
.time-tile__meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.time-tile__label { font-size: 13px; font-weight: 600; color: var(--ink); }
.time-tile__range {
    font-size: 11.5px;
    color: var(--forest);
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}
.time-tile__value {
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 600;
    color: var(--forest-deep);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    display: none; /* affiché quand le JS prend la main (.is-enhanced) */
}
/* input réel : visible/stylé sans JS ; overlay invisible plein-tuile avec JS */
.time-tile input[type="time"] {
    font: inherit;
    font-size: 17px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .8);
    color: var(--forest-deep);
}
.time-tile.is-enhanced .time-tile__value { display: block; }
.time-tile.is-enhanced input[type="time"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
}
@keyframes tile-flash {
    0%, 100% { box-shadow: 0 8px 28px rgba(25, 22, 20, .07); }
    35% { box-shadow: 0 0 0 4px rgba(179, 55, 47, .28); }
}
.time-tile.is-clamped { animation: tile-flash .7s ease; }
[dir="rtl"] .time-tile__range { text-align: right; }

/* ============================================================================
   Roue façon iPhone (dialog partagé des tuiles heure)
   ========================================================================= */
.wheel-sheet {
    border: 0;
    padding: 0;
    width: min(340px, calc(100vw - 32px));
    border-radius: 22px;
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: 0 24px 70px rgba(25, 22, 20, .28);
    margin: auto;
}
.wheel-sheet::backdrop { background: rgba(25, 22, 20, .35); }
.wheel-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px 4px;
}
.wheel-sheet__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    flex: 1;
}
.wheel-sheet__btn {
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--muted);
    padding: 6px 10px;
    border-radius: var(--radius-pill);
}
.wheel-sheet__btn--ok {
    background: var(--emerald);
    color: #fff;
    font-weight: 600;
    padding: 6px 18px;
}
.wheel-sheet__body {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px 18px;
}
.wheel {
    position: relative;
    height: 200px; /* 5 rangées de 40px */
    width: 76px;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent);
    mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent);
    z-index: 1;
}
.wheel::-webkit-scrollbar { display: none; }
.wheel__list { padding: 80px 0; } /* 2 rangées de marge pour centrer bords */
.wheel__item {
    height: 40px;
    display: grid;
    place-items: center;
    font-size: 21px;
    color: var(--muted);
    scroll-snap-align: center;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: transform .12s ease, color .12s ease, opacity .12s ease;
    opacity: .55;
    transform: scale(.86);
}
.wheel__item.is-near { opacity: .8; transform: scale(.93); }
.wheel__item.is-centered {
    color: var(--forest-deep);
    font-weight: 600;
    font-size: 23px;
    opacity: 1;
    transform: scale(1);
}
.wheel.is-locked { pointer-events: none; opacity: .4; }
.wheel__colon {
    align-self: center;
    font-size: 23px;
    font-weight: 600;
    color: var(--forest-deep);
    padding-bottom: 2px;
}
.wheel__band {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 50%;
    height: 40px;
    transform: translateY(calc(-50% + 4px));
    border-radius: 12px;
    background: var(--emerald-soft);
    opacity: .55;
    z-index: 0;
    pointer-events: none;
}
/* la tuile n'ouvre plus le picker natif : input inerte en mode enhanced */
.time-tile.is-enhanced input[type="time"] { pointer-events: none; }

/* ============================================================================
   Tuiles select/date glass hors stay-times + sheet liste + roue date + merci
   ========================================================================= */
.tile-field {
    padding: 10px;
    margin-bottom: 16px;
    border-radius: 18px;
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(36, 93, 79, .12), transparent 55%),
        linear-gradient(135deg, var(--sage), #f3f7f4 60%, var(--emerald-soft));
}
.time-tile--select { width: 100%; }
.time-tile__value--sm {
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.time-tile--select .time-tile__meta { min-width: 0; }
.time-tile__chevron { flex: none; color: var(--forest); display: grid; place-items: center; }
.time-tile__chevron svg { width: 20px; height: 20px; }
/* selects/inputs réels : stylés sans JS, inertes + invisibles une fois enhanced */
.time-tile--select select,
.time-tile--select input[type="date"] {
    font: inherit;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .8);
    max-width: 46%;
}
.time-tile--select.is-enhanced select,
.time-tile--select.is-enhanced input[type="date"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

/* ---- Sheet liste avec recherche ---- */
.list-sheet { width: min(400px, calc(100vw - 32px)); }
.list-sheet__search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 14px 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .8);
    border: 1px solid var(--line);
}
.list-sheet__search svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.list-sheet__search input {
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    width: 100%;
    color: var(--ink);
}
.list-sheet__list {
    list-style: none;
    margin: 0;
    padding: 0 8px 12px;
    max-height: min(52vh, 420px);
    overflow-y: auto;
}
.list-sheet__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 12px;
    font-size: 15px;
    color: var(--ink);
    cursor: pointer;
}
.list-sheet__item:hover { background: var(--sage); }
.list-sheet__item.is-selected {
    background: var(--emerald-soft);
    color: var(--forest-deep);
    font-weight: 600;
}
.list-sheet__item.is-selected::after {
    content: '✓';
    color: var(--emerald);
    font-weight: 700;
}
.wheel--wide { width: 96px; }

/* ---- Carte de remerciement (écran 2/2) ---- */
.thanks-card {
    position: relative;
    padding: 18px;
    margin-bottom: 18px;
    border-radius: 20px;
    background:
        radial-gradient(130% 170% at 100% 0%, rgba(36, 93, 79, .14), transparent 55%),
        linear-gradient(150deg, var(--sage), #f4f8f5 55%, var(--emerald-soft));
}
.thanks-card__title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--forest-deep);
    margin-bottom: 12px;
}
.thanks-card__row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .6);
    border: 1px solid rgba(255, 255, 255, .75);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-soft);
}
.thanks-card__row p { margin: 0; }
.thanks-card__chip {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--forest-deep);
    color: #fff;
}
.thanks-card__chip svg { width: 18px; height: 18px; }
.thanks-card__chip--ok { background: var(--emerald); }
.thanks-card__future { font-size: 13.5px; color: var(--ink-soft); margin: 12px 2px 10px; }
.thanks-card__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.thanks-card__actions .btn { flex: 1; min-width: 150px; justify-content: center; }
.thanks-card__closing {
    margin-top: 14px;
    text-align: center;
    font-size: 14px;
    color: var(--forest-deep);
}

/* ---- Dissuasion de copie sur les instructions d'entrée ----
   Bloque le geste distrait : sélection, appui long iOS, glisser-déposer d'image,
   impression. Ne bloque PAS une capture d'écran système — c'est impossible sur
   le web, la page n'en est jamais informée. Le bouton « copier le mot de passe »
   continue de fonctionner : il passe par l'API presse-papier, pas par la
   sélection de texte. */
[data-protected] {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none; /* menu « Enregistrer l'image » à l'appui long iOS */
}
[data-protected] img,
[data-protected] video {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* Neutralise « Imprimer » et « Enregistrer en PDF » du navigateur. */
.print-notice { display: none; }
@media print {
    [data-protected] { display: none !important; }
    .print-notice {
        display: block;
        padding: 24px;
        text-align: center;
        font-family: var(--font-ui);
        font-size: 13px;
        color: #000;
    }
}
