/* ============================================================
   style.css — Styles personnalisés
   Séverine Jubert – Diététicienne nutritionniste à Langon
   Palette : vert nature (#3a7d44), blanc, gris clair
   Typographie : Playfair Display (titres) + Lato (corps)
   ============================================================ */

/* --------------------------------
   Variables CSS (Custom Properties)
   -------------------------------- */
:root {
    --color-primary:    #3a7d44;
    --color-primary-dark: #2d6235;
    --color-accent:     #6abf69;
    --color-light-bg:   #f4f9f4;
    --color-dark:       #1e1e1e;
    --color-text:       #333333;
    --color-muted:      #777777;
    --font-heading:     'Playfair Display', Georgia, serif;
    --font-body:        'Lato', 'Segoe UI', Tahoma, sans-serif;
}

/* --------------------------------
   Reset / Base
   -------------------------------- */
html,
body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-dark);
}

a {
    color: var(--color-primary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

/* --------------------------------
   Navbar
   -------------------------------- */
.navbar-custom {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: background 0.4s ease, box-shadow 0.4s ease;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.navbar-custom.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.navbar-custom .navbar-brand {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    display: inline-block;
    transition: color 0.3s ease, transform 0.1s ease;
}

.navbar-custom .navbar-brand:hover {
    color: var(--color-primary-dark);
    transform: scale(1.02);
}

.brand-icon {
    color: var(--color-accent);
    margin-right: 0.3rem;
}

.navbar-custom .nav-link {
    color: var(--color-text);
    font-weight: 400;
    padding: 0.5rem 0.9rem;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-origin: content-box;
    background-clip: content-box;
    transition: background-size 0.5s ease, color 0.3s ease;
}

.navbar-custom .nav-link:hover {
    color: var(--color-primary);
    background-size: 100% 2px;
}

.navbar-custom .nav-link.active {
    background: var(--color-primary);
    color: #fff;
    border-radius: 2rem;
}

.navbar-custom .navbar-toggler {
    border-color: rgba(58, 125, 68, 0.3);
}

.navbar-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%233a7d44' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --------------------------------
   Hero Section (Accueil)
   -------------------------------- */
.hero-section {
    min-height: 100vh;
    background: url('media/acceuil/84770f_54542ae0ad9b460e946f767ac8634da3.avif') center / cover no-repeat;
    position: relative;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.45) 100%);
    z-index: 0;
}

.hero-title {
    font-family: var(--font-heading);
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.text-accent {
    color: var(--color-accent);
}

/* Bouton accent */
.btn-accent {
    background: var(--color-accent);
    color: #fff;
    border: none;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-accent:hover {
    background: #5aad59;
    color: #fff;
    transform: translateY(-2px);
}

/* --------------------------------
   Page Banner (sous-pages)
   -------------------------------- */
.page-banner {
    min-height: 45vh;
    background:
        linear-gradient(135deg, rgba(58, 125, 68, 0.75), rgba(45, 98, 53, 0.80)),
        url('media/acceuil/84770f_3ae959ed8ff54fec89d7bd0574b7bf04.avif') center / cover no-repeat;
    position: relative;
    padding-top: 80px;
}

/* Force les titres et sous-titres des bannières en blanc lisible */
.page-banner h1,
.page-banner p {
    color: #ffffff;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* --------------------------------
   Section Titles
   -------------------------------- */
.section-title {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* Centrer le trait quand le titre est centré */
.text-center .section-title::after {
    margin-left: auto;
    margin-right: auto;
}

/* --------------------------------
   Background light custom
   -------------------------------- */
.bg-light-custom {
    background-color: var(--color-light-bg);
}

/* --------------------------------
   Certification Cards
   -------------------------------- */
.cert-card {
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(58, 125, 68, 0.15);
}

.cert-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
}

/* --------------------------------
   Service Cards
   -------------------------------- */
.service-card {
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(58, 125, 68, 0.15);
    border-left-color: var(--color-primary);
}

.service-icon {
    font-size: 2rem;
    color: var(--color-primary);
}

/* --------------------------------
   Step Cards (Méthode)
   -------------------------------- */
.step-card {
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(58, 125, 68, 0.15);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

/* --------------------------------
   Service Block Cards (Services)
   -------------------------------- */
.service-block {
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--color-primary);
}

.service-block:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(58, 125, 68, 0.18);
}

.service-block-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
}

.service-block-title {
    color: var(--color-primary);
    font-family: var(--font-heading);
}

.service-list li {
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(58, 125, 68, 0.08);
    color: var(--color-text);
}

.service-list li:last-child {
    border-bottom: none;
}

.service-list .bi-check-circle-fill {
    color: var(--color-primary);
}

/* --------------------------------
   Link Cards (Liens utiles)
   -------------------------------- */
.link-card {
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.link-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(58, 125, 68, 0.15);
}

.link-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
}

/* --------------------------------
   Contact Info Card
   -------------------------------- */
.contact-info-card {
    border-radius: 1rem;
    background: var(--color-light-bg);
}

/* --------------------------------
   Review Cards (Avis Google)
   -------------------------------- */
.review-card {
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(58, 125, 68, 0.15);
}

.review-stars {
    color: #f5b301;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.review-author {
    color: var(--color-primary);
    font-size: 0.95rem;
}

/* --------------------------------
   CTA Section
   -------------------------------- */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.cta-section h2,
.cta-section p {
    color: #fff;
}

/* --------------------------------
   Image Frame
   -------------------------------- */
.img-frame {
    max-width: 400px;
}

.img-frame img {
    border: 5px solid var(--color-light-bg);
}

/* --------------------------------
   Footer
   -------------------------------- */
.footer-section {
    background: var(--color-dark);
    color: #e0e0e0;
}

.footer-heading {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.footer-link {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-accent);
}

.footer-nav li {
    margin-bottom: 0.35rem;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.25);
}

/* Texte des crédits footer */
.footer-section .small.text-muted {
    color: #b0b0b0 !important;
}

/* --------------------------------
   Form Styles (contact.php)
   -------------------------------- */
.form-control {
    border-radius: 0.75rem;
    border: 1px solid #dee2e6;
    padding: 0.65rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(58, 125, 68, 0.2);
}

/* Email invalide affiché seulement après interaction */
input[type="email"].touched:invalid {
    border-color: #dc3545;
}

/* --------------------------------
   Bouton outline success override
   -------------------------------- */
.btn-outline-success {
    --bs-btn-color: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-bg: var(--color-primary);
    --bs-btn-hover-border-color: var(--color-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--color-primary-dark);
    --bs-btn-active-border-color: var(--color-primary-dark);
}

.btn-success {
    --bs-btn-bg: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-bg: var(--color-primary-dark);
    --bs-btn-hover-border-color: var(--color-primary-dark);
    --bs-btn-active-bg: var(--color-primary-dark);
}

/* --------------------------------
   Utilities & Responsive tweaks
   -------------------------------- */
.z-1 {
    z-index: 1;
}

/* Ajuste le padding pour la navbar fixe */
section:first-of-type {
    scroll-margin-top: 80px;
}

/* Animation supplémentaire pour les cartes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* --------------------------------
   Responsive
   -------------------------------- */

/* Tablette et plus petit */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: 80vh;
    }

    .page-banner {
        min-height: 35vh;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .navbar-custom .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 1rem;
        padding: 1rem;
        margin-top: 0.5rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .navbar-custom .nav-link {
        padding: 0.6rem 1rem;
    }
}

/* Mobile petit */
@media (max-width: 575.98px) {
    .hero-section {
        min-height: 70vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .navbar-custom .navbar-brand {
        font-size: 1.05rem;
    }
}
