@font-face {
  font-family: 'Arabswell';
  src: url('../assets/fonts/arabswell_1.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --card: #ffffff;
  --primary: #0d7f5f;
  --danger: #b42318;
  --success: #027a48;
  --border: #d0d5dd;
  --text: #101828;
  --shadow: 0 14px 35px rgba(16, 24, 40, .16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  font-family: 'Arabswell', sans-serif;
  line-height: 1.8;
  letter-spacing: .5px;
  text-align: right;
  transition: background .35s ease, color .35s ease;
  background: #eef2f6 url('background.jpg') center/cover fixed no-repeat;
}

body.theme-male {
  --primary: #0c6dc9;
  --brand-bar-bg: rgba(192, 224, 255, .55);
  background-blend-mode: multiply;
}

body.theme-female {
  --primary: #ab2a8f;
  --brand-bar-bg: rgba(255, 208, 236, .56);
  background-blend-mode: soft-light;
}

h1, h2, h3, label, button { font-family: 'Arabswell', sans-serif; }
h1, h2, h3 { margin-top: 0; line-height: 1.5; text-align: center; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; white-space: nowrap; }
label { text-align: center; text-decoration: underline; text-underline-offset: .16em; text-decoration-thickness: 1px; }

.site-header {
  padding: 1rem .75rem .4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
}
.logos {
  width: 100%;
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  flex-wrap: nowrap;
  padding: .7rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .4);
  background: var(--brand-bar-bg, rgba(255, 255, 255, .3));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(16, 24, 40, .18);
  opacity: .9;
}
.logo-img {
  width: 50%;
  max-width: 360px;
  height: auto;
  object-fit: contain;
  min-width: 0;
}

.header-title {
  margin: 0;
  font-family: 'Arabswell', sans-serif;
  font-size: clamp(1.05rem, 2.7vw, 1.7rem);
  font-weight: 700;
  color: #0a4a3c;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: .2em;
  white-space: nowrap;
  line-height: 1.3;
}


.container { max-width: 1080px; margin: .25rem auto 1rem; padding: .85rem; }
.card {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(4px);
  padding: 1rem;
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin-inline: auto;
  border: 1px solid rgba(255,255,255,.65);
}
.registration-card { max-width: 760px; }
.with-brand-bar { margin-top: .35rem; }
.modern-form { display: grid; gap: .55rem; transition: opacity .25s ease; }
.modern-form.is-disabled { opacity: .7; }

label { display: block; margin: .45rem 0 .2rem; font-weight: 700; }
input,select,textarea,button {
  width: 100%;
  padding: .74rem .8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  transition: border-color .25s ease, box-shadow .25s ease, transform .2s ease;
}
input:focus,select:focus,textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary), white 35%);
  box-shadow: 0 0 0 3px rgba(13, 127, 95, .18);
}
button {
  background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--primary), black 18%));
  color: #fff;
  border: none;
  cursor: pointer;
  margin-top: .4rem;
  font-weight: 700;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .6; cursor: not-allowed; }

.category-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin-bottom: .25rem;
}
.pill-option input { display: none; }
.pill-option span {
  display: block;
  text-align: center;
  border-radius: 999px;
  padding: .55rem .8rem;
  border: 1px solid var(--border);
  background: #f8fafc;
  cursor: pointer;
  transition: all .22s ease;
}
.pill-option input:checked + span {
  background: color-mix(in srgb, var(--primary), white 75%);
  border-color: var(--primary);
  color: color-mix(in srgb, var(--primary), black 20%);
  box-shadow: 0 5px 14px rgba(16, 24, 40, .12);
}

.alert { padding: .65rem .8rem; border-radius: 10px; }
.alert.error { background: #fef3f2; color: var(--danger); }
.alert.success { background: #ecfdf3; color: var(--success); }
.hidden { display: none; }
.preview-box { border: 1px dashed #98a2b3; border-radius: 10px; padding: .8rem; margin-top: .4rem; text-align: center; background: #fcfcfd; }
.preview-box img { max-width: 220px; max-height: 220px; border-radius: 8px; display: none; margin: auto; }
.link { display: inline-block; margin-top: .5rem; color: #0b4f6c; text-decoration: none; }
.table-wrap { overflow-x: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; margin-top: .8rem; background: rgba(255,255,255,.96); }
th,td { border-bottom: 1px solid #eaecf0; padding: .55rem; text-align: right; vertical-align: middle; }
th { text-align: center; text-decoration: underline; text-underline-offset: .16em; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.badge { padding: .2rem .5rem; border-radius: 6px; font-size: .8rem; background: #eef4ff; }

.status-control {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: .9rem;
}

.segment-group {
  display: inline-flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.segment-form {
  margin: 0;
}

.segment-btn {
  width: auto;
  min-width: 88px;
  border-radius: 999px;
  margin-top: 0;
  border: 1px solid var(--primary);
  padding: .45rem .9rem;
  background: transparent;
  color: var(--primary);
}

.segment-btn.active {
  background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--primary), black 18%));
  color: #fff;
}

.thumb { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; border: 1px solid #d0d5dd; background: #fff; }
audio { width: 210px; max-width: 100%; }

.code-badge {
  font-family: 'Arabswell', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.tabs { display: flex; gap: .55rem; margin: .8rem 0; justify-content: center; }
.tab-btn { width: auto; padding: .55rem 1rem; border-radius: 999px; }
.tab-btn.active { box-shadow: inset 0 0 0 2px #fff; }
.tab-panel.hidden { display: none; }

.site-footer {
  text-align: center;
  color: #fff;
  font-weight: 700;
  background: rgba(9, 45, 65, .78);
  padding: .75rem;
  margin-top: 1rem;
}

@media (min-width:768px) {
  .card { padding: 1.4rem 1.8rem; }
  .site-header { padding-top: 1.4rem; }
}

@media (max-width:640px) {
  .logos {
    width: 100%;
    padding: .55rem .5rem;
    gap: .4rem;
  }

  .logo-img {
    width: 50%;
    max-width: 100%;
  }

  .header-title {
    font-size: clamp(.9rem, 3.7vw, 1.1rem);
    letter-spacing: 0;
  }

  h1, h2, h3 {
    white-space: normal;
  }
}
.pill-option{
  text-decoration: none !important;
}
/* ===============================
   FONT ARABSWELL
=============================== */
@font-face {
    font-family: 'Arabswell';
    src: url('fonts/arabswell_1.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ===============================
   HEADER TITLE MODERNE
=============================== */

.header-title {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Badge النسخة الثانية */
.header-title .title-badge {
    font-family: 'Arabswell';
    background: linear-gradient(135deg,#16a085,#2ecc71);
    color: white;
    padding: 5px 22px;
    border-radius: 50px;
    font-size: 14px;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Titre principal */
.header-title h2 {
    font-family: 'Arabswell';
    font-size: 26px;
    font-weight: bold;
    background: linear-gradient(to right,#0f3057,#16a085);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: underline;
    text-underline-offset: 6px;
}

/* ===============================
   THEMES DYNAMIQUES
=============================== */

/* Féminin */
.theme-female .header-title .title-badge {
    background: linear-gradient(135deg,#ff6fa5,#f06292);
}

.theme-female .header-title h2 {
    background: linear-gradient(to right,#ad1457,#ec407a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Masculin */
.theme-male .header-title .title-badge {
    background: linear-gradient(135deg,#1565c0,#42a5f5);
}

.theme-male .header-title h2 {
    background: linear-gradient(to right,#0d47a1,#1e88e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===============================
   LOGOS RESPONSIVE
=============================== */

.header-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-logos img {
    width: 100%;
    max-width: 760px;
    height: auto;
}

/* ===============================
   RESPONSIVE MOBILE
=============================== */

@media(max-width:768px){
    .header-title h2{
        font-size:20px;
    }
}
audio{
  width: 100%;
}

.judge-dashboard-layout {
  max-width: 900px;
}

.candidate-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
}

.candidate-row {
  width: 100%;
}

.candidate-row-audio {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.candidate-row-audio .code-badge {
  align-self: flex-start;
  background: #eef4ff;
  border-radius: 999px;
  padding: .2rem .8rem;
}

.candidate-row-audio audio {
  width: 100%;
}

.candidate-row-scores {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.candidate-row-scores label {
  text-align: right;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .2rem 0 .1rem;
}

.score-label-badge {
  font-size: .78rem;
  background: #f2f4f7;
  border-radius: 999px;
  padding: .1rem .45rem;
}

.judge-total-display {
  margin: .4rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

textarea[name="comment"] {
  width: 100%;
  resize: vertical;
}

.save-row {
  position: sticky;
  bottom: .4rem;
}

.save-btn {
  width: 100%;
  font-size: 1.1rem;
  padding: .85rem;
}

@media (min-width: 640px) {
  .candidate-row-audio {
    flex-direction: row;
    align-items: center;
  }

  .candidate-row-audio .code-badge {
    order: 2;
    flex-shrink: 0;
  }

  .candidate-row-audio audio {
    order: 1;
  }
}

.judge-candidate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

.judge-candidate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem .65rem;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: #f8fafc;
}

.judge-candidate-item.active {
  border-color: #175cd3;
  background: #eaf2ff;
}

.judge-candidate-status {
  font-size: .8rem;
  color: #475467;
}

.judge-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  font-size: .92rem;
}

@media (max-width: 640px) {
  .judge-candidate-list {
    grid-template-columns: 1fr;
  }
}
