/*
Theme Name: OTGM
Theme URI: https://otgm.ma
Author: OTGM
Author URI: https://otgm.ma
Description: Thème WordPress officiel de l'Organisation Générale des Travailleurs du Maroc (OTGM). RTL, arabe, design rouge & or.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: otgm
Tags: rtl-language-support, one-column, custom-menu, translation-ready
*/

:root {
  --red: #c0181f;
  --dark-red: #8b1015;
  --gold: #d4a843;
  --light-gold: #f5d98a;
  --cream: #fdf6e8;
  --dark: #1a1208;
  --text: #2d1f0a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Cairo', sans-serif; background: var(--cream); color: var(--text); overflow-x: hidden; }

/* HEADER */
.site-header { background: var(--dark); position: sticky; top: 0; z-index: 999; border-bottom: 3px solid var(--gold); }
.site-header nav { max-width: 1200px; margin: auto; padding: 0 30px; display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo-wrap { display: flex; align-items: center; gap: 14px; }
.logo-emblem { width: 50px; height: 50px; background: var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 900; color: var(--dark); flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; }
.logo-ar { font-family: 'Amiri', serif; font-size: 0.85rem; color: var(--light-gold); line-height: 1.2; }
.logo-fr { font-size: 0.7rem; color: #888; letter-spacing: 1px; }
.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a { color: #ccc; text-decoration: none; font-size: 0.88rem; font-weight: 600; padding: 7px 14px; border-radius: 6px; transition: all 0.25s; white-space: nowrap; }
.nav-links a:hover { background: var(--gold); color: var(--dark); }

/* HERO */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; background: var(--dark); }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(192,24,31,0.35) 0%, transparent 70%), radial-gradient(ellipse 50% 80% at 100% 50%, rgba(212,168,67,0.12) 0%, transparent 60%), repeating-linear-gradient(45deg, transparent, transparent 60px, rgba(212,168,67,0.03) 60px, rgba(212,168,67,0.03) 61px); }
.star-pattern { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(212,168,67,0.15) 1px, transparent 1px); background-size: 40px 40px; opacity: 0.5; }
.hero-content { position: relative; max-width: 1200px; margin: auto; padding: 80px 30px; text-align: center; z-index: 2; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(212,168,67,0.15); border: 1px solid rgba(212,168,67,0.4); color: var(--gold); padding: 8px 20px; border-radius: 50px; font-size: 0.85rem; font-weight: 700; margin-bottom: 35px; letter-spacing: 2px; animation: fadeDown 0.8s ease both; }
.hero h1 { font-family: 'Amiri', serif; font-size: clamp(2.5rem, 6vw, 5rem); color: white; line-height: 1.3; margin-bottom: 15px; animation: fadeDown 0.8s 0.2s ease both; }
.hero h1 span { color: var(--gold); }
.hero-abbr { font-size: clamp(1rem, 3vw, 1.8rem); color: rgba(255,255,255,0.5); font-weight: 300; letter-spacing: 6px; margin-bottom: 30px; animation: fadeDown 0.8s 0.35s ease both; }
.hero p { font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(255,255,255,0.75); max-width: 680px; margin: 0 auto 50px; line-height: 1.9; animation: fadeDown 0.8s 0.5s ease both; }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; animation: fadeDown 0.8s 0.65s ease both; }
.btn-primary { background: var(--gold); color: var(--dark); padding: 15px 36px; border-radius: 8px; font-weight: 700; font-size: 1rem; text-decoration: none; transition: all 0.3s; border: 2px solid var(--gold); }
.btn-primary:hover { background: transparent; color: var(--gold); transform: translateY(-3px); }
.btn-outline { background: transparent; color: white; padding: 15px 36px; border-radius: 8px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 2px solid rgba(255,255,255,0.3); transition: all 0.3s; }
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.08); }
.hero-stats { display: flex; justify-content: center; gap: 60px; margin-top: 80px; padding-top: 50px; border-top: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; animation: fadeDown 0.8s 0.8s ease both; }
.stat-item { text-align: center; }
.stat-num { font-size: 2.5rem; font-weight: 900; color: var(--gold); display: block; line-height: 1; }
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-top: 6px; }

.divider { height: 6px; background: linear-gradient(90deg, var(--dark-red), var(--gold), var(--dark-red)); }

section { padding: 100px 0; }
.container { max-width: 1200px; margin: auto; padding: 0 30px; }
.section-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 4px; color: var(--gold); text-transform: uppercase; margin-bottom: 12px; display: block; }
.section-title { font-family: 'Amiri', serif; font-size: clamp(2rem, 4vw, 3rem); color: var(--dark); margin-bottom: 20px; line-height: 1.3; }
.section-desc { font-size: 1.05rem; color: #555; max-width: 580px; line-height: 1.8; }

#about { background: white; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-visual { position: relative; }
.about-card-main { background: var(--dark); border-radius: 20px; padding: 45px 40px; position: relative; overflow: hidden; }
.about-card-main::before { content: '⚒'; position: absolute; font-size: 12rem; color: rgba(212,168,67,0.06); bottom: -30px; left: -20px; line-height: 1; }
.about-card-main h3 { font-family: 'Amiri', serif; font-size: 1.6rem; color: var(--gold); margin-bottom: 15px; }
.about-card-main p { color: rgba(255,255,255,0.75); line-height: 1.9; font-size: 0.95rem; }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.tag { background: rgba(212,168,67,0.15); border: 1px solid rgba(212,168,67,0.3); color: var(--gold); padding: 5px 14px; border-radius: 50px; font-size: 0.82rem; font-weight: 600; }
.about-floating { position: absolute; bottom: -25px; left: -25px; background: var(--gold); color: var(--dark); padding: 18px 25px; border-radius: 16px; font-weight: 700; font-size: 0.9rem; box-shadow: 0 8px 25px rgba(212,168,67,0.4); }
.values-list { display: flex; flex-direction: column; gap: 22px; }
.value-item { display: flex; gap: 18px; align-items: flex-start; }
.value-icon { width: 48px; height: 48px; background: linear-gradient(135deg, var(--red), var(--dark-red)); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.value-text h4 { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin-bottom: 5px; }
.value-text p { font-size: 0.9rem; color: #666; line-height: 1.7; }

#services { background: var(--cream); }
.services-header { text-align: center; margin-bottom: 70px; }
.services-header .section-desc { margin: 0 auto; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 25px; }
.service-card { background: white; border-radius: 20px; padding: 40px 30px; position: relative; overflow: hidden; transition: all 0.35s; border: 2px solid transparent; }
.service-card:hover { border-color: var(--gold); transform: translateY(-8px); box-shadow: 0 25px 50px rgba(0,0,0,0.1); }
.service-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--red), var(--gold)); transform: scaleX(0); transition: transform 0.35s; }
.service-card:hover::after { transform: scaleX(1); }
.service-num { font-size: 3.5rem; font-weight: 900; color: rgba(192,24,31,0.08); line-height: 1; margin-bottom: 5px; }
.service-icon { font-size: 2rem; margin-bottom: 18px; }
.service-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.service-card p { font-size: 0.9rem; color: #666; line-height: 1.8; }

#join { background: var(--dark); position: relative; overflow: hidden; }
#join::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(192,24,31,0.2) 0%, transparent 70%); }
.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; position: relative; }
.join-info .section-title { color: white; }
.join-info .section-desc { color: rgba(255,255,255,0.65); }
.join-benefits { margin-top: 35px; display: flex; flex-direction: column; gap: 16px; }
.benefit { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.85); font-size: 0.95rem; }
.benefit::before { content: '✦'; color: var(--gold); font-size: 0.8rem; flex-shrink: 0; }
.form-box { background: white; border-radius: 24px; padding: 45px 40px; }
.form-box h3 { font-family: 'Amiri', serif; font-size: 1.6rem; color: var(--dark); margin-bottom: 30px; text-align: center; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px 16px; border: 2px solid #e8e0d0; border-radius: 10px; font-family: 'Cairo', sans-serif; font-size: 0.95rem; color: var(--text); background: var(--cream); transition: border-color 0.25s; outline: none; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--gold); }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.submit-btn { width: 100%; background: linear-gradient(135deg, var(--red), var(--dark-red)); color: white; border: none; padding: 15px; border-radius: 10px; font-family: 'Cairo', sans-serif; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.3s; margin-top: 8px; }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(192,24,31,0.4); }

#contact { background: white; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 25px; margin-top: 60px; }
.contact-card { background: var(--cream); border-radius: 18px; padding: 35px 28px; text-align: center; border: 2px solid transparent; transition: all 0.3s; }
.contact-card:hover { border-color: var(--gold); background: white; transform: translateY(-5px); }
.contact-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--red), var(--dark-red)); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin: 0 auto 20px; }
.contact-card h3 { font-weight: 700; color: var(--dark); margin-bottom: 12px; font-size: 1.05rem; }
.contact-card p { font-size: 0.9rem; color: #666; line-height: 1.8; }
.contact-card a { color: var(--red); text-decoration: none; }

.cities-banner { background: var(--red); padding: 20px 0; overflow: hidden; }
.cities-track { display: flex; gap: 50px; animation: slide 20s linear infinite; white-space: nowrap; }
.city-item { color: rgba(255,255,255,0.8); font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.city-item::after { content: '⭑'; color: var(--gold); }

.site-footer { background: var(--dark); color: rgba(255,255,255,0.6); padding: 50px 0 30px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; margin-bottom: 40px; flex-wrap: wrap; }
.footer-brand .logo-ar { font-size: 1.1rem; margin-bottom: 10px; display: block; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; max-width: 280px; }
.footer-links h4 { color: var(--gold); font-size: 0.9rem; font-weight: 700; margin-bottom: 18px; letter-spacing: 1px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; text-align: center; font-size: 0.82rem; }

.success-msg { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; padding: 14px 20px; border-radius: 10px; text-align: center; font-weight: 600; margin-top: 15px; }
.error-msg { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; padding: 14px 20px; border-radius: 10px; text-align: center; font-weight: 600; margin-top: 15px; }

@keyframes fadeDown { from { opacity: 0; transform: translateY(-25px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.menu-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,0.3); color: white; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 1.1rem; }

@media (max-width: 900px) {
  .about-grid, .join-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-floating { position: static; margin-top: 20px; display: inline-block; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 30px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 72px; right: 0; left: 0; background: var(--dark); padding: 20px 30px; gap: 4px; border-bottom: 3px solid var(--gold); }
  .nav-links.open { display: flex; }
  .site-header nav { flex-wrap: wrap; position: relative; }
  .menu-toggle { display: block; }
  section { padding: 60px 0; }
  .footer-top { flex-direction: column; }
}
