/*=================================
    CORRECTIONS FINALES - Airsoft SARL
    Optimisations et corrections
==================================*/

/* ===== RESET ET CORRECTIONS GLOBALES ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== HEADER FIXE ===== */
.th-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    transition: all 0.3s ease;
}

.header-top {
    min-height: auto;
}

.sticky-wrapper.sticky {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ===== ESPACEMENT APRÈS HEADER ===== */
body > .th-hero-wrapper,
body > section:first-of-type {
    padding-top: 0;
}

/* ===== CONTAINER ET ALIGNEMENT ===== */
.container {
    max-width: 1200px;
    padding-left: 15px;
    padding-right: 15px;
}

/* ===== IMAGES RESPONSIVES ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.course-card_img img,
.img-box1 img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* ===== CARDS ET BOXES ===== */
.course-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.course-card_img {
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.course-card_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-card_img img {
    transform: scale(1.05);
}

.course-card_content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ===== SECTIONS ===== */
section {
    position: relative;
    overflow: hidden;
}

.space {
    padding: 80px 0;
}

.space-top {
    padding-top: 80px;
}

.space-bottom {
    padding-bottom: 80px;
}

/* ===== TITRES ===== */
.sec-title {
    font-size: 38px;
    line-height: 1.3;
    margin-bottom: 15px;
    font-weight: 700;
}

.box-title {
    font-size: 22px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.sub-title {
    display: inline-block;
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== BOUTONS ===== */
.th-btn {
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border-radius: 5px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    text-decoration: none;
}

.th-btn:focus {
    outline: none;
}

/* ===== LIENS ===== */
a {
    text-decoration: none;
    transition: all 0.3s ease;
}

a:focus {
    outline: none;
}

.line-btn {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    gap: 8px;
}

.line-btn:hover {
    gap: 12px;
}

/* ===== SLIDER ET SWIPER ===== */
.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
}

/* ===== CAROUSEL BOOTSTRAP ===== */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.7;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1);
}

/* ===== PARTENAIRES ===== */
.carousel-item .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.carousel-item .course-card {
    margin: 0 auto;
}

/* ===== INFO BOX ===== */
.info-box {
    padding: 25px;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-box_icon {
    font-size: 32px;
    min-width: 50px;
}

.info-box_subtitle {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-box_text {
    font-size: 14px;
    line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer-wrapper {
    padding: 40px 0 0;
}

.widget-area {
    padding: 40px 0;
}

.copyright-wrap {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

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

.scroll-top:hover {
    transform: translateY(-5px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease;
}

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

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .sec-title {
        font-size: 34px;
    }
    
    .space {
        padding: 70px 0;
    }
}

/* Tablette */
@media (max-width: 991px) {
    .sec-title {
        font-size: 30px;
    }
    
    .space {
        padding: 60px 0;
    }
    
    .course-card_img {
        height: 240px;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* Tablette Portrait */
@media (max-width: 767px) {
    .sec-title {
        font-size: 26px;
    }
    
    .box-title {
        font-size: 20px;
    }
    
    .space {
        padding: 50px 0;
    }
    
    .course-card_img {
        height: 220px;
    }
    
    .info-box {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .info-box_icon {
        margin: 0 auto;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
    }
    
    .footer-wrapper {
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 575px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .sec-title {
        font-size: 24px;
    }
    
    .box-title {
        font-size: 18px;
    }
    
    .sub-title {
        font-size: 13px;
    }
    
    .space {
        padding: 40px 0;
    }
    
    .course-card_img {
        height: 200px;
    }
    
    .course-card_content {
        padding: 15px;
    }
    
    .scroll-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
    
    .info-box {
        padding: 15px;
    }
}

/* Très petit mobile */
@media (max-width: 380px) {
    .sec-title {
        font-size: 22px;
    }
    
    .box-title {
        font-size: 17px;
    }
    
    .course-card_img {
        height: 180px;
    }
}

/* ===== CORRECTIONS SPÉCIFIQUES ===== */

/* Fix débordement horizontal */
.row {
    margin-left: -15px;
    margin-right: -15px;
}

.col, [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* Fix slider Swiper */
.th-slider {
    position: relative;
}

.th-slider .swiper-wrapper {
    align-items: center;
}

/* Fix images partenaires */
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fix menu sticky */
.sticky-wrapper.sticky .menu-area {
    padding: 10px 0 !important;
}

.sticky-wrapper.sticky .header-logo img {
    max-height: 50px !important;
}

/* Fix z-index */
.th-header {
    z-index: 999 !important;
}

.cursor,
.cursor2 {
    z-index: 10000 !important;
}

.sidemenu-wrapper {
    z-index: 9999 !important;
}

.th-menu-wrapper {
    z-index: 9998 !important;
}

/* Fix transitions */
* {
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Fix hover states */
.course-card,
.service-box,
.info-box,
.th-btn {
    transition: all 0.3s ease;
}

/* Performance optimizations */
.th-hero-bg,
.course-card_img,
.global-img,
.global-image {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Fix scroll smooth */
html {
    scroll-padding-top: 100px;
}

/* Fix animations WeAreBrand compatibility */
[class*="wearebrand-"] {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ===== ACCESSIBILITÉ ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

img[alt=""],
img:not([alt]) {
    border: 2px solid red; /* Aide au développement */
}

/* ===== PRINT ===== */
@media print {
    .th-header,
    .footer-wrapper,
    .scroll-top,
    .slider-arrow,
    .cursor,
    .cursor2 {
        display: none !important;
    }
}
