/**
 * TalentAfrik — Styles globaux
 * Design system : The Modern Griot + navbar prototype
 */

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

.talent-gradient {
    background: linear-gradient(135deg, #002357 0%, #1E3A6E 100%);
}

body {
    min-height: 100dvh;
    font-family: 'Inter', sans-serif;
    background-color: #fbf9f4;
    color: #1b1c19;
}

h1, h2, h3, .brand-font {
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
}

.editorial-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .editorial-grid {
        grid-template-columns: 1fr;
    }
}

.has-mobile-nav {
    padding-bottom: 5rem;
}

/* =========================================================
   NAVBAR (inspirée du prototype TalentAfrik)
   ========================================================= */
.ta-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 68px;
    background: rgba(30, 58, 110, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.ta-nav.is-scrolled {
    background: rgba(0, 35, 87, 0.96);
    box-shadow: 0 8px 32px rgba(0, 35, 87, 0.25);
}

.ta-nav-inner {
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ta-nav-logo {
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.ta-nav-logo span {
    color: #C9943A;
}

.ta-nav-links {
    display: none;
    align-items: center;
    gap: 4px;
}

@media (min-width: 900px) {
    .ta-nav-links {
        display: flex;
    }
}

.ta-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.72);
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
}

.ta-nav-link:hover,
.ta-nav-link.is-active,
.ta-dropdown.is-open > .ta-dropdown-trigger {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.ta-chevron {
    font-size: 18px !important;
    transition: transform 0.2s ease;
}

.ta-dropdown.is-open .ta-chevron {
    transform: rotate(180deg);
}

/* Dropdown panels */
.ta-dropdown {
    position: relative;
}

.ta-dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 280px;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 16px 48px rgba(27, 28, 25, 0.14);
    border: 1px solid rgba(196, 198, 209, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 60;
}

.ta-dropdown-panel-right {
    left: auto;
    right: 0;
    min-width: 260px;
}

.ta-dropdown.is-open .ta-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ta-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #1b1c19;
    transition: background 0.15s;
}

.ta-dropdown-item:hover {
    background: #f5f3ee;
}

.ta-dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 35, 87, 0.08);
    color: #002357;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px !important;
    flex-shrink: 0;
}

.ta-dropdown-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #002357;
}

.ta-dropdown-desc {
    display: block;
    font-size: 0.75rem;
    color: #747780;
    margin-top: 2px;
}

.ta-dropdown-divider {
    height: 1px;
    background: rgba(196, 198, 209, 0.35);
    margin: 6px 8px;
}

.ta-dropdown-danger .ta-dropdown-label,
.ta-dropdown-danger .ta-dropdown-icon {
    color: #ba1a1a;
}

.ta-dropdown-danger .ta-dropdown-icon {
    background: rgba(186, 26, 26, 0.08);
}

/* Actions */
.ta-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ta-nav-login {
    display: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 10px;
}

.ta-nav-login:hover {
    color: #fff;
}

@media (min-width: 640px) {
    .ta-nav-login {
        display: inline;
    }
}

.ta-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #C9943A;
    color: #fff;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.02em;
}

.ta-nav-cta:hover {
    background: #dfab4f;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(201, 148, 58, 0.35);
}

.ta-nav-cta-block {
    justify-content: center;
    width: 100%;
    padding: 14px;
}

.ta-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px 10px 4px 4px;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
}

.ta-account-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.ta-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #C9943A;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
}

.ta-account-name {
    display: none;
    font-size: 0.8125rem;
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .ta-account-name {
        display: inline;
    }
}

.ta-nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
}

@media (min-width: 900px) {
    .ta-nav-burger {
        display: none;
    }
}

/* Mobile drawer */
.ta-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 70;
}

.ta-mobile-menu.hidden {
    display: none;
}

.ta-mobile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 35, 87, 0.55);
    backdrop-filter: blur(4px);
}

.ta-mobile-panel {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: min(320px, 88vw);
    background: #1E3A6E;
    color: #fff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
}

.ta-mobile-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ta-mobile-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}

.ta-mobile-link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
}

.ta-mobile-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ta-mobile-group {
    border-radius: 10px;
    overflow: hidden;
}

.ta-mobile-group summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 600;
    color: #fff;
    border-radius: 10px;
}

.ta-mobile-group summary::-webkit-details-marker {
    display: none;
}

.ta-mobile-group summary::after {
    content: 'expand_more';
    font-family: 'Material Symbols Outlined';
    float: right;
    opacity: 0.7;
}

.ta-mobile-group[open] summary {
    background: rgba(255, 255, 255, 0.08);
    color: #C9943A;
}

.ta-mobile-group a {
    display: block;
    padding: 10px 14px 10px 28px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
}

.ta-mobile-group a:hover {
    color: #fff;
}

.ta-mobile-cta {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ta-mobile-logout {
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 8px;
}

/* Marquee : styles principaux dans includes/marquee-sectors.php (inline)
   pour garantir le défilement même si le cache CSS est obsolète. */
.sectors-marquee {
    overflow: hidden;
}

/* =========================================================
   RESPONSIVE GLOBAL
   ========================================================= */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

img, video, iframe, svg {
    max-width: 100%;
    height: auto;
}

.ta-container {
    width: 100%;
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 640px) {
    .ta-container { padding-inline: 1.5rem; }
}

@media (min-width: 1024px) {
    .ta-container { padding-inline: 2rem; }
}

/* Typo fluide */
.ta-hero-title {
    font-size: clamp(2rem, 6vw, 4.5rem);
    line-height: 1.1;
}

.ta-section-title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1.15;
}

/* Espacements pages */
main > section,
.page-section {
    padding-inline: max(1rem, env(safe-area-inset-left));
}

/* Grilles adaptatives */
.ta-grid-3 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .ta-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .ta-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.ta-grid-2 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .ta-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* Cartes interactives */
.ta-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease,
                border-color 0.25s ease;
    will-change: transform;
}

.ta-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 35, 87, 0.12);
}

.ta-card:active {
    transform: translateY(-2px);
}

/* Boutons tactiles */
.ta-btn,
a.ta-btn,
button.ta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
    touch-action: manipulation;
}

.ta-btn:hover { transform: translateY(-2px); }
.ta-btn:active { transform: scale(0.97); }

/* Formulaires mobiles */
input, select, textarea, button {
    font-size: 16px; /* évite le zoom iOS */
}

@media (min-width: 768px) {
    input, select, textarea {
        font-size: inherit;
    }
}

/* Tables → scroll horizontal sur mobile */
.ta-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ta-table-wrap table {
    min-width: 640px;
}

/* Footer responsive */
footer {
    padding-left: max(1.5rem, env(safe-area-inset-left)) !important;
    padding-right: max(1.5rem, env(safe-area-inset-right)) !important;
}

/* Nav mobile safe area */
.has-mobile-nav {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
}

nav[aria-label="Navigation mobile"] {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

/* Hero image mobile */
.ta-hero-media {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
}

.ta-hero-media img {
    width: 100%;
    height: clamp(200px, 45vw, 400px);
    object-fit: cover;
    display: block;
}

@media (max-width: 639px) {
    .talent-gradient {
        min-height: auto !important;
        padding-top: 2rem;
        padding-bottom: 2.5rem;
    }

    .ta-nav-inner {
        padding-inline: 12px;
    }

    .ta-brand {
        font-size: 1.15rem;
    }

    .ta-nav-cta {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    /* Masquer le libellé long du CTA sur très petit écran */
    .ta-cta-label-full { display: none; }
    .ta-cta-label-short { display: inline; }
}

@media (min-width: 640px) {
    .ta-cta-label-full { display: inline; }
    .ta-cta-label-short { display: none; }
}

/* =========================================================
   DYNAMIQUE — animations & révélations
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulseSoft {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.03); }
}

.animate-in {
    animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stat-value {
    display: inline-block;
    transition: transform 0.3s ease;
}

.stat-value.is-counting {
    animation: pulseSoft 0.6s ease;
}

/* Skeleton / loading léger */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.ta-skeleton {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 0.75rem;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .ta-card,
    .ta-btn,
    .animate-in {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}
