/* 
   Société de Déménagement Casablanca 
   Main Stylesheet
*/

/* ----- Reset & Base Styles ----- */
:root {
    --primary-color: #1e7ac2;       /* Bleu principal du logo */
    --secondary-color: #0c5896;     /* Bleu foncé pour contraste */
    --light-color: #f0f5fa;         /* Bleu très clair */
    --accent-color: #ffad00;        /* Couleur dorée/jaune des étoiles */
    --star-color: #ffad00;          /* Couleur des étoiles */
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(30, 122, 194, 0.2);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--secondary-color);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* ----- Buttons ----- */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

/* ----- Exception for primary button ----- */
.btn-primary2 {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn-primary2:hover {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

/*end exception for primary button */

/* Secondary Button */
.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ----- Header & Navigation ----- */
.header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 15px 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 600;
}

.logo span {
    color: var(--secondary-color);
}

.navbar {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
}

.nav-item {
    position: relative;
    margin: 0 15px;
}

.nav-link {
    padding: 10px 15px;
    font-weight: 500;
    font-size: 16px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after, 
.nav-item.active .nav-link::after {
    width: 100%;
}

.nav-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
}

/* Dropdown menu */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 5px;
    font-size: 14px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    width: 220px;
    box-shadow: var(--shadow);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 99;
    padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

    .dropdown-menu a {
        padding: 10px 20px;
        display: block;
        color: var(--primary-color);
        transition: var(--transition);
    }

    .dropdown-menu a:hover {
        background-color: var(--primary-color);
        color: var(--white);
    }
    
    @media (max-width: 768px) {
        .dropdown-menu a {
            font-size: 16px; /* Taille de police légèrement réduite par rapport aux liens principaux */
            padding: 10px 15px; /* Espacement ajusté */
        }
    }/* Contact Buttons */
.contact-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.btn-phone, 
.btn-whatsapp {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--white);
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-phone {
    background-color: var(--primary-color);
}

.btn-whatsapp {
    background-color: #25D366;
}

.btn-contact {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-phone:hover, 
.btn-whatsapp:hover, 
.btn-contact:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
}

.nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* ----- Hero Section ----- */
.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slider {
    height: 100%;
}

.slide {
    position: relative;
    height: 100%;
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: none;
}

.slide.active {
    display: block;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    width: 80%;
    max-width: 800px;
    z-index: 2;
}

.slide-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ----- Services Section ----- */
.services {
    background-color: var(--light-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.service-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: auto; /* Hauteur fixe augmentée */
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-image {
    height: 200px; /* Hauteur fixe pour toutes les images */
    overflow: hidden;
    position: relative;
    width: 100%;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    object-position: center;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: calc(100% - 200px); /* Hauteur qui s'adapte en fonction de la hauteur de l'image */
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.service-icon i {
    font-size: 32px;
    color: var(--accent-color);
}

.service-card h3 {
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}

.service-card p {
    margin-bottom: 20px;
    color: var(--secondary-color);
    flex-grow: 1; /* Pour pousser le bouton vers le bas */
    min-height: 60px; /* Hauteur minimale pour le texte */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-content .btn-secondary {
    align-self: center;
    margin-top: auto; /* Pour positionner le bouton en bas */
}

/* ----- About Section ----- */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1;
}

.about-text .section-header {
    text-align: left;
}

.about-text .section-header h2::after {
    left: 0;
    transform: none;
}

.about-text p {
    margin-bottom: 15px;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ----- CTA Section ----- */
.cta {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 60px 0;
}

.cta h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    margin-bottom: 20px;
}

.cta p {
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

.cta .btn-primary:hover {
    background-color: transparent;
    color: var(--white);
}

/* ----- Contact Info Section ----- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.contact-card {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    background-color: var(--light-color);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.contact-icon i {
    font-size: 24px;
    color: var(--accent-color);
}

.contact-card h3 {
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.contact-card p {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.contact-card a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ----- Footer ----- */
.footer {
    background-color: black;
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-img-logo {
    /* max-width: 200px; */
    height: auto;
    margin-bottom: 15px;
    border-radius: 5px;
    background-color: white;
}

.footer-logo p {
    color: #e0e0e0; /* Plus clair pour un meilleur contraste */
    margin-top: 10px;
}

.footer h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff; /* Blanc pur pour un meilleur contraste */
}

.footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #ffffff; /* Blanc pour un meilleur contraste */
}

.footer-links ul li,
.footer-services ul li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-services a {
    color: #e0e0e0; /* Plus clair pour un meilleur contraste */
    transition: var(--transition);
}

.footer-links a:hover,
.footer-services a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 14px;
}

/* ----- Responsive Design ----- */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .slide-content h2 {
        font-size: 36px;
    }
    
    .slide-content p {
        font-size: 18px;
    }
    
    .section {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        z-index: 200;
    }
    
    .navbar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        box-shadow: var(--shadow);
        transition: 0.4s ease;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        z-index: 150;
        padding-top: 80px; /* Espace pour positionner le menu sous le nav-toggle */
        overflow-y: auto; /* Permet le défilement si le menu est trop grand */
    }
    
    .navbar.active {
        right: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-item {
        margin: 15px 0; /* Augmentation de l'espacement vertical */
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        font-size: 18px; /* Taille de police augmentée */
        padding: 12px 0; /* Plus d'espace autour des liens */
        display: block;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
        margin-top: 10px; /* Ajouter un peu d'espace entre le lien parent et le menu déroulant */
        position: static;
        max-height: 300px; /* Hauteur maximale pour éviter que le menu ne prenne trop de place */
        overflow-y: auto; /* Permet le défilement si nécessaire */
        text-align: left; /* Alignement du texte à gauche pour une meilleure lisibilité */
    }
    
    .dropdown-toggle::after {
        content: '\f107';
    }
    
    .dropdown.active .dropdown-toggle::after {
        content: '\f106';
    }
    
    /* Style amélioré pour les éléments du menu déroulant en mobile */
    .dropdown-menu li {
        margin: 8px 0;
    }
    
    /* Les contact-buttons sont déjà flottants et verticaux pour toutes les tailles d'écran */
    
    .btn-phone, 
    .btn-whatsapp {
        width: 45px;
        height: 45px;
    }
    
    .hero {
        height: 500px;
    }
    
    .slide-content h2 {
        font-size: 28px;
    }
    
    .slide-content p {
        font-size: 16px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .hero {
        height: 400px;
    }
    
    .slide-content h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .slide-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .btn-primary, 
    .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* Media Queries pour la grille de services */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}
.logo-img {
    max-width: 200px; /* Ajustez la taille maximale de l'image du logo */
    height: auto; /* Assurez-vous que la hauteur s'ajuste automatiquement */
    display: block;
    margin: 0 auto; /* Centrer le logo */
}
