/**
 * LD Solutions - Styles personnalises globaux
 *
 * Styles globaux du theme enfant (hors hero/header qui sont dans hero.css)
 * Variables CSS (tokens) dans assets/css/tokens.css
 * Boutons (.lds-btn--*) dans assets/css/components/buttons.css
 *
 * Palette LD Solutions:
 * - Deep Navy (dominante): var(--lds-navy, #021B50)
 * - Ink Black (textes): var(--lds-black, #151E28)
 * - Platinium (fonds): var(--lds-platinium, #EBEBEB)
 * - Full Spectrum Blue (CTAs): var(--lds-blue, #125AF8)
 * - Brick Ember (accent): var(--lds-cta, #B82A14)
 *
 * @package ldsolutions
 * @version 2.0.0
 */

/* ============================================================
   RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ============================================================
   A11Y - FOCUS VISIBLE (clavier uniquement, transparent souris)
   ============================================================ */

:focus-visible {
    outline: 2px solid var(--lds-blue, #125AF8);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Boutons : focus integre dans le design existant */
.lds-btn:focus-visible,
.wp-block-button__link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* ============================================================
   A11Y - REDUCED MOTION (vestibular sensitivity)
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Exception : les marquees décoratifs (défilement lent et linéaire,
       sans risque vestibulaire) restent animés */
    .lds-hero__marquee-track,
    .lds-references__track,
    .se-marquee__track {
        animation-duration: 25s !important;
        animation-iteration-count: infinite !important;
    }

    .lds-references__track {
        animation-duration: 35s !important;
    }

    .se-marquee__track {
        animation-duration: 30s !important;
    }
}

/* ============================================================
   TYPOGRAPHIE - CHILLAX (titres) + ARIAL (textes)
   ============================================================ */

body,
html {
    font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--lds-black, #151E28);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Chillax', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--lds-navy, #021B50);
}

/* Mots en italique soulignés - garder visible */
h1 span, h2 span, h3 span, h4 span, h5 span, h6 span {
    color: var(--lds-navy, #021B50);
}

/* Titres sur fond sombre - dégradé blanc éclatant */
.section-dark h1, .section-dark h2, .section-dark h3,
.section-dark h4, .section-dark h5, .section-dark h6,
.lds-services__card--dark h3,
.lds-services__card--dark .lds-services__card-title {
    color: var(--lds-white, #ffffff);
}

/* Titres des cards claires - dégradé bleu */
.lds-services__card--light h3,
.lds-services__card--light .lds-services__card-title {
    color: var(--lds-navy, #021B50);
}

/* CTA Bandeau - titre blanc (fond navy) */
.lds-cta-bandeau h2,
.lds-cta-bandeau .lds-cta-bandeau__card h2.lds-cta-bandeau__title,
.lds-cta-bandeau__card .lds-cta-bandeau__title,
h2.lds-cta-bandeau__title,
.lds-cta-bandeau__title {
    color: var(--lds-white, #ffffff);
}

/* Mots en italique soulignés sur fond sombre - BLANC */
.section-dark h1 span, .section-dark h2 span, .section-dark h3 span,
.lds-pourqui h2 span, .lds-cta-bandeau h2 span,
.se-valeurs h2 span, .se-valeurs h3 span,
.se-valeurs .se-valeurs__title span,
.se-valeurs .se-valeur__title,
.na-cta-final h2 span,
.page-hero h1 span, .page-hero h2 span,
.page-hero__title span,
.lds-hero h1 span, .lds-hero h2 span,
.ap-valeurs .ap-valeur__title,
.ap-cta-final h2 span,
.ap-cta-final .ap-cta-final__title span,
.pq-cta-final h2 span,
.pq-cta-final .pq-cta-final__title span,
.pq-cible--collectivites h2 span, .pq-cible--collectivites h3 span {
    color: var(--lds-white, #ffffff);
}

/* Boutons WordPress (.wp-block-button__link) dans assets/css/components/buttons.css */

/* ============================================================
   LIENS
   ============================================================ */

a {
    color: var(--lds-blue, #125AF8);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--lds-blue-hover, #0d4ad4);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background-color: var(--lds-navy, #021B50);
    color: var(--lds-white, #ffffff);
    padding: 4rem 0 2rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
}

.site-footer a:hover {
    color: var(--lds-blue, #125AF8);
}

/* ============================================================
   TITRES - Soulignement retiré (PME/COLLECTIVITÉS via étiquettes)
   ============================================================ */

/* ============================================================
   TEXTURE DE FOND - SECTIONS (désactivées)
   ============================================================ */

.lds-texture-overlay {
    display: none;
}

/* ============================================================
   LOGO DECORATIF DE FOND
   ============================================================ */

/* Base pour toutes les sections avec logo décoratif */
.lds-presentation,
.lds-references,
.lds-approche,
.lds-avis,
.lds-cta-bandeau {
    position: relative;
    overflow: hidden;
}

/* Contact - PAS de overflow hidden pour permettre le chevauchement du footer */
.lds-contact {
    position: relative;
    overflow: visible;
}

/* Services - pas de overflow hidden pour le scroll sticky */
.lds-services {
    position: relative;
}

/* Element logo de fond */
.lds-bg-logo {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

/* Sections claires - logo sombre */
.lds-presentation .lds-bg-logo,
.lds-services .lds-bg-logo,
.lds-references .lds-bg-logo {
    width: 1200px;
    height: 1200px;
    background-image: url('../img/logo (2).svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.15;
}

/* Masquer le logo sur certaines sections */
.lds-approche .lds-bg-logo,
.lds-avis .lds-bg-logo,
.lds-contact .lds-bg-logo,
.lds-services .lds-bg-logo {
    display: none;
}

/* Sections sombres - logo clair */
.lds-cta-bandeau .lds-bg-logo {
    width: 1200px;
    height: 1200px;
    background-image: url('../img/logo (1).svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.15;
}

/* Positions variées pour chaque section - tous 1200x1200 */
.lds-presentation .lds-bg-logo {
    top: -300px;
    right: -300px;
}

.lds-services .lds-bg-logo {
    position: absolute;
    bottom: -400px;
    left: -600px;
    top: auto;
    transform: none;
}

.lds-references .lds-bg-logo {
    top: 50%;
    left: -400px;
    right: auto;
    transform: translateY(-50%);
    width: 1800px;
    height: 1800px;
}

.lds-cta-bandeau .lds-bg-logo {
    top: 50%;
    right: -400px;
    left: auto;
    transform: translateY(-50%);
    width: 1800px;
    height: 1800px;
    background-image: url('../img/logo (1).svg');
    opacity: 0.15;
}

/* S'assurer que tout le contenu est AU-DESSUS du logo de fond */
.lds-presentation > *:not(.lds-bg-logo),
.lds-services > *:not(.lds-bg-logo),
.lds-references > *:not(.lds-bg-logo),
.lds-approche > *:not(.lds-bg-logo),
.lds-avis > *:not(.lds-bg-logo),
.lds-cta-bandeau > *:not(.lds-bg-logo),
.lds-contact > *:not(.lds-bg-logo),
.lds-footer > *:not(.lds-bg-logo) {
    position: relative;
    z-index: 2;
}

/* ============================================================
   SECTIONS
   ============================================================ */

.section {
    padding: 5rem 0;
}

.section-light {
    background-color: var(--lds-platinium, #EBEBEB);
}

.section-dark {
    background-color: var(--lds-navy, #021B50);
    color: var(--lds-white, #ffffff);
}

/* ============================================================
   TITRES SECTIONS EN MAJUSCULES
   ============================================================ */

.lds-services__title,
.lds-presentation__title,
.lds-pourqui__titre,
.lds-pourqui__etiquette-text,
.lds-references__title,
.lds-approche__title,
.lds-avis__title,
.lds-contact__title,
.lds-cta-bandeau__title,
.lds-services__cta-title {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ============================================================
   MARGES UNIFORMES - SYSTEME STANDARDISE
   ============================================================
   Desktop: 2rem (32px)
   Tablette: 1.5rem (24px)
   Mobile: 1rem (16px)
   ============================================================ */

/* Toutes les sections principales */
.lds-presentation,
.lds-services,
.lds-references,
.lds-approche,
.lds-avis,
.lds-cta-bandeau,
.lds-pourqui,
.lds-contact,
.lds-chiffres {
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (max-width: 1024px) {
    .lds-presentation,
    .lds-services,
    .lds-references,
    .lds-approche,
    .lds-avis,
    .lds-cta-bandeau,
    .lds-pourqui,
    .lds-contact,
    .lds-chiffres {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 768px) {
    .lds-presentation,
    .lds-services,
    .lds-references,
    .lds-approche,
    .lds-avis,
    .lds-cta-bandeau,
    .lds-pourqui,
    .lds-contact,
    .lds-chiffres {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6 {
    color: var(--lds-white, #ffffff);
}

/* Container - Utilise le systeme de marges standardise */
.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

/* ============================================================
   CARTES
   ============================================================ */

.card {
    background-color: var(--lds-white, #ffffff);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--lds-blue, #125AF8);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   FORMULAIRES
   ============================================================ */

input,
textarea,
select {
    font-family: Arial, sans-serif;
    font-size: 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--lds-blue, #125AF8);
    box-shadow: 0 0 0 3px rgba(18, 90, 248, 0.1);
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--lds-black, #151E28);
}

/* ============================================================
   ALERTES ET MESSAGES
   ============================================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.alert-error,
.message-error {
    background-color: rgba(184, 42, 20, 0.08);
    border-color: var(--lds-cta, #B82A14);
    color: var(--lds-cta, #B82A14);
}

.alert-success,
.message-success {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: #10B981;
    color: #047857;
}

.alert-info,
.message-info {
    background-color: rgba(18, 90, 248, 0.08);
    border-color: var(--lds-blue, #125AF8);
    color: var(--lds-blue-hover, #0d4ad4);
}

.alert-warning,
.message-warning {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: #F59E0B;
    color: #B45309;
}

/* ============================================================
   UTILITAIRES
   ============================================================ */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   MASQUER LE HEADER PARENT
   Le nouveau header est dans hero.css
   ============================================================ */

/* Masquer l'ancien wrapper header du theme parent si present */
.header-wrapper:not(.lds-header-wrapper) {
    display: none !important;
}

/* ============================================================
   WORDPRESS OVERRIDES
   ============================================================ */

/* Admin bar spacing */
body.admin-bar .lds-header-wrapper {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .lds-header-wrapper {
        top: 46px;
    }
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--lds-blue, #125AF8);
    color: var(--lds-white, #ffffff);
    padding: 0.5rem 1rem;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/*
 * Neutralise le padding-top ajoute par le theme parent ldstarter sur
 * #main-content pour compenser son header fixe (assets/css/header.css:349).
 * Toutes nos pages internes gerent deja ce decalage elles-memes via le
 * padding-top de leur propre section .page-hero : le padding du parent
 * s'ajoutait donc en double et decalait visuellement le hero vers le bas.
 * Meme specificite (1,1,1) que la regle parent, mais chargee apres elle
 * dans la cascade (custom.css est le dernier fichier enqueue) => l'emporte.
 */
body:not(.home) #main-content {
    padding-top: 0;
}
