/* ============================================================
   LT Formation — Design System
   Police : Barlow Condensed (titres) + Inter (corps)
   Palette : Orange #ea580c · Slate-950 #0f172a · Slate-800 #1e293b
   ============================================================ */


/* ============================================================
   1. BASE & TYPOGRAPHIE
   ============================================================ */

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, h4, h5, h6,
.font-heading, .lt-heading {
    font-family: 'Barlow Condensed', -apple-system, sans-serif;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.1;
}

/* Override Tailwind font-bold sur les titres */
h1.font-bold, h2.font-bold, h3.font-bold, h4.font-bold,
h1.font-black, h2.font-black, h3.font-black {
    font-family: 'Barlow Condensed', sans-serif;
    letter-spacing: 0.01em;
}

/* Focus accessibilité */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #ea580c;
    outline-offset: 2px;
}

/* Transitions ciblées */
a, button, input, select, textarea,
[class*="hover"], [class*="transition"] {
    transition: all 0.2s ease-in-out;
}

/* Touch targets */
main a, main button { min-height: 44px; }
footer a { min-height: 44px; padding: 8px 6px; line-height: 1.5; }


/* ============================================================
   2. COMPOSANTS BOUTONS — .lt-btn
   Forme angulaire (rounded-none), uppercase, Barlow Condensed
   Différent de piaformation.fr qui utilise rounded-lg
   ============================================================ */

.lt-btn {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.875rem 2rem;
    border-radius: 0;               /* carré — pas de rounded-lg */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.lt-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.08);
    opacity: 0;
    transition: opacity 0.2s;
}
.lt-btn:hover::after { opacity: 1; }
.lt-btn:hover { transform: translateY(-2px); }
.lt-btn:active { transform: translateY(0); }

.lt-btn-primary {
    background: #ea580c;
    color: #ffffff;
    border: 2px solid #ea580c;
}
.lt-btn-primary:hover { background: #c2410c; border-color: #c2410c; }

.lt-btn-outline {
    background: transparent;
    color: #f97316;
    border: 2px solid #ea580c;
}
.lt-btn-outline:hover { background: #ea580c; color: #ffffff; }

.lt-btn-dark {
    background: #0f172a;
    color: #f97316;
    border: 2px solid #334155;
}
.lt-btn-dark:hover { border-color: #ea580c; color: #fb923c; }

/* Bouton "accent" secondaire blanc sur fond sombre */
.lt-btn-ghost {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.5);
}
.lt-btn-ghost:hover { border-color: #ffffff; background: rgba(255,255,255,0.08); }


/* ============================================================
   3. CARTES FORMATION — .lt-card
   Design : dark slate + orange top border
   Différent de piaformation.fr : pas de colored header band
   ============================================================ */

.lt-card {
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border-top: 3px solid #ea580c;
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-top-color 0.3s ease;
}

.lt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(234,88,12,0.06) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.lt-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(234,88,12,0.2);
    border-top-color: #f97316;
}
.lt-card:hover::before { opacity: 1; }

.lt-card-inner { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }

.lt-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.875rem;
}

.lt-card-cat {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #f97316;
    display: block;
    margin-bottom: 0.2rem;
}

.lt-card-icon {
    font-size: 2.25rem;
    line-height: 1;
    opacity: 0.9;
}

.lt-card-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.05;
    margin-bottom: 0.625rem;
}

.lt-card-desc {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 1rem;
}

.lt-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.75rem;
    color: #475569;
    margin-bottom: 1.125rem;
    font-family: 'Inter', sans-serif;
}

.lt-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lt-card-cta {
    background: #ea580c;
    color: #ffffff;
    text-align: center;
    padding: 0.75rem 1rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
    margin: 0 1.5rem 1.5rem;
}

.lt-card:hover .lt-card-cta { background: #c2410c; }


/* ============================================================
   4. EN-TÊTES DE CATÉGORIES — .lt-section-header
   Design : dark + numéro fané + titre Barlow Condensed
   Différent de piaformation.fr : pas de bg-green-100/bg-orange-100
   ============================================================ */

.lt-section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.75rem;
    background: #0f172a;
    border-left: 5px solid #ea580c;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.lt-section-header::before {
    content: attr(data-num);
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 5rem;
    color: rgba(234,88,12,0.08);
    line-height: 1;
    pointer-events: none;
}

.lt-section-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 2.75rem;
    color: rgba(234,88,12,0.35);
    line-height: 1;
    min-width: 3rem;
}

.lt-section-tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #f97316;
    margin-bottom: 0.2rem;
}

.lt-section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.875rem;
    color: #ffffff;
    line-height: 1.05;
}

.lt-section-link {
    margin-left: auto;
    color: #f97316;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border: 1px solid #ea580c;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.lt-section-link:hover { background: #ea580c; color: #ffffff; }

.lt-section-header:hover { border-left-color: #f97316; }


/* ============================================================
   5. ZONE D'INTERVENTION — .lt-zone-card
   Uniforme dark (différent de piaformation.fr : cartes colorées)
   ============================================================ */

.lt-zone-card {
    background: #0f172a;
    border-left: 3px solid #ea580c;
    padding: 1.25rem 1.5rem;
    border-radius: 2px;
    transition: border-left-color 0.2s, box-shadow 0.2s;
}

.lt-zone-card:hover {
    border-left-color: #f97316;
    box-shadow: 0 4px 20px rgba(234,88,12,0.12);
}

.lt-zone-dept {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.125rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.lt-zone-dot::before {
    content: '▸';
    color: #f97316;
    margin-right: 0.375rem;
    font-size: 0.7rem;
}


/* ============================================================
   6. HERO PATTERN — différent de piaformation.fr (dots)
   LT Formation utilise des lignes diagonales (hachures BTP)
   ============================================================ */

.lt-hero-pattern {
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(255,255,255,0.025) 0px,
        rgba(255,255,255,0.025) 1px,
        transparent 1px,
        transparent 18px
    );
}


/* ============================================================
   7. GRADIENT ANIMÉ ORANGE (stats section)
   ============================================================ */

.gradient-animated {
    background: linear-gradient(135deg, #c2410c 0%, #7c2d12 50%, #1e293b 100%);
    background-size: 300% 300%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* ============================================================
   8. BARRE DE PROGRESSION (page scroll)
   ============================================================ */

.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #ea580c;
    z-index: 9999;
    transition: width 0.2s ease;
    box-shadow: 0 0 8px rgba(234,88,12,0.6);
}


/* ============================================================
   9. ANIMATIONS SCROLL
   ============================================================ */

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: transform, opacity;
}
.animate-on-scroll.animated {
    opacity: 1;
    will-change: auto;
}

.slide-up    { transform: translateY(40px); }
.slide-left  { transform: translateX(-50px); }
.slide-right { transform: translateX(50px); }
.scale-in    { transform: scale(0.93); }

.slide-up.animated,
.slide-left.animated,
.slide-right.animated,
.scale-in.animated { transform: none; }


/* ============================================================
   10. COMPTEURS & EFFETS DIVERS
   ============================================================ */

/* Bouton retour en haut */
#backToTop {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#backToTop.visible,
#backToTop.opacity-100 {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Logo */
.logo-container { display: flex; align-items: center; gap: 12px; }

/* Hauteur minimale hero */
section:first-of-type { min-height: 500px; }
.hero-section, section.lt-hero-pattern { min-height: 580px; }

/* Stagger animation */
.stagger-animation > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}
.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

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

/* Accessibilité — réduit les animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Formulaires */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

/* Responsive */
@media (max-width: 640px) {
    .lt-section-header { padding: 1rem 1.25rem; gap: 1rem; }
    .lt-section-num { font-size: 2rem; min-width: 2rem; }
    .lt-section-title { font-size: 1.5rem; }
    .lt-btn { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
}
