/* ============================================
   DHL Express — Feuille de style principale
   Jaune : #FFCC00 — Rouge : #D40511
   ============================================ */

:root {
    --yellow: #FFCC00;
    --yellow-dark: #e6b800;
    --red: #D40511;
    --red-dark: #a30410;
    --black: #1a1a1a;
    --grey-1: #f7f7f7;
    --grey-2: #e0e0e0;
    --grey-3: #888;
    --white: #fff;
    --green: #22a06b;
    --shadow: 0 2px 10px rgba(0,0,0,.08);
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', 'Helvetica Neue', system-ui, sans-serif;
    color: var(--black);
    line-height: 1.6;
    background: var(--white);
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.2; margin-bottom: 0.6em; color: var(--black); }
h1 { font-size: 2.4rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.3rem; }
p { margin-bottom: 1em; }

/* ===== Top bar ===== */
.topbar {
    background: var(--black);
    color: #ddd;
    font-size: 0.85rem;
    padding: 8px 0;
}
.topbar-inner { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.lang-switcher { display: inline-flex; gap: 4px; margin-left: 8px; }
.lang-switcher .lang-flag {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,0.08); color: #ddd; text-decoration: none;
    font-size: 0.78rem; font-weight: 600; padding: 3px 9px; border-radius: 12px;
    transition: all .2s;
}
.lang-switcher .lang-flag:hover { background: rgba(255,204,0,0.25); color: #fff; }
.lang-switcher .lang-flag.active { background: var(--yellow); color: var(--black); }

/* ===== Navbar ===== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.6rem; }
.brand-logo {
    background: var(--yellow);
    color: var(--red);
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 900;
    letter-spacing: 1px;
}
.brand-text { color: var(--red); }

.menu { display: flex; gap: 6px; list-style: none; align-items: center; }
.menu a {
    color: var(--black);
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 500;
    transition: all .2s;
}
.menu a:hover, .menu a.active { background: var(--yellow); color: var(--black); text-decoration: none; }

.btn-track {
    background: var(--red) !important;
    color: var(--white) !important;
    padding: 10px 18px !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
}
.btn-track:hover { background: var(--red-dark) !important; }

.burger { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    font-size: 1rem;
}
.btn-primary { background: var(--yellow); color: var(--black); }
.btn-primary:hover { background: var(--yellow-dark); text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.15); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: var(--red-dark); text-decoration: none; color:#fff; }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--black); text-decoration: none; }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -50px; right: -50px;
    width: 300px; height: 300px;
    background: var(--red);
    border-radius: 50%;
    opacity: 0.1;
}
.hero h1 { font-size: 3rem; margin-bottom: 20px; color: var(--black); }
.hero h1 span { color: var(--red); }
.hero p.lead { font-size: 1.25rem; max-width: 600px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Tracking box dans le hero */
.tracking-box {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    max-width: 560px;
    margin-top: 40px;
    border-top: 5px solid var(--red);
}
.tracking-box h3 { margin-bottom: 16px; }
.tracking-form { display: flex; gap: 10px; }
.tracking-form input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--grey-2);
    border-radius: 30px;
    font-size: 1rem;
    transition: border .2s;
}
.tracking-form input:focus { outline: none; border-color: var(--red); }

/* ===== Sections ===== */
section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { display: inline-block; position: relative; padding-bottom: 12px; }
.section-title h2::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 0;
    transform: translateX(-50%);
    width: 60px; height: 4px;
    background: var(--red);
    border-radius: 4px;
}
.section-title p { color: var(--grey-3); max-width: 600px; margin: 0 auto; }

/* ===== Features / Services grid ===== */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card-feature {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--yellow);
    transition: transform .2s, box-shadow .2s;
}
.card-feature:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(0,0,0,.1); border-top-color: var(--red); }
.card-feature .icon { font-size: 3rem; margin-bottom: 12px; }
.card-feature h3 { color: var(--red); }

/* ===== Service card ===== */
.service-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.service-card-header { background: var(--red); color: var(--white); padding: 30px; text-align: center; }
.service-card-header.yellow { background: var(--yellow); color: var(--black); }
.service-card-header h3 { color: inherit; }
.service-card-body { padding: 24px; }
.service-card-body ul { list-style: none; padding: 0; }
.service-card-body li { padding: 8px 0; border-bottom: 1px solid var(--grey-2); }
.service-card-body li:last-child { border-bottom: 0; }
.service-card-body li::before { content: '✓ '; color: var(--green); font-weight: bold; }

/* ===== Stats ===== */
.stats {
    background: var(--black);
    color: var(--white);
    padding: 60px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stat-num { font-size: 3rem; font-weight: 800; color: var(--yellow); }
.stat-label { font-size: 1rem; color: var(--grey-2); margin-top: 8px; }

/* ===== CTA section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: var(--white);
    text-align: center;
    padding: 70px 0;
}
.cta-section h2 { color: var(--white); }
.cta-section p { font-size: 1.15rem; margin-bottom: 30px; }

/* ===== Page header ===== */
.page-header {
    background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
    padding: 60px 0;
    text-align: center;
}
.page-header h1 { margin-bottom: 6px; }
.page-header p { color: var(--black); opacity: .75; }

/* ===== Forms ===== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--grey-2);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group textarea { resize: vertical; min-height: 110px; }

.alert { padding: 14px 18px; border-radius: 6px; margin-bottom: 18px; }
.alert-success { background: #d8f5e3; color: #1b6e3f; border-left: 4px solid var(--green); }
.alert-danger  { background: #ffeaea; color: #a30410; border-left: 4px solid var(--red); }
.alert-info    { background: #fff7d6; color: #6d5b00; border-left: 4px solid var(--yellow); }

/* ===== Timeline tracking ===== */
.tracking-result { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-top: 30px; }
.tracking-header {
    background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
}
.tracking-header h2 { margin: 0; font-size: 1.6rem; }
.tracking-header .status-pill {
    background: var(--white);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 600;
    color: var(--red);
}

.tracking-meta { display: grid; grid-template-columns: repeat(2, 1fr); padding: 26px 30px; border-bottom: 1px solid var(--grey-2); gap: 12px; }
.tracking-meta .meta-block strong { display: block; color: var(--red); margin-bottom: 4px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }

.timeline { padding: 30px; }
.timeline-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 16px;
    position: relative;
    padding-bottom: 28px;
}
.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 56px;
    bottom: 0;
    width: 3px;
    background: var(--yellow);
    border-radius: 3px;
}
.timeline-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--yellow);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 10px rgba(0,0,0,.1);
    z-index: 1;
}
.timeline-item.delivered .timeline-icon { background: var(--green); color: #fff; }
.timeline-item.exception .timeline-icon { background: var(--red); color: #fff; }
.timeline-content {
    background: var(--grey-1);
    padding: 16px 18px;
    border-radius: var(--radius);
    border-left: 4px solid var(--yellow);
}
.timeline-content h4 { color: var(--red); margin-bottom: 4px; font-size: 1.05rem; }
.timeline-content .loc { color: var(--grey-3); font-size: 0.9rem; }
.timeline-content .date { color: var(--black); font-size: 0.85rem; margin-top: 6px; font-weight: 500; }

/* ===== Footer ===== */
.footer {
    background: var(--black);
    color: #bbb;
    padding: 60px 0 0;
    margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; padding-bottom: 40px; }
.footer h4 { color: var(--yellow); margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; }
.footer ul li { padding: 4px 0; }
.footer a { color: #bbb; }
.footer a:hover { color: var(--yellow); }
.footer-bottom { background: #000; padding: 16px 0; text-align: center; font-size: 0.9rem; }

/* ===== Placeholders pour les emplacements d'images ===== */
.img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(45deg, #f8e9a1 0 12px, #fff4c2 12px 24px);
    border: 2px dashed #c9a900;
    color: #7a6500;
    text-align: center;
    border-radius: var(--radius);
    padding: 20px;
    min-height: 180px;
    font-weight: 500;
}
.img-placeholder .icon { font-size: 2.5rem; margin-bottom: 6px; }
.img-placeholder .label { font-size: 0.9rem; opacity: 0.8; }
.img-placeholder.square { aspect-ratio: 1 / 1; min-height: 0; }
.img-placeholder.wide   { aspect-ratio: 16 / 9; min-height: 0; }
.img-placeholder.full   { min-height: 320px; width: 100%; }

/* Images cadres standards */
.media-img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
    display: block;
}
.media-img.square { aspect-ratio: 1 / 1; }
.media-img.wide   { aspect-ratio: 16 / 9; }

/* ===== Hero avec image de fond ===== */
.hero.has-bg {
    background: var(--black);
    color: #fff;
    position: relative;
}
.hero.has-bg::before {
    content: '';
    position: absolute; inset: 0;
    background: inherit;
    opacity: 0.45;
}
.hero.has-bg .container { position: relative; z-index: 1; }
.hero.has-bg h1, .hero.has-bg p.lead { color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.hero.has-bg h1 span { color: var(--yellow); }

.hero-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero-illustration {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,.2);
}
.hero-illustration img { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; }

/* ===== Page header avec image de fond ===== */
.page-header.has-bg {
    background: var(--black);
    color: #fff;
    position: relative;
}
.page-header.has-bg::before {
    content:''; position: absolute; inset:0;
    background: inherit; opacity: .55;
}
.page-header.has-bg .container { position: relative; z-index: 1; }
.page-header.has-bg h1, .page-header.has-bg p { color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.4); }

/* ===== CTA avec image de fond ===== */
.cta-section.has-bg { position: relative; background: var(--red); }
.cta-section.has-bg::before {
    content:''; position:absolute; inset:0;
    background: inherit;
    opacity: .55;
}
.cta-section.has-bg .container { position: relative; z-index: 1; }

/* ===== Galerie ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.gallery-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .3s, box-shadow .3s;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(0,0,0,.15); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item .img-placeholder { height: 100%; min-height: 0; border-radius: 0; }

/* Card feature : intègre l'image au-dessus du contenu */
.card-feature .feature-img {
    width: 84px; height: 84px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--yellow);
    display: flex; align-items: center; justify-content: center;
}
.card-feature .feature-img img { width: 100%; height: 100%; object-fit: cover; }
.card-feature .feature-img .img-placeholder { min-height: 0; width: 100%; height: 100%; border-radius: 50%; border: 0; }
.card-feature .feature-img .img-placeholder .label { display: none; }
.card-feature .feature-img .img-placeholder .icon { font-size: 2.2rem; margin: 0; }

/* Service-card top image */
.service-card .service-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--grey-1);
}
.service-card .service-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-card .service-img .img-placeholder { height: 100%; min-height: 0; border-radius: 0; border-width: 1px; }

/* Logo dans la navbar (si défini) */
.brand-logo-img { height: 38px; display: block; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .hero-layout { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    /* On garde la topbar mais on masque les infos longues, on laisse le sélecteur de langue */
    .topbar-inner > span:not(.lang-switcher) { display: none; }
    .topbar-inner { justify-content: center; }
    .burger { display: block; }
    .menu {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 20px;
        box-shadow: var(--shadow);
    }
    .menu.open { display: flex; }
    .menu li { width: 100%; }
    .menu a { display: block; }
    .navbar { position: relative; }
    .hero h1 { font-size: 2.2rem; }
    .hero { padding: 50px 0; }
    .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .tracking-form { flex-direction: column; }
    .tracking-meta { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
}
