body, h1, h2, h3, h4, h5, h6 {
    font-family: "Raleway", sans-serif;
}

body, html {
    height: 100%;
    line-height: 1.8;
    scroll-behavior: smooth;
}

/* Margin & responsive */
@media screen and (max-width: 768px) {
  .w3-padding-64 {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
}

/* Full height image header */
.bgimg-1 {
    background-position: center;
    background-size: cover;
    background-image: url("../img/maison-accueil.jpg");
    min-height: 100%;
    position: relative;
}

.bgimg-1::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
}

@media screen and (max-width: 768px) {
  .bgimg-1 {
    background-position: center top;
    transform: translateY(-40px);
  }
}

/* Hero text box with semi-transparent background */
.hero-glass {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 20px;
    display: inline-block;
}

/* Section Expertise */
@media screen and (max-width: 768px) {
  .w3-padding-64 {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  /* Ajout d'un espacement au-dessus du titre "Mon expertise" sur mobile
     pour éviter qu'il soit collé à l'image (toulousaine.jpg) */
  #expertise h2 {
    margin-top: 32px;
  }
}

@media screen and (max-width: 768px) {
  #expertise .w3-col:first-child {
    margin-top: 32px;
  }
}

/* Testimonial styling */
.testimonial-card {
    padding: 32px 16px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px 0 rgba(0,0,0,0.2);
}

.testimonial-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin: 0 auto 16px auto;
    border: 3px solid #f1f1f1;
}

.testimonial-stars {
    color: #f9a825;
    padding-top: 16px;
}

/* Contact section styling */
.contact-card {
    height: 100%;
    padding: 16px;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px 0 rgba(0,0,0,0.2);
}

.social-icons a {
    margin-right: 16px;
    color: #000;
    text-decoration: none;
    font-size: 24px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #3498db;
}

/* Modal styling */
.w3-modal {
    padding-top: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    border-radius: 20px;
    max-width: 800px;
    margin: auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-60%);
        opacity: 0;
    }
    to {
        transform: translateY(-50%);
        opacity: 1;
    }
}

.modal-header {
    background-color: #f8f9fa;
    border-radius: 20px 20px 0 0;
    padding: 25px 30px;
    position: relative;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.modal-close {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: #95a5a6;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    transform: translateY(-50%) rotate(90deg);
}

.modal-body {
    padding: 35px;
    color: #576574;
    line-height: 1.8;
    font-size: 16px;
}

.modal-body p {
    margin-bottom: 20px;
}

.modal-body strong {
    color: #2c3e50;
    font-weight: 600;
}

.modal-footer {
    padding: 25px;
    text-align: right;
    background-color: #f8f9fa;
    border-radius: 0 0 20px 20px;
    border-top: 1px solid #eee;
}

.modal-button {
    background-color: #3498db;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.2);
}

.modal-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.modal-button:active {
    transform: translateY(0);
}

/* Animations */
.w3-animate-left {
    animation: animateleft 0.4s;
}

@keyframes animateleft {
    from {
        left: -300px;
        opacity: 0;
    }
    to {
        left: 0;
        opacity: 1;
    }
}

/* Hover effects */
.w3-button {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.w3-card {
    transition: box-shadow 0.3s ease;
}

.w3-card:hover {
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .testimonial-card, .contact-card {
        margin-bottom: 16px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
        top: 0;
        transform: none;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 24px;
    }
    
    .modal-body {
        padding: 25px;
    }
    
    .modal-footer {
        padding: 20px;
    }
    
    .w3-modal {
        padding-top: 50px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
