/* ============================================================
   JTN Events v1.0 — CSS unifié
   Charte : violet #400E49 | or #FABB48 | thé #D4E4BC | noir #23231A
   ============================================================ */

/* ── Honeypot ───────────────────────────────────────────── */
.jtn-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

/* ── Base formulaires ───────────────────────────────────── */
.jtn-devis-wrap,
.jtn-contact-wrap {
    max-width: 720px;
    margin: 0 auto;
    font-family: 'Open Sans', sans-serif;
}

.jtn-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .jtn-form-grid { grid-template-columns: 1fr; }
}

.jtn-field { display: flex; flex-direction: column; gap: 6px; }
.jtn-field--full { grid-column: 1 / -1; }

.jtn-field label {
    font-size: 12px;
    font-weight: 600;
    color: #400E49;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.jtn-field label span { color: #FABB48; }

.jtn-field input,
.jtn-field select,
.jtn-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid rgba(64,14,73,.2);
    border-radius: 6px;
    font-size: 14px;
    color: #23231A;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    font-family: 'Open Sans', sans-serif;
}

.jtn-field input:focus,
.jtn-field select:focus,
.jtn-field textarea:focus {
    outline: none;
    border-color: #400E49;
    box-shadow: 0 0 0 3px rgba(64,14,73,.08);
}

/* Checkboxes */
.jtn-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jtn-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 12px;
    border: 1.5px solid rgba(64,14,73,.18);
    border-radius: 6px;
    transition: all .2s;
    user-select: none;
    background: #fff;
}

.jtn-check:hover { border-color: #400E49; background: rgba(64,14,73,.03); }
.jtn-check input[type="checkbox"] { accent-color: #400E49; width: 15px; height: 15px; }

/* Radios */
.jtn-radios { display: flex; flex-direction: column; gap: 8px; }

.jtn-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    padding: 10px 14px;
    border: 1.5px solid rgba(64,14,73,.18);
    border-radius: 6px;
    transition: all .2s;
    background: #fff;
}

.jtn-radio:hover { border-color: #400E49; background: rgba(64,14,73,.03); }
.jtn-radio input[type="radio"] { accent-color: #400E49; width: 15px; height: 15px; }

/* Bouton */
.jtn-submit-wrap { margin-top: 28px; text-align: center; }

.jtn-btn {
    display: inline-block;
    width: 100%;
    max-width: 420px;
    padding: 15px 32px;
    background: #FABB48;
    color: #23231A;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    font-family: 'Open Sans', sans-serif;
}

.jtn-btn:hover { background: #e8a930; }
.jtn-btn:active { transform: scale(.98); }
.jtn-btn:disabled { opacity: .6; cursor: not-allowed; }

.jtn-note {
    font-size: 12px;
    color: rgba(35,35,26,.5);
    margin-top: 10px;
}

.jtn-note a { color: #400E49; }

/* Notices */
.jtn-notice {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 20px;
    line-height: 1.6;
}

.jtn-notice--error {
    background: #fff1f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
}

.jtn-notice--success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

/* ── Calendrier réservation ─────────────────────────────── */
.jtn-resa-box {
    border: 1.5px solid rgba(64,14,73,.15);
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    background: #faf7fb;
    font-family: 'Open Sans', sans-serif;
}

.jtn-resa-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: #400E49;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 14px;
}

.jtn-resa-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .jtn-resa-fields { grid-template-columns: 1fr; }
}

.jtn-resa-field { display: flex; flex-direction: column; gap: 5px; }

.jtn-resa-field label {
    font-size: 11px;
    font-weight: 600;
    color: #400E49;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.jtn-date-input {
    padding: 10px 12px;
    border: 1.5px solid rgba(64,14,73,.2);
    border-radius: 6px;
    font-size: 14px;
    color: #23231A;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.jtn-date-input:focus {
    outline: none;
    border-color: #400E49;
    box-shadow: 0 0 0 3px rgba(64,14,73,.08);
}

.jtn-resa-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 5px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jtn-resa-status.is-idle       { background: rgba(64,14,73,.04); color: rgba(35,35,26,.6); }
.jtn-resa-status.is-checking   { background: #fffbe6; color: #ad6800; }
.jtn-resa-status.is-available  { background: #f6ffed; color: #389e0d; }
.jtn-resa-status.is-unavailable{ background: #fff1f0; color: #cf1322; }

/* ── Bouton devis fiche produit ─────────────────────────── */
.jtn-devis-btn-wrap { margin: 16px 0; }

.jtn-devis-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: #400E49;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    font-family: 'Open Sans', sans-serif;
}

.jtn-devis-add-btn:hover { background: #5a1569; }
.jtn-devis-add-btn:active { transform: scale(.98); }
.jtn-devis-add-btn:disabled { opacity: .6; cursor: not-allowed; }

.jtn-add-feedback {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
}

.jtn-add-feedback.ok  { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.jtn-add-feedback.err { background: #fff1f0; border: 1px solid #ffccc7; color: #cf1322; }

.jtn-goto-devis {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #FABB48;
    text-decoration: none;
    padding: 10px;
    border: 1.5px solid #FABB48;
    border-radius: 6px;
    transition: background .2s, color .2s;
}

.jtn-goto-devis:hover { background: #FABB48; color: #23231A; }

/* ── Badge menu ─────────────────────────────────────────── */
.jtn-devis-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #FABB48;
    color: #23231A;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 5px;
    line-height: 1;
}

/* ── Récap liste devis page /devis/ ─────────────────────── */
.jtn-liste-recap {
    background: #f9f6fb;
    border: 1.5px solid rgba(64,14,73,.12);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 36px;
    font-family: 'Open Sans', sans-serif;
}

.jtn-liste-titre {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #400E49;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.jtn-liste-items {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jtn-liste-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(64,14,73,.08);
    border-radius: 7px;
}

.jtn-liste-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.jtn-liste-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.jtn-liste-devis-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #23231A;
    text-decoration: none;
}

.jtn-liste-devis-item-name:hover { color: #400E49; }

.jtn-liste-prix { font-size: 13px; color: rgba(35,35,26,.55); }

.jtn-liste-suppr {
    background: transparent;
    border: 1px solid rgba(207,19,34,.25);
    color: #cf1322;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
}

.jtn-liste-suppr:hover { background: #cf1322; color: #fff; border-color: #cf1322; }

.jtn-liste-vider-btn {
    background: transparent;
    border: 1px solid rgba(64,14,73,.25);
    color: #400E49;
    padding: 8px 18px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    font-family: 'Open Sans', sans-serif;
}

.jtn-liste-vider-btn:hover { background: #400E49; color: #fff; }

.jtn-liste-vide a { color: #400E49; font-weight: 600; }

/* ── Responsive mobile ──────────────────────────────────── */
@media (max-width: 480px) {
    .jtn-liste-img { width: 42px; height: 42px; }
    .jtn-devis-add-btn { font-size: 14px; padding: 12px 14px; }
    .jtn-btn { font-size: 14px; padding: 13px 16px; }
}

/* ── Coût estimé liste devis ────────────────────────────── */
.jtn-liste-cout {
    margin-top: 20px;
    padding: 18px 20px;
    background: #fff;
    border: 2px solid rgba(64,14,73,.15);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jtn-cout-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #400E49;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.jtn-cout-valeur {
    font-size: 26px;
    font-weight: 700;
    color: #400E49;
    line-height: 1.2;
}

.jtn-cout-valeur .woocommerce-Price-amount { font-size: inherit; color: inherit; }

.jtn-cout-note {
    font-size: 12px;
    color: rgba(35,35,26,.5);
    margin: 0;
    line-height: 1.5;
    font-style: italic;
}

.jtn-liste-actions {
    margin-top: 16px;
}

@media (max-width: 480px) {
    .jtn-cout-valeur { font-size: 22px; }
}

/* ── v1.2.0 — Bouton devis responsive amélioré ─────────── */
.jtn-devis-btn-wrap {
    margin: 20px 0;
    width: 100%;
}

.jtn-devis-add-btn {
    width: 100%;
    min-height: 52px;
    font-size: 15px;
    padding: 14px 20px;
    touch-action: manipulation; /* évite le double-tap sur iOS */
    -webkit-tap-highlight-color: transparent;
    word-break: break-word;
    white-space: normal;
    line-height: 1.4;
}

.jtn-goto-devis {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (max-width: 480px) {
    .jtn-devis-add-btn {
        font-size: 14px;
        padding: 13px 16px;
        min-height: 50px;
    }
    .jtn-add-feedback {
        font-size: 13px;
    }
}

/* ── v1.2.0 — Cacher quantité WooCommerce si bouton devis présent ── */
.single-product .jtn-devis-btn-wrap ~ form.cart .quantity,
.single-product .jtn-devis-btn-wrap ~ .quantity {
    display: none !important;
}

/* ── v1.2.2 — Radios touch-friendly mobile ──────────────── */
.jtn-radio {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;           /* supprime délai 300ms iOS */
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;                     /* zone tactile Apple HIG */
    align-items: center;
}

/* Input radio visible et cliquable */
.jtn-radio input[type="radio"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    accent-color: #400E49;
    pointer-events: auto;
}

/* État sélectionné — bordure violette */
.jtn-radio:has(input[type="radio"]:checked) {
    border-color: #400E49;
    background: rgba(64,14,73,.04);
}

/* Checkboxes touch-friendly aussi */
.jtn-check {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    align-items: center;
}

.jtn-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
    touch-action: manipulation;
}
