/* ============================================================
   COSMA - Feuille de style partagée
   Centre Orthopédique Sportif et Médical des Alpes | Gap
   ============================================================ */

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --text-color: #334155;
    --text-light: #64748b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

/* ── Header ── */
header {
    background-color: var(--dark-color);
    color: white;
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
}
.logo {
    position: relative;
    top: 20px;
    z-index: 1001;
}
.logo img {
    height: 100px;
    display: block;
    margin: -20px 0;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}
nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.3rem 0.8em;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 0.9rem;
}
nav a:hover, nav a.active {
    background-color: var(--secondary-color);
}

/* Burger menu */
.mobile-menu-icon {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1002;
    color: white;
    background: transparent;
    border: none;
    padding: 0;
    line-height: 1;
}
.close-menu-icon {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    z-index: 1003;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    padding: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ── Hero (accueil) ── */
.hero {
    background: linear-gradient(rgba(30, 58, 138, 0.85), rgba(59, 130, 246, 0.85)),
        url('images/banniere.webp') no-repeat center center;
    background-size: cover;
    color: white;
    padding: 60px 2rem 40px;
    text-align: center;
    margin-top: 50px;
    min-height: 25vh;
}
.hero h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}
.hero p {
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    opacity: 0.80;
}

/* ── Hero (pages chirurgiens) ── */
.hero-surgeon {
    background: linear-gradient(rgba(30, 58, 138, 0.88), rgba(59, 130, 246, 0.88)),
        url('images/banniere.webp') no-repeat center center;
    background-size: cover;
    color: white;
    padding: 80px 2rem 40px;
    text-align: center;
    margin-top: 50px;
}
.hero-surgeon h1 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.4rem;
}
.hero-surgeon .hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 1.2rem;
}
.hero-surgeon .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}
.hero-surgeon .back-link:hover { color: white; }

/* ── Grille icônes articulations ── */
.articulation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto 0;
    padding: 0 1rem;
}
.articulation-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: 0.5rem;
}
.articulation-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}
.articulation-icon img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    margin-bottom: 0.5rem;
}
.articulation-icon p {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
}

/* ── Contenu principal ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem;
}

/* Sections SPA (masquées par défaut) */
section {
    display: none;
    animation: fadeIn 0.5s;
}
section.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Typographie ── */
h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    font-family: 'Montserrat', sans-serif;
}
h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}

/* ── Cards ── */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--secondary-color);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.card h3 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.card ul { list-style: none; padding-left: 0; }
.card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}
.card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* ── Info Box ── */
.info-box {
    background: #eff6ff;
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
    margin: 2rem 0;
}

/* ── Équipe ── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.inférieur-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.team-member {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}
.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    border: 4px solid var(--secondary-color);
}
.team-member h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.team-member p { color: var(--text-light); font-size: 0.95rem; }
.team-details {
    text-align: left;
    margin-top: 1rem;
    font-size: 0.9rem;
    display: none;
}
.team-details.active { display: block; }
.team-details ul { margin-left: 1.5rem; margin-bottom: 1rem; }
.team-details li { margin-bottom: 0.3rem; }

/* Lien "Voir la fiche complète" dans les cartes chirurgiens */
.team-member .profile-link {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.team-member .profile-link:hover { color: var(--primary-color); text-decoration: underline; }

/* ── Profil chirurgien (pages dédiées) ── */
.surgeon-profile {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}
.surgeon-profile-photo {
    text-align: center;
}
.surgeon-profile-photo img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary-color);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}
.surgeon-profile-photo .rdv-button { width: 100%; text-align: center; }
.surgeon-profile-content h2 { border-bottom: none; padding-bottom: 0; margin-bottom: 0.3rem; }
.surgeon-profile-content .surgeon-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}
.surgeon-profile-content h3 { margin-top: 1.5rem; font-size: 1.2rem; }
.surgeon-profile-content ul { margin-left: 1.5rem; margin-bottom: 1rem; }
.surgeon-profile-content li { margin-bottom: 0.4rem; }
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}
.tag {
    background: #dbeafe;
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

/* ── Contact ── */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.contact-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.contact-item h3 { margin-top: 0; font-size: 1.2rem; color: var(--primary-color); margin-bottom: 1rem; }
.contact-item i { font-size: 2rem; color: var(--secondary-color); margin-bottom: 1rem; }

/* ── Carte Google Maps ── */
.map-container {
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.map-container iframe { width: 100%; height: 400px; border: none; }

/* ── Footer ── */
footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-section ul { list-style: none; }
.footer-section li { margin-bottom: 0.5rem; }
.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.footer-section a:hover { color: white; padding-left: 0.3rem; }
.footer-section p { color: #cbd5e1; font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.4rem; }
.footer-section i { color: var(--accent-color); font-size: 0.85rem; margin-top: 0.15rem; flex-shrink: 0; }
.footer-bottom {
    border-top: 1px solid #475569;
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}
.footer-bottom-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.footer-bottom-links a { color: #94a3b8; text-decoration: none; transition: var(--transition); font-size: 0.85rem; }
.footer-bottom-links a:hover { color: white; }
.congres-highlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    margin-top: 1rem;
    width: fit-content;
    max-width: 100%;
}
.congres-highlight h5 { margin: 0; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.congres-highlight p  { margin: 0; font-size: 0.8rem; opacity: 0.9; white-space: nowrap; }
.congres-highlight a {
    background: white;
    color: var(--primary-color);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.congres-highlight a:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.footer-section strong { font-size: 0.9rem; }
.footer-inline-link { display: inline-flex !important; align-items: center; gap: 0.25rem; padding-left: 0; }

/* ── Pédagogie / Vidéos ── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #f9f9f9;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.congres-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}
.congres-info h3 { color: var(--primary-color); margin-bottom: 1rem; }
.congres-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.congres-images img {
    width: 100%; height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.congres-images img:hover { transform: scale(1.02); }

/* ── Bouton RDV ── */
.rdv-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    margin: 0.3rem 0;
    border: none;
    cursor: pointer;
    text-align: center;
}
.rdv-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.rdv-button.disabled { background-color: #cbd5e1; cursor: not-allowed; }
.rdv-button.disabled:hover { transform: none; box-shadow: none; }

/* ── Module RDV (contact) ── */
.rdv-module {
    grid-column: 1 / -1;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.rdv-module h3 { margin-top: 0; }
.rdv-module .module-intro { margin-bottom: 1.5rem; color: var(--text-light); font-size: 0.95rem; }
.rdv-main-container { margin-bottom: 1.5rem; }
.rdv-columns-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.rdv-column { display: flex; flex-direction: column; }
.rdv-category {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.category-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}
.category-header.supérieur { background-color: #dbeafe; color: var(--primary-color); }
.category-header.inférieur { background-color: #bfdbfe; color: var(--primary-color); }
.category-header.sport      { background-color: #a7f3d0; color: #065f46; }
.category-header i { font-size: 1.2rem; }
.category-header h4 { margin: 0; font-size: 1rem; }
.category-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    background: white;
}
.surgeon-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}
.surgeon-card:hover { background-color: #f1f5f9; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.surgeon-info { flex: 1; min-width: 0; }
.surgeon-info h5 { margin: 0 0 0.25rem 0; color: var(--primary-color); font-size: 0.95rem; font-weight: 600; }
.surgeon-info .specialty { margin: 0; font-size: 0.85rem; color: var(--text-light); }
.surgeon-card .rdv-button,
.rdv-module .rdv-button {
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.85rem;
    white-space: nowrap;
    min-width: 110px;
    text-align: center;
    display: inline-block;
    box-shadow: none;
}
.surgeon-card .rdv-button:hover,
.rdv-module .rdv-button:hover { background-color: var(--primary-color); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.surgeon-card .rdv-button.disabled,
.rdv-module .rdv-button.disabled { background-color: #cbd5e1; cursor: not-allowed; }
.surgeon-card .rdv-button.disabled:hover,
.rdv-module .rdv-button.disabled:hover { transform: none; box-shadow: none; }
.rdv-sport-container { margin-bottom: 1.5rem; }
.rdv-instructions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #e2e8f0;
    align-items: start;
}
.instruction-icon { display: none; }
.instruction-content h4 { margin-bottom: 0.75rem; color: var(--primary-color); font-size: 1rem; margin-top: 0; }
.instruction-content ol { margin: 0.5rem 0 0 1.5rem; padding-left: 0.5rem; }
.instruction-content li { margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--text-light); }
.instruction-contact { text-align: right; }
.instruction-contact p { margin: 0; font-size: 0.9rem; color: var(--text-light); }
.instruction-contact strong { color: var(--primary-color); font-size: 1.1rem; }

/* ── Utilitaires ── */
.hidden { display: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .rdv-columns-container { grid-template-columns: 1fr; }
    .rdv-sport-container   { margin-top: 0; }
    .rdv-instructions      { grid-template-columns: 1fr; gap: 1rem; }
    .instruction-contact   { text-align: left; }
    .surgeon-profile       { grid-template-columns: 1fr; }
    .surgeon-profile-photo { display: flex; flex-direction: column; align-items: center; }
}

@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 1rem; position: relative; }
    .logo img { height: 80px; margin: -15px 0; }

    .mobile-menu-icon { display: block; }
    nav ul.show ~ .mobile-menu-icon { display: none; }
    nav ul.show ~ .close-menu-icon  { display: flex; }

    nav ul {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh;
        background-color: var(--dark-color);
        padding: 5rem 1rem 1rem;
        gap: 0.5rem;
        z-index: 999;
    }
    nav ul.show { display: flex; }
    nav a { padding: 0.8rem; text-align: center; font-size: 1.1rem; }

    .hero       { margin-top: 80px; padding-top: 20px; }
    .hero h1    { font-size: 1.5rem; line-height: 1.3; }
    .hero p     { font-size: 1.1rem; }

    .hero-surgeon    { margin-top: 80px; }
    .hero-surgeon h1 { font-size: 1.5rem; }

    .articulation-icon img { width: 80px; height: 80px; padding: 6px; }
    .articulation-grid     { gap: 0.2rem; }
    .articulation-icon p   { font-size: 0.7rem; }

    .inférieur-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }

    body       { overflow-x: hidden; }
    .container { padding: 2rem 1rem; }
    .cards     { grid-template-columns: 1fr; }

    .rdv-module { padding: 1rem; }
    .surgeon-card { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .surgeon-card .rdv-button,
    .rdv-module .rdv-button { width: 100%; text-align: center; }

    .rdv-instructions  { grid-template-columns: 1fr; gap: 1rem; }
    .instruction-icon  { display: flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; }
    .instruction-icon i { color: var(--secondary-color); font-size: 1.5rem; }
    .instruction-contact { text-align: center; width: 100%; }

    .surgeon-profile { grid-template-columns: 1fr; }
    .surgeon-profile-photo { align-items: center; }
    .surgeon-profile-photo img { width: 140px; height: 140px; }
}
