/* =============================================
   PEINTURA — Design System officiel
   Palette : couleurs des lettres du logo
   ============================================= */

/* --- Tokens --- */
:root {
    /* Palette logo */
    --p:      #ff3131;   /* P — rouge */
    --e:      #38b6ff;   /* E — bleu  */
    --i:      #d43790;   /* i — rose  */
    --n:      #fffd16;   /* N — jaune */
    --t:      #72ff95;   /* T — vert  */
    --u:      #ff5757;   /* U — corail*/
    --r:      #8c52ff;   /* R — violet*/
    --a:      #010101;   /* A — noir  */

    /* UI sémantique */
    --color-primary:   #1697ff;   /* bleu principal (CTA) */
    --color-accent:    #d43790;   /* rose (accents) */
    --color-dark:      #0d1117;   /* footer / hero dark */
    --color-black:     #111111;
    --color-white:     #ffffff;

    /* Surfaces */
    --bg-page:         #f2f4f8;
    --bg-card:         #ffffff;
    --bg-hero:         linear-gradient(135deg, #1a7fe8 0%, #1565c0 100%);

    /* Texte */
    --text-primary:    #0d1117;
    --text-secondary:  #374151;
    --text-muted:      #6b7280;
    --text-light:      rgba(255,255,255,.75);

    /* Bordures */
    --border:          #e5e7eb;
    --border-card:     rgba(0,0,0,.06);

    /* Rayons */
    --radius-sm:       6px;
    --radius-md:       12px;
    --radius-lg:       18px;
    --radius-xl:       24px;

    /* Ombres */
    --shadow-xs:       0 1px 2px rgba(0,0,0,.05);
    --shadow-sm:       0 2px 8px rgba(0,0,0,.07);
    --shadow-md:       0 4px 20px rgba(0,0,0,.10);
    --shadow-lg:       0 12px 40px rgba(0,0,0,.14);
    --shadow-blue:     0 4px 20px rgba(22,151,255,.25);

    /* Fonts */
    --font-display:    'Syne', 'DM Sans', sans-serif;
    --font-body:       'DM Sans', system-ui, sans-serif;

    /* Spacing */
    --section-gap:     3rem;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Typography --- */
h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
}

/* --- Layout --- */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.page-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
    padding: 2rem 0 5rem;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 0;
}
.site-logo img { height: 34px; width: auto; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}
.site-nav a {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .15s;
}
.site-nav a:hover,
.site-nav a.active { color: var(--color-black); }

/* --- Breadcrumb --- */
.breadcrumb-bar {
    background: var(--color-white);
    border-bottom: 1px solid var(--border);
    padding: .55rem 0;
}
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.breadcrumb-nav a { color: var(--text-muted); transition: color .15s; }
.breadcrumb-nav a:hover { color: var(--color-black); }
.breadcrumb-nav .sep { opacity: .4; }
.breadcrumb-nav .current { color: var(--text-primary); font-weight: 500; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    border: none;
    transition: transform .15s, box-shadow .15s, background .15s, opacity .15s;
    line-height: 1;
}
.btn:hover   { transform: translateY(-1px); }
.btn:active  { transform: translateY(0); opacity: .9; }

/* Primary — bleu */
.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-blue);
}
.btn-primary:hover { background: #0d87ee; box-shadow: 0 6px 28px rgba(22,151,255,.35); }

/* Accent — rose */
.btn-accent {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(212,55,144,.3);
}
.btn-accent:hover { background: #bc2f7f; }

/* Dark */
.btn-dark {
    background: var(--color-dark);
    color: #fff;
}
.btn-dark:hover { background: #1a2030; }

/* Outline */
.btn-outline {
    background: transparent;
    color: var(--color-black);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Ghost blanc (sur fond sombre) */
.btn-ghost {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,.25); }

/* Sm/Lg */
.btn-sm { padding: .45rem .9rem; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: .9rem 2rem; font-size: 1rem; }

/* =============================================
   BADGES / PILLS
   ============================================= */
.badge {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.badge-blue   { background: rgba(22,151,255,.12); color: #0d87ee; }
.badge-pink   { background: rgba(212,55,144,.12); color: #bc2f7f; }
.badge-green  { background: rgba(114,255,149,.25); color: #15a845; }
.badge-yellow { background: rgba(255,253,22,.35);  color: #8a7a00; }
.badge-red    { background: rgba(255,49,49,.12);   color: #cc1a1a; }
.badge-purple { background: rgba(140,82,255,.12);  color: #6b35d9; }
.badge-dark   { background: var(--color-dark); color: #fff; }

/* =============================================
   CARDS
   ============================================= */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
    overflow: hidden;
}
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.card-body { padding: 1.5rem; }
.card-title { font-size: 1.05rem; margin-bottom: .4rem; }
.card-text  { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }

/* Stat card */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    text-align: center;
    transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin-bottom: .2rem;
}
.stat-icon-blue   { background: rgba(22,151,255,.1); }
.stat-icon-pink   { background: rgba(212,55,144,.1); }
.stat-icon-green  { background: rgba(114,255,149,.2); }
.stat-icon-purple { background: rgba(140,82,255,.1); }

.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

/* =============================================
   HERO
   ============================================= */
.hero {
    background: var(--bg-hero);
    border-radius: var(--radius-xl);
    padding: 4rem 3rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255,255,255,.9);
    margin-bottom: 1.5rem;
}
.hero-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--n); /* jaune = live */
    animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
    0%,100% { opacity:1; } 50% { opacity:.3; }
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: #fff;
    margin-bottom: 1rem;
    max-width: 640px;
}
.hero-sub {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 520px;
    line-height: 1.75;
    margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: .85rem; flex-wrap: wrap; }

/* Logo color band */
.logo-band {
    display: flex;
    gap: 5px;
    margin-bottom: 2rem;
}
.logo-band span {
    height: 3px;
    flex: 1;
    border-radius: 999px;
    opacity: .7;
}

/* =============================================
   SECTION TITLES
   ============================================= */
.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}
.section-subtitle {
    font-size: .9rem;
    color: var(--text-muted);
    margin-top: -.75rem;
    margin-bottom: 1.5rem;
}

/* =============================================
   GRIDS
   ============================================= */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero { padding: 2.5rem 1.5rem; }
}

/* =============================================
   SEARCH / FILTER BAR
   ============================================= */
.filter-bar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
}
.filter-bar-title {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .75rem;
    align-items: end;
}
.filter-field label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .4rem;
}
.filter-field input,
.filter-field select {
    width: 100%;
    padding: .6rem .85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-primary);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    appearance: none;
}
.filter-field input:focus,
.filter-field select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(22,151,255,.12);
    background: #fff;
}

/* =============================================
   DISTRIBUTOR / COMPANY CARDS
   ============================================= */
.distributor-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-sm);
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    transition: box-shadow .2s, transform .2s;
}
.distributor-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.distributor-name { font-size: 1.05rem; font-weight: 700; }
.distributor-meta { font-size: .82rem; color: var(--text-muted); }
.distributor-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }

/* Featured ring */
.distributor-card.is-featured {
    border: 1.5px solid rgba(22,151,255,.3);
    box-shadow: 0 0 0 4px rgba(22,151,255,.06), var(--shadow-sm);
}

/* =============================================
   ALERTS / NOTICES
   ============================================= */
.alert {
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    font-size: .875rem;
    line-height: 1.6;
    border: 1px solid transparent;
}
.alert-yellow { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-blue   { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-green  { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-red    { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--color-dark);
    color: rgba(255,255,255,.7);
    padding: 3.5rem 0 2rem;
    margin-top: 4rem;
}
.site-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}
.site-footer h4 {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: rgba(255,255,255,.95);
    margin-bottom: 1rem;
}
.site-footer a {
    display: block;
    font-size: .85rem;
    color: rgba(255,255,255,.55);
    margin-bottom: .5rem;
    transition: color .15s;
}
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: .85rem; line-height: 1.7; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
    color: rgba(255,255,255,.35);
    flex-wrap: wrap;
    gap: .5rem;
}

@media (max-width: 768px) {
    .site-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .site-footer-grid { grid-template-columns: 1fr; }
}

/* =============================================
   UTILITIES
   ============================================= */
.text-pink   { color: var(--i); }
.text-blue   { color: var(--e); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.anim-fadein { animation: fadeUp .45s ease both; }
.anim-delay-1 { animation-delay: .08s; }
.anim-delay-2 { animation-delay: .16s; }
.anim-delay-3 { animation-delay: .24s; }
.anim-delay-4 { animation-delay: .32s; }

.prep-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.paints-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* =============================================
   MOBILE OPTIMISATIONS
   ============================================= */
@media(max-width:768px) {
    /* Container padding réduit */
    .container { padding: 0 1rem; }

    /* Page wrap compact */
    .page-wrap { gap: 1.75rem; padding-bottom: 3rem; }

    /* Section titles plus petits */
    .section-title { font-size: 1.3rem; }

    /* Hero compact */
    .about-hero, .contact-hero { padding: 2.5rem 0 2rem; }
    .hero { padding: 2.5rem 1.25rem 2rem; }
    /* Index hero */
    section[style*="1a7fe8"] { padding-top: 1.5rem !important; padding-bottom: 2rem !important; }

    /* Cards: padding réduit */
    .card-body { padding: 1.1rem; }
    .about-section { padding: 1.5rem 1.1rem; }

    /* Formulaire pleine largeur */
    .contact-layout { flex-direction: column; }
    .contact-layout > div:last-child { width: 100% !important; }

    /* Grids mono colonne */
    .about-grid-3, .about-grid-2,
    .experts-grid, .academy-grid,
    .brands-grid { grid-template-columns: 1fr 1fr; }

    /* Marques : 2 colonnes compactes */
    .brands-grid { gap: .6rem; }

    /* Breadcrumb compact */
    .breadcrumb-bar { padding: .4rem 1rem; }

    /* Footer compact */
    .site-footer { padding: 2rem 0 1.5rem; margin-top: 2.5rem; }
    .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }

    /* Boutons pleine largeur sur mobile */
    .btn-lg { width: 100%; justify-content: center; }

    /* Distributeur home villes */
    .filter-grid { grid-template-columns: 1fr 1fr; }

    /* Form grid */
    [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

@media(max-width:480px) {
    .brands-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
    .experts-grid { grid-template-columns: 1fr; }
    .academy-grid { grid-template-columns: 1fr; }
    .prep-grid { grid-template-columns: 1fr; }
    .paints-grid { grid-template-columns: repeat(2,1fr); }
}