/* Variables couleurs */
:root {
    --red-passion: #e63946;
    --black: #1a1a1a;
    --gold: #f1c40f;
    --white: #f8f9fa;
    --dark-red: #c1121f;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Lecteur Compás (player) */
.compas-player {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    color: #fff;
    width: min(640px, 92vw);
}
.player-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.player-title { font-weight: 800; letter-spacing: 0.5px; }
.player-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 0 rgba(241,196,15,0.7);
    animation: livePulse 1.6s infinite;
}
@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(241,196,15,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(241,196,15,0); }
    100% { box-shadow: 0 0 0 0 rgba(241,196,15,0); }
}
.player-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .player-row { grid-template-columns: 1fr 1fr; align-items: end; } }

/* Sliders custom */
input[type="range"].compas-volume,
input[type="range"].compas-bpm {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--red-passion), var(--gold));
    outline: none;
}
input[type="range"].compas-volume::-webkit-slider-thumb,
input[type="range"].compas-bpm::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid var(--red-passion);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
input[type="range"].compas-volume::-moz-range-thumb,
input[type="range"].compas-bpm::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid var(--red-passion);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Boutons presets et palmas */
.compas-audio-toggle, .compas-preset {
    display: inline-flex; align-items: center; gap: 8px;
}
.compas-audio-toggle { font-size: 0.95rem; }
.compas-preset { font-weight: 700; }

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Alegreya', serif;
    color: var(--black);
    line-height: 1.6;
    background-color: var(--white);
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.highlight {
    color: var(--red-passion);
}

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

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--black);
}

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

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--red-passion);
}

.btn-nav {
    background-color: var(--red-passion);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.3s;
}

.btn-nav:hover {
    background-color: var(--dark-red);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1) 0%, rgba(241, 196, 15, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    text-transform: lowercase;
}

.hero h1::first-letter {
    text-transform: uppercase;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background-color: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.2);
}

.btn-secondary {
    border: 2px solid var(--red-passion);
    color: var(--red-passion);
}

.btn-secondary:hover {
    background-color: rgba(230, 57, 70, 0.1);
    transform: translateY(-2px);
}

/* Accent flamenco sur les boutons */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.btn-primary::after, .btn-secondary::after {
    content: "";
    position: absolute;
    inset: -120% -40% auto auto;
    width: 220%;
    height: 220%;
    background: conic-gradient(from 210deg, rgba(241,196,15,0.0) 0 70deg, rgba(241,196,15,0.25) 90deg, rgba(230,57,70,0.25) 120deg, rgba(241,196,15,0.0) 160deg);
    transform: rotate(0deg);
    transition: transform 0.6s ease;
    z-index: -1;
}
.btn-primary:hover::after, .btn-secondary:hover::after {
    transform: rotate(25deg);
}

.hero-visual {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><path fill="%23e63946" d="M..."/>') no-repeat center right;
    background-size: contain;
    opacity: 0.9;
}

/* Pétales de rose flottants dans le hero */
.hero-petals {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.petal {
    position: absolute;
    top: -10vh;
    width: var(--s, 14px);
    height: var(--s, 18px);
    background: radial-gradient(60% 60% at 40% 40%, #ff7a7a 0%, #e63946 60%, #c1121f 100%);
    border-radius: 60% 40% 60% 40% / 60% 60% 40% 40%;
    filter: drop-shadow(0 6px 8px rgba(0,0,0,0.15));
    opacity: 0.85;
    animation: petalFall var(--dur, 10s) linear var(--delay, 0s) infinite, petalDrift 6s ease-in-out infinite alternate;
}
@keyframes petalFall {
    to { transform: translate3d(var(--x, 0), 115vh, 0) rotate(var(--r, 120deg)); }
}
@keyframes petalDrift {
    from { translate: 0 0; }
    to { translate: 12px 0; }
}

/* Visualiseur de compás (12 temps) */
.compas {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    align-items: center;
}
.compas-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: 2px solid rgba(230,57,70,0.6);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: scale(0.95);
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.compas-dot.accent { border-color: var(--gold); background: rgba(241,196,15,0.35); }
.compas-dot.active { transform: scale(1.25); background: var(--red-passion); border-color: var(--red-passion); }
.compas-label { margin-top: 8px; font-size: 0.9rem; color: rgba(255,255,255,0.9); }

/* Contrôles audio du compás */
.compas-audio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}
.compas-audio-toggle {
    background: rgba(255,255,255,0.85);
    color: var(--black);
    border: 2px solid var(--red-passion);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.compas-audio-toggle[aria-pressed="true"] {
    background: var(--red-passion);
    color: #fff;
}
.compas-volume { width: 160px; }

/* utilitaire accessibilité */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Tempo + presets */
.compas-tempo {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
    color: #fff;
}
.compas-tempo label { font-weight: 700; }
.compas-bpm { width: 260px; max-width: 70vw; }
.compas-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.compas-preset {
    background: rgba(255,255,255,0.9);
    color: var(--black);
    border: 1px solid rgba(230,57,70,0.5);
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
}
.compas-preset:hover { background: #fff; }

/* Accessibilité: réduire les animations si demandé */
@media (prefers-reduced-motion: reduce) {
    .petal { animation: none; }
    .btn-primary::after, .btn-secondary::after { transition: none; }
}

/* Sections communes */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* Cours Section */
.cours {
    padding: 100px 0;
    background-color: white;
}

.cours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.cours-card {
    background: white;
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-align: center;
}

.cours-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.cours-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.cours-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--red-passion);
}

.cours-details {
    list-style: none;
    margin-top: 20px;
    text-align: left;
}

.cours-details li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.cours-details li:before {
    content: "•";
    color: var(--gold);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

/* Professeurs Section */
.professeurs {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.05) 0%, rgba(230, 57, 70, 0.05) 100%);
}

.professeurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.professeur-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
}

.professeur-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #eee;
    margin: 0 auto 20px;
    background-size: cover;
    border: 5px solid var(--gold);
}

.professeur-card h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.professeur-origine {
    color: var(--red-passion);
    font-weight: 600;
    margin-bottom: 15px;
}

/* Galerie Section */
.galerie {
    padding: 100px 0;
    background-color: white;
}

.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.galerie-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    transition: transform 0.3s, box-shadow 0.3s;
    background: #eee;
}
.galerie-img:hover {
    transform: scale(1.04) rotate(-1deg);
    box-shadow: 0 8px 32px rgba(230,57,70,0.18);
}

/* Modale galerie */
.galerie-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s;
}
.galerie-modal.active {
    display: flex;
}
.galerie-modal-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    background: #fff;
    object-fit: contain;
}
.galerie-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.2s;
}
.galerie-modal-close:hover {
    color: var(--red-passion);
}
.galerie-modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    padding: 0 20px;
    transition: color 0.2s;
}
.galerie-modal-arrow:hover {
    color: var(--red-passion);
}
.galerie-modal-arrow.left {
    left: 10px;
}
.galerie-modal-arrow.right {
    right: 10px;
}
@media (max-width: 600px) {
    .galerie-modal-img {
        max-width: 98vw;
        max-height: 60vh;
    }
    .galerie-modal-close {
        top: 10px;
        right: 10px;
        font-size: 2rem;
    }
    .galerie-modal-arrow {
        font-size: 2.2rem;
        padding: 0 8px;
    }
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.05) 0%, rgba(241, 196, 15, 0.05) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.contact-form h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-family: 'Alegreya', serif;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--red-passion);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.contact-info {
    padding: 20px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item .icon {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--red-passion);
}

/* Footer */
.footer {
    background-color: var(--black);
    color: white;
    padding: 50px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer .logo {
    color: white;
}

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

.footer p {
    color: #aaa;
    margin-top: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--gold);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 120px 0 80px;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-visual {
        display: none;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
}
