/*
Theme Name: Clain Vision - Elementor
Theme URI: https://clain-vision.fr
Author: Agence Scoop Communication
Author URI: https://scoop-communication.fr
Description: Thème WordPress Elementor pour Clain Vision - Opticien à Saint-Maixent-l'École
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clain-vision
Tags: elementor, optician, glasses, responsive, custom-logo, custom-menu, featured-images
*/

/* ========================================
   BASE STYLES
   ======================================== */

:root {
    --color-primary: #3A7A7E;
    --color-primary-dark: #2D5F62;
    --color-primary-light: #D4E5E6;
    --color-wood: #C9B896;
    --color-wood-light: #E8DCC8;
    --color-white: #FFFFFF;
    --color-text: #333333;
    --color-text-light: #666666;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-primary);
}

h1 {
    font-size: 48px;
}

h2 {
    font-size: 36px;
}

h3 {
    font-size: 28px;
}

p {
    margin-bottom: 1rem;
}

/* ========================================
   HEADER
   ======================================== */

.cv-header {
    width: 100%;
}

.cv-header-top {
    position: relative;
    padding: 24px 16px;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.cv-header-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
}

.cv-logo-container {
    position: relative;
    z-index: 1;
}

.cv-logo {
    max-height: 96px;
    width: auto;
    margin: 0 auto;
}

.cv-tagline {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.5px;
}

.cv-tagline span {
    font-weight: 400;
}

/* Navigation */
.cv-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
    border-bottom: 1px solid #e5e5e5;
    transition: box-shadow 0.3s ease;
}

.cv-nav.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cv-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.cv-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    flex: 1;
    justify-content: center;
}

.cv-menu li {
    position: relative;
}

.cv-menu a {
    display: block;
    padding: 16px 0;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    position: relative;
}

.cv-menu a::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.cv-menu a:hover::after,
.cv-menu .current-menu-item a::after {
    transform: scaleX(1);
}

.cv-menu .current-menu-item a {
    color: var(--color-primary);
}

.cv-nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: var(--color-white) !important;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
}

.cv-nav-cta:hover {
    background: var(--color-primary-dark);
    transform: scale(1.02);
}

/* Mobile Menu */
.cv-mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.cv-mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    color: #333;
}

/* ========================================
   HERO SECTION
   ======================================== */

.cv-hero {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.cv-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.cv-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
    padding: 0 16px;
    max-width: 800px;
}

.cv-hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-white);
}

.cv-hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.8;
}

.cv-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
}

.cv-hero-cta:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
    transform: scale(1.02);
}

/* ========================================
   BUTTONS
   ======================================== */

.cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.cv-btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.cv-btn-primary:hover {
    background: var(--color-primary-dark);
    color: var(--color-white);
}

.cv-btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.cv-btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.cv-btn-white {
    background: var(--color-white);
    color: var(--color-primary);
}

.cv-btn-white:hover {
    background: var(--color-primary-light);
}

/* ========================================
   SECTIONS
   ======================================== */

.cv-section {
    padding: 64px 16px;
}

.cv-section-teal {
    background: var(--color-primary-light);
}

.cv-section-gray {
    background: #f5f5f5;
}

.cv-section-wood {
    background-size: cover;
    background-position: center;
}

.cv-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cv-section-header {
    text-align: center;
    margin-bottom: 48px;
}

.cv-section-title {
    font-size: 36px;
    margin-bottom: 8px;
}

.cv-section-subtitle {
    font-size: 18px;
    color: var(--color-primary);
}

.cv-divider {
    width: 64px;
    height: 2px;
    background: var(--color-primary);
    margin: 24px 0;
}

.cv-divider-center {
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */

.cv-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.cv-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .cv-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cv-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   CARDS
   ======================================== */

.cv-card {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cv-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cv-card:hover .cv-card-image {
    transform: scale(1.05);
}

/* ========================================
   FEATURE DIAMONDS
   ======================================== */

.cv-diamonds {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.cv-diamond {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cv-diamond-shape {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.cv-diamond-shape:hover {
    transform: scale(1.05);
}

.cv-diamond-bg {
    position: absolute;
    inset: 0;
    background: var(--color-white);
    border: 3px solid var(--color-primary);
    transform: rotate(45deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cv-diamond-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 16px;
}

.cv-diamond-icon {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.cv-diamond-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.3;
    max-width: 80px;
}

@media (min-width: 768px) {
    .cv-diamonds {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .cv-diamond-shape {
        width: 160px;
        height: 160px;
    }
    
    .cv-diamond-icon {
        width: 40px;
        height: 40px;
    }
    
    .cv-diamond-text {
        font-size: 13px;
    }
}

/* ========================================
   BRAND CAROUSEL
   ======================================== */

.cv-brands {
    position: relative;
    padding: 0 48px;
}

.cv-brands-track {
    display: flex;
    gap: 48px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 16px 0;
}

.cv-brands-track::-webkit-scrollbar {
    display: none;
}

.cv-brand {
    flex-shrink: 0;
    width: 120px;
    transition: transform 0.3s ease;
}

.cv-brand:hover {
    transform: scale(1.1);
}

.cv-brand img {
    width: 100%;
    height: 60px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.cv-brand:hover img {
    filter: grayscale(0%);
}

.cv-brands-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #999;
    transition: color 0.3s ease;
}

.cv-brands-nav:hover {
    color: var(--color-primary);
}

.cv-brands-prev {
    left: 0;
}

.cv-brands-next {
    right: 0;
}

/* ========================================
   CONTACT FORM
   ======================================== */

.cv-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

@media (min-width: 768px) {
    .cv-form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cv-input,
.cv-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: var(--color-white);
    transition: border-color 0.3s ease;
}

.cv-input:focus,
.cv-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.cv-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ========================================
   MAP
   ======================================== */

.cv-map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cv-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========================================
   TESTIMONIAL
   ======================================== */

.cv-testimonial {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.cv-testimonial-text {
    font-family: var(--font-serif);
    font-size: 22px;
    font-style: italic;
    color: var(--color-primary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.cv-testimonial-author {
    color: var(--color-text-light);
    font-size: 14px;
}

/* ========================================
   SOCIAL FEED
   ======================================== */

.cv-social {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.cv-social-content {
    text-align: center;
}

.cv-social-icon {
    width: 40px;
    height: 40px;
    color: #1877f2;
    margin: 0 auto 16px;
}

.cv-social-title {
    font-size: 28px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.cv-social-hashtag {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.cv-social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cv-social-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cv-social-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cv-social-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cv-social-image:hover img {
    transform: scale(1.05);
}

@media (min-width: 1024px) {
    .cv-social {
        grid-template-columns: 1fr 2fr;
    }
    
    .cv-social-content {
        text-align: left;
    }
    
    .cv-social-icon {
        margin: 0 0 16px;
    }
    
    .cv-social-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   GALLERY
   ======================================== */

.cv-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    grid-auto-rows: 200px;
}

.cv-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.cv-gallery-item:first-child {
    grid-row: span 2;
}

.cv-gallery-item:nth-child(5) {
    grid-column: span 2;
}

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

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

.cv-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.cv-gallery-item:hover .cv-gallery-overlay {
    background: rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .cv-gallery {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 250px;
    }
}

/* ========================================
   FOOTER
   ======================================== */

.cv-footer {
    background: var(--color-primary-dark);
    color: var(--color-white);
    padding: 64px 16px 32px;
}

.cv-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.cv-footer-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-white);
}

.cv-footer-links {
    list-style: none;
}

.cv-footer-links li {
    margin-bottom: 12px;
}

.cv-footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    transition: color 0.3s ease;
}

.cv-footer-links a:hover {
    color: var(--color-white);
}

.cv-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cv-footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.cv-footer-contact-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cv-footer-contact-item a {
    color: rgba(255, 255, 255, 0.8);
}

.cv-footer-contact-item a:hover {
    color: var(--color-white);
}

.cv-footer-newsletter {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cv-footer-newsletter input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    font-size: 14px;
}

.cv-footer-newsletter input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.cv-footer-newsletter input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.cv-footer-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.cv-footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.cv-footer-social a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cv-footer-social svg {
    width: 20px;
    height: 20px;
    color: var(--color-white);
}

.cv-footer-bottom {
    max-width: 1200px;
    margin: 48px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.cv-footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
}

.cv-footer-bottom a:hover {
    color: var(--color-white);
}

@media (min-width: 768px) {
    .cv-footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   CONTACT INFO CARDS
   ======================================== */

.cv-contact-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.cv-contact-card {
    background: #f5f5f5;
    padding: 32px 24px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.cv-contact-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(58, 122, 126, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.cv-contact-card-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.cv-contact-card-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.cv-contact-card-text {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
}

.cv-contact-card-text a {
    color: var(--color-text-light);
}

.cv-contact-card-text a:hover {
    color: var(--color-primary);
}

@media (min-width: 768px) {
    .cv-contact-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cv-contact-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 767px) {
    .cv-hero {
        height: 400px;
    }
    
    .cv-hero-title {
        font-size: 32px;
    }
    
    .cv-hero-subtitle {
        font-size: 14px;
    }
    
    h1 {
        font-size: 36px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    .cv-section {
        padding: 48px 16px;
    }
    
    .cv-menu {
        display: none;
    }
    
    .cv-nav-cta {
        display: none;
    }
    
    .cv-mobile-menu-btn {
        display: block;
    }
    
    .cv-tagline {
        font-size: 12px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cv-animate {
    animation: fadeInUp 0.6s ease forwards;
}

.cv-animate-delay-1 {
    animation-delay: 0.1s;
}

.cv-animate-delay-2 {
    animation-delay: 0.2s;
}

.cv-animate-delay-3 {
    animation-delay: 0.3s;
}

.cv-animate-delay-4 {
    animation-delay: 0.4s;
}

/* Elementor Widget Styles */
.elementor-widget-clain-hero .cv-hero {
    min-height: 500px;
}

.elementor-widget-clain-section .cv-section {
    padding: 80px 0;
}

/* WordPress Admin Bar Fix */
body.admin-bar .cv-nav {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .cv-nav {
        top: 46px;
    }
}
