/* ============================================
   RAVAL'EST - Site vitrine
   Feuille de style principale
   ============================================ */

/* --- Simulateur Reonic --- */
.reonic-simulator {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    min-height: 400px;
}

/* --- Contenu légal (mentions, RGPD...) --- */
.legal-content {
    max-width: 820px;
    margin: 0 auto;
    line-height: 1.7;
}

.legal-content h2 {
    margin-top: 2em;
    margin-bottom: 0.6em;
    font-size: 1.4rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p { margin-bottom: 1em; }

.legal-content .legal-list {
    list-style: none;
    margin: 0 0 1.5em;
    padding: 16px 20px;
    background: var(--color-bg-alt);
    border-left: 3px solid var(--color-primary);
    border-radius: 4px;
}

.legal-content .legal-list li {
    padding: 4px 0;
}

.legal-content .legal-list strong {
    color: var(--color-primary-dark);
    display: inline-block;
    min-width: 180px;
}

.legal-content .legal-update {
    margin-top: 2em;
    color: var(--color-text-light);
    font-size: 0.9rem;
    text-align: right;
}


/* --- Reset & base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #2C5F7C;        /* bleu ardoise */
    --color-primary-dark: #1F4659;
    --color-primary-light: #4A8AAB;
    --color-accent: #E8A33D;         /* orange chaleureux pour les CTA */
    --color-text: #2A2A2A;
    --color-text-light: #5A5A5A;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F5F7F9;
    --color-border: #E0E4E8;

    --font-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    --container-width: 1200px;
    --header-height: 110px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 6px;
    --transition: 0.25s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-primary-dark);
    margin-bottom: 0.6em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }

p { margin-bottom: 1em; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header / Navigation --- */
.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    height: calc(var(--header-height) - 20px);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.logo img {
    height: 100%;
    width: auto;
    max-height: 90px;
    display: block;
}

.logo span {
    color: var(--color-accent);
}

.main-nav ul {
    display: flex;
    gap: 8px;
    list-style: none;
}

.main-nav a {
    display: block;
    padding: 10px 16px;
    color: var(--color-text);
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--color-primary);
    color: #fff;
}

/* Burger menu (mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--color-primary);
    margin: 5px 0;
    border-radius: 2px;
    transition: all var(--transition);
}

/* --- Hero --- */
.hero {
    background: var(--color-primary);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero-inner {
    position: relative;
}

.hero h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 0.4em;
}

.hero .lead {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2em;
    opacity: 0.95;
}

.hero-page {
    padding: 60px 0;
    text-align: left;
}

.hero-page h1 { font-size: 2.4rem; }

/* --- Boutons --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background: #d6912e;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: var(--color-primary);
}

/* --- Sections génériques --- */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    margin-bottom: 0.3em;
}

.section-title p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* --- Grille de services (accueil) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.service-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all var(--transition);
    color: var(--color-text);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.service-card .icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
}

.service-card h3 {
    color: var(--color-primary-dark);
    margin-bottom: 12px;
}

.service-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.service-card .read-more {
    font-weight: 600;
    color: var(--color-primary);
}

/* --- Pages métier (deux colonnes) --- */
.content-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.content-two-col .image-placeholder {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    border-radius: var(--radius);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-style: italic;
    box-shadow: var(--shadow-md);
}

.content-two-col .image-frame {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 4 / 3;
}

.content-two-col .image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.content-two-col .image-frame:hover img {
    transform: scale(1.04);
}

/* --- Galerie / item d'image --- */
.gallery-item {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

/* --- Carrousel de réalisations --- */
.carousel {
    position: relative;
    padding: 0 50px;
}

.carousel-viewport {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.45s ease;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 calc(100% / 3);
    padding: 0 8px;
    box-sizing: border-box;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--color-primary);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.carousel-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: #fff;
}

.carousel-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #C5D0DA;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition);
}

.carousel-dot:hover {
    background: var(--color-primary-light);
}

.carousel-dot.active {
    background: var(--color-primary);
    transform: scale(1.3);
}

@media (max-width: 900px) {
    .carousel-slide { flex: 0 0 50%; }
    .carousel { padding: 0 40px; }
}

@media (max-width: 600px) {
    .carousel-slide { flex: 0 0 100%; }
    .carousel { padding: 0 36px; }
    .carousel-btn { width: 36px; height: 36px; font-size: 1.4rem; }
}

.feature-list {
    list-style: none;
    margin: 20px 0;
}

.feature-list li {
    padding: 8px 0 8px 32px;
    position: relative;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 8px;
    width: 22px;
    height: 22px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
}

/* --- Bandeau CTA --- */
.cta-banner {
    background: var(--color-primary);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.cta-banner h2 {
    color: #fff;
    margin-bottom: 0.5em;
}

.cta-banner p {
    font-size: 1.1rem;
    margin-bottom: 1.5em;
    opacity: 0.95;
}

/* --- Formulaire de contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info h3 {
    margin-bottom: 20px;
}

.contact-info ul {
    list-style: none;
}

.contact-info li {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.contact-info strong {
    display: block;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.contact-form {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text);
    font-size: 0.95rem;
}

label .required {
    color: #d33;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition);
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(44, 95, 124, 0.15);
}

textarea {
    resize: vertical;
    min-height: 140px;
}

/* Honeypot anti-spam (caché) */
.hp-field {
    position: absolute;
    left: -9999px;
}

.form-message {
    padding: 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.form-message.success {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #b8dfc4;
}

.form-message.error {
    background: #fde8e8;
    color: #b91c1c;
    border: 1px solid #f5c2c2;
}

/* --- Footer --- */
.site-footer {
    background: #1A2A35;
    color: #C5D0DA;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    background: #2D404F;
}

.footer-map iframe {
    width: 100%;
    height: 200px;
    border: 0;
    display: block;
    filter: grayscale(20%);
}

.site-footer h4 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.site-footer ul {
    list-style: none;
}

.site-footer li {
    padding: 4px 0;
}

.site-footer a {
    color: #C5D0DA;
}

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

.footer-bottom {
    border-top: 1px solid #2D404F;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #8B9AA8;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2.2rem; }
    h2 { font-size: 1.6rem; }

    .menu-toggle { display: block; }

    .main-nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--color-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-nav.open {
        max-height: 500px;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 16px;
        gap: 4px;
    }

    .main-nav a {
        display: block;
        padding: 12px 16px;
    }

    .content-two-col,
    .contact-grid,
    .form-row,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section { padding: 50px 0; }
    .hero { padding: 70px 0; }
}
