
/* SUPERMATHS V414 — Publications carousel + admin premium */

:root{
  --sm414-navy:#102c47;
  --sm414-teal:#12b8b2;
  --sm414-teal-soft:#eafaf8;
  --sm414-yellow:#ffc447;
  --sm414-orange:#ff9859;
  --sm414-line:#dfeceb;
}

/* ----- ANGLES SUPERMATHS ADMIN ----- */
.sm403-admin-pub{
  display:grid;grid-template-columns:minmax(0,1.2fr) minmax(330px,.8fr);
  gap:20px!important;
}
.sm403-pub-panel{
  border:1px solid var(--sm414-line)!important;
  border-radius:30px!important;
  background:rgba(255,255,255,.98)!important;
  padding:24px!important;
  box-shadow:0 18px 48px rgba(17,57,69,.08)!important;
  overflow:hidden;
}
.sm403-type-tabs{display:flex;gap:9px;flex-wrap:wrap;margin:16px 0}
.sm403-type-tabs button{
  border:1px solid #dbe9e8;background:#f7fbfb;border-radius:16px!important;
  padding:11px 16px;font-weight:850;color:#355a68;cursor:pointer;transition:.2s ease
}
.sm403-type-tabs button.active{
  background:linear-gradient(135deg,#13b9b2,#21c7bd)!important;color:#fff;border-color:transparent;
  box-shadow:0 9px 22px rgba(24,185,176,.22)
}
.sm403-field{display:grid;gap:7px;margin:13px 0}
.sm403-field span{font-size:12px;font-weight:850;color:#526f7a}
.sm403-field input,.sm403-field textarea,.sm403-field select{
  width:100%;border:1px solid #dbe7e8;border-radius:18px!important;padding:13px 14px;
  background:#fbfdfd;font:inherit;color:#163a4a;outline:none
}
.sm403-field textarea{min-height:120px;resize:vertical}
.sm403-field input:focus,.sm403-field textarea:focus,.sm403-field select:focus{
  border-color:#25bdb4;box-shadow:0 0 0 4px rgba(37,189,180,.09);background:#fff
}
.sm403-upload{
  border:1.5px dashed #b6deda;border-radius:24px!important;padding:21px;text-align:center;
  background:linear-gradient(145deg,#f4fcfb,#fffaf0)
}
.sm403-pub-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.sm403-publish-btn{
  width:100%;border:0;border-radius:18px!important;padding:15px 18px;
  background:linear-gradient(100deg,#13b9b2,#35cbbb 62%,#ffc238)!important;
  color:#fff;font-weight:900;font-size:15px;cursor:pointer;
  box-shadow:0 12px 28px rgba(24,185,176,.22);transition:.2s
}
.sm403-publish-btn:hover{transform:translateY(-2px)}
.sm403-preview{
  border:1px solid #e0ecec;border-radius:28px!important;overflow:hidden;background:#fff;
  box-shadow:0 10px 26px rgba(18,60,78,.06)
}
.sm403-preview-media{
  min-height:220px;max-height:360px;
  background:linear-gradient(135deg,#e8faf7,#fff1cc);
  display:grid;place-items:center;overflow:hidden;padding:10px
}
.sm403-preview-media img,.sm403-preview-media video{
  width:100%;height:100%;max-height:340px;object-fit:contain!important;border-radius:22px!important
}
.sm414-preview-placeholder{font-weight:900;color:#81959c}
.sm403-preview-copy{padding:18px}.sm403-preview-copy h3{margin:0 0 7px;color:var(--sm414-navy)}
.sm403-preview-copy p{margin:0;color:#667e89}
.sm403-admin-list{display:grid;gap:12px;margin-top:14px;max-height:560px;overflow:auto;padding:2px}
.sm414-admin-item{
  display:grid;grid-template-columns:60px 1fr;gap:12px;align-items:center;
  border:1px solid #e3eeee;border-radius:22px!important;padding:12px;
  background:#fff;transition:.2s;box-shadow:0 6px 18px rgba(20,57,73,.04)
}
.sm414-admin-item:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(20,57,73,.07)}
.sm414-admin-item.is-paused{opacity:.72;background:#f7f9f9}
.sm414-admin-thumb{
  width:60px;height:56px;border-radius:16px!important;background:#eef8f7;overflow:hidden;
  display:grid;place-items:center;font-size:20px
}
.sm414-admin-thumb img{width:100%;height:100%;object-fit:contain!important;background:#f7fbfa}
.sm414-admin-info b{display:block;color:#173c4c;font-size:13px}
.sm414-admin-info small{display:block;color:#809197;margin-top:3px}
.sm414-status{display:inline-flex;margin-top:6px;padding:4px 7px;border-radius:999px;font-size:8px;font-weight:900;letter-spacing:.08em}
.sm414-status.live{background:#e7faf7;color:#078f8c}.sm414-status.paused{background:#fff0e6;color:#b86225}
.sm414-admin-actions{
  grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:2px
}
.sm414-admin-actions button{
  border:1px solid #e2ecec;border-radius:13px!important;padding:8px 7px;background:#f8fbfb;
  color:#44616d;font-size:10px;font-weight:850;cursor:pointer
}
.sm414-admin-actions .edit{background:#eafaf8;color:#0a8f8d}
.sm414-admin-actions .pause{background:#fff7e6;color:#9a6a0c}
.sm414-admin-actions .boost{background:#eef2ff;color:#5d62aa}
.sm414-admin-actions .delete{background:#fff0ee;color:#b83e31}
.sm414-edit-notice{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:11px 13px;margin:12px 0;border-radius:16px!important;background:#edf9ff;color:#315d78;font-weight:850
}
.sm414-edit-notice[hidden]{display:none!important}
.sm414-edit-notice button,.sm414-remove-media{
  border:0;border-radius:12px!important;padding:8px 10px;background:#fff;color:#54717e;cursor:pointer;font-weight:800
}
.sm414-remove-media{margin-top:10px;background:#fff1ef;color:#b94a3e}

/* ----- ACCUEIL : PUBLICATION CENTRÉE ----- */
.sm414-public-shell{
  position:fixed;inset:0;z-index:80000;display:grid;place-items:center;padding:18px;
  animation:sm414ShellIn .35s ease both
}
.sm414-public-shell[hidden]{display:none!important}
.sm414-public-shell.closing{animation:sm414ShellOut .25s ease both}
.sm414-backdrop{
  position:absolute;inset:0;background:rgba(10,39,59,.34);backdrop-filter:blur(8px)
}
.sm414-public-card{
  position:relative;z-index:1;width:min(930px,calc(100vw - 36px));
  max-height:min(82vh,720px);overflow:hidden;
  border:1px solid rgba(255,255,255,.75);
  border-radius:36px!important;
  background:rgba(255,255,255,.97);
  box-shadow:0 34px 90px rgba(6,34,54,.28);
}
.sm414-public-card::before{
  content:"";position:absolute;left:0;right:0;top:0;height:5px;z-index:8;
  background:linear-gradient(90deg,#16bbb6,#54d3cb,#ffd04f,#ff9558,#16bbb6);
  background-size:220% 100%;animation:sm414Bar 4s linear infinite
}
.sm414-public-head{
  display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px 12px;
  background:rgba(255,255,255,.9);backdrop-filter:blur(10px)
}
.sm414-public-brand{display:flex;align-items:center;gap:11px;color:var(--sm414-navy)}
.sm414-public-brand>span{
  width:40px;height:40px;display:grid;place-items:center;border-radius:14px!important;
  background:linear-gradient(145deg,#e6faf7,#fff2cd);font-size:19px
}
.sm414-public-brand b{display:block;font-size:11px;letter-spacing:.12em;color:#078f91}
.sm414-public-brand small{display:block;margin-top:2px;color:#8a9aa0;font-size:10px}
.sm414-close{
  width:40px;height:40px;border:1px solid #e1eded;border-radius:14px!important;
  background:#f7fbfb;color:#617987;font-size:25px;cursor:pointer;transition:.18s
}
.sm414-close:hover{background:#fff0ed;color:#c34c42;transform:scale(1.05)}
.sm414-carousel-frame{position:relative;overflow:hidden;min-height:430px}
.sm414-carousel-host{position:relative;width:100%;height:100%;min-height:430px}
.sm414-slide{
  position:absolute;inset:0;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);
  gap:0;opacity:0;transition:transform .42s cubic-bezier(.2,.75,.25,1),opacity .3s ease;
  background:linear-gradient(145deg,#fbffff,#f2fbfa 62%,#fff8e9)
}
.sm414-slide.from-right{transform:translateX(100%)}.sm414-slide.from-left{transform:translateX(-100%)}
.sm414-slide.is-active{opacity:1;transform:translateX(0)}
.sm414-slide.is-leaving-left{opacity:0;transform:translateX(-100%)}
.sm414-slide.is-leaving-right{opacity:0;transform:translateX(100%)}
.sm414-slide-media{
  min-height:430px;display:grid;place-items:center;padding:20px;
  background:
    radial-gradient(circle at 10% 15%,rgba(23,190,184,.14),transparent 33%),
    radial-gradient(circle at 90% 85%,rgba(255,194,62,.16),transparent 32%),
    #f5fcfb
}
.sm414-slide-media img,.sm414-slide-media video{
  width:100%;height:100%;max-height:390px;object-fit:contain!important;
  border-radius:28px!important;background:#fff;
  box-shadow:0 13px 32px rgba(17,62,79,.09)
}
.sm414-media-empty{
  width:min(340px,90%);aspect-ratio:4/3;border-radius:28px!important;
  display:grid;place-items:center;align-content:center;gap:9px;
  background:linear-gradient(145deg,#e8faf7,#fff1ca);color:#68828e
}
.sm414-media-empty span{font-size:38px}.sm414-media-empty b{letter-spacing:.15em}
.sm414-slide-copy{
  padding:42px 38px 36px;display:flex;flex-direction:column;justify-content:center
}
.sm414-new{
  display:inline-flex;width:max-content;padding:7px 10px;border-radius:999px;
  background:#e4faf7;color:#078f91;font-size:9px;font-weight:950;letter-spacing:.13em
}
.sm414-slide-copy h2{
  margin:14px 0 12px;color:var(--sm414-navy);font-size:clamp(27px,3vw,42px);
  line-height:1.03;letter-spacing:-.035em
}
.sm414-slide-copy p{margin:0;color:#56707d;font-size:15px;line-height:1.65;white-space:pre-line}
.sm414-slide-meta{
  display:flex;justify-content:space-between;gap:12px;margin-top:24px;padding-top:14px;
  border-top:1px solid #e1eceb;color:#84959c;font-size:10px;font-weight:850
}
.sm414-arrow{
  position:absolute;top:55%;z-index:7;width:48px;height:48px;border:1px solid #dceaea;
  border-radius:16px!important;background:rgba(255,255,255,.94);color:#0d6671;font-size:35px;
  line-height:1;display:grid;place-items:center;cursor:pointer;
  box-shadow:0 10px 28px rgba(14,58,74,.12);transition:.18s
}
.sm414-arrow:hover{transform:scale(1.06);background:#eafaf8}
.sm414-arrow.prev{left:14px}.sm414-arrow.next{right:14px}.sm414-arrow[hidden]{display:none!important}
.sm414-dots{
  position:absolute;z-index:8;left:50%;bottom:13px;transform:translateX(-50%);
  display:flex;gap:7px;padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.82)
}
.sm414-dots button{
  width:8px;height:8px;padding:0;border:0;border-radius:999px;background:#bfd4d4;cursor:pointer;transition:.2s
}
.sm414-dots button.active{width:24px;background:#11b5b0}

/* Ciblé */
.sm403-target-feed{
  position:fixed;right:16px;bottom:16px;z-index:75000;width:min(390px,calc(100vw - 24px));
  max-height:min(570px,75vh);overflow:auto;border:1px solid #dfeaea;border-radius:28px!important;
  background:rgba(255,255,255,.98);box-shadow:0 24px 60px rgba(11,44,58,.2);padding:12px
}
.sm403-target-feed[hidden]{display:none!important}
.sm403-target-head{display:flex;align-items:center;justify-content:space-between;padding:7px 6px 11px}
.sm403-target-head button{width:36px;height:36px;border:0;border-radius:13px!important;background:#eef6f6;cursor:pointer}
.sm403-target-card{border:1px solid #e5eded;border-radius:21px!important;overflow:hidden;background:#fff;margin-bottom:10px}
.sm403-target-card img,.sm403-target-card video{width:100%;max-height:200px;object-fit:contain!important;background:#f6fbfa}
.sm403-target-card div{padding:13px}.sm403-target-card h4{margin:0 0 5px;color:#15394a}.sm403-target-card p{margin:0;color:#667c85;font-size:12px;line-height:1.45}

@keyframes sm414ShellIn{from{opacity:0}to{opacity:1}}
@keyframes sm414ShellOut{from{opacity:1}to{opacity:0}}
@keyframes sm414Bar{from{background-position:0 0}to{background-position:220% 0}}

@media(max-width:900px){
  .sm403-admin-pub{grid-template-columns:1fr}
  .sm403-pub-row{grid-template-columns:1fr}
  .sm414-public-card{width:min(720px,calc(100vw - 24px));border-radius:30px!important}
  .sm414-carousel-frame,.sm414-carousel-host{min-height:560px}
  .sm414-slide{grid-template-columns:1fr;grid-template-rows:minmax(280px,1fr) auto}
  .sm414-slide-media{min-height:300px;padding:14px}
  .sm414-slide-media img,.sm414-slide-media video{max-height:330px;border-radius:24px!important}
  .sm414-slide-copy{padding:22px 28px 34px}
  .sm414-slide-copy h2{font-size:28px}
  .sm414-arrow{top:47%}
}

@media(max-width:560px){
  .sm403-pub-panel{padding:16px!important;border-radius:24px!important}
  .sm414-admin-actions{grid-template-columns:1fr 1fr}
  .sm414-public-shell{padding:6px;align-items:center}
  .sm414-public-card{
    width:calc(100vw - 12px);max-height:92vh;border-radius:26px!important;
  }
  .sm414-public-head{padding:14px 14px 9px}
  .sm414-public-brand>span{width:35px;height:35px;border-radius:12px!important}
  .sm414-close{width:36px;height:36px;border-radius:12px!important}
  .sm414-carousel-frame,.sm414-carousel-host{min-height:610px}
  .sm414-slide{grid-template-rows:340px auto}
  .sm414-slide-media{min-height:340px;padding:10px}
  .sm414-slide-media img,.sm414-slide-media video{
    width:100%;height:100%;max-height:320px;object-fit:contain!important;border-radius:20px!important
  }
  .sm414-slide-copy{padding:17px 18px 36px}
  .sm414-slide-copy h2{font-size:24px;margin:10px 0 8px}
  .sm414-slide-copy p{font-size:12.5px;line-height:1.5}
  .sm414-slide-meta{margin-top:14px}
  .sm414-arrow{
    width:40px;height:40px;border-radius:13px!important;font-size:29px;top:49%;
  }
  .sm414-arrow.prev{left:8px}.sm414-arrow.next{right:8px}
  .sm414-dots{bottom:8px}
  .sm403-target-feed{right:7px;bottom:7px;width:calc(100vw - 14px);border-radius:24px!important}
}


/* V415 — carrousel Android centré, photo complète */
@media(max-width:700px){
  .sm414-public-shell{
    position:fixed!important;
    inset:0!important;
    display:grid!important;
    place-items:center!important;
    padding:8px!important;
  }
  .sm414-public-card{
    width:calc(100vw - 16px)!important;
    max-width:520px!important;
    max-height:90vh!important;
    border-radius:26px!important;
    overflow:hidden!important;
  }
  .sm414-carousel-frame,
  .sm414-carousel-host{
    min-height:0!important;
    height:min(690px,76vh)!important;
  }
  .sm414-slide{
    grid-template-columns:1fr!important;
    grid-template-rows:minmax(240px,48%) minmax(0,1fr)!important;
    height:100%!important;
  }
  .sm414-slide-media{
    min-height:0!important;
    height:100%!important;
    padding:10px!important;
  }
  .sm414-slide-media img,
  .sm414-slide-media video{
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    object-fit:contain!important;
    object-position:center!important;
    border-radius:18px!important;
  }
  .sm414-slide-copy{
    min-height:0!important;
    overflow:auto!important;
    padding:16px 18px 38px!important;
  }
  .sm414-slide-copy h2{
    font-size:23px!important;
    line-height:1.05!important;
  }
  .sm414-slide-copy p{
    font-size:12.5px!important;
    line-height:1.48!important;
  }
  .sm414-arrow{
    top:42%!important;
  }
}
