:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#f7f3ff;background:#140525;color-scheme:dark}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 15% 0,#6d20a5 0,transparent 35%),radial-gradient(circle at 90% 30%,#3e1578 0,transparent 30%),#140525}.shell{width:min(920px,calc(100% - 32px));margin:0 auto;padding:48px 0}.hero{padding:18px 4px 28px}.badge{display:inline-block;padding:6px 10px;border:1px solid #9c6bc7;border-radius:999px;background:#ffffff12;font-size:13px}.hero h1{font-size:clamp(34px,7vw,58px);margin:16px 0 10px;line-height:1}.hero p{max-width:720px;color:#d7c7e8;font-size:18px;line-height:1.6}.panel{background:#211030e8;border:1px solid #ffffff1f;border-radius:22px;padding:24px;box-shadow:0 20px 70px #0006;margin-bottom:18px}.field{margin-bottom:20px}.field label{display:block;font-weight:700;margin-bottom:8px}input,textarea,select{width:100%;border:1px solid #ffffff2e;background:#12081d;color:white;border-radius:12px;padding:13px 14px;font:inherit;outline:none}input:focus,textarea:focus,select:focus{border-color:#c895ff;box-shadow:0 0 0 3px #9b4ee633}textarea{resize:vertical;line-height:1.6}.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.upload-zone{position:relative;display:grid;place-items:center;text-align:center;min-height:150px;border:2px dashed #9c6bc7;border-radius:16px;background:#ffffff08;padding:24px;cursor:pointer}.upload-zone input{position:absolute;inset:0;opacity:0;cursor:pointer}.upload-zone strong{font-size:18px}.upload-zone span,small{color:#bba8cc;margin-top:6px}#preview{display:block;width:min(100%,460px);max-height:420px;object-fit:contain;margin:16px auto 0;border-radius:14px;border:1px solid #ffffff1f}button,.download{display:inline-flex;justify-content:center;align-items:center;border:0;border-radius:14px;padding:14px 20px;background:linear-gradient(135deg,#a23df0,#6554ff);color:white;font-weight:800;font-size:16px;cursor:pointer;text-decoration:none}button:disabled{opacity:.55;cursor:not-allowed}.status-head{display:flex;justify-content:space-between;align-items:center;gap:18px}.status-head h2{margin:0}.progress{height:12px;background:#100719;border-radius:999px;overflow:hidden;margin:18px 0}.progress div{width:8%;height:100%;background:linear-gradient(90deg,#a23df0,#6bdeff);border-radius:inherit;transition:width .4s ease}pre{min-height:100px;max-height:230px;overflow:auto;background:#0d0614;padding:14px;border-radius:12px;color:#cbb5df;white-space:pre-wrap}#result{margin-top:20px}video{display:block;width:min(100%,400px);max-height:650px;margin:0 auto 16px;border-radius:14px;background:black}.download{width:100%}@media(max-width:640px){.grid{grid-template-columns:1fr}.shell{padding-top:22px}.panel{padding:18px}.status-head{align-items:flex-start;flex-direction:column}}
.secondary{background:transparent;color:#6f32d9;border:2px solid #6f32d9;margin-bottom:10px}.secondary:disabled{opacity:.45;cursor:not-allowed}.ocr-message{min-height:24px;margin:0 0 18px;font-weight:600}.ocr-message.success{color:#197348}.ocr-message.warning{color:#9a6200}.ocr-message.error{color:#b42318}
.ocr-progress{margin:0 0 14px}.ocr-progress .progress{margin:8px 0}.ocr-progress span{display:block;color:#cdb9df;font-size:14px}.ocr-zones{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:0 0 20px}.ocr-zones figure{margin:0;background:#12081d;border:1px solid #ffffff1f;border-radius:12px;padding:8px}.ocr-zones canvas{display:block;width:100%;height:70px;object-fit:contain;background:white;border-radius:7px}.ocr-zones figcaption{text-align:center;color:#cdb9df;font-size:12px;margin-top:6px}@media(max-width:640px){.ocr-zones{grid-template-columns:repeat(2,1fr)}}
.mode-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.mode-tab{background:#ffffff0b;border:1px solid #ffffff25}.mode-tab.active{background:linear-gradient(135deg,#a23df0,#6554ff);border-color:transparent}.preview{display:block;width:min(100%,500px);max-height:520px;object-fit:contain;margin:16px auto 0;border-radius:14px;border:1px solid #ffffff1f}.format-note{padding:14px 16px;border-radius:14px;background:#6d20a522;border:1px solid #9c6bc755;margin-bottom:20px;color:#e7daf3}.grid.two .full{grid-column:1/-1}.section-title{font-size:22px;margin:10px 0 16px}.conjugation-grid{display:grid;gap:12px;margin-bottom:22px}.conjugation-row{display:grid;grid-template-columns:38px 1fr 1fr;gap:12px;align-items:end;padding:12px;border:1px solid #ffffff1d;border-radius:14px;background:#12081d77}.conjugation-row .field{margin:0}.scene-number{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#8d42d8;font-weight:800;margin-bottom:7px}@media(max-width:640px){.mode-tabs{grid-template-columns:1fr}.conjugation-row{grid-template-columns:34px 1fr}.conjugation-row .field:last-child{grid-column:2}.grid.two .full{grid-column:auto}}


/* Today in History */
.history-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}
.history-head h2{margin:0 0 7px}.history-head p{margin:0;color:#cdb9df;line-height:1.5}
.history-category{border:1px solid #ffffff1c;border-radius:14px;overflow:hidden;margin:13px 0;background:#12081d77}
.history-category>summary{cursor:pointer;padding:17px 19px;font-size:18px;font-weight:900;background:#ffffff0a}
.history-event{padding:18px;border-top:1px solid #ffffff18}
.history-event h3{margin:0 0 8px;line-height:1.4}.history-event p{color:#cdb9df;line-height:1.55}.history-event a{color:#76dfff}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}
.history-translations,.history-poster-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:15px}
.history-translation{padding:14px;border:1px solid #ffffff1c;border-radius:13px;background:#0d0614}
.history-translation h4{margin:8px 0}.history-translation p{margin:0;color:#cdb9df}
.history-translation[dir="rtl"]{text-align:right;font-family:Arial,"Noto Sans Arabic",sans-serif}
.history-poster-card{padding:10px;border:1px solid #ffffff1c;border-radius:13px;background:#0d0614}
.history-poster-card img{display:block;width:100%;border-radius:9px}
.history-poster-actions{display:flex;gap:8px;margin-top:10px}
.history-poster-actions a,.history-poster-actions button{flex:1;text-align:center;text-decoration:none;padding:10px;border-radius:8px;font-size:14px;font-weight:800}
.history-poster-actions a{background:#6554ff;color:white}.history-regenerate{background:#9a6200}
@media(max-width:800px){.history-head{align-items:flex-start;flex-direction:column}.history-translations,.history-poster-grid{grid-template-columns:1fr}}


.history-score {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #6554ff22;
  border: 1px solid #8b7cff66;
  color: #cfc7ff;
  font-weight: 800;
  font-size: 13px;
}

.history-reason {
  margin-top: 8px;
  color: #aeb6c8;
  font-size: 13px;
  font-style: italic;
}


/* Publication Facebook */
.facebook-message-label{display:block;margin-top:12px;color:#d9d2e4;font-size:13px;font-weight:800}
.facebook-message{width:100%;min-height:122px;margin-top:7px;padding:11px 12px;resize:vertical;border:1px solid #ffffff26;border-radius:9px;background:#160c20;color:#fff;font:inherit;font-size:14px;line-height:1.45}
.facebook-message[dir="rtl"]{direction:rtl;text-align:right;font-family:"Noto Sans Arabic",Tahoma,Arial,sans-serif}
.history-poster-actions{flex-wrap:wrap}
.history-poster-actions .history-facebook-publish{flex-basis:100%;background:#1877f2;color:#fff}
.facebook-publish-result{min-height:20px;margin:10px 2px 0;color:#c8c0d4;font-size:13px;line-height:1.4}
.facebook-publish-result.success{color:#72e0a5}
.facebook-publish-result.error{color:#ff8e8e}


/* =========================================================
   FACEBOOK — SÉLECTION ET PUBLICATION GROUPÉE
   ========================================================= */

.history-carousel-toolbar {
  margin: 18px 0 24px;
  padding: 18px;
  border: 1px solid #ffffff1c;
  border-radius: 15px;
  background: #0d0614cc;
}

.history-carousel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.history-carousel-heading h3 {
  margin: 0 0 6px;
}

.history-carousel-heading p {
  margin: 0;
  color: #cdb9df;
  line-height: 1.5;
}

.history-carousel-limit {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #ffffff22;
  border-radius: 999px;
  color: #cfc7ff;
  background: #6554ff18;
  font-size: 12px;
  font-weight: 800;
}

.history-carousel-language-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.history-carousel-language {
  min-width: 0;
  padding: 14px;
  border: 1px solid #ffffff1c;
  border-radius: 13px;
  background: #160c20;
}

.history-carousel-language-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.history-carousel-count {
  padding: 5px 8px;
  border-radius: 999px;
  background: #6554ff22;
  color: #cfc7ff;
  font-size: 12px;
  font-weight: 800;
}

.history-carousel-language label {
  display: block;
  margin-top: 11px;
  color: #d9d2e4;
  font-size: 13px;
  font-weight: 800;
}

.history-carousel-hashtags,
.history-carousel-preview {
  width: 100%;
  margin-top: 6px;
  padding: 10px 11px;
  border: 1px solid #ffffff26;
  border-radius: 9px;
  background: #0d0614;
  color: #ffffff;
  font: inherit;
  line-height: 1.45;
}

.history-carousel-preview {
  min-height: 175px;
  resize: vertical;
}

.history-carousel-preview[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family:
    "Noto Sans Arabic",
    Tahoma,
    Arial,
    sans-serif;
}

.history-carousel-toolbar-actions {
  display: flex;
  gap: 8px;
  margin-top: 11px;
}

.history-carousel-toolbar-actions button {
  flex: 1;
}

.history-carousel-publish {
  background: #1877f2;
}

.history-carousel-result {
  min-height: 19px;
  margin: 10px 0 0;
  color: #c8c0d4;
  font-size: 12px;
  line-height: 1.4;
}

.history-carousel-result.success {
  color: #72e0a5;
}

.history-carousel-result.error {
  color: #ff8e8e;
}

.history-carousel-selector {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid #ffffff1f;
  border-radius: 9px;
  background: #6554ff13;
  cursor: pointer;
  color: #f4effa;
  font-size: 13px;
  font-weight: 800;
}

.history-carousel-selector input {
  width: 18px;
  height: 18px;
  accent-color: #6554ff;
  cursor: pointer;
}

.history-carousel-selector:has(input:checked) {
  border-color: #8b7cff99;
  background: #6554ff2b;
}

@media (max-width: 1050px) {
  .history-carousel-language-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .history-carousel-heading {
    flex-direction: column;
  }

  .history-carousel-toolbar-actions {
    flex-direction: column;
  }
}


/* TikTok - Vidéo pour mots */
.tiktok-publish-panel{
  margin-top:18px;
  padding:18px;
  border:1px solid #ffffff25;
  border-radius:16px;
  background:#12081dcc;
}
.tiktok-publish-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}
.tiktok-publish-head h3{margin:0 0 6px}
.tiktok-publish-head p{margin:0;color:#cbb5df}
.tiktok-publish-panel textarea{margin:8px 0 16px}
.tiktok-options{padding-top:1px}
.check-row{
  display:flex!important;
  align-items:center;
  gap:8px;
  margin:8px 0!important;
  font-weight:500!important;
}
.check-row input{
  width:auto;
  margin:0;
  accent-color:#a23df0;
}
#tiktok-publish{width:100%;margin-top:8px}
@media(max-width:640px){
  .tiktok-publish-head{flex-direction:column}
  #tiktok-connect{width:100%}
}
