/* ========================================
   G.R.M.S - Grande Route Multiservices
   Couleurs basees sur le logo
   ======================================== */

:root {
    --primary: #1a2e6e;
    --primary-light: #2a4494;
    --primary-dark: #0f1d4a;
    --accent: #c41e3a;
    --accent-light: #e8293f;
    --accent-dark: #9e1830;
    --orange: #e67e22;
    --green: #27ae60;
    --blue-light: #3498db;
    --bg-light: #f4f6fa;
}

* {
    font-family: 'Poppins', sans-serif;
}

body {
    overflow-x: hidden;
    color: #333;
}

/* ---- Navbar ---- */
#mainNav {
    background: rgba(26, 46, 110, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.6rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

#mainNav.scrolled {
    background: rgba(15, 29, 74, 0.98);
    padding: 0.4rem 0;
}

.brand-text {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--orange) !important;
}

.btn-inscription {
    background: var(--accent) !important;
    color: white !important;
    border-radius: 50px !important;
    padding: 0.5rem 1.5rem !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
}

.btn-inscription:hover {
    background: var(--accent-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

/* ---- Hero ---- */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 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");
}

.hero-row {
    min-height: 100vh;
}

.hero-content {
    padding-top: 100px;
    animation: fadeInUp 1s ease;
}

.hero-logo {
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.slogan-text {
    font-style: italic;
    font-size: 1.3rem;
    color: var(--orange);
}

.hero-desc {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 550px;
}

.text-accent { color: var(--orange) !important; }

/* ---- Hero Image ---- */
.hero-image-wrapper {
    padding-top: 80px;
    text-align: center;
    animation: fadeInUp 1.2s ease 0.3s both;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 4px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.4s ease;
}

.hero-image:hover {
    transform: scale(1.03);
}

/* ---- Buttons ---- */
.btn-primary-custom {
    background: var(--accent);
    border: none;
    color: white;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary-custom:hover {
    background: var(--accent-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.35);
}

.btn-outline-primary-custom {
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline-primary-custom:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ---- Sections ---- */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.ls-2 { letter-spacing: 2px; }

.text-primary-custom { color: var(--primary) !important; }

/* ---- Service Cards ---- */
.service-card {
    border-radius: 16px;
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.4s;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(26, 46, 110, 0.15) !important;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    transform: scale(1.1);
}

.card-direct .service-icon {
    background: linear-gradient(135deg, var(--orange), #f39c12);
}

/* ---- Offre Cards ---- */
.offre-card {
    border-radius: 16px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent !important;
}

.offre-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    border-left: 4px solid var(--accent) !important;
}

.offre-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.offre-card:hover .offre-icon {
    background: var(--primary);
    color: white;
}

/* ---- About Section ---- */
.bg-dark-blue {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.about-stat {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    text-align: center;
    transition: all 0.3s;
}

.about-stat:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
}

.opacity-85 { opacity: 0.85; }

/* ---- CTA ---- */
.cta-section {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent), var(--accent-light));
    padding: 60px 0;
}

/* ---- Page Header ---- */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 120px 0 40px;
}

.page-header-dark {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    padding: 120px 0 40px;
}

/* ---- Form ---- */
.form-header-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 1.5rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(26, 46, 110, 0.15);
}

.input-group-text {
    background: var(--bg-light);
    border-right: none;
    color: var(--primary);
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: none;
}

/* ---- Dashboard ---- */
.stat-card {
    border-radius: 16px;
    transition: all 0.3s;
    border-left: 5px solid transparent !important;
}

.stat-card-blue { border-left-color: var(--primary) !important; }
.stat-card-green { border-left-color: var(--green) !important; }
.stat-card-orange { border-left-color: var(--orange) !important; }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.stat-number {
    font-size: 2rem;
    color: var(--primary);
}

.stat-icon-bg {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.bg-blue { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.bg-green { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.bg-orange { background: linear-gradient(135deg, #e67e22, #f39c12); }

.bg-primary-custom { background-color: var(--primary) !important; }
.bg-danger-custom { background-color: var(--accent) !important; }

.progress {
    border-radius: 10px;
    background: var(--bg-light);
}

.progress-bar.bg-primary-custom { background-color: var(--primary) !important; }
.progress-bar.bg-danger-custom { background-color: var(--accent) !important; }

.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}

.table-hover tbody tr:hover {
    background: rgba(26, 46, 110, 0.03);
}

/* ---- Footer ---- */
.footer {
    background: var(--primary-dark);
    padding: 50px 0 20px;
}

.footer-link {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.3s;
    display: block;
    padding: 3px 0;
}

.footer-link:hover {
    color: var(--orange);
    padding-left: 5px;
}

/* ---- Flash Messages ---- */
.flash-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: none;
    border-left: 4px solid var(--green);
    color: #155724;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ---- Responsive ---- */

/* Tablet */
@media (max-width: 991.98px) {
    .hero-section { min-height: auto; padding-bottom: 60px; }
    .hero-row { min-height: auto !important; }
    .hero-content { padding-top: 100px; padding-bottom: 40px; }
    .section-padding { padding: 60px 0; }
    .section-title { font-size: 1.9rem; }
    .about-visual { width: 200px; height: 200px; }
    .about-big-icon { font-size: 6rem; }

    /* Navbar mobile menu */
    .navbar-collapse {
        background: var(--primary-dark);
        border-radius: 12px;
        padding: 1rem;
        margin-top: 0.5rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    .navbar-nav .nav-link {
        padding: 0.7rem 1rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    .btn-inscription {
        display: inline-block !important;
        text-align: center;
        margin-top: 0.5rem;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .hero-section { min-height: auto; padding-bottom: 40px; }
    .hero-row { min-height: auto !important; }
    .hero-content {
        padding-top: 80px;
        padding-bottom: 30px;
        text-align: center;
    }
    .hero-content h1 { font-size: 2rem; }
    .hero-desc { margin: 0 auto; font-size: 0.95rem; }
    .slogan-text { font-size: 1.1rem; }
    .hero-content .d-flex.gap-3 {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    .hero-content .d-flex.gap-3 .btn { width: 100%; max-width: 280px; }

    .section-padding { padding: 40px 0; }
    .section-title { font-size: 1.5rem; }
    .section-title::after { width: 40px; height: 3px; }
    .text-center.mb-5 { margin-bottom: 1.5rem !important; }
    .text-center.mb-5 p { font-size: 0.9rem; }

    /* Service cards */
    .service-card { margin-bottom: 0; }
    .service-icon { width: 55px; height: 55px; font-size: 1.2rem; }

    /* Offre cards */
    .offre-icon { width: 42px; height: 42px; font-size: 1rem; }
    .offre-card .card-body { padding: 1rem !important; }
    .offre-card h5 { font-size: 1rem; }
    .offre-card .card-text { font-size: 0.85rem; }

    /* About */
    .about-visual { width: 150px; height: 150px; margin-bottom: 1.5rem; }
    .about-big-icon { font-size: 5rem; }
    .about-float-icon { font-size: 1.5rem; }
    .about-stat { padding: 0.6rem; }
    .about-stat h5 { font-size: 0.9rem; }
    .about-stat .small { font-size: 0.75rem; }

    /* CTA */
    .cta-section { padding: 40px 0; }
    .cta-section h2 { font-size: 1.4rem; }
    .cta-section .btn-lg { font-size: 0.95rem; padding: 0.6rem 1.5rem; }

    /* Page headers */
    .page-header, .page-header-dark { padding: 90px 0 25px; }
    .page-header h1, .page-header-dark h1 { font-size: 1.5rem; }
    .page-header p, .page-header-dark p { font-size: 0.85rem; }

    /* Form */
    .card-body.p-4.p-md-5 { padding: 1.25rem !important; }
    .form-header-icon { width: 55px; height: 55px; font-size: 1.2rem; }
    h3.fw-bold.mt-3 { font-size: 1.2rem; }
    h5.fw-bold.mb-3 { font-size: 1rem; }
    .btn-primary-custom.btn-lg { font-size: 0.95rem; padding: 0.65rem 1.5rem; }

    /* Dashboard */
    .stat-number { font-size: 1.3rem; }
    .stat-icon-bg { width: 45px; height: 45px; font-size: 1rem; }
    .stat-card .card-body { padding: 1rem !important; }
    .stat-card .small { font-size: 0.7rem; }

    /* Dashboard table horizontal scroll */
    .table-responsive { font-size: 0.8rem; }
    .table th, .table td { padding: 0.4rem 0.5rem; white-space: nowrap; }

    /* Dashboard filters */
    .card-header .d-flex { flex-direction: column; align-items: flex-start !important; }
    .card-header form { width: 100%; }
    .card-header form .form-select-sm { width: 100% !important; margin-bottom: 0.3rem; }

    /* Footer */
    .footer { padding: 30px 0 15px; text-align: center; }
    .footer h5 { font-size: 1rem; }
    .footer .col-md-4 { margin-bottom: 1.5rem !important; }

    /* Flash */
    .flash-container { max-width: calc(100% - 30px); left: 15px; right: 15px; }

    /* Login */
    .login-card .card-body { padding: 1.5rem !important; }
    .login-icon { width: 55px; height: 55px; font-size: 1.2rem; }
}

/* Small mobile */
@media (max-width: 374.98px) {
    .hero-content h1 { font-size: 1.6rem; }
    .hero-content { padding-top: 70px; }
    .navbar-brand img { height: 35px !important; }
    .brand-text { font-size: 1rem; }
    .section-title { font-size: 1.3rem; }
    .stat-number { font-size: 1.1rem; }
}

/* ---- Login ---- */
.login-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    min-height: 100vh;
}

.login-card {
    border-radius: 20px;
    overflow: hidden;
}

.login-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 1.5rem;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: none;
    border-left: 4px solid var(--accent);
    color: #721c24;
    border-radius: 12px;
}

/* ---- About Visual (no logo) ---- */
.about-visual {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto;
}

.about-big-icon {
    font-size: 8rem;
    color: rgba(255,255,255,0.15);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.about-float-icon {
    position: absolute;
    font-size: 2rem;
    color: var(--orange);
    animation: floatIcon 3s ease-in-out infinite;
}

.float-1 { top: 10%; left: 10%; animation-delay: 0s; }
.float-2 { top: 60%; right: 5%; animation-delay: 1s; }
.float-3 { bottom: 5%; left: 20%; animation-delay: 2s; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(-12px); opacity: 1; }
}

/* ---- Scroll smooth ---- */
html { scroll-behavior: smooth; }
