/* LJ Ad Manager — Frontend Styles */

/* ── Ad Space Container ── */
.ljam-ad-space {
    position: relative;
    display: block;          /* block so it fills container width */
    overflow: hidden;
    border-radius: 8px;
    box-sizing: border-box;
    /* width + max-width + aspect-ratio set inline by PHP */
}
.ljam-ad-space * { box-sizing: border-box; }

/* Link wrapper fills the full space */
.ljam-ad-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    text-decoration: none;
}

/* Media always fills the container */
.ljam-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    position: absolute;
    inset: 0;
}

video.ljam-media {
    object-fit: cover;
    background: #000;
}

/* ── PUBLICITÉ label ── */
.ljam-pub-label {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #999;
    background: rgba(255,255,255,.85);
    padding: 2px 7px;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
    border: 1px solid rgba(0,0,0,.08);
}

/* ── Default Placeholder — matches screenshot ── */
.ljam-placeholder {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    vertical-align: top;
    box-sizing: border-box;
}

.ljam-placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.ljam-ph-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(192, 57, 43, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0392b;
    margin-bottom: 2px;
}

.ljam-ph-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    line-height: 1.3;
}

.ljam-ph-sub {
    margin: 0;
    font-size: 12px;
    color: #888;
}

/* ── Enlarge Modal ── */
.ljam-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .25s;
}
.ljam-modal-overlay.ljam-visible { opacity: 1; }
.ljam-modal-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
    animation: ljamPop .25s ease;
}
@keyframes ljamPop {
    from { transform: scale(.8); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}
.ljam-modal-inner img,
.ljam-modal-inner video { max-width: 90vw; max-height: 85vh; display: block; border-radius: 8px; }
.ljam-modal-close {
    position: absolute;
    top: -14px; right: -14px;
    width: 30px; height: 30px;
    background: #fff;
    border: none; border-radius: 50%;
    font-size: 16px; line-height: 30px; text-align: center;
    cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3);
    padding: 0;
}

/* ── Hover hint ── */
.ljam-ad-space[data-action="enlarge"] { cursor: zoom-in; }
.ljam-ad-space[data-action="play"],
.ljam-ad-space[data-action="replay"]  { cursor: pointer; }

/* ── Responsive ── */
/* The inline aspect-ratio handles proportional scaling automatically.
   These rules just ensure the wrapper doesn't overflow on small screens. */
.ljam-ad-space,
.ljam-placeholder {
    max-width: 100% !important;
}

/* On mobile, center the ad if it's smaller than the viewport */
@media (max-width: 768px) {
    .ljam-ad-space,
    .ljam-placeholder {
        width: 100% !important;  /* stretch to full container width on mobile */
        border-radius: 6px;
    }
}

/* ═══════════════════════════════════════════
   HOVER EFFECTS
═══════════════════════════════════════════ */

/* Base — smooth transition on all effects */
.ljam-ad-space[class*="ljam-fx-"] {
    transition: transform .3s ease, box-shadow .3s ease;
    cursor: pointer;
    will-change: transform;
}
.ljam-ad-space[class*="ljam-fx-"] .ljam-media {
    transition: transform .3s ease, filter .3s ease;
}

/* 1. Zoom doux ── */
.ljam-fx-zoom:hover { transform: scale(1.03); }

/* 2. Élévation ── */
.ljam-fx-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

/* 3. Lueur ── */
.ljam-fx-glow:hover {
    box-shadow: 0 0 0 3px rgba(192,57,43,.5),
                0 0 20px rgba(192,57,43,.25);
}

/* 4. Assombrissement ── */
.ljam-fx-dim { position: relative; }
.ljam-fx-dim::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(0,0,0,0);
    border-radius: inherit;
    transition: background .3s ease;
    pointer-events: none;
    z-index: 5;
}
.ljam-fx-dim:hover::after { background: rgba(0,0,0,.22); }

/* 5. Reflet lumineux ── */
.ljam-fx-shine { overflow: hidden; }
.ljam-fx-shine::before {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0)   0%,
        rgba(255,255,255,.35) 50%,
        rgba(255,255,255,0)   100%
    );
    transform: skewX(-20deg);
    transition: none;
    pointer-events: none;
    z-index: 6;
}
.ljam-fx-shine:hover::before {
    animation: ljam-shine .55s ease forwards;
}
@keyframes ljam-shine {
    0%   { left: -75%; }
    100% { left: 125%; }
}

/* Rotation */
.ljam-rotation-stage {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}
.ljam-rotation-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s ease, visibility .45s ease;
}
.ljam-rotation-item.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}
.ljam-rotation-stage .ljam-ad-space {
    width: 100% !important;
    height: 100%;
}

.ljam-placeholder-link { text-decoration:none; display:block; position:relative; overflow:hidden; border-radius:8px; }
.ljam-placeholder-link .ljam-placeholder-inner { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; text-align:center; padding:18px; height:100%; }
.ljam-ph-cta { display:inline-block; padding:8px 14px; border-radius:999px; background:rgba(255,255,255,.18); font-weight:700; }
.ljam-campaign-badge { position:absolute; z-index:8; color:#fff; font-size:11px; font-weight:700; padding:4px 8px; border-radius:999px; box-shadow:0 2px 10px rgba(0,0,0,.18); }
.ljam-badge-top-left { top:10px; left:10px; }
.ljam-badge-top-right { top:10px; right:10px; }
.ljam-badge-bottom-left { bottom:10px; left:10px; }
.ljam-badge-bottom-right { bottom:10px; right:10px; }
.ljam-advertise-form { max-width:900px; margin:0 auto; background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:20px; box-shadow:0 8px 30px rgba(0,0,0,.05); }
.ljam-public-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.ljam-advertise-form input, .ljam-advertise-form select, .ljam-advertise-form textarea { width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid #d1d5db; border-radius:10px; }
.ljam-advertise-form button { background:#c0392b; color:#fff; border:none; border-radius:999px; padding:11px 16px; cursor:pointer; font-weight:700; }
.ljam-public-notice { max-width:900px; margin:0 auto 16px; padding:12px 14px; border-radius:12px; background:#e8f5e9; color:#1b5e20; }
.ljam-agreement-box { max-width:900px; margin:0 auto; background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:22px; }
.ljam-agreement-box button{background:var(--ljam-agree-btn-bg,#0f172a);color:var(--ljam-agree-btn-text,#fff);border:none;border-radius:999px;padding:12px 18px;font-weight:700;cursor:pointer}
.ljam-agreement-copy { white-space:normal; line-height:1.6; margin:14px 0; }
@media (max-width: 768px){ .ljam-public-grid { grid-template-columns:1fr; } }

/* Inquiry form v2 */
.ljam-lead-shell{max-width:1040px;margin:0 auto;padding:4px 0 12px}
.ljam-form-lead-card{max-width:1040px;margin:0 auto 18px;background:linear-gradient(135deg,var(--ljam-form-card-1,#0f172a),var(--ljam-form-card-2,#1d4ed8));color:var(--ljam-form-card-text,#fff);border-radius:var(--ljam-form-radius,24px);padding:28px 30px;box-shadow:0 16px 42px rgba(15,23,42,.14)}
.ljam-form-lead-card h2{margin:8px 0 10px;font-size:clamp(28px,4vw,40px);line-height:1.08;color:var(--ljam-form-card-text,#fff)}
.ljam-form-lead-card p{margin:0;font-size:18px;line-height:1.7;color:var(--ljam-form-card-text,#fff);opacity:.92}
.ljam-form-lead-badge{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.14);font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.ljam-form-highlight{display:inline-flex;align-items:center;margin-top:16px;padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.12);font-size:14px;color:var(--ljam-form-card-text,#fff)}
.ljam-advertise-form-upgraded{padding:26px;border-radius:var(--ljam-form-radius,24px);background:linear-gradient(180deg,var(--ljam-form-panel-bg,#ffffff),#fbfdff);box-shadow:0 18px 40px rgba(15,23,42,.08);border:1px solid #e7ecf4}
.ljam-form-section{padding:20px;border:1px solid #e8eef6;border-radius:calc(var(--ljam-form-radius,24px) - 4px);background:#fff;margin-bottom:18px}
.ljam-form-section-head{margin-bottom:14px}
.ljam-form-section-head h3{margin:0 0 4px;font-size:22px;line-height:1.2;color:var(--ljam-form-section-title,#0f172a)}
.ljam-form-section-head p{margin:0;color:#64748b;font-size:14px;line-height:1.6}
.ljam-public-grid-form{gap:18px}
.ljam-field-wrap{margin:0}
.ljam-field-wrap > label{display:block;margin:0 0 8px;font-weight:700;color:#0f172a;font-size:15px}
.ljam-advertise-form-upgraded input,
.ljam-advertise-form-upgraded select,
.ljam-advertise-form-upgraded textarea{padding:14px 16px;border-radius:16px;border:1px solid #d7dfeb;background:#fff;color:#0f172a;font-size:16px;line-height:1.45;transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease}
.ljam-advertise-form-upgraded textarea{min-height:126px;resize:vertical}
.ljam-advertise-form-upgraded input::placeholder,
.ljam-advertise-form-upgraded textarea::placeholder{color:#94a3b8}
.ljam-advertise-form-upgraded input:focus,
.ljam-advertise-form-upgraded select:focus,
.ljam-advertise-form-upgraded textarea:focus{border-color:#2563eb;outline:none;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.ljam-phone-combo{display:grid;grid-template-columns:minmax(240px,300px) minmax(0,1fr);gap:14px;align-items:stretch}
.ljam-phone-country{min-width:0;min-height:58px;padding-right:46px !important;background-position:right 16px center !important;background-color:#fff}
.ljam-phone-input-wrap{position:relative;display:flex;align-items:center;min-height:58px;border:1px solid #d7dfeb;border-radius:16px;background:#fff;overflow:hidden}
.ljam-phone-input-wrap:focus-within{border-color:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.ljam-phone-dial{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;height:36px;margin-left:12px;padding:0 12px;border-radius:999px;background:#eff6ff;color:#0f172a;font-weight:800;white-space:nowrap;font-size:15px;pointer-events:none}
.ljam-phone-local{min-height:56px;padding:0 16px 0 12px !important;border:0 !important;background:transparent !important;box-shadow:none !important;min-width:0;width:100%}
.ljam-phone-local:focus{box-shadow:none !important}
.ljam-phone-local::placeholder{color:#94a3b8}
.ljam-date-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.ljam-date-field{display:flex;flex-direction:column;gap:8px;margin:0;min-width:0}
.ljam-date-field span{display:block;margin:0;font-size:13px;font-weight:700;color:#475569;line-height:1.3}
.ljam-help{display:block;margin-top:8px;color:#64748b;font-size:12px;line-height:1.5}
.ljam-date-range input[type="date"]{-webkit-appearance:none;appearance:none;min-height:58px}
.ljam-human-check-box{display:grid;grid-template-columns:minmax(220px,300px) minmax(130px,180px);gap:12px;align-items:center}
.ljam-human-check-q{display:inline-flex;align-items:center;min-height:54px;padding:0 16px;border-radius:16px;background:#eff6ff;color:#1d4ed8;font-weight:800}
.ljam-privacy-note{margin:8px 0 0;color:#475569;line-height:1.7}
.ljam-form-submit-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:8px;flex-wrap:wrap}
.ljam-public-grid-form > .ljam-field-wrap:has(.ljam-date-range){align-self:start}
.ljam-public-grid-form input[type="number"]{-moz-appearance:textfield}
.ljam-public-grid-form input[type="number"]::-webkit-outer-spin-button,
.ljam-public-grid-form input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.ljam-advertise-form-upgraded button{min-width:220px;padding:14px 22px;border-radius:999px;background:linear-gradient(135deg,var(--ljam-form-btn-1,#1d4ed8),var(--ljam-form-btn-2,#0f172a));color:var(--ljam-form-btn-text,#fff);box-shadow:0 12px 24px rgba(29,78,216,.24);font-size:16px;letter-spacing:.01em;transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease}
.ljam-advertise-form-upgraded button:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(29,78,216,.28)}
.ljam-advertise-form-upgraded button:disabled{opacity:.75;cursor:wait}
.ljam-submit-note{color:#64748b;font-size:14px;line-height:1.6}
.ljam-public-notice-error{background:#fff1f2;border:1px solid #fecdd3;color:#9f1239}
.ljam-hp-wrap{position:absolute !important;left:-9999px !important;top:auto !important;width:1px !important;height:1px !important;overflow:hidden !important;opacity:0 !important;pointer-events:none !important}
.ljam-advertise-form-upgraded.is-submitting{opacity:.96}
@media (max-width: 920px){
  .ljam-phone-combo{grid-template-columns:1fr}
  .ljam-date-range{grid-template-columns:1fr}
}
@media (max-width: 768px){
  .ljam-form-lead-card{padding:22px 18px;border-radius:18px}
  .ljam-form-section{padding:16px;border-radius:18px}
  .ljam-phone-combo,
  .ljam-human-check-box{grid-template-columns:1fr}
  .ljam-form-submit-row{align-items:stretch}
  .ljam-advertise-form-upgraded button{width:100%;min-width:0}
}

.ljam-advertise-form-upgraded .ljam-public-grid-form{align-items:start}
.ljam-advertise-form-upgraded .ljam-field-wrap{min-width:0}
.ljam-advertise-form-upgraded .ljam-field-wrap select{background-color:#fff}
.ljam-advertise-form-upgraded .ljam-field-wrap input[type="date"]{background-color:#fff;color:#0f172a}
.ljam-advertise-form-upgraded .ljam-help{max-width:52ch}
.ljam-advertise-form-upgraded .ljam-field-wrap-phone{align-self:start}
.ljam-advertise-form-upgraded .ljam-field-wrap-period{align-self:start}
.ljam-advertise-form-upgraded .ljam-field-wrap-budget{max-width:340px}
.ljam-advertise-form-upgraded .ljam-field-wrap-budget input[type="number"]{text-align:left}
.ljam-advertise-form-upgraded .ljam-date-range input[type="date"]{padding-right:44px}
.ljam-advertise-form-upgraded .ljam-phone-country,
.ljam-advertise-form-upgraded .ljam-phone-local{font-size:15px}
@media (max-width: 920px){
  .ljam-advertise-form-upgraded .ljam-field-wrap-budget{max-width:none}
}


/* v3.4.5 simplified single-column inquiry layout */
.ljam-advertise-form-upgraded .ljam-public-grid-form{grid-template-columns:1fr;gap:16px}
.ljam-advertise-form-upgraded .ljam-field-wrap,
.ljam-advertise-form-upgraded .ljam-field-wrap-phone,
.ljam-advertise-form-upgraded .ljam-field-wrap-period,
.ljam-advertise-form-upgraded .ljam-field-wrap-budget{max-width:none;width:100%}
.ljam-advertise-form-upgraded .ljam-phone-combo{grid-template-columns:1fr;gap:10px}
.ljam-advertise-form-upgraded .ljam-phone-input-wrap{display:grid;grid-template-columns:auto 1fr;align-items:stretch;border-radius:16px;overflow:hidden}
.ljam-advertise-form-upgraded .ljam-phone-dial{height:auto;min-width:92px;margin:0;padding:0 16px;border-right:1px solid #d7dfeb;border-radius:0;background:#f8fafc}
.ljam-advertise-form-upgraded .ljam-phone-local{min-height:56px;padding:0 16px !important}
.ljam-advertise-form-upgraded .ljam-date-range{grid-template-columns:1fr;gap:12px}
.ljam-advertise-form-upgraded .ljam-date-field span{font-size:14px}
.ljam-advertise-form-upgraded .ljam-field-wrap-period .ljam-help{max-width:none}
.ljam-advertise-form-upgraded .ljam-field-wrap-budget input[type="number"]{max-width:none}
@media (min-width: 921px){
  .ljam-advertise-form-upgraded .ljam-public-grid-form{grid-template-columns:1fr}
}

/* v3.5.1 form layout hard reset */
.ljam-advertise-form-upgraded .ljam-form-stack,
.ljam-lead-shell .ljam-advertise-form-upgraded .ljam-form-stack{
  display:flex !important;
  flex-direction:column !important;
  gap:16px !important;
}
.ljam-advertise-form-upgraded .ljam-form-stack > .ljam-field-wrap,
.ljam-advertise-form-upgraded .ljam-form-stack > .ljam-field-wrap-phone,
.ljam-advertise-form-upgraded .ljam-form-stack > .ljam-field-wrap-period,
.ljam-advertise-form-upgraded .ljam-form-stack > .ljam-field-wrap-budget{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
}
.ljam-advertise-form-upgraded .ljam-field-wrap-phone .ljam-phone-combo-simple{
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
}
.ljam-advertise-form-upgraded .ljam-phone-country{
  width:100% !important;
  max-width:none !important;
}
.ljam-advertise-form-upgraded .ljam-phone-input-wrap{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) !important;
  align-items:center !important;
  width:100% !important;
  border:1px solid #d7dfeb !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:#fff !important;
}
.ljam-advertise-form-upgraded .ljam-phone-dial{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:96px !important;
  padding:0 14px !important;
  background:#f8fafc !important;
  border-right:1px solid #d7dfeb !important;
  margin:0 !important;
  height:58px !important;
  font-weight:700 !important;
}
.ljam-advertise-form-upgraded .ljam-phone-local{
  width:100% !important;
  min-width:0 !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  min-height:58px !important;
  padding:0 16px !important;
}
.ljam-advertise-form-upgraded .ljam-phone-local:focus{
  box-shadow:none !important;
}
.ljam-advertise-form-upgraded .ljam-field-wrap-period .ljam-date-range-simple{
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
}
.ljam-advertise-form-upgraded .ljam-date-field{
  width:100% !important;
}
.ljam-advertise-form-upgraded .ljam-date-field span{
  display:block !important;
  margin:0 0 6px !important;
  font-size:14px !important;
  font-weight:600 !important;
  color:#475569 !important;
}
.ljam-advertise-form-upgraded .ljam-date-field input[type="date"]{
  width:100% !important;
}
.ljam-advertise-form-upgraded .ljam-field-wrap-budget input[type="number"]{
  width:100% !important;
  max-width:none !important;
}
@media (min-width: 768px){
  .ljam-advertise-form-upgraded .ljam-form-section{padding:22px !important;}
}
