/*
Theme Name:   ITAG Child Theme
Theme URI:    https://itag-cm.com
Description:  Thème enfant officiel ITAG v9.5 — Barre supérieure, annonces défilantes, améliorations CLER et BF BEAUTY.
Author:       International Training Academy Group
Author URI:   https://itag-cm.com
Template:     theme_build
Version:      9.5.0
License:      GNU General Public License v2 or later
Text Domain:  itag-child
*/

/*
 * ╔══════════════════════════════════════════════════════════╗
 * ║  IMPORTANT — À LIRE AVANT ACTIVATION                   ║
 * ╠══════════════════════════════════════════════════════════╣
 * ║  La ligne "Template:" ci-dessus doit correspondre       ║
 * ║  EXACTEMENT au nom du dossier du thème parent sur       ║
 * ║  votre serveur dans wp-content/themes/                  ║
 * ║                                                         ║
 * ║  Ce fichier est configuré pour : theme_build            ║
 * ║  Si votre dossier parent s'appelle "itag-theme",        ║
 * ║  changez la ligne Template: en itag-theme               ║
 * ╚══════════════════════════════════════════════════════════╝
 */

/* ── Variables CSS (fallback si parent absent) ── */
:root {
  --wa-green:         #25D366;
  --itag-red:         #C0392B;
  --itag-red-dark:    #8B0000;
  --itag-border-warm: #E8DFC0;
  --itag-gray:        #6B7280;
  --itag-cler:        #F1C40F;
  --itag-bf-bright:   #D4A017;
}

/* ============================================================
   1. BARRE SUPÉRIEURE FIXE
   ============================================================ */
.itag-top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 38px;
  z-index: 99999;
  background: #0A0A0F;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.itag-top-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: rgba(255,255,255,.4);
  white-space: nowrap;
}
.itag-top-bar-sep {
  width: 1px; height: 12px;
  background: rgba(255,255,255,.12);
  flex-shrink: 0;
}
.itag-top-bar-right { display: flex; gap: 8px; }
.itag-top-bar-btn {
  padding: 4px 13px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s;
  letter-spacing: .3px;
}
.itag-top-bar-btn.emploi-btn {
  background: rgba(192,57,43,.15);
  border: 1px solid rgba(192,57,43,.3);
  color: #E74C3C;
}
.itag-top-bar-btn.etudiant-btn {
  background: rgba(212,172,13,.12);
  border: 1px solid rgba(212,172,13,.25);
  color: #D4AC0D;
}
.itag-top-bar-btn:hover { opacity: .8; }

/* ============================================================
   2. BARRE ANNONCES FIXE
   ============================================================ */
.itag-announce-bar {
  position: fixed;
  top: 38px; left: 0; right: 0;
  height: 36px;
  z-index: 99998;
  background: linear-gradient(90deg,#9a6f00,#D4AC0D,#F1C40F,#D4AC0D,#9a6f00);
  background-size: 300% auto;
  animation: itag-shimmer 4s linear infinite;
  display: flex;
  align-items: center;
  overflow: hidden;
}
@keyframes itag-shimmer {
  0%   { background-position: 0% }
  100% { background-position: 300% }
}
.itag-announce-track {
  display: flex;
  white-space: nowrap;
  animation: itag-scroll 28s linear infinite;
}
@keyframes itag-scroll {
  0%   { transform: translateX(0) }
  100% { transform: translateX(-50%) }
}
.itag-announce-item {
  padding: 0 48px;
  font-size: 11px;
  font-weight: 700;
  color: #3D2B00;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ann-star { font-size: 12px; }
.itag-announce-btn {
  background: #3D2B00;
  color: #F1C40F;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}
.itag-announce-close {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer;
  font-size: 18px;
  color: #3D2B00;
  font-weight: 700;
  line-height: 1;
  z-index: 2;
}

/* ============================================================
   3. NAV PARENT — Décalée sous les 2 barres (géré par JS)
   ============================================================ */
.itag-nav {
  top: 74px !important;   /* 38px topbar + 36px annonces */
  z-index: 99997 !important;
}
body {
  padding-top: 0 !important;  /* 38 + 36 + 70 nav */
}

/* ============================================================
   4. CLER — Police Georgia + correction padding
   ============================================================ */
.cler-root {
  padding-top: 0 !important;
}
.cler-root .sec-h2,
.cler-root .ph-content h1,
.cler-root .acrd-title,
.cler-root h1, .cler-root h2, .cler-root h3 {
  font-family: Georgia, serif !important;
}

/* ============================================================
   5. BF BEAUTY — Police Georgia + correction padding
   ============================================================ */
.bf-root {
  padding-top: 0 !important;
}
.bf-root .sec-h2,
.bf-root .ph-content h1,
.bf-root .acrd-title,
.bf-root h1, .bf-root h2, .bf-root h3 {
  font-family: Georgia, serif !important;
}

/* ============================================================
   6. DROPDOWN "Nos Départements"
   ============================================================ */
.itag-dept-dropdown-wrap { position: relative; display: inline-block; }
.itag-dept-dd {
  display: none;
  position: absolute;
  top: calc(100% + 8px); left: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 8px;
  min-width: 220px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.itag-dept-dropdown-wrap.open .itag-dept-dd { display: block; }
.itag-dept-dd a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 7px;
  color: #fff; text-decoration: none; transition: .15s;
}
.itag-dept-dd a:hover { background: rgba(255,255,255,.06); }
.itag-dept-dd-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.itag-dept-dd-icon.cy { background: rgba(241,196,15,.12); }
.itag-dept-dd-icon.bf { background: rgba(212,160,23,.12); }
.itag-dept-dd-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.itag-dept-dd-name.cy { color: #F1C40F; }
.itag-dept-dd-name.bf { color: #D4A017; }
.itag-dept-dd-sub  { font-size: 10px; color: rgba(255,255,255,.35); }
.itag-dept-dd-sep  { height: 1px; background: rgba(255,255,255,.06); margin: 4px 0; }

/* ============================================================
   7. ACCRÉDITATIONS & WHATSAPP
   ============================================================ */
.itag-accreds-bar {
  justify-content: center !important;
  flex-wrap: wrap !important;
}
.itag-wa-float,
#itag-wa-float,
[class*="whatsapp-float"],
[id*="whatsapp-float"] {
  bottom: 80px !important;
}

/* ============================================================
   8. RESPONSIVE MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .itag-top-bar { padding: 0 16px; }
  .itag-top-bar-left { display: none; }
  .itag-top-bar-right { margin: 0 auto; }
  .itag-announce-item { padding: 0 24px; }
}

/* Fix gap page espace-etudiant et pages custom */
.page-template-page-espace-etudiant .site-header-hero,
.page-template-page-espace-etudiant .hero-section,
.page-template-page-espace-etudiant .page-hero,
.page-template-page-espace-etudiant #hero,
.page-template-page-espace-etudiant .banner { 
    display: none !important; 
}
.page-template-page-espace-etudiant .site-content,
.page-template-page-espace-etudiant #content,
.page-template-page-espace-etudiant main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Fix padding-top dupliqué — pages avec get_header() + hero propre */
.page-template-page-espace-etudiant main#main-content,
.page-template-page-emplois main#main-content,
.page-template-page-tests-cler main#main-content {
    padding-top: 0 !important;
}
/* Le hero de ces pages gère son propre espacement depuis le nav fixe */
.page-template-page-espace-etudiant .m03-hero,
.page-template-page-emplois .emplois-hero {
    margin-top: 0;
    padding-top: 70px;
}

/* Fix gap main-content */
#main-content { padding-top: 0 !important; margin-top: 0 !important; }
.m03-hero { padding-top: 90px !important; }
.emplois-hero { padding-top: 90px !important; }

/* Fix global gap nav fixe */
body { padding-top: 0 !important; }
.itag-top-bar ~ * { margin-top: 0; }
/* Compensation pour les pages WordPress standard (pas SPA) */
.single, .page:not(.page-template-front-page) body { padding-top: 70px !important; }

/* Fix superposition boutons flottants */
#itag-ai-fab { bottom: 90px !important; right: 20px !important; z-index: 99998 !important; cursor: pointer !important; pointer-events: auto !important; }
.gtranslate_wrapper { bottom: 20px !important; right: 80px !important; z-index: 9985 !important; }
#wpml-widget, .wpml-ls { bottom: 20px !important; right: 80px !important; }

/* Fix icônes footer blanches */
.itag-social-btn { color: inherit !important; }
.itag-footer-social .itag-social-btn { 
    background: rgba(255,255,255,.1) !important;
    color: #fff !important;
}

/* Fix gap blanc définitif — toutes les pages avec template custom */
body.page-template-page-bf-beauty,
body.page-template-page-cler,
body.page-template-page-emplois,
body.page-template-page-espace-etudiant,
body.page-template-page-tests-niveau {
    padding-top: 0 !important;
    margin-top: 0 !important;
}



/* Reset main WordPress sur toutes les pages custom */
body.page-template-page-cler main#main,
body.page-template-page-bf-beauty main#main,
body.page-template-page-emplois main#main,
body.page-template-page-rentrees main#main {
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

/* Masquer spacer sur pages avec nav propre */
body.page-template-page-cler .itag-hdr-spacer,
body.page-template-page-bf-beauty .itag-hdr-spacer {
    display: none !important;
}

/* Boutons flottants — Aïcha à GAUCHE, WhatsApp + Traduction à DROITE */
.ia-fab,
.ia-chat-window {
    right: auto !important;
    left: 24px !important;
}
#itag-wa-float {
    bottom: 80px !important;
    right: 24px !important;
    left: auto !important;
}
body.itr-fixed-br #itag-tr-nav {
    bottom: 24px !important;
    right: 24px !important;
    left: auto !important;
}

/* Aïcha à GAUCHE */
#itag-ai-fab {
    right: auto !important;
    left: 24px !important;
    bottom: 24px !important;
}
#itag-ai-chat {
    right: auto !important;
    left: 24px !important;
    bottom: 100px !important;
}
/* WhatsApp à DROITE */
#itag-wa-float {
    right: 24px !important;
    left: auto !important;
    bottom: 80px !important;
}
/* Traduction à DROITE */
body.itr-fixed-br #itag-tr-nav,
#itag-tr-nav {
    right: 24px !important;
    left: auto !important;
    bottom: 24px !important;
    position: fixed !important;
}

/* Fenêtre chat Aïcha à GAUCHE */
#itag-ai-window {
    right: auto !important;
    left: 24px !important;
    z-index: 99999 !important;
}

/* Aïcha au-dessus du bouton cookies */
#itag-ai-fab {
    bottom: 80px !important;
}
#itag-ai-window {
    bottom: 160px !important;
}

/* Aligner Aïcha avec le bouton cookie — left:15px */
#itag-ai-fab {
    left: 15px !important;
}
#itag-ai-window {
    left: 15px !important;
}

/* Mobile — réorganisation boutons flottants */
@media (max-width: 600px) {
    /* Aïcha plus petit et plus bas */
    #itag-ai-fab {
        bottom: 70px !important;
        left: 12px !important;
        width: 48px !important;
        height: 48px !important;
    }
    #itag-ai-window {
        left: 12px !important;
        bottom: 130px !important;
        width: calc(100vw - 24px) !important;
        max-width: 340px !important;
    }
    /* WhatsApp plus petit */
    #itag-wa-float {
        right: 12px !important;
        bottom: 70px !important;
    }
    /* Traduction */
    #itag-tr-nav {
        right: 12px !important;
        bottom: 16px !important;
    }
    /* Cookie */
    button.cookieadmin_re_consent {
        bottom: 12px !important;
        left: 12px !important;
    }
}

/* Très petits écrans (320px) */
@media (max-width: 360px) {
    #itag-ai-window {
        width: calc(100vw - 16px) !important;
        left: 8px !important;
    }
    #itag-ai-fab {
        left: 8px !important;
    }
    #itag-wa-float {
        right: 8px !important;
    }
    #itag-tr-nav {
        right: 8px !important;
    }
}

/* WhatsApp tooltip "Réponse en moins de 2h" */
.itag-wa-tooltip {
    background: rgba(0,0,0,.85);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    animation: itag-wa-pulse 3s ease-in-out infinite;
}
.itag-wa-dot {
    width: 8px;
    height: 8px;
    background: #25D366;
    border-radius: 50%;
    animation: itag-dot-blink 1.5s ease-in-out infinite;
}
@keyframes itag-wa-pulse {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: .8; transform: translateY(-2px); }
}
@keyframes itag-dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

/* Barre certifications */
.itag-accreds-bar {
  background: #FEFDF5;
  border-top: 1px solid #E8DFC0;
  border-bottom: 1px solid #E8DFC0;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.itag-accreds-bar::-webkit-scrollbar { display: none; }
.itag-accreds-label {
  font-size: 9px;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.itag-accred-chip {
  border: 1px solid #D4AC0D;
  border-radius: 3px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #6a4a00;
  background: #FFFBEE;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Calendrier académique */
.itag-cal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
@media (max-width: 768px) { .itag-cal-grid { grid-template-columns: 1fr; } }
@media (max-width: 1024px) and (min-width: 769px) { .itag-cal-grid { grid-template-columns: 1fr 1fr; } }
.itag-cal-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .25s;
}
.itag-cal-card:hover { border-color: rgba(212,172,13,.4); }
.itag-cal-head { padding: 16px 18px; }
.itag-cal-head.cler { background: rgba(241,196,15,.08); border-bottom: 2px solid rgba(241,196,15,.18); }
.itag-cal-head.bf   { background: rgba(212,160,23,.08); border-bottom: 2px solid rgba(212,160,23,.18); }
.itag-cal-dept { font-size: 9px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.itag-cal-dept.cler { color: #F1C40F; }
.itag-cal-dept.bf   { color: #D4A017; }
.itag-cal-date { font-family: 'Playfair Display',serif; font-size: 22px; font-weight: 900; color: #fff; line-height: 1.1; }
.itag-cal-body { padding: 14px 18px; }
.itag-cal-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.itag-cal-meta  { font-size: 11px; color: rgba(255,255,255,.4); margin-bottom: 12px; }
.itag-cal-cta {
  display: block; text-align: center; padding: 9px;
  border-radius: 7px; font-size: 11px; font-weight: 700;
  background: #C0392B; color: #fff;
  text-decoration: none; transition: background .2s;
}
.itag-cal-cta:hover { background: #8B0000; color: #fff; }

/* Surbrillance menu actif */
.itag-nav-links-hdr a.current,
.itag-nav-links-hdr a:focus,
#itagNavHdr a.current {
    color: #fff !important;
    background: rgba(192,57,43,.25) !important;
    border-radius: 7px;
}

/* Footer seal */
.itag-footer-seal {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(241,196,15,.06);
    border: 1px solid rgba(241,196,15,.15);
    border-radius: 10px;
    max-width: 280px;
}
.itag-footer-seal-icon {
    font-size: 22px;
    color: #F1C40F;
    flex-shrink: 0;
}
.itag-footer-seal-text {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.8);
}
.itag-footer-seal-sub {
    font-size: 11px;
    color: rgba(255,255,255,.4);
    margin-top: 2px;
}

/* Section CTA — Inscriptions ouvertes */
.itag-cta-section {
  background: linear-gradient(135deg, #050000, #2a0000, #050000);
  padding: 90px 32px;
  text-align: center;
}
.itag-cta-eyebrow { color: #F1C40F !important; }
.itag-cta-title {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 900;
  margin-bottom: 14px;
  line-height: 1.1;
}
.itag-cta-title em { color: #F1C40F; font-style: italic; }
.itag-cta-desc { color: rgba(255,255,255,.58); font-size: 14px; line-height: 1.85; max-width: 520px; margin: 0 auto 28px; }
.itag-cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.itag-cta-btn-wa {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  background: #25D366; color: #fff;
  border-radius: 8px; font-size: 14px; font-weight: 700;
  text-decoration: none; transition: .2s;
}
.itag-cta-btn-wa:hover { background: #1db954; color: #fff; }
.itag-cta-contacts { font-size: 11px; color: rgba(255,255,255,.3); letter-spacing: .3px; }


/* Dropdown Nos Départements — front-page nav */
.dept-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 8px;
  min-width: 260px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.nav-dept-btn.open .dept-dropdown { display: block; }
.dept-dd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  text-decoration: none; transition: .15s; color: #fff;
}
.dept-dd-item:hover { background: rgba(255,255,255,.06); }
.dept-dd-icon {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.dept-dd-icon.cler { background: rgba(241,196,15,.12); }
.dept-dd-icon.bf   { background: rgba(212,160,23,.12); }
.dept-dd-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.dept-dd-name.cler { color: #F1C40F; }
.dept-dd-name.bf   { color: #D4A017; }
.dept-dd-sub  { font-size: 11px; color: rgba(255,255,255,.4); }
.dept-dd-sep  { height: 1px; background: rgba(255,255,255,.06); margin: 4px 0; }
.dept-arrow   { font-size: 11px; transition: transform .2s; }
.nav-dept-btn.open .dept-arrow { transform: rotate(180deg); }

/* Fix position bouton traduction page accueil */
#mainNav #itag-tr-nav {
    position: static !important;
    bottom: auto !important;
    right: auto !important;
    transform: none !important;
}

/* Emplois — compteurs filtres */
.ef-count {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.1); color: inherit;
    min-width: 20px; height: 20px; border-radius: 10px;
    font-size: 11px; font-weight: 800; padding: 0 5px;
    margin-left: 4px;
}
.ef-btn.active .ef-count { background: rgba(255,255,255,.25); }

/* Emplois — pied de carte boutons */
.ocard-foot { gap: 10px; }
.ocard-foot .owa { font-size: 13px; }
.ocard-postuler {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px; background: #1E40AF; color: #fff;
    border-radius: 8px; font-size: 13px; font-weight: 700;
    cursor: pointer; border: none; font-family: inherit;
    transition: .2s; text-decoration: none;
}
.ocard-postuler:hover { background: #1d4ed8; }

/* Emplois — table admin style */
.emp-admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.emp-admin-table th {
    padding: 10px 14px; text-align: left;
    color: rgba(255,255,255,.45); font-size: 11px;
    text-transform: uppercase; letter-spacing: .6px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    white-space: nowrap;
}
.emp-admin-table td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.06); vertical-align: middle; }
.emp-admin-table tr:last-child td { border-bottom: none; }
.emp-candidat-name { color: #fff; font-weight: 700; font-size: 13px; }
.emp-candidat-info { color: rgba(255,255,255,.4); font-size: 11px; margin-top: 2px; }

/* Table candidatures — forcer couleurs sur fond clair */
#cand-row-0 td, #cand-row-1 td, #cand-row-2 td,
#cand-row-3 td, #cand-row-4 td, #cand-row-5 td,
tr[id^="cand-row-"] td {
    color: #fff !important;
}
tr[id^="cand-row-"] {
    background: rgba(255,255,255,.03);
}

/* Emplois — options des filtres candidatures */
#cand-filter-poste option,
#cand-filter-statut option {
    background: #1a0a0a !important;
    color: #fff !important;
}
#cand-filter-poste,
#cand-filter-statut {
    color: #fff !important;
    background-color: rgba(255,255,255,.08) !important;
}
#cand-filter-search::placeholder { color: rgba(255,255,255,.4) !important; }
