:root {
    --bg: #0b1020;
    --bg-alt: #111729;
    --accent: #ffbf3c;
    --accent-soft: rgba(255, 191, 60, 0.1);
    --text: #f5f7ff;
    --muted: #a5acc7;
    --card: #181f33;
    --border: #252c44;
    --danger: #ff4d4f;
    --success: #3ccf7a;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
    --container: 1100px;
}

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

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #1b2640, #050713);
    color: var(--text);
    line-height: 1.6;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: linear-gradient(to bottom, rgba(5,7,19,0.92), rgba(5,7,19,0.75));
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 10%, #fff4d4, #ffbf3c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1b1b26;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 14px;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--muted);
}

.main-nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    font-size: 14px;
    color: var(--muted);
    position: relative;
    padding-bottom: 0.2rem;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a.active {
    color: #ffffff;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none; /* visible seulement sur mobile */
    background: transparent;
    border: none;
    padding: 0.2rem;
    margin-left: 0.5rem;
    cursor: pointer;
    border-radius: 999px;
    outline: none;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    background: #ffbf3c;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Mobile nav container */
.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 0.5rem 1.5rem 0.8rem;
    background: rgba(5,7,19,0.96);
    border-top: 1px solid rgba(255,255,255,0.04);
}

.mobile-nav a {
    text-decoration: none;
    color: var(--muted);
    padding: 0.35rem 0;
    font-size: 0.95rem;
}

.mobile-nav a.active {
    color: #ffffff;
}

/* Classes togglées en JS */
.mobile-nav.open {
    display: flex;
}

/* Hero */
.hero {
    padding: 3.5rem 0 2.5rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    margin-bottom: 0.6rem;
}

.hero-lead {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 34rem;
}

.hero-actions {
    margin-top: 1.3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.6rem 1.3rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #ffbf3c, #ff8c3c);
    color: #1b1b26;
    box-shadow: 0 14px 30px rgba(0,0,0,0.45);
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}

.btn-outline {
    border-color: rgba(255,255,255,0.18);
    color: var(--text);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.04);
}

/* Hero panel */
.hero-panel {
    position: relative;
}

.hero-card {
    background: radial-gradient(circle at top left, rgba(255,191,60,0.12), rgba(10,14,28,0.98));
    border-radius: var(--radius-xl);
    padding: 1.6rem 1.5rem 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255,255,255,0.06);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at -10% -20%, rgba(255,255,255,0.17), transparent 60%);
    opacity: 0.9;
    pointer-events: none;
}

.hero-card h2 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.15rem;
}

.hero-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.hero-list li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.2rem;
}

.hero-list li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
    position: absolute;
    left: 0;
    top: 0.6rem;
}

/* Sections */
.section {
    padding: 2.5rem 0;
}

.section-alt {
    background: radial-gradient(circle at top, rgba(255,191,60,0.06), rgba(7,10,26,0.98));
}

/* Typography helpers */
.section h2 {
    font-size: 1.45rem;
    margin-bottom: 0.75rem;
}

.intro {
    color: var(--muted);
    max-width: 40rem;
}

/* Grid utilities */
.grid {
    display: grid;
    gap: 1.4rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Cards */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--border);
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

.card p {
    font-size: 0.92rem;
}

.card-tags {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Stats */
.stats {
    display: grid;
    gap: 0.9rem;
}

.stat {
    background: linear-gradient(135deg, rgba(255,191,60,0.08), rgba(9,14,32,0.95));
    border-radius: var(--radius-lg);
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255,255,255,0.08);
}

.stat-number {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Chantiers */
.chantier-grid {
    margin-top: 1.5rem;
}

.chantier-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 16px 36px rgba(0,0,0,0.4);
    transition: transform 0.13s ease, box-shadow 0.13s ease, border-color 0.13s ease;
}

.chantier-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.chantier-thumb {
    position: relative;
    overflow: hidden;
}

.chantier-thumb img {
    width: 100%;
    display: block;
    height: 190px;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.chantier-body {
    padding: 0.9rem 1rem 1rem;
}

.chantier-body h2 {
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
}

.chantier-body p {
    font-size: 0.9rem;
    color: var(--muted);
}

.chantier-more {
    display: inline-flex;
    align-items: center;
    margin-top: 0.45rem;
    font-size: 0.85rem;
    color: #ffd37a;
}

.chantier-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 45px rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.18);
}

.chantier-card:hover .chantier-thumb img {
    transform: scale(1.06);
}

/* Gallery detail */
.gallery-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.1rem;
}

.gallery-item {
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(0,0,0,0.45);
}

.gallery-link {
    display: block;
}

.gallery-item img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.gallery-item figcaption {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem 0.7rem;
    color: var(--muted);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.lightbox.open {
    display: flex;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2,3,10,0.88);
}

.lightbox-content {
    position: relative;
    max-width: min(900px, 92vw);
    max-height: 90vh;
    border-radius: 18px;
    overflow: hidden;
    background: #050713;
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 26px 68px rgba(0,0,0,0.85);
    padding: 0.6rem 0.6rem 0.9rem;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
    object-fit: contain;
    background: #050713;
}

.lightbox-caption {
    margin: 0.5rem 0.3rem 0;
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 0.35rem;
    right: 0.55rem;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    background: rgba(5,7,19,0.9);
    color: #ffffff;
    font-size: 1.4rem;
    cursor: pointer;
}

/* Contact */
.contact-grid {
    margin-top: 1.3rem;
}

.contact-form .form-group {
    margin-bottom: 0.9rem;
}

.contact-form label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(8,11,25,0.96);
    color: var(--text);
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(255,191,60,0.35);
    background: #060818;
}

.alert {
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
}

.alert-success {
    background: rgba(60,207,122,0.12);
    border: 1px solid rgba(60,207,122,0.5);
    color: #c7ffdd;
}

.alert-error {
    background: rgba(255,77,79,0.12);
    border: 1px solid rgba(255,77,79,0.6);
    color: #ffd2d3;
}

/* Footer */
.site-footer {
    padding: 1.8rem 0 1.4rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(to top, rgba(3,4,10,0.98), rgba(3,4,10,0.9));
    margin-top: 2rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.2rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-contact a {
    color: var(--text);
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

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

/* Misc */
a {
    color: #ffd37a;
}

a:hover {
    color: #ffe5ad;
}

/* Responsive */
@media (max-width: 780px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
    .hero-panel {
        order: -1;
    }
    .main-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .header-inner {
        justify-content: space-between;
    }
    .footer-copy {
        text-align: left;
    }
}


/* Logo image override */
.logo img.logo-image,
.logo-image {
    height: 40px;
    width: auto;
    display: block;
}
