/* E-book « Où voyager en 2027 ? » — formulaire, popup, page dédiée */

/* ---------- Formulaire ---------- */
.ebook-form { font-family: 'Montserrat', Arial, Helvetica, sans-serif; color: #2b2824; }
.ebook-form__fields { display: flex; flex-direction: column; gap: 12px; }
.ebook-form__fields[hidden], .ebook-form__success[hidden] { display: none; }
.ebook-form__label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; color: #1d1d1b; }
.ebook-form__input {
    width: 100%; box-sizing: border-box; padding: 13px 15px; font-size: 16px;
    border: 2px solid #e7ded1; border-radius: 12px; background: #fff; color: #1d1d1b;
    transition: border-color .15s, box-shadow .15s;
}
.ebook-form__input:focus { outline: none; border-color: #d86727; box-shadow: 0 0 0 3px rgba(216,103,39,.2); }
.ebook-form__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: #6b645c; cursor: pointer; }
.ebook-form__consent input { margin-top: 2px; width: 18px; height: 18px; flex-shrink: 0; accent-color: #d86727; }
.ebook-form__consent a { color: #d86727; font-weight: 600; text-decoration: underline; }
.ebook-form__error { margin: 0; font-size: 13px; color: #b42318; background: #fef3f2; border: 1px solid #fecdca; border-radius: 10px; padding: 10px 12px; }
.ebook-form__error[hidden] { display: none; }
.ebook-form__btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 15px 20px; border: 0; border-radius: 12px; cursor: pointer;
    background: linear-gradient(90deg, #d86727, #e87835); color: #fff;
    font: 700 16px/1.2 'Montserrat', Arial, sans-serif;
    box-shadow: 0 10px 24px rgba(216,103,39,.3); transition: transform .15s, box-shadow .15s;
}
.ebook-form__btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(216,103,39,.38); }
.ebook-form__btn:disabled { opacity: .75; cursor: wait; transform: none; }
.ebook-form__btn [hidden] { display: none; }
.ebook-form__note { margin: 0; text-align: center; font-size: 12px; color: #8a8278; }
.ebook-form__success { text-align: center; padding: 10px 0; }
.ebook-form__check {
    width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #e8f6ec; color: #1f9d55; font-size: 28px;
}
.ebook-form__success-title { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: #1d1d1b; }
.ebook-form__success-text { margin: 0; font-size: 14.5px; color: #6b645c; line-height: 1.55; }

/* Variante sur fond sombre */
.ebook-form--dark .ebook-form__label, .ebook-form--dark .ebook-form__success-title { color: #fff; }
.ebook-form--dark .ebook-form__consent, .ebook-form--dark .ebook-form__success-text, .ebook-form--dark .ebook-form__note { color: rgba(255,255,255,.72); }
.ebook-form--dark .ebook-form__input { border-color: rgba(255,255,255,.18); }

/* ---------- Popup ---------- */
.ebook-pop {
    position: fixed; inset: 0; z-index: 146; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(20,16,12,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.ebook-pop[hidden] { display: none; }
.ebook-pop__card {
    position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 32px); overflow-y: auto;
    display: grid; grid-template-columns: 300px 1fr; background: #fff; border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: ebook-pop-in .35s ease-out;
}
@keyframes ebook-pop-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.ebook-pop__visual {
    background: linear-gradient(160deg, #f7f1e8 0%, #f0dcc6 100%);
    display: flex; align-items: center; justify-content: center; padding: 30px 26px;
    border-radius: 24px 0 0 24px;
}
.ebook-pop__visual img {
    width: 100%; max-width: 230px; height: auto; border-radius: 8px; display: block;
    box-shadow: 0 18px 40px rgba(60,35,10,.35); transform: rotate(-3deg);
}
.ebook-pop__body { padding: 34px 32px 28px; }
.ebook-pop__tag {
    display: inline-block; font: 800 11px/1 'Montserrat', sans-serif; letter-spacing: .08em; text-transform: uppercase;
    color: #d86727; background: rgba(216,103,39,.1); padding: 7px 10px; border-radius: 999px; margin-bottom: 12px;
}
.ebook-pop__title { margin: 0 0 8px; font: 800 26px/1.15 'Montserrat', sans-serif; color: #1d1d1b; }
.ebook-pop__title span { color: #d86727; }
.ebook-pop__text { margin: 0 0 18px; font-size: 14.5px; line-height: 1.55; color: #6b645c; }
.ebook-pop__close {
    position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.9); color: #6b645c; font-size: 18px; cursor: pointer;
}
.ebook-pop__close:hover { background: #f3eee8; color: #1d1d1b; }
.ebook-pop__later {
    display: block; margin: 12px auto 0; background: none; border: 0; padding: 4px; cursor: pointer;
    font-size: 12.5px; color: #8a8278; text-decoration: underline;
}
@media (max-width: 680px) {
    .ebook-pop { align-items: flex-end; padding: 0; }
    .ebook-pop__card { grid-template-columns: 1fr; max-height: 92vh; border-radius: 22px 22px 0 0; }
    .ebook-pop__visual { padding: 22px 20px 6px; border-radius: 22px 22px 0 0; background: #f7f1e8; }
    .ebook-pop__visual img { max-width: 120px; }
    .ebook-pop__body { padding: 18px 20px 22px; }
    .ebook-pop__title { font-size: 22px; text-align: center; }
    .ebook-pop__text { text-align: center; font-size: 14px; margin-bottom: 14px; }
    .ebook-pop__tag { display: table; margin: 0 auto 10px; }
}
@media (prefers-reduced-motion: reduce) { .ebook-pop__card { animation: none; } }
