/*
Theme Name: UNE Union Theme
Theme URI: https://smartdigiweb.ma/
Author: Abdeltif KOSTANI
Description: Un theme WordPress arabe complet pour l'Union nationale de l'enseignement, affiliee a l'Union des syndicats populaires.
Version: 1.4.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: une-union
*/

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

:root{
  --une-green:#1f6f3f;
  --une-green-dark:#103d25;
  --une-yellow:#eef126;
  --une-orange:#b85b2b;
  --une-orange-dark:#8e3f20;
  --une-black:#111111;
  --une-white:#ffffff;
  --une-soft:#f7f5df;
  --une-muted:#5d5d5d;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  direction:rtl;
  text-align:justify;
  font-family:'Tajawal', Arial, sans-serif;
  background:var(--une-soft);
  color:var(--une-black);
  line-height:1.8;
}
a{color:inherit;}
img{max-width:100%;height:auto;}

.une-header{
  background:linear-gradient(135deg,var(--une-green-dark),var(--une-green));
  color:var(--une-white);
  padding:16px 6%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  position:sticky;
  top:0;
  z-index:1000;
  box-shadow:0 6px 22px rgba(0,0,0,.18);
}
.une-brand{display:flex;align-items:center;gap:14px;text-decoration:none;}
.une-brand img{width:74px;height:74px;object-fit:cover;border-radius:50%;background:var(--une-yellow);padding:3px;}
.une-brand h1{font-size:24px;margin:0;font-weight:900;line-height:1.25;}
.une-brand span{display:block;font-size:14px;color:var(--une-yellow);font-weight:700;}
.une-nav{display:flex;flex-wrap:wrap;gap:18px;align-items:center;}
.une-nav a{text-decoration:none;font-weight:800;color:var(--une-white);transition:.2s;}
.une-nav a:hover{color:var(--une-yellow);}

.une-hero{
  min-height:78vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(238,241,38,.22), transparent 32%),
    linear-gradient(rgba(16,61,37,.88),rgba(16,61,37,.88));
  color:var(--une-white);
  display:grid;
  place-items:center;
  padding:70px 6%;
  overflow:hidden;
}
.une-hero-inner{display:grid;grid-template-columns:1.25fr .75fr;gap:40px;align-items:center;width:100%;max-width:1180px;}
.une-badge{display:inline-block;background:var(--une-orange);padding:8px 18px;border-radius:999px;font-weight:900;margin-bottom:18px;}
.une-hero h2{font-size:clamp(36px,5vw,62px);line-height:1.25;margin:0 0 18px;font-weight:900;}
.une-hero p{font-size:21px;max-width:780px;margin:0 0 30px;color:#f7f7f7;}
.une-hero-logo{display:flex;justify-content:center;}
.une-hero-logo img{width:min(340px,85vw);border-radius:50%;box-shadow:0 22px 55px rgba(0,0,0,.32);background:var(--une-yellow);padding:8px;}
.une-buttons{display:flex;gap:14px;flex-wrap:wrap;}
.une-btn{display:inline-block;padding:14px 25px;border-radius:12px;text-decoration:none;font-weight:900;border:2px solid transparent;transition:.2s;font-family:'Tajawal', Arial, sans-serif;font-size:16px;line-height:1.4;cursor:pointer;appearance:none;-webkit-appearance:none;}
.une-btn-primary{background:var(--une-yellow);color:var(--une-black);}
.une-btn-secondary{background:var(--une-white);color:var(--une-green-dark);font-family:'Tajawal', Arial, sans-serif;font-weight:900;}
.une-btn:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,0,0,.14);}

.une-section{padding:76px 6%;}
.une-section.white{background:var(--une-white);}
.une-section-title{text-align:center;max-width:800px;margin:0 auto 42px;}
.une-section-title h2{font-size:clamp(30px,4vw,42px);color:var(--une-green-dark);margin:0 0 10px;font-weight:900;}
.une-section-title p{font-size:18px;color:var(--une-muted);margin:0;}
.une-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:24px;max-width:1180px;margin:auto;}
.une-card{background:var(--une-white);border-radius:20px;padding:28px;box-shadow:0 10px 28px rgba(0,0,0,.08);border-top:7px solid var(--une-orange);}
.white .une-card{background:var(--une-soft);}
.une-card h3{margin:0 0 10px;color:var(--une-green-dark);font-size:24px;font-weight:900;}
.une-card p{margin:0;color:#444;}

.une-news{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;max-width:1180px;margin:auto;}
.une-news article{background:var(--une-white);border-radius:20px;overflow:hidden;box-shadow:0 10px 28px rgba(0,0,0,.08);}
.une-news .thumb{height:190px;background:linear-gradient(135deg,var(--une-green),var(--une-orange));display:flex;align-items:center;justify-content:center;color:var(--une-yellow);font-weight:900;font-size:22px;}
.une-news img{width:100%;height:190px;object-fit:cover;display:block;}
.une-news-content{padding:22px;}
.une-news h3{margin:0 0 10px;color:var(--une-green-dark);font-weight:900;}
.une-news p{margin:0 0 18px;color:#555;}

.une-cta{max-width:1180px;margin:auto;background:linear-gradient(135deg,var(--une-orange),var(--une-orange-dark));color:var(--une-white);text-align:center;border-radius:28px;padding:55px 24px;box-shadow:0 18px 45px rgba(142,63,32,.25);}
.une-cta h2{font-size:clamp(28px,4vw,42px);margin:0 0 12px;font-weight:900;}
.une-cta p{font-size:19px;margin:0 0 24px;}

.une-footer{background:var(--une-green-dark);color:var(--une-white);padding:48px 6% 20px;}
.une-footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:30px;max-width:1180px;margin:auto;}
.une-footer h3{color:var(--une-yellow);margin:0 0 14px;font-weight:900;}
.une-footer a{display:block;text-decoration:none;margin:6px 0;color:var(--une-white);}
.une-footer a:hover{color:var(--une-yellow);}
.une-footer-bottom{max-width:1180px;margin:30px auto 0;border-top:1px solid rgba(255,255,255,.2);padding-top:18px;text-align:center;font-size:14px;}

.une-page{max-width:980px;margin:50px auto;padding:0 6%;}
.une-page-card{background:#fff;border-radius:20px;padding:34px;box-shadow:0 10px 28px rgba(0,0,0,.08);}

@media(max-width:850px){
  .une-header{position:relative;flex-direction:column;text-align:center;}
  .une-brand{flex-direction:column;}
  .une-nav{justify-content:center;gap:12px;}
  .une-hero-inner{grid-template-columns:1fr;text-align:center;}
  .une-buttons{justify-content:center;}
}

.une-support-section{
  background:linear-gradient(135deg,rgba(31,111,63,.12),rgba(238,241,38,.18));
}
.une-support-card{
  max-width:1180px;
  margin:auto;
  background:var(--une-white);
  border-radius:28px;
  padding:38px;
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:28px;
  box-shadow:0 16px 42px rgba(0,0,0,.10);
  border-top:8px solid var(--une-orange);
}
.une-support-card h2{
  margin:8px 0 12px;
  color:var(--une-green-dark);
  font-size:clamp(28px,4vw,42px);
  font-weight:900;
}
.une-support-card p{
  margin:0;
  color:#444;
  font-size:18px;
}
.une-support-card .une-btn{
  border:0;
  cursor:pointer;
  white-space:nowrap;
  font-family:inherit;
  font-size:18px;
}
.une-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.une-modal.is-open{display:flex;}
.une-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.62);
}
.une-modal-box{
  position:relative;
  width:min(680px,100%);
  max-height:92vh;
  overflow:auto;
  background:var(--une-white);
  border-radius:24px;
  padding:34px;
  box-shadow:0 22px 65px rgba(0,0,0,.35);
  border-top:8px solid var(--une-orange);
}
.une-modal-close{
  position:absolute;
  top:12px;
  left:14px;
  width:42px;
  height:42px;
  border:0;
  border-radius:50%;
  background:var(--une-green-dark);
  color:var(--une-white);
  font-size:28px;
  line-height:1;
  cursor:pointer;
}
.une-modal-box h2{
  margin:0 0 8px;
  color:var(--une-green-dark);
  font-size:32px;
  font-weight:900;
}
.une-modal-intro{
  margin:0 0 22px;
  color:#555;
}
.une-support-form label{
  display:block;
  margin:14px 0 6px;
  color:var(--une-green-dark);
  font-weight:900;
}
.une-support-form input,
.une-support-form textarea{
  width:100%;
  border:1px solid #ddd;
  border-radius:12px;
  padding:13px 14px;
  font-family:inherit;
  font-size:16px;
  background:#fff;
}
.une-support-form input:focus,
.une-support-form textarea:focus{
  outline:none;
  border-color:var(--une-green);
  box-shadow:0 0 0 3px rgba(31,111,63,.12);
}
.une-submit-btn{
  margin-top:18px;
  width:100%;
  border:0;
  cursor:pointer;
  font-family:inherit;
  font-size:18px;
}
.une-alert{
  padding:13px 16px;
  border-radius:12px;
  margin:0 0 18px;
  font-weight:800;
}
.une-alert.success{background:#e7f8ed;color:#145c2f;}
.une-alert.error{background:#fff1ef;color:#9a2a16;}
body.une-modal-open{overflow:hidden;}

@media(max-width:850px){
  .une-support-card{grid-template-columns:1fr;text-align:center;}
  .une-support-card .une-btn{width:100%;}
}

/* Membership form additions */
.une-membership-modal-box{
  max-width:820px;
  max-height:92vh;
  overflow-y:auto;
}
.une-form-subtitle{
  margin:24px 0 14px;
  padding:12px 16px;
  border-radius:12px;
  background:#f7f6e8;
  color:var(--green-dark);
  border-right:5px solid var(--orange);
  font-size:20px;
}
.une-membership-form input[type="file"]{
  background:#fff;
  border:1px dashed var(--green);
  padding:14px;
  cursor:pointer;
}
.une-checkbox-label{
  display:flex !important;
  align-items:flex-start;
  gap:10px;
  line-height:1.9;
  margin:16px 0 24px;
  font-weight:700;
  color:var(--green-dark);
}
.une-checkbox-label input{
  width:auto !important;
  margin-top:8px;
  flex:0 0 auto;
}

.une-membership-note{
  margin:10px 0 18px;
  padding:12px 14px;
  border-radius:12px;
  background:#fff8d8;
  border-right:4px solid var(--orange);
  color:var(--green-dark);
  font-weight:700;
  line-height:1.8;
}

/* Membership upload validation and progress */
.une-field-hint{display:block;margin:8px 0 16px;color:#666;font-size:13px;line-height:1.6;}
.une-required-star{color:#c0392b;font-weight:900;margin-left:4px;}
.une-membership-payment-note{margin-top:-6px;}
.une-form-error{display:none;margin:12px 0;padding:12px 14px;border-radius:10px;background:#fff1f0;color:#8a1f11;border:1px solid #ffc7c2;font-weight:700;}
.une-form-error.is-visible{display:block;}
.une-upload-progress{display:none;margin:14px 0;background:#f0f0f0;border-radius:999px;overflow:hidden;height:12px;border:1px solid #ddd;}
.une-upload-progress span{display:block;height:100%;width:0;background:var(--une-green);transition:width .25s ease;}
.une-support-form.is-submitting .une-upload-progress{display:block;}
.une-support-form.is-submitting .une-submit-btn{opacity:.75;pointer-events:none;}


/* واجهة رفع ملفات بطاقة الانخراط: عربية، سحب وإفلات، ومعاينة */
.une-file-drop{
  position:relative;
  border:2px dashed rgba(31,111,63,.35);
  border-radius:18px;
  background:#fffef3;
  padding:18px;
  margin:8px 0 14px;
  cursor:pointer;
  transition:.2s ease;
}
.une-file-drop:hover,
.une-file-drop.is-dragover{
  border-color:var(--une-green);
  background:#f2ffe8;
  box-shadow:0 10px 26px rgba(31,111,63,.12);
}
.une-file-drop input[type="file"].une-file-input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}
.une-file-drop-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  pointer-events:none;
}
.une-file-drop-inner strong{
  color:var(--une-green-dark);
  font-size:15px;
}
.une-file-btn{
  background:var(--une-green);
  color:#fff;
  border-radius:999px;
  padding:9px 16px;
  font-weight:800;
  white-space:nowrap;
}
.une-file-name{
  color:#555;
  font-size:14px;
}
.une-file-preview{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr));
  gap:10px;
  margin-top:12px;
  pointer-events:none;
}
.une-file-preview-item{
  display:flex;
  align-items:center;
  gap:8px;
  background:#fff;
  border:1px solid #e4e4e4;
  border-radius:12px;
  padding:8px;
  min-width:0;
}
.une-file-preview-item img{
  width:48px;
  height:48px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid #ddd;
}
.une-file-preview-icon{
  width:48px;
  height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#f1f1f1;
  color:var(--une-orange);
  font-weight:900;
  border:1px solid #ddd;
}
.une-file-preview-item span:last-child{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  color:#444;
}
.une-submit-btn:disabled{
  opacity:.75;
  cursor:not-allowed;
}
