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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #faf9f7;
    color: #333;
    overflow-x: hidden;
}

.gradient-bg {
    background: linear-gradient(135deg, #fea018 0%, #b21318 100%);
}


/* Header */

header {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 80px;
    /* hauteur fixe */
    position: relative;
    /* pour positionnement absolu de logo */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* fait aller les liens vers la droite */
}

.logo {
    position: absolute;
    /* pour sortir du flux */
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    
    display: flex;
    align-items: center;
}

.logo img {
    height: 120px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #fea018 0%, #b21318 100%);
    transition: width 0.3s;
}

.nav-links a:hover:after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: linear-gradient(135deg, #fea018 0%, #b21318 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* Hero Section */

.hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('/assets/img/back2.jpg');
    /* chemin relatif depuis la racine public */
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    max-width: 900px;
    padding: 2rem;
}


/* Container pour les photos animées */

.slider {
    position: absolute;
    bottom: 30px;
    /* Ajuste la position verticale */
    left: 0;
    width: 100%;
    overflow: hidden;
    height: 180px;
    /* Hauteur des images */
    z-index: 1;
    /* Derrière le texte */
}

.slider-track {
    display: flex;
    width: calc(6 * 300px);
    /* 6 images de 300px */
    animation: slideLeft 20s linear infinite;
}

.slider-track img {
    width: 300px;
    height: 180px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


/* Animation pour glisser vers la gauche */

@keyframes slideLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 8.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    /* met le texte en majuscule */
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.experience-badge {
    display: inline-block;
    background: white;
    color: #b21318;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}


/* Search Section */

.search-section {
    background: white;
    padding: 3rem 2rem;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-top: -15px;
    z-index: 10;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 20px;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #fea018;
}


/* On met le bouton sur toute la largeur, puis on centre son contenu */

.search-btn {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #fea018 0%, #b21318 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(254, 160, 24, 0.4);
}


/* Services Section */

.services {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 4rem;
    font-size: 1.2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

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

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #fea018 0%, #b21318 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}


/* categories*/

.categories {
    padding: 4rem 0;
    width: 100%;
}

.categories-container {
    width: 100%;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 3rem;
}

.categories-mosaic {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 200px);
    gap: 15px;
    border-radius: 20px;
    overflow: hidden;
}

.category-cell {
    position: relative;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: all 0.4s ease;
    overflow: hidden;
    border-radius: 10px;
}

.category-cell:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}


/* Dimensions différentes pour chaque catégorie */

.villa {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    background-image: url('/assets/img/villa.jpg');
}

.riad {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
    background-image: url('/assets/img/riad.jpg');
}

.appartement {
    grid-column: 5 / 7;
    grid-row: 1 / 3;
    background-image: url('/assets/img/app.jpg');
}

.hotel {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    background-image: url('/assets/img/hotel.jpg');
}

.local {
    grid-column: 4 / 5;
    grid-row: 2 / 3;
    background-image: url('/assets/img/local.jpg');
}

.maison {
    grid-column: 1 / 3;
    grid-row: 3 / 5;
    background-image: url('/assets/img/maison.jpg');
}

.terrain {
    grid-column: 3 / 5;
    grid-row: 3 / 4;
    background-image: url('/assets/img/terrain.jpg');
}

.bureau {
    grid-column: 5 / 7;
    grid-row: 3 / 4;
    background-image: url('/assets/img/bureau.jpg');
}

.maison-hotes {
    grid-column: 3 / 4;
    grid-row: 4 / 5;
    background-image: url('/assets/img/villa.jpg');
}

.duplex {
    grid-column: 4 / 5;
    grid-row: 4 / 5;
    background-image: url('/assets/img/duplex.jpg');
}

.studio {
    grid-column: 5 / 6;
    grid-row: 4 / 5;
    background-image: url('/assets/img/studio.jpg');
}

.ferme {
    grid-column: 6 / 7;
    grid-row: 4 / 5;
    background-image: url('/assets/img/ferme.jpg');
}

.category-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    transition: background 0.3s ease;
    padding: 1rem;
}

.category-cell:hover .category-overlay {
    background: linear-gradient(135deg, rgba(254, 160, 24, 0.3) 0%, rgba(178, 19, 24, 0.3) 100%);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.category-title {
    color: white;
    background: rgba(0, 0, 0, 0.25);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-align: center;
}

.category-count {
    color: white;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.95;
    background: rgba(0, 0, 0, 0.25);
    ;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

@media (max-width: 1024px) {
    .categories-mosaic {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(6, 180px);
    }
    .villa {
        grid-column: 1 / 3;
        grid-row: 1 / 3;
    }
    .riad {
        grid-column: 3 / 5;
        grid-row: 1 / 2;
    }
    .appartement {
        grid-column: 3 / 5;
        grid-row: 2 / 3;
    }
    .hotel {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }
    .local {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
    }
    .maison {
        grid-column: 3 / 5;
        grid-row: 3 / 5;
    }
    .terrain {
        grid-column: 1 / 3;
        grid-row: 4 / 5;
    }
    .bureau {
        grid-column: 1 / 3;
        grid-row: 5 / 6;
    }
    .maison-hotes {
        grid-column: 3 / 4;
        grid-row: 5 / 6;
    }
    .duplex {
        grid-column: 4 / 5;
        grid-row: 5 / 6;
    }
    .studio {
        grid-column: 1 / 2;
        grid-row: 6 / 7;
    }
    .ferme {
        grid-column: 2 / 3;
        grid-row: 6 / 7;
    }
}

@media (max-width: 768px) {
    .categories-mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(12, 160px);
        gap: 10px;
    }
    .villa,
    .riad,
    .appartement,
    .hotel,
    .local,
    .maison,
    .terrain,
    .bureau,
    .maison-hotes,
    .duplex,
    .studio,
    .ferme {
        grid-column: auto;
        grid-row: auto;
    }
    .section-title {
        font-size: 2rem;
    }
    .category-title {
        font-size: 1.1rem;
    }
    .category-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .categories-container {
        padding: 0 1rem;
    }
    .categories-mosaic {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(12, 180px);
    }
}


/* Properties Section */

.properties {
    padding: 6rem 3rem;
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fea018 0%, #b21318 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 4rem;
}

.properties-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.properties-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease;
}

.property-card {
    min-width: calc(25% - 1.5rem);
    flex-shrink: 0;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    cursor: pointer;
    /* 👉 Ajoute ceci */
    height: 520px;
    
    /* tu peux ajuster selon ton design */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.property-image {
    height: 350px;
    background-image: url('/assets/img/villa.jpg');
    position: relative;
    overflow: hidden;
}

.property-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.property-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: white;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #b21318;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.property-info {
    padding: 2rem;
}

.property-price {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fea018 0%, #b21318 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.8rem;
}

.property-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
}

.property-details {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.property-details span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-details i {
    color: #fea018;
    font-size: 1.1rem;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.slider-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fea018 0%, #b21318 100%);
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(178, 19, 24, 0.3);
}

.slider-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(178, 19, 24, 0.4);
}

.slider-btn:active {
    transform: scale(0.95);
}

.slider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Responsive */

@media (max-width: 1400px) {
    .property-card {
        min-width: calc(33.333% - 1.33rem);
    }
}

@media (max-width: 1024px) {
    .property-card {
        min-width: calc(50% - 1rem);
    }
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .properties {
        padding: 4rem 1.5rem;
    }
    .property-card {
        min-width: 100%;
    }
    .section-title {
        font-size: 2rem;
    }
    .property-image {
        height: 250px;
    }
}


/* About Section */

.about {
    padding: 6rem 2rem;
    background: white;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    height: 500px;
    background-image: url('/assets/img/aboutryad.png');
    border-radius: 20px;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-content p {
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}


/* Floating Buttons */

.floating-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

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

.whatsapp-btn {
    background: #25D366;
}

.chat-btn {
    background: linear-gradient(135deg, #fea018 0%, #b21318 100%);
}


/* Modal */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.modal-content h2 {
    margin-bottom: 2rem;
    color: #333;
}

.form-group-modal {
    margin-bottom: 1.5rem;
}

.form-group-modal input,
.form-group-modal textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
}

.form-group-modal textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #fea018 0%, #b21318 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}


/* Footer */

footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #fea018;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 2;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #888;
}


/* Responsive */

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu {
        display: block;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .search-form {
        grid-template-columns: 1fr;
    }
    .property-card {
        min-width: calc(100% - 1rem);
    }
    .about-container {
        grid-template-columns: 1fr;
    }
    .floating-buttons {
        bottom: 1rem;
        right: 1rem;
    }
}


/* Responsive : menu mobile */

@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
        /* caché par défaut sur mobile */
        flex-direction: column;
        background-color: white;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 2rem;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .mobile-menu {
        display: block;
    }
}
