/* ============================================
   SARL HUBERT Patrice — Stylesheet
   Modern monopage with cinematic animations
   ============================================ */

:root {
    --primary: #1B3A5C;       /* Bleu marine profond */
    --primary-dark: #0F2440;
    --primary-light: #2A5580;
    --accent: #E8793A;        /* Orange chaleureux */
    --accent-light: #F0944E;
    --accent-dark: #D0602A;
    --bg: #FAFAFA;
    --bg-alt: #F0EFEB;
    --bg-dark: #111827;
    --text: #1F2937;
    --text-light: #6B7280;
    --text-white: #F9FAFB;
    --border: #E5E7EB;
    --shadow: 0 4px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========== RESET ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }

/* ========== NAVBAR ========== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-container {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Playfair Display', serif;
    font-weight: 700; font-size: 22px;
    color: var(--primary);
}
.nav-logo img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
    font-size: 14px; font-weight: 500;
    color: var(--text-light);
    position: relative; transition: color 0.3s;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--accent);
    transition: width 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent); color: white;
    padding: 10px 20px; border-radius: 50px;
    font-size: 14px; font-weight: 600;
    transition: var(--transition);
}
.nav-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: 0.3s; }

/* ========== HERO ========== */
.hero {
    position: relative; height: 100vh; min-height: 600px;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.hero-slider { position: absolute; inset: 0; }
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.2s ease-in-out;
    transform: scale(1.05);
}
.hero-slide.active { opacity: 1; transform: scale(1); transition: opacity 1.2s, transform 8s ease-out; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(15,36,64,0.85) 0%, rgba(15,36,64,0.55) 50%, rgba(0,0,0,0.3) 100%);
}
.hero-content {
    position: relative; z-index: 2;
    text-align: center; color: white;
    padding: 0 24px;
}
.hero-badge {
    display: inline-block;
    background: rgba(232,121,58,0.2); border: 1px solid rgba(232,121,58,0.5);
    color: var(--accent-light); padding: 8px 20px;
    border-radius: 50px; font-size: 13px; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    margin-bottom: 24px;
    animation: fadeInDown 1s 0.2s both;
}
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(42px, 8vw, 90px);
    font-weight: 700; line-height: 1.1;
    margin-bottom: 20px;
}
.hero-line {
    display: block; overflow: hidden;
}
.hero-line.accent { color: var(--accent-light); }
.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    opacity: 0.85; max-width: 500px; margin: 0 auto 32px;
    animation: fadeInUp 1s 0.8s both;
}
.hero-actions {
    display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
    animation: fadeInUp 1s 1s both;
}
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; border-radius: 50px;
    font-size: 15px; font-weight: 600;
    transition: var(--transition); cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(232,121,58,0.3); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; }
.hero-scroll {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    z-index: 2; text-align: center; color: rgba(255,255,255,0.6);
    font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
}
.scroll-line { width: 1px; height: 40px; background: rgba(255,255,255,0.3); margin: 8px auto 0; animation: scrollPulse 2s infinite; }
.hero-dots {
    position: absolute; bottom: 40px; right: 40px; z-index: 2;
    display: flex; gap: 8px;
}
.hero-dot {
    width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5); background: transparent;
    cursor: pointer; transition: 0.3s;
}
.hero-dot.active { background: var(--accent); border-color: var(--accent); }

/* ========== SECTIONS ========== */
.section { padding: 100px 0; position: relative; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
    display: inline-block; font-size: 12px; font-weight: 700;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 12px;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 50px);
    font-weight: 700; color: var(--primary-dark);
    line-height: 1.2; margin-bottom: 12px;
}
.section-desc { font-size: 17px; color: var(--text-light); max-width: 550px; margin: 0 auto; }

/* ========== ABOUT ========== */
.section-about { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-intro { font-size: 18px; line-height: 1.8; color: var(--text); margin-bottom: 32px; }
.about-features { display: flex; flex-direction: column; gap: 24px; }
.feature-item {
    display: flex; gap: 16px; padding: 20px;
    background: white; border-radius: var(--radius);
    box-shadow: var(--shadow); transition: var(--transition);
}
.feature-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon {
    width: 50px; height: 50px; min-width: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.feature-item h3 { font-size: 16px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.feature-item p { font-size: 14px; color: var(--text-light); line-height: 1.5; }
.about-images { position: relative; }
.about-img-main {
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.about-img-main img { width: 100%; height: 400px; object-fit: cover; }
.about-img-accent {
    position: absolute; bottom: -30px; left: -30px;
    width: 200px; border-radius: var(--radius);
    overflow: hidden; border: 6px solid white;
    box-shadow: var(--shadow-lg);
}
.about-img-accent img { width: 100%; height: 160px; object-fit: cover; }
.about-stats {
    position: absolute; top: -20px; right: -20px;
    background: var(--accent); color: white;
    padding: 20px 28px; border-radius: var(--radius);
    text-align: center; box-shadow: var(--shadow-lg);
}
.stat-number { font-size: 42px; font-weight: 800; display: block; line-height: 1; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; }

/* ========== RÉALISATIONS ========== */
.section-realisations { background: var(--bg-alt); }
.realisations-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.real-card { display:block; border-radius: var(--radius); overflow: hidden; position: relative; cursor: pointer; }
.real-card-img { position: relative; overflow: hidden; aspect-ratio: 4/3; }
.real-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease;
}
.real-card:hover .real-card-img img { transform: scale(1.08); }
.real-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15,36,64,0.92) 0%, transparent 60%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 24px; opacity: 0; transition: opacity 0.4s;
}
.real-card:hover .real-card-overlay { opacity: 1; }
.real-card-overlay h3 { color: white; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.real-card-overlay p { color: rgba(255,255,255,0.8); font-size: 14px; }
.real-card-link { color: var(--accent-light); font-size: 13px; font-weight: 700; margin-top: 10px; letter-spacing: 0.02em; }
.real-card-categories { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.real-cat { display:inline-block; padding:6px 10px; border-radius:999px; background:rgba(255,255,255,0.14); color:#fff; font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; }
.real-cat.dark { background:#eef4f7; color:var(--primary); }
.real-card-body-simple { background:#fff; min-height:100%; padding:24px; border-radius:var(--radius); box-shadow:var(--shadow); }
.real-card-body-simple h3 { color:var(--primary-dark); font-size:20px; margin-bottom:8px; }
.real-card-body-simple p { color:var(--text-light); font-size:14px; line-height:1.6; }
.real-card-date.dark { color:var(--accent); display:inline-block; margin-top:10px; }
.avis-card { color:inherit; text-decoration:none; }

/* ========== ACTUALITÉS ========== */
.section-actualites { background: var(--bg); }
.actu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.actu-card {
    display:block;
    background: white; border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    transition: var(--transition);
}
.actu-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.actu-card-img { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.actu-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.actu-card:hover .actu-card-img img { transform: scale(1.05); }
.actu-date-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--accent); color: white;
    padding: 4px 12px; border-radius: 50px;
    font-size: 12px; font-weight: 600;
}
.actu-card-body { padding: 20px; }
.actu-card-body h3 { font-size: 18px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.actu-card-body p { font-size: 14px; color: var(--text-light); line-height: 1.5; }
.actu-readmore { display:inline-block; margin-top:12px; color:var(--accent); font-weight:700; font-size:13px; }

/* ========== AVIS ========== */
.section-avis { background: var(--bg-dark); color: white; }
.section-avis .section-title { color: white; }
.section-avis .section-tag { color: var(--accent-light); }
.avis-slider-wrap { position: relative; overflow: hidden; }
.avis-track { display: flex; gap: 24px; transition: transform 0.5s ease; width: 100%; align-items: stretch; }
.avis-card {
    flex: 0 0 calc((100% - 48px) / 3);
    width: calc((100% - 48px) / 3);
    min-width: calc((100% - 48px) / 3);
    max-width: calc((100% - 48px) / 3);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius); padding: 32px;
    backdrop-filter: blur(10px);
}
.avis-stars { color: #FFC107; font-size: 16px; margin-bottom: 16px; }
.avis-text {
    font-size: 16px; line-height: 1.7; color: rgba(255,255,255,0.85);
    margin-bottom: 20px; font-style: italic;
    white-space: normal; overflow-wrap: anywhere; word-break: break-word;
}
.avis-footer { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avis-avatar {
    width: 42px; height: 42px; min-width: 42px; border-radius: 50%;
    background: var(--accent); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px;
}
.avis-author { font-weight: 600; font-size: 15px; white-space: normal; overflow-wrap: anywhere; }
.avis-date { font-size: 13px; opacity: 0.5; }
.avis-controls {
    display: flex; justify-content: center; gap: 12px; margin-top: 32px;
}
.avis-btn {
    width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2); background: transparent;
    color: white; font-size: 16px; cursor: pointer;
    transition: 0.3s; display: flex; align-items: center; justify-content: center;
}
.avis-btn:hover { background: var(--accent); border-color: var(--accent); }

/* ========== CONTACT ========== */
.section-contact { background: var(--bg-alt); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-item {
    display: flex; gap: 16px; padding: 20px;
    background: white; border-radius: var(--radius);
    box-shadow: var(--shadow); transition: var(--transition);
}
.contact-item:hover { transform: translateX(6px); }
.contact-icon {
    width: 50px; height: 50px; min-width: 50px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.contact-item h3 { font-size: 15px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.contact-item p { font-size: 14px; color: var(--text-light); line-height: 1.5; }
.contact-item a { color: var(--accent); transition: 0.3s; }
.contact-item a:hover { color: var(--accent-dark); }
.contact-map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }

/* ========== FOOTER ========== */
.footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { width: 60px; height: 60px; border-radius: 12px; margin-bottom: 12px; object-fit: cover; }
.footer-brand p { font-size: 14px; line-height: 1.7; }
.footer-links h4, .footer-contact h4 {
    font-size: 15px; font-weight: 700; color: white; margin-bottom: 16px;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; transition: 0.3s; }
.footer-links a:hover { color: var(--accent-light); padding-left: 4px; }
.footer-contact p { font-size: 14px; margin-bottom: 8px; }
.footer-contact a:hover { color: var(--accent-light); }
.footer-contact i { width: 20px; color: var(--accent); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0; display: flex; justify-content: space-between;
    align-items: center; font-size: 13px; opacity: 0.6;
}
.footer-admin a { color: rgba(255,255,255,0.3); }
.footer-admin a:hover { color: var(--accent-light); }

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed; bottom: 30px; right: 30px; z-index: 999;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--accent); color: white;
    border: none; cursor: pointer; font-size: 18px;
    box-shadow: 0 4px 15px rgba(232,121,58,0.4);
    opacity: 0; transform: translateY(20px);
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-dark); transform: translateY(-3px); }

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--text-light); font-size: 16px;
    font-style: italic;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scrollPulse {
    0%, 100% { opacity: 1; height: 40px; }
    50% { opacity: 0.3; height: 25px; }
}

[data-anim] { opacity: 0; transform: translateY(40px); }
[data-anim="fade-right"] { transform: translateX(-40px); }
[data-anim="fade-left"] { transform: translateX(40px); }
[data-anim].animated { opacity: 1; transform: translate(0); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
[data-anim="stagger"].animated .real-card,
[data-anim="stagger"].animated .actu-card {
    animation: fadeInUp 0.6s both;
}
[data-anim="stagger"].animated .real-card:nth-child(1),
[data-anim="stagger"].animated .actu-card:nth-child(1) { animation-delay: 0.1s; }
[data-anim="stagger"].animated .real-card:nth-child(2),
[data-anim="stagger"].animated .actu-card:nth-child(2) { animation-delay: 0.2s; }
[data-anim="stagger"].animated .real-card:nth-child(3),
[data-anim="stagger"].animated .actu-card:nth-child(3) { animation-delay: 0.3s; }
[data-anim="stagger"].animated .real-card:nth-child(4),
[data-anim="stagger"].animated .actu-card:nth-child(4) { animation-delay: 0.4s; }
[data-anim="stagger"].animated .real-card:nth-child(5),
[data-anim="stagger"].animated .actu-card:nth-child(5) { animation-delay: 0.5s; }
[data-anim="stagger"].animated .real-card:nth-child(6),
[data-anim="stagger"].animated .actu-card:nth-child(6) { animation-delay: 0.6s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .realisations-grid { grid-template-columns: repeat(2, 1fr); }
    .actu-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .avis-card {
        flex: 0 0 calc((100% - 24px) / 2);
        width: calc((100% - 24px) / 2);
        min-width: calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .nav-toggle { display: flex; }
    .nav-links.open {
        display: flex; flex-direction: column; position: absolute;
        top: 100%; left: 0; right: 0; background: white;
        padding: 20px 24px; gap: 16px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    .realisations-grid { grid-template-columns: 1fr; }
    .actu-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .hero-dots { right: 20px; bottom: 20px; }
    .hero-title { font-size: clamp(36px, 10vw, 60px); }
    .avis-card {
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
    .about-img-accent { display: none; }
    .about-stats { position: static; margin-top: 16px; display: inline-block; }
    .section { padding: 60px 0; }
}
