/**
 * Styles spécifiques CHERY
 * Charte : blanc / noir + accent #A3886B (actif) et #B7AEA5 (inactif),
 * relevés sur cheryinternational.com. #3E342A reste le brun profond des aplats.
 *
 * @package GrimTheme
 * @subpackage Brands\Chery
 */

/* ==========================================================================
   TOKENS DE MARQUE (scopés au body .brand-chery)
   ========================================================================== */
.brand-chery {
    --chery-accent: #A3886B;
    --chery-accent-hover: #8E7359;
    --chery-accent-muted: #B7AEA5;
    --chery-accent-deep: #3E342A;
    --chery-accent-soft: #6B5E4F;
    --chery-ink: #111111;
    --chery-graphite: #313131;
    --chery-steel: #51565D;
    --chery-silver: #A6A6A6;
    --chery-cloud: #F3F4F4;
    --chery-gradient: linear-gradient(45deg, #3E342A 0%, #111111 100%);
    --chery-gradient-accent: linear-gradient(45deg, #A3886B 0%, #3E342A 100%);
}

/* ==========================================================================
   UTILITAIRES DE MARQUE
   ========================================================================== */
.brand-chery .brand-gradient { background: var(--chery-gradient); }
.brand-chery .brand-gradient-text {
    background: var(--chery-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-chery .brand-accent-bar { background: var(--chery-gradient); }
.brand-chery .brand-primary-color { color: var(--chery-accent); }
.brand-chery .brand-primary-bg { background-color: var(--chery-accent); }
.brand-chery .brand-border { border-color: var(--chery-accent); }

/* ==========================================================================
   REBRANDING COULEURS — remplace le violet GRIM par l'accent CHERY #3E342A
   Les sélecteurs .brand-chery <utilitaire> ont une spécificité (0,2,0)
   supérieure aux utilitaires Tailwind (0,1,0) : ils gagnent sans !important.
   ========================================================================== */
/* Textes */
.brand-chery .text-grim-violet-500 { color: var(--chery-accent); }
.brand-chery .text-grim-violet-600 { color: var(--chery-accent-hover); }
.brand-chery .hover\:text-grim-violet-600:hover { color: var(--chery-accent-hover); }

/* Fonds */
.brand-chery .bg-grim-violet-500 { background-color: var(--chery-accent); }
.brand-chery .bg-grim-violet-600 { background-color: var(--chery-accent-hover); }
.brand-chery .hover\:bg-grim-violet-600:hover { background-color: var(--chery-accent-hover); }
.brand-chery .hover\:bg-grim-violet-100:hover { background-color: rgba(62, 52, 42, 0.08); }

/* Bordures */
.brand-chery .border-grim-violet-500 { border-color: var(--chery-accent); }
.brand-chery .hover\:border-grim-violet-500:hover { border-color: var(--chery-accent); }

/* Focus ring */
.brand-chery .focus\:ring-grim-violet-500:focus { --tw-ring-color: var(--chery-accent); }

/* Dégradés Tailwind (from-/to-) */
.brand-chery .from-grim-violet-500 {
    --tw-gradient-from: #A3886B var(--tw-gradient-from-position);
    --tw-gradient-to: rgba(163, 136, 107, 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

/* Liens de contenu (le thème met les liens en violet #6646ff) */
.brand-chery .entry-content a:not(.no-underline),
.brand-chery .prose a:not(.no-underline) { color: var(--chery-accent); }
.brand-chery .entry-content a:not(.no-underline):hover,
.brand-chery .prose a:not(.no-underline):hover { color: var(--chery-accent-hover); }

/* ==========================================================================
   BLOCS PLEINE LARGEUR
   Le slider de modèles CHERY sort du gabarit .max-w-layout (1100px) avec des
   marges négatives en vw. `clip` (et non `hidden`) écrête le résidu dû à la
   barre de défilement sans créer de conteneur de défilement : les éléments
   sticky / fixed du thème continuent de fonctionner.
   ========================================================================== */
.brand-chery .site-main {
    overflow-x: clip;
}

/* ==========================================================================
   HERO VIDÉO (home)
   ========================================================================== */
.brand-chery .chery-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.brand-chery .chery-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.brand-chery .chery-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17,17,17,0) 40%, rgba(17,17,17,0.65) 100%);
}
.brand-chery .chery-hero__content { position: relative; z-index: 2; }

/* ==========================================================================
   HEADER — Ajustement logo CHERY (ratio ~2.4:1, moins large qu'OMODA JAECOO)
   ========================================================================== */
@media (max-width: 767px) {
    .brand-chery .grim-floating-header .flex-none img,
    .brand-chery .grim-floating-header .flex-none picture img {
        height: 30px !important;
        width: auto !important;
    }
    .brand-chery .grim-floating-header .border-s img,
    .brand-chery .grim-floating-header .border-s picture img {
        height: 26px !important;
        width: auto !important;
    }
}

@media (max-width: 374px) {
    .brand-chery .grim-floating-header .flex-none img,
    .brand-chery .grim-floating-header .flex-none picture img {
        height: 26px !important;
    }
    .brand-chery .grim-floating-header .border-s img,
    .brand-chery .grim-floating-header .border-s picture img {
        height: 22px !important;
    }
}
