/*
Theme Name: Atout Sport
Theme URI: https://atoutsport.fr
Author: Loxys
Author URI: https://loxys.fr
Description: Thème WordPress sur-mesure pour Atout Sport - Le Sport à la Carte. Compatible Elementor, optimisé pour activités sportives, entreprises, écoles et particuliers. Vallée de Poupet, Saint-Malô-du-Bois.
Version: 1.9.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: atout-sport
Tags: sport, elementor, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template
*/

/* === PALETTE COULEURS (modifiable via Customizer) === */
:root {
    --as-primary: #0E5E3F;        /* Vert sport */
    --as-secondary: #F4A91D;      /* Orange dynamique */
    --as-accent: #1B7AAB;         /* Bleu eau / Sèvre */
    --as-dark: #1A2E22;
    --as-light: #F7F5EE;
    --as-white: #FFFFFF;
    --as-text: #2C2C2C;
    --as-muted: #6B6B6B;
    --as-radius: 12px;
    --as-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --as-shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    --as-font-heading: 'Montserrat', sans-serif;
    --as-font-body: 'Open Sans', sans-serif;
}

/* === RESET BASIQUE === */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--as-font-body);
    color: var(--as-text);
    line-height: 1.65;
    background: var(--as-white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--as-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--as-secondary); }

h1,h2,h3,h4,h5,h6 {
    font-family: var(--as-font-heading);
    color: var(--as-dark);
    line-height: 1.2;
    margin: 0 0 .6em;
    font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.4rem; }

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

/* === HEADER === */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--as-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 20px;
}
.site-logo img { max-height: 70px; width: auto; }
.site-logo .site-title {
    font-family: var(--as-font-heading);
    font-size: 1.4rem; font-weight: 800;
    color: var(--as-primary);
}
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a {
    color: var(--as-dark); font-weight: 600; font-size: .95rem;
    text-transform: uppercase; letter-spacing: .5px;
}
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--as-secondary); }

.menu-toggle {
    display: none; background: none; border: 0; cursor: pointer;
    width: 32px; height: 32px;
}
.menu-toggle span {
    display: block; width: 100%; height: 3px; background: var(--as-dark);
    margin: 6px 0; transition: .3s;
}

@media (max-width: 900px) {
    .menu-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: var(--as-shadow); }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; padding: 20px; gap: 16px; }
}

/* === BUTTONS === */
.btn, .wp-block-button__link, button[type="submit"], input[type="submit"] {
    display: inline-block;
    padding: 14px 32px;
    background: var(--as-secondary);
    color: var(--as-white) !important;
    border: 0; border-radius: 50px;
    font-family: var(--as-font-heading);
    font-weight: 700; font-size: .95rem;
    text-transform: uppercase; letter-spacing: .8px;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: 0 4px 15px rgba(244,169,29,.3);
}
.btn:hover { background: var(--as-primary); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(14,94,63,.35); }
.btn-outline { background: transparent; color: var(--as-primary) !important; border: 2px solid var(--as-primary); box-shadow: none; }
.btn-outline:hover { background: var(--as-primary); color: #fff !important; }

/* === HERO === */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex; align-items: center;
    background: linear-gradient(135deg, rgba(14,94,63,.85), rgba(27,122,171,.7)),
                url('assets/images/hero-bg.jpg') center/cover;
    color: #fff;
    padding: 80px 20px;
}
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; max-width: 650px; margin-bottom: 30px; }
.hero .btn { margin-right: 12px; }

/* === ACTIVITIES GRID === */
.activities { padding: 80px 0; background: var(--as-light); }
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.activity-card {
    background: var(--as-white);
    border-radius: var(--as-radius);
    overflow: hidden;
    box-shadow: var(--as-shadow);
    transition: transform .3s, box-shadow .3s;
    display: flex; flex-direction: column;
}
.activity-card:hover { transform: translateY(-6px); box-shadow: var(--as-shadow-hover); }
.activity-card .img { height: 220px; background: #ddd center/cover no-repeat; }
.activity-card .content { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.activity-card h3 { color: var(--as-primary); margin-bottom: 12px; }
.activity-card .price { font-weight: 700; color: var(--as-secondary); margin: 12px 0; }
.activity-card .btn { margin-top: auto; align-self: flex-start; }

/* === SECTIONS === */
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 20px; }
.section-subtitle { text-align: center; color: var(--as-muted); font-size: 1.1rem; max-width: 700px; margin: 0 auto 60px; }

/* === ABOUT === */
.about { padding: 80px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }
.about img { border-radius: var(--as-radius); box-shadow: var(--as-shadow); }

/* === GALLERY === */
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.gallery-grid img { border-radius: 8px; aspect-ratio: 1; object-fit: cover; transition: transform .3s; }
.gallery-grid img:hover { transform: scale(1.03); }

/* === CONTACT === */
.contact { background: var(--as-primary); color: #fff; padding: 80px 0; }
.contact h2, .contact h3 { color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact a { color: var(--as-secondary); }
.contact form input, .contact form textarea {
    width: 100%; padding: 14px 18px; margin-bottom: 16px;
    border: 0; border-radius: 8px;
    font-family: inherit; font-size: 1rem;
}
.contact form textarea { min-height: 140px; resize: vertical; }

/* === FOOTER === */
.site-footer {
    background: var(--as-dark); color: #c4c4c4;
    padding: 50px 0 20px;
}
.site-footer h4 { color: #fff; margin-bottom: 16px; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 40px; margin-bottom: 30px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer a { color: var(--as-secondary); }
.footer-bottom {
    border-top: 1px solid #2d4435;
    padding-top: 20px; text-align: center; font-size: .9rem;
}
.social-links { display: flex; gap: 14px; margin-top: 14px; }
.social-links a {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--as-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background .25s;
}
.social-links a:hover { background: var(--as-secondary); }

/* === UTILITIES === */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.bg-primary { background: var(--as-primary); color: #fff; }
.bg-light { background: var(--as-light); }

/* === ELEMENTOR OVERRIDES === */
.elementor-button-wrapper .elementor-button { border-radius: 50px !important; }
body.elementor-page .site-content { padding: 0; }

/* === ACCESSIBILITY === */
.screen-reader-text {
    clip: rect(1px,1px,1px,1px); position: absolute !important;
    height: 1px; width: 1px; overflow: hidden;
}
:focus-visible { outline: 3px solid var(--as-secondary); outline-offset: 2px; }

/* === ANIMATIONS PREMIUM === */
@keyframes asFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: none; }
}
@keyframes asScaleIn {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes asFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.elementor-section, .elementor-column, .activity-card, .post-card {
    animation: asFadeUp .6s ease backwards;
}
.elementor-section:nth-child(2) { animation-delay: .1s; }
.elementor-section:nth-child(3) { animation-delay: .2s; }
.elementor-section:nth-child(4) { animation-delay: .3s; }

/* === GRADIENT TEXT EFFECTS === */
.has-gradient-text {
    background: linear-gradient(135deg, var(--as-primary), var(--as-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === HOVER PREMIUM SUR LES CARTES ELEMENTOR === */
.elementor-widget-image-box .elementor-image-box-wrapper,
.elementor-widget-icon-box .elementor-icon-box-wrapper {
    transition: transform .3s ease, box-shadow .3s ease;
}
.elementor-widget-image-box:hover .elementor-image-box-wrapper,
.elementor-widget-icon-box:hover .elementor-icon-box-wrapper {
    transform: translateY(-6px);
}

/* === SECTIONS FULL WIDTH HERO === */
.elementor-section.elementor-section-stretched {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* === BOUTONS ELEMENTOR PREMIUM === */
.elementor-button {
    border-radius: 50px !important;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 700 !important;
    transition: all .25s ease !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.elementor-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

/* === COUNTERS === */
.elementor-counter-number-wrapper {
    font-family: var(--as-font-heading);
    font-size: 3.5rem !important;
    font-weight: 800 !important;
}
.elementor-counter-title {
    font-size: 1rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px !important;
}

/* === ACTIVITÉS GRID PREMIUM (shortcode atout_activities) === */
.activity-card {
    position: relative;
    overflow: hidden;
}
.activity-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.4) 100%);
    opacity: 0;
    transition: opacity .3s;
    z-index: 1;
    pointer-events: none;
}
.activity-card:hover::before { opacity: 1; }
.activity-card .img {
    transition: transform .5s ease;
}
.activity-card:hover .img {
    transform: scale(1.06);
}

/* === GALERIE === */
.atout-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    grid-auto-flow: dense;
}
.atout-gallery a {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}
.atout-gallery a:nth-child(7n+1) { grid-column: span 2; aspect-ratio: 2; }
.atout-gallery a:nth-child(11n+5) { grid-row: span 2; aspect-ratio: 1/2; }
.atout-gallery img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.atout-gallery a:hover img { transform: scale(1.08); }

/* === RESPONSIVE TWEAKS === */
@media (max-width: 768px) {
    .elementor-counter-number-wrapper { font-size: 2.5rem !important; }
    h1 { font-size: 2rem !important; }
}
