/* =====================================================
   GSDI - SECURITY COMPANY
   STYLE.CSS - VERSION NETTOYÉE
===================================================== */

:root {
    --primary: #0F172A;
    --secondary: #1E40AF;
    --accent: #3B82F6;
    --dark: #020617;
    --gray: #64748B;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --gold: #FBBF24;
}

/* =====================================================
   RESET
===================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: var(--light);
    color: #333;
    overflow-x: hidden;
    padding-top: 80px;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

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

/* =====================================================
   NAVBAR - FIXE ET TOUJOURS VISIBLE
===================================================== */

.navbar {
    background-color: var(--primary) !important;
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-height: 80px;
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.navbar-brand span {
    color: white;
}

.navbar-brand img {
    transition: height 0.3s ease;
}

.navbar.scrolled .navbar-brand img {
    height: 40px;
}

.navbar .nav-link {
    color: white !important;
    transition: color 0.3s ease;
}

.navbar .nav-link.active {
    color: #f5c842 !important;
}

.navbar .nav-link:hover {
    color: #f5c842 !important;
}

.btn-warning {
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 600;
}

/* =====================================================
   LANGUAGE SELECTOR - VERSION SIMPLE
===================================================== */

.language-selector {
    position: relative;
}

.language-selector .form-select {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 30px 6px 12px;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 130px;
}

.language-selector .form-select:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.language-selector .form-select:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(251, 191, 36, 0.25);
}

.language-selector .form-select option {
    background-color: var(--primary);
    color: white;
}

@media (max-width: 992px) {
    .language-selector {
        margin: 10px 0;
        width: 100%;
    }
    
    .language-selector .form-select {
        width: 100% !important;
        min-width: unset;
    }
}

/* =====================================================
   POLICE ARABE - NOTO SANS ARABIC
===================================================== */

html[lang="ar"] * {
    font-family: 'Noto Sans Arabic', 'Segoe UI', sans-serif !important;
}

html[lang="ar"] {
    font-size: 16px;
}

html[lang="ar"] .hero-content h1 {
    font-size: 3.2rem;
    letter-spacing: 1px;
}

html[lang="ar"] .navbar-brand span {
    font-weight: 800;
}

html[lang="ar"] .section-header h2 {
    font-size: 2.5rem;
}

html[lang="ar"] p,
html[lang="ar"] li,
html[lang="ar"] .service-card p {
    line-height: 1.9;
}

html[lang="ar"] .service-card i {
    margin-bottom: 15px;
}

/* =====================================================
   CORRECTIONS RTL POUR LES IMAGES ET ICONES
===================================================== */

html[lang="ar"] img,
html[lang="ar"] .gallery img,
html[lang="ar"] .about img,
html[lang="ar"] .navbar-brand img {
    transform: none !important;
    direction: ltr !important;
    unicode-bidi: embed !important;
    display: inline-block !important;
}

html[lang="ar"] .service-card i,
html[lang="ar"] .about li i,
html[lang="ar"] .fa-solid,
html[lang="ar"] .fa-regular,
html[lang="ar"] .fa-brands,
html[lang="ar"] .fa,
html[lang="ar"] .fas,
html[lang="ar"] .far,
html[lang="ar"] .fab {
    transform: none !important;
    display: inline-block !important;
    direction: ltr !important;
}

html[lang="ar"] .fa-chevron-right,
html[lang="ar"] .fa-angle-right,
html[lang="ar"] .fa-arrow-right {
    transform: scaleX(-1) !important;
}

html[lang="ar"] .about li i {
    margin-left: 10px;
    margin-right: 0;
}

html[lang="ar"] .btn {
    direction: ltr !important;
}

html[lang="ar"] .swiper-slide {
    direction: ltr !important;
}

html[lang="ar"] .hero-content {
    direction: rtl !important;
    text-align: right !important;
}

html[lang="ar"] .hero-content .btn {
    direction: ltr !important;
}

html[lang="ar"] .cta .container {
    direction: rtl !important;
}

html[lang="ar"] .cta .btn {
    direction: ltr !important;
}

html[lang="ar"] .navbar-brand img {
    transform: none !important;
    direction: ltr !important;
}

html[lang="ar"] .fa-shield-halved,
html[lang="ar"] .fa-video,
html[lang="ar"] .fa-dog,
html[lang="ar"] .fa-user-tie,
html[lang="ar"] .fa-truck,
html[lang="ar"] .fa-calendar-check {
    transform: none !important;
}

/* =====================================================
   HERO
===================================================== */

.slide-1 {
    background-image: url('../images/hero/security1.jpg'), linear-gradient(135deg, #0F172A, #1E40AF);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

.slide-2 {
    background-image: url('../images/hero/security2.jpg'), linear-gradient(135deg, #1E40AF, #3B82F6);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

.slide-3 {
    background-image: url('../images/hero/security3.png'), linear-gradient(135deg, #0F172A, #1E40AF);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .60);
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 700px;
    color: white;
    animation: fadeUp 1s ease;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-content .btn {
    width: fit-content;
    padding: 15px 35px;
    border-radius: 50px;
}

html[lang="ar"] .slide-1,
html[lang="ar"] .slide-2,
html[lang="ar"] .slide-3,
html[lang="ar"] .cta {
    direction: ltr !important;
    background-blend-mode: overlay !important;
    background-size: cover !important;
    background-position: center !important;
}

html[lang="ar"] .hero-section,
html[lang="ar"] .cta {
    direction: ltr !important;
}

html[lang="ar"] .hero-content,
html[lang="ar"] .cta .container {
    direction: rtl !important;
}

/* =====================================================
   CTA
===================================================== */

.cta {
    background-image: url('../images/cta.jpg'), linear-gradient(135deg, #0F172A, #1E40AF);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    position: relative;
    padding: 120px 0;
}

.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .8);
}

.cta .container {
    position: relative;
    z-index: 2;
}

.cta h2 {
    color: white;
    font-size: 3rem;
    font-weight: 800;
}

.cta p {
    color: white;
    margin: 20px 0 30px;
}

.cta .btn {
    border-radius: 50px;
    padding: 15px 40px;
    font-weight: 700;
}

/* =====================================================
   SECTION HEADER
===================================================== */

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.7rem;
    font-weight: 800;
    color: var(--primary);
}

.section-header p {
    color: var(--gray);
    margin-top: 10px;
}

.section-tag {
    display: inline-block;
    background: #dbeafe;
    color: var(--secondary);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* =====================================================
   ABOUT
===================================================== */

.about {
    padding: 100px 0;
}

.about h2 {
    font-size: 2.8rem;
    margin-bottom: 25px;
    color: var(--primary);
    font-weight: 800;
}

.about p {
    color: var(--gray);
    line-height: 1.9;
}

.about ul {
    margin-top: 30px;
}

.about li {
    margin-bottom: 15px;
    font-weight: 500;
}

.about li i {
    color: green;
    margin-right: 10px;
}

.about .btn {
    margin-top: 20px;
    border-radius: 30px;
    padding: 12px 25px;
}

/* =====================================================
   SERVICES
===================================================== */

.services {
    background: white;
    padding: 100px 0;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: .4s;
    border: 1px solid #eee;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
}

.service-card i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.service-card h4 {
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary);
}

.service-card p {
    color: var(--gray);
}

/* =====================================================
   STATS
===================================================== */

.stats {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 80px 0;
}

.stats h2 {
    font-size: 3rem;
    font-weight: 800;
}

.stats p {
    opacity: .9;
}

/* =====================================================
   GALLERY
===================================================== */

.gallery {
    padding: 100px 0;
}

.gallery img {
    height: 300px;
    width: 100%;
    object-fit: cover;
    transition: .4s;
    cursor: pointer;
}

.gallery img:hover {
    transform: scale(1.05);
}

.gallery-item img {
    height: 280px;
    width: 100%;
    object-fit: cover;
    transition: .4s;
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* =====================================================
   TESTIMONIALS
===================================================== */

.testimonials {
    background: #f1f5f9;
    padding: 100px 0;
}

.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}

.testimonial-card p {
    margin: 20px 0;
    font-style: italic;
    color: var(--gray);
}

.testimonial-card h5 {
    font-weight: 700;
    color: var(--primary);
}

/* =====================================================
   FOOTER
===================================================== */

footer {
    background: var(--dark);
    color: white;
    padding: 80px 0 30px;
}

footer h4,
footer h5 {
    margin-bottom: 20px;
}

footer p {
    color: #cbd5e1;
}

footer ul {
    padding-left: 0;
}

footer ul li {
    margin-bottom: 10px;
}

footer a {
    color: #cbd5e1;
    transition: .3s;
}

footer a:hover {
    color: var(--gold);
}

footer hr {
    border-color: #334155;
    margin: 40px 0;
}

/* =====================================================
   BUTTONS
===================================================== */

.btn-primary {
    background: var(--secondary);
    border: none;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-outline-primary {
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline-primary:hover {
    background: var(--secondary);
    color: white;
}

/* =====================================================
   ANIMATIONS
===================================================== */

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

/* =====================================================
   SCROLLBAR
===================================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #e2e8f0;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

/* =====================================================
   PAGE HEADER
===================================================== */

.page-header {
    background: linear-gradient(rgba(15, 23, 42, .85), rgba(15, 23, 42, .85)), url('../images/about/banner.jpg');
    background-size: cover;
    background-position: center;
    padding: 180px 0 100px;
    text-align: center;
    color: white;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

/* =====================================================
   TIMELINE
===================================================== */

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #1E40AF;
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
    padding-left: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1E40AF;
}

/* =====================================================
   GALLERY FILTER BUTTONS
===================================================== */

.filter-buttons .btn {
    margin: 5px;
    border-radius: 30px;
    padding: 10px 20px;
    font-weight: 600;
}

.filter-buttons .active {
    background: #1E40AF;
    color: white !important;
    border-color: #1E40AF;
}

/* =====================================================
   CONTACT PAGE
===================================================== */

.map iframe {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
}

/* WHATSAPP BUTTON */

.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .3);
    z-index: 9999;
    transition: .3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* =====================================================
   LIGHTBOX
===================================================== */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* =====================================================
   BACK TO TOP
===================================================== */

.back-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #1E40AF;
    color: white;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
}

.back-top.show {
    opacity: 1;
    visibility: visible;
}

.back-top:hover {
    background: #2563EB;
}

/* =====================================================
   RECRUTEMENT
===================================================== */

.section-box {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
    margin-bottom: 30px;
}

.job-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: .3s;
    height: 100%;
}

.job-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
}

.job-card h5 {
    color: var(--primary);
    font-weight: 700;
}

.form-control,
.form-select {
    border-radius: 10px;
    padding: 12px;
}

.btn-gold {
    background: var(--gold);
    color: var(--dark);
    font-weight: 700;
    border-radius: 30px;
    padding: 12px;
    width: 100%;
}

.btn-gold:hover {
    background: #f59e0b;
}

.success-msg {
    display: none;
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 10px;
    margin-top: 15px;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 3.3rem;
    }
}

@media (max-width: 992px) {
    .hero-content {
        text-align: center;
        align-items: center;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .about {
        text-align: center;
    }
    
    .about ul {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.3rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .about h2 {
        font-size: 2rem;
    }
    
    .cta h2 {
        font-size: 2rem;
    }
    
    .stats h2 {
        font-size: 2.2rem;
    }
    
    .gallery img {
        height: 250px;
    }
    
    html[lang="ar"] .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand span {
        font-size: 1.1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .btn {
        width: 100%;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .cta {
        padding: 80px 0;
    }
    
    html[lang="ar"] .hero-content h1 {
        font-size: 1.8rem;
    }
}

/* =====================================================
   GESTION RTL POUR L'ARABE (UNIFIÉE)
==================================================== */

html.rtl-mode {
    direction: rtl;
}

html.rtl-mode .container,
html.rtl-mode .container-fluid,
html.rtl-mode .row {
    direction: rtl;
}

html.rtl-mode .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

html.rtl-mode .ms-lg-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

html.rtl-mode .ms-lg-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

html.rtl-mode .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

html.rtl-mode .me-1 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}

html.rtl-mode .service-card i,
html.rtl-mode .about li i {
    margin-left: 10px;
    margin-right: 0;
}

html.rtl-mode .btn {
    font-family: 'Noto Sans Arabic', sans-serif;
}

html.rtl-mode p,
html.rtl-mode h1,
html.rtl-mode h2,
html.rtl-mode h3,
html.rtl-mode h4,
html.rtl-mode h5,
html.rtl-mode li,
html.rtl-mode span:not(.fa):not(.fas):not(.fab):not(.far),
html.rtl-mode div:not(.d-flex):not(.row):not(.container) {
    font-family: 'Noto Sans Arabic', sans-serif;
}

html.rtl-mode .fa,
html.rtl-mode .fas,
html.rtl-mode .fab,
html.rtl-mode .far {
    font-family: 'Font Awesome 6 Free' !important;
}

html.rtl-mode .fab {
    font-family: 'Font Awesome 6 Brands' !important;
}

html.rtl-mode .form-control {
    text-align: right;
    font-family: 'Noto Sans Arabic', sans-serif;
}

html.rtl-mode .form-control::placeholder {
    text-align: right;
}

html.rtl-mode .navbar-nav {
    padding-right: 0;
}

html.rtl-mode .navbar-brand span {
    font-family: 'Noto Sans Arabic', sans-serif;
}

html.rtl-mode footer ul {
    padding-right: 0;
}

html.rtl-mode footer ul li {
    list-style: none;
}

html.rtl-mode .timeline-item {
    text-align: right;
}

html.rtl-mode .service-card {
    text-align: right;
}

html.rtl-mode .filter-buttons .btn {
    font-family: 'Noto Sans Arabic', sans-serif;
    margin: 0 5px;
}

html.rtl-mode .d-flex.gap-4 {
    flex-direction: row-reverse;
}

html.rtl-mode .d-flex.gap-3 {
    flex-direction: row-reverse;
}

html.rtl-mode .language-selector {
    margin-right: 0;
    margin-left: 1rem;
}

html.rtl-mode .language-selector select {
    text-align: right;
    padding-right: 12px;
    padding-left: 30px;
    background-position: left 10px center;
    direction: ltr;
}

html.rtl-mode .language-selector select option {
    direction: ltr;
}

html.rtl-mode .about {
    padding-right: 0;
}

html.rtl-mode .about li {
    display: flex;
    align-items: center;
    gap: 10px;
}

html.rtl-mode .about li i {
    order: 0;
}

html.rtl-mode .job-card {
    text-align: right;
}

html.rtl-mode .section-box h2 {
    text-align: right;
}

html.rtl-mode .testimonial-card {
    text-align: right;
}

html.rtl-mode .stats .col-md-3 {
    text-align: center;
}

html.rtl-mode .gallery .col-md-4 {
    text-align: center;
}

html.rtl-mode .gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

html.rtl-mode .btn-warning.ms-lg-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

@media (max-width: 768px) {
    html.rtl-mode .d-flex.flex-column {
        align-items: center !important;
    }
    
    html.rtl-mode .text-center.text-md-start {
        text-align: center !important;
    }
}

/* =====================================================
   ALPHABET ARABE
===================================================== */

.alphabet-table {
    font-size: 1.2rem;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
}

.alphabet-table thead th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    padding: 15px 20px;
    border: none;
}

.alphabet-table tbody td {
    padding: 12px 20px;
    vertical-align: middle;
    border-color: #e9ecef;
}

.alphabet-table tbody tr:hover {
    background: #f8f9fa;
}

.alphabet-table tbody td:first-child {
    font-size: 2rem;
    font-family: 'Noto Sans Arabic', 'Segoe UI', sans-serif;
    text-align: center;
    font-weight: 700;
    color: var(--secondary);
}

.alphabet-table tbody td:nth-child(2) {
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

.alphabet-table tbody td:nth-child(3) {
    color: var(--gray);
}

@media (max-width: 768px) {
    .alphabet-table {
        font-size: 0.9rem;
    }
    
    .alphabet-table tbody td:first-child {
        font-size: 1.5rem;
    }
    
    .alphabet-table thead th,
    .alphabet-table tbody td {
        padding: 8px 12px;
    }
}

@media (max-width: 576px) {
    .alphabet-table tbody td:first-child {
        font-size: 1.2rem;
    }
    
    .alphabet-table tbody td:nth-child(2) {
        font-size: 0.75rem;
    }
    
    .alphabet-table tbody td:nth-child(3) {
        font-size: 0.75rem;
    }
}