/* =========================================================
   TecniPack Services - v2
   Palette reprise du site d'origine : bleu #005fae, rouge #e32f31
   ========================================================= */
:root {
    --primary: #005fae;
    --primary-dark: #00467f;
    --primary-light: #e8f1fa;
    --accent: #e32f31;
    --accent-dark: #c2201f;
    --ink: #16202c;
    --ink-2: #0d1621;
    --text: #3d4855;
    --muted: #6b7684;
    --line: #e2e7ee;
    --bg-light: #f4f7fa;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(13, 22, 33, .08);
    --shadow-lg: 0 20px 50px rgba(13, 22, 33, .14);
    --font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --bs-primary: var(--primary);
    --bs-primary-rgb: 0, 95, 174;
    --bs-link-color: var(--primary);
    --bs-link-color-rgb: 0, 95, 174;
    --bs-link-hover-color: var(--primary-dark);
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--text);
}

body { font-family: var(--font-body); font-size: 1.05rem; color: var(--text); background: #fff; }
h1, h2, h3, h4, h5, .h1, .h2 { font-family: var(--font-head); color: var(--ink); font-weight: 700; letter-spacing: .2px; line-height: 1.1; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
a { text-decoration: none; }
img { max-width: 100%; }
.letter-wide { letter-spacing: 2px; }
.skip-link { position: absolute; z-index: 2000; left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; }

/* ---------- Boutons ---------- */
.btn { font-weight: 600; border-radius: 8px; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark); --bs-btn-active-bg: var(--primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); --bs-btn-active-bg: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; border: 2px solid var(--accent); }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-call { align-items: center; gap: .5rem; color: var(--primary); background: var(--primary-light); border: 0; padding: .55rem 1rem; font-weight: 700; }
.btn-call:hover { background: var(--primary); color: #fff; }

/* ---------- Topbar & header ---------- */
.topbar { background: var(--ink-2); color: rgba(255,255,255,.7); font-size: .88rem; padding: .45rem 0; }
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: #fff; }

.site-header { background: #fff; box-shadow: 0 2px 18px rgba(13,22,33,.07); }
.site-header .navbar { padding: .7rem 0; }
.brand-logo { border-radius: 6px; height: 48px; width: auto; }
.brand-text { line-height: 1; font-family: var(--font-head); }
.brand-text strong { font-size: 1.45rem; color: var(--primary); letter-spacing: .5px; }
.brand-text small { font-size: .9rem; color: var(--accent); text-transform: uppercase; letter-spacing: 3px; font-weight: 600; }
.site-footer .brand-text strong { color: #fff; }

.navbar-toggler { color: var(--ink); padding: 0 .25rem; }
.navbar-toggler:focus { box-shadow: none; }
.navbar .nav-link { font-weight: 600; color: var(--ink); padding: .5rem .9rem !important; position: relative; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--primary); }
@media (min-width: 992px) {
    .navbar .nav-link.active::after { content: ''; position: absolute; left: .9rem; right: .9rem; bottom: -.15rem; height: 3px; background: var(--accent); border-radius: 2px; }
}
.dropdown-menu { border: 0; box-shadow: var(--shadow-lg); border-radius: 12px; padding: .5rem; min-width: 280px; }
.dropdown-item { border-radius: 8px; padding: .55rem .8rem; font-weight: 500; }
.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.dropdown-item i { color: var(--primary); }

@media (max-width: 991.98px) {
    .offcanvas-lg { background: var(--ink-2); }
    .offcanvas-lg .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,.1); }
    .offcanvas-lg .offcanvas-title { color: #fff; font-family: var(--font-head); }
    .offcanvas-lg .nav-link { color: #fff; font-size: 1.15rem; border-bottom: 1px solid rgba(255,255,255,.07); }
    .offcanvas-lg .nav-link:hover, .offcanvas-lg .nav-link.active { color: #7fb7e6; }
    .offcanvas-lg .dropdown-menu { background: rgba(255,255,255,.05); box-shadow: none; }
    .offcanvas-lg .dropdown-item { color: rgba(255,255,255,.85); }
    .offcanvas-lg .dropdown-item i { color: #7fb7e6; }
    .offcanvas-lg .dropdown-divider { border-color: rgba(255,255,255,.1); }
    .offcanvas-lg .btn-accent { width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 56px 0; }
.section-light { background: var(--bg-light); }
.section-dark { background: var(--ink-2); color: rgba(255,255,255,.75); position: relative; overflow: hidden; }
.section-dark::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.section-dark .container { position: relative; }
.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head.text-start { max-width: none; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-top: .75rem; }
.section-head-light h2 { color: #fff; }
.section-head-light p { color: rgba(255,255,255,.65); }
.eyebrow { display: inline-flex; align-items: center; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: 2px; font-size: .95rem; color: var(--accent); margin-bottom: .6rem; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 110px 0 120px; color: #fff; background: var(--ink-2); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: var(--hero-img) center/cover no-repeat; opacity: .35; filter: grayscale(.2); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(0,40,80,.96) 0%, rgba(0,70,127,.85) 45%, rgba(0,95,174,.35) 100%); }
.hero > .container { z-index: 1; }
.hero .eyebrow { color: #ff8f90; }
.hero-title { color: #fff; font-size: clamp(2.6rem, 5.6vw, 4.4rem); text-transform: uppercase; margin-bottom: 1.25rem; }
.hero-title span { color: #fff; background: linear-gradient(transparent 62%, var(--accent) 62%, var(--accent) 90%, transparent 90%); }
.hero-lead { font-size: 1.2rem; color: rgba(255,255,255,.85); max-width: 600px; }
.hero-card { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.15); border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.18); }
.hero-stat { background: rgba(13,22,33,.55); padding: 1.6rem 1.4rem; }
.hero-stat strong { display: block; font-family: var(--font-head); font-size: 2.8rem; line-height: 1; color: #fff; }
.hero-stat span { color: rgba(255,255,255,.7); font-size: .95rem; }

/* ---------- Bandeau atouts ---------- */
.strip { background: #fff; position: relative; margin-top: -48px; z-index: 2; }
.strip .row { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.75rem 1rem; margin: 0; }
.strip-item { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
@media (min-width: 768px) { .strip-item { flex-direction: row; align-items: flex-start; } }
.strip-item i { font-size: 2rem; color: var(--primary); flex-shrink: 0; }
.strip-item strong { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--ink); }
.strip-item span { font-size: .92rem; color: var(--muted); }

/* ---------- Cartes machines ---------- */
.machine-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .25s, box-shadow .25s, border-color .25s; }
.machine-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; color: var(--text); }
.machine-card-img { aspect-ratio: 4/3; background: var(--bg-light); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.machine-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; transition: transform .4s; }
.machine-card:hover .machine-card-img img { transform: scale(1.06); }
.machine-card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.machine-card-body h3 { font-size: 1.5rem; margin: .5rem 0; }
.machine-card-body p { font-size: .95rem; color: var(--muted); flex: 1; }
.machine-tag { display: inline-flex; align-items: center; align-self: flex-start; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--primary); background: var(--primary-light); padding: .3rem .65rem; border-radius: 50px; }
.machine-link { font-weight: 700; color: var(--accent); margin-top: .5rem; }
.machine-link i { transition: transform .2s; display: inline-block; }
.machine-card:hover .machine-link i, .machine-row:hover .machine-link i { transform: translateX(5px); }
.machine-card-cta { background: linear-gradient(145deg, var(--primary), var(--primary-dark)); border: 0; color: #fff; }
.machine-card-cta h3 { color: #fff; }
.machine-card-cta p { color: rgba(255,255,255,.8); }
.machine-card-cta .machine-link { color: #fff; }
.machine-card-cta:hover { color: #fff; }

.machine-placeholder { width: 100%; height: 100%; min-height: 180px; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, var(--primary-light), #fff); }
.machine-placeholder i { font-size: 4rem; color: var(--primary); opacity: .55; }

.machine-row { display: grid; grid-template-columns: 1fr; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: box-shadow .25s, border-color .25s; }
@media (min-width: 768px) { .machine-row { grid-template-columns: 340px 1fr; } }
.machine-row:hover { box-shadow: var(--shadow-lg); border-color: transparent; color: var(--text); }
.machine-row-img { background: var(--bg-light); display: flex; align-items: center; justify-content: center; min-height: 240px; }
.machine-row-img img { width: 100%; height: 100%; max-height: 300px; object-fit: contain; padding: 1.25rem; }
.machine-row-body { padding: 2rem; }
.machine-row-body h2 { font-size: 2rem; margin: .6rem 0 .8rem; }

/* ---------- Listes ---------- */
.check-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.check-list li { position: relative; padding-left: 1.8rem; margin-bottom: .55rem; }
.check-list li::before { content: '\F26E'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: bold; }
.check-list-inline { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.check-list-inline li { margin-bottom: 0; font-size: .95rem; }
.chip { display: inline-block; padding: .45rem .9rem; border-radius: 50px; background: var(--bg-light); border: 1px solid var(--line); font-size: .92rem; font-weight: 500; }

/* ---------- Services ---------- */
.service-card { position: relative; height: 100%; padding: 2.25rem 2rem; border-radius: var(--radius); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); transition: background .25s, transform .25s; }
.service-card:hover { background: rgba(255,255,255,.07); transform: translateY(-4px); }
.service-card > i { font-size: 2.6rem; color: #ff6b6d; display: block; margin-bottom: 1rem; }
.service-card h3 { color: #fff; font-size: 1.75rem; }
.service-card ul { list-style: none; padding: 1rem 0 0; margin: 1rem 0 0; border-top: 1px solid rgba(255,255,255,.1); }
.service-card li { padding: .3rem 0; color: rgba(255,255,255,.85); }
.service-card li::before { content: '\F285'; font-family: 'bootstrap-icons'; color: #7fb7e6; margin-right: .5rem; font-size: .8rem; }
.service-num { position: absolute; top: 1.25rem; right: 1.5rem; font-family: var(--font-head); font-size: 3.5rem; font-weight: 700; color: rgba(255,255,255,.07); line-height: 1; }

/* ---------- Démarche ---------- */
.about-img { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.about-badge { position: absolute; left: 1.25rem; bottom: 1.25rem; background: var(--accent); color: #fff; padding: 1rem 1.25rem; border-radius: 12px; display: flex; align-items: center; gap: .8rem; }
.about-badge strong { font-family: var(--font-head); font-size: 2.6rem; line-height: 1; }
.about-badge span { font-size: .9rem; line-height: 1.2; }
.steps { display: grid; gap: 1.25rem; }
.step { display: flex; gap: 1.1rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .25s, box-shadow .25s; }
.step:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.step > span { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step h3 { font-size: 1.35rem; margin-bottom: .25rem; }
.step p { margin: 0; color: var(--muted); }

/* ---------- Vidéos ---------- */
.video-card h3 { font-size: 1.3rem; margin-top: .75rem; }
.video-facade { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius); overflow: hidden; cursor: pointer; background: linear-gradient(135deg, var(--primary-dark), var(--ink-2)); background-size: cover; background-position: center; }
.video-facade::before { content: ''; position: absolute; inset: 0; background: rgba(13,22,33,.35); transition: background .25s; }
.video-facade:hover::before { background: rgba(13,22,33,.15); }
.video-facade i { position: relative; font-size: 4rem; color: #fff; transition: transform .25s, color .25s; }
.video-facade:hover i { transform: scale(1.1); color: var(--accent); }
.video-frame { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius); display: block; background: #000; }

/* ---------- Partenaires ---------- */
.partners { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2.5rem 3.5rem; }
.partners img { height: 64px; width: auto; filter: grayscale(1); opacity: .6; transition: filter .25s, opacity .25s; }
.partners img:hover { filter: none; opacity: 1; }

/* ---------- Pages internes ---------- */
.page-hero { background: linear-gradient(110deg, var(--ink-2), var(--primary-dark) 70%, var(--primary)); color: rgba(255,255,255,.8); padding: 64px 0 56px; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border: 40px solid rgba(255,255,255,.04); border-radius: 50%; }
.page-hero h1 { color: #fff; font-size: clamp(2.3rem, 4.5vw, 3.4rem); text-transform: uppercase; margin-bottom: .6rem; }
.page-hero p { font-size: 1.15rem; max-width: 720px; margin: 0; }
.page-hero-sm { padding: 48px 0 40px; }
.breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.5); --bs-breadcrumb-item-active-color: rgba(255,255,255,.65); margin-bottom: 1rem; font-size: .92rem; }
.breadcrumb a { color: #fff; }

.detail-img { background: var(--bg-light); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.detail-img img { max-height: 460px; width: auto; object-fit: contain; padding: 1.5rem; }
.detail-img .machine-placeholder { min-height: 300px; }
.lead-text { font-size: 1.2rem; color: var(--ink); font-weight: 500; }
.detail-h2 { font-size: 1.75rem; margin: 2rem 0 .75rem; padding-left: .9rem; border-left: 4px solid var(--accent); }
.sticky-aside { position: sticky; top: 110px; display: grid; gap: 1.25rem; }
.aside-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.aside-card h2 { font-size: 1.45rem; margin-bottom: 1rem; }
.aside-card-accent { background: linear-gradient(145deg, var(--accent), var(--accent-dark)); border: 0; color: rgba(255,255,255,.9); }
.aside-card-accent h2 { color: #fff; }

/* ---------- Contact ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2.25rem; box-shadow: var(--shadow); }
.form-card h2 { font-size: 2rem; }
.form-label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.form-control, .form-select { border-radius: 8px; padding: .7rem .9rem; border-color: #cfd7e1; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(0,95,174,.15); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-list { display: grid; gap: 1rem; }
.contact-item { display: flex; gap: 1rem; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.contact-item > i { width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.contact-item h3 { font-size: 1.3rem; margin-bottom: .3rem; }
.contact-item a { display: block; color: var(--text); font-size: .95rem; word-break: break-word; }
.contact-item a:hover { color: var(--primary); }

.legal { max-width: 860px; }
.legal h2 { font-size: 1.6rem; margin: 2rem 0 .75rem; }

/* ---------- CTA & footer ---------- */
.cta-band { background: linear-gradient(110deg, var(--accent-dark), var(--accent)); color: rgba(255,255,255,.9); padding: 56px 0; }
.cta-band h2 { color: #fff; }
.site-footer { background: var(--ink-2); color: rgba(255,255,255,.65); padding: 72px 0 0; font-size: .97rem; }
.footer-title { color: #fff; font-size: 1.3rem; margin-bottom: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a, .footer-contact a { color: rgba(255,255,255,.7); }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact li { display: flex; gap: .8rem; margin-bottom: .9rem; }
.footer-contact i { color: #7fb7e6; font-size: 1.15rem; margin-top: .15rem; }
.footer-contact small { display: block; text-transform: uppercase; font-size: .72rem; letter-spacing: 1px; color: rgba(255,255,255,.45); }
.footer-contact a { word-break: break-word; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.08); margin-top: 48px; padding: 1.5rem 0; font-size: .88rem; }
.footer-bottom a { color: rgba(255,255,255,.75); }
.footer-bottom a:hover { color: #fff; }

.fab-call { position: fixed; right: 16px; bottom: 16px; z-index: 1040; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 8px 24px rgba(227,47,49,.45); }
.fab-call:hover { color: #fff; background: var(--accent-dark); }

/* ---------- Bandeau cookies ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1060; padding: 0 16px 16px; }
.cookie-inner { background: #fff; border-radius: var(--radius); box-shadow: 0 -4px 40px rgba(13,22,33,.2); padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; font-size: .95rem; border-top: 4px solid var(--primary); }
@media (min-width: 768px) { .cookie-inner { flex-direction: row; align-items: center; justify-content: space-between; } }
.cookie-banner .btn { min-width: 110px; }

@media (max-width: 767.98px) {
    .section { padding: 64px 0; }
    .hero { padding: 72px 0 96px; }
    .form-card { padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
