/* Charte graphique SIMEC */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;700&family=Amiri:wght@400;700&display=swap');
/* Google Fonts for hero */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Mulish:wght@300;400;600;700&display=swap');

/* Prevent text selection and copying */
html, body {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

h1, h2, h3 {
    font-family: 'Lora', 'Amiri', serif;
}

.title-decorative {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.4;
    font-size: 1em;
    text-align: center;
}

a{
    text-decoration:none;
}
.btn-simec {
    padding: 0.6em 2em;
    border: none;
    outline: none;
    color: rgb(255, 255, 255);
    background: #111;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 10px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.btn-simec:before {
    content: "";
    background: linear-gradient(
        45deg,
        #ff0000,
        #ff7300,
        #fffb00,
        #48ff00,
        #00ffd5,
        #002bff,
        #7a00ff,
        #ff00c8,
        #ff0000
    );
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    -webkit-filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing-simec 20s linear infinite;
    transition: opacity 0.3s ease-in-out;
    border-radius: 10px;
}

@keyframes glowing-simec {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

.btn-simec:after {
    z-index: -1;
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: #222;
    left: 0;
    top: 0;
    border-radius: 10px;
}

.btn-simec:hover {
    color: white;
}
.btn-simec:hover {
    background-color: #ffe066;
}
.hero-banner .headline { font-size:1.6rem; font-family: 'Lora', serif; color:#FFF9E6; max-width:820px; margin:0 auto; }
.hero-banner .headline .sub { display:block; font-size:1rem; font-weight:400; color:rgba(255,249,230,0.9); margin-top:8px; }
.hero-banner { animation: banner-entrance 900ms ease both; }
.static-hero .title { font-family: 'Cinzel Decorative', serif; font-weight:700; font-size:3.2rem; letter-spacing:0.02em; color:#111; text-align:center; }
.static-hero .subtitle { font-family: 'Mulish', sans-serif; font-weight:400; color:#444; text-align:center; margin-top:12px; }

@media (min-width: 768px) {
    .static-hero { display:flex; align-items:center; gap:2rem; padding:60px 0; }
    .static-hero .container-fluid { display:flex; align-items:center; gap:2rem; }
    .static-hero .content { flex: 0 0 62.5%; padding-right:1.5rem; text-align:center; }
    .static-hero .right-img { flex: 0 0 37.5%; }
    .static-hero .title { font-size:4rem; text-align:center; }
    .static-hero .subtitle { text-align:center; font-size:1.05rem; }
}
.scroll-invite { color: rgba(255,255,255,0.9); margin-top:18px; font-size:0.95rem; opacity:0.85 }

@keyframes banner-entrance {
    from { transform: translateY(8px); opacity:0 }
    to { transform: translateY(0); opacity:1 }
}
.clavier-connaissance {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(4, 80px);
    gap: 16px;
    justify-content: center;
    margin: 2rem auto;
}
.touche-clavier {
    background: #222831;
    color: #FFD700;
    font-size: 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(34,40,49,0.08);
}
.touche-clavier:hover {
    background: #FFD700;
    color: #222831;
}

/* Tooltip for clavier touches (simple, CSS-only) */
.touche-clavier { position:relative; }
.touche-clavier::after {
    content: attr(data-label);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(11,15,18,0.95);
    color: #FFD700;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events:none;
    transition: opacity 160ms ease, transform 160ms ease;
}
.touche-clavier:hover::after { opacity:1; transform: translateX(-50%) translateY(0); }

/* small responsive tweak for clavier grid to scale on narrow viewports */
@media (max-width:640px) {
    .clavier-connaissance { grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(4, 64px); gap:10px; }
    .touche-clavier { font-size:1.5rem; border-radius:10px; }
}

/* Simple site header (replaces neo theme) */
.site-hero {
    /* warmer blue-teal gradient instead of black */
    background: linear-gradient(180deg, #0a5566 0%, #117a63 100%);
    color: #FFD700;
    padding: 12px 0;
}
.site-hero .container { display:flex; align-items:center; justify-content:space-between; gap:12px; max-width:1100px; margin:0 auto; padding:0 12px; }
.site-hero a { color: #FFD700; }

/* Keep the clavier and content styles as before */
.neo-removed-note { display:none; }

/* Sticky header + responsive menu */
.site-hero {
    position: sticky;
    top: 0;
    z-index: 999;
    transition: box-shadow 200ms ease, background-color 200ms ease, padding 200ms ease;
}
.site-hero.scrolled {
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
    background-color: rgba(11,15,18,0.98);
    padding: 6px 0;
}
.site-brand { display:flex; align-items:center; gap:12px; }
.site-brand img { max-width:72px; display:block; }
.site-brand .brand-text { line-height:1; }
.nav-toggle { background:transparent; border:0; color:inherit; font-size:1.6rem; cursor:pointer; display:none; }
.nav-menu { display:flex; gap:16px; align-items:center; }

@media (max-width: 768px) {
    .site-hero .container { align-items:center; }
    .nav-toggle { display:block; }
    .nav-menu { position:absolute; top:100%; right:12px; background: linear-gradient(180deg,#0b6b6b 0%, #0e7f6f 100%); border-radius:8px; padding:10px; flex-direction:column; display:none; box-shadow:0 6px 18px rgba(0,0,0,0.18); }
    .nav-menu a { display:block; padding:6px 12px; }
    .nav-menu.open { display:flex; }
}

/* small polish for links */
.nav-menu a { color:#FFD700; text-decoration:none; font-weight:600; }
.site-hero .cta { margin-top:12px; }

/* Main page container tighter layout */
main.container { max-width:1100px; margin:0 auto; padding-left:12px; padding-right:12px; }

/* Hero headline sizing and spacing */
.hero-banner .headline { font-size:1.5rem; margin-bottom:8px; line-height:1.15; }
.hero-content { padding-bottom:8px; }

/* Reduce large vertical gaps between sections */
section { margin-bottom:18px; }

/* Clavier grid: make it responsive and compact on desktop */
.clavier-connaissance {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 72px;
    gap: 12px;
    max-width: 360px;
    justify-items: center;
    margin: 1.5rem auto;
}
.touche-clavier { width:72px; height:72px; }

/* Cards and knowledge area: reduce gaps */
.knowledge-cards { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.knowledge-card { width: 320px; padding:18px; }

/* Bassymala cards adjustments */
.bassymala-cards .knowledge-card { padding:18px; }

/* Mobile specific: slightly larger headline and compact spacing */
@media (max-width: 768px) {
    .hero-banner .headline { font-size:1.25rem; }
    .clavier-connaissance { grid-auto-rows:64px; gap:10px; max-width:280px; }
    .touche-clavier { width:64px; height:64px; font-size:1.4rem; }
    main.container { padding-left:10px; padding-right:10px; }
    .knowledge-card { width:92%; }
}

/* Desktop roomy but not excessive */
@media (min-width: 1200px) {
    .hero-banner .headline { font-size:1.8rem; }
    .clavier-connaissance { max-width:420px; grid-auto-rows:84px; }
    .touche-clavier { width:84px; height:84px; font-size:2rem; }
}

/* Navbar brand as background logo */
.navbar-brand.bg-logo{ display:inline-block; width:48px; height:48px; background-image:url('/assets/images/logobgwhite.jpg'); background-size:cover; background-position:center; border-radius:50%; }
.navbar-brand.bg-logo .visually-hidden{ position:absolute; left:-9999px; }

#header.scrolled .navbar-brand.bg-logo{ background-image:url('/assets/images/logo-2.svg'); }


/* 3.1 hero-section */
/* static-hero */
.static-hero {
    margin: 0 60px;
    height: 900px;
    border-bottom-left-radius: 100px;
    border-bottom-right-radius: 100px;
    background: url(../images/slider/bg.png);
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 30px;
    padding-left: 130px;
    display: flex;
    align-items: center;
}
@media (max-width: 1780px) {
    .static-hero {
        padding-left: 80px;
    }
}
@media (max-width: 1730px) {
    .static-hero {
        padding-left: 20px;
    }
}
@media (max-width: 1690px) {
    .static-hero {
        height: 800px;
    }
}
@media (max-width: 1399px) {
    .static-hero {
        height: 750px;
    }
}
@media (max-width: 1199px) {
    .static-hero {
        margin: 0 20px;
        height: 700px;
    }
}
@media (max-width: 991px) {
    .static-hero {
        display: block;
        height: 100%;
        padding: 30px;
    }
}
@media (max-width: 575px) {
    .static-hero {
        padding: 20px 0px;
        border-radius: 20px;
    }
}
.static-hero::before {
    position: absolute;
    content: "";
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #F6F6F6;
    z-index: -11;
    opacity: 0.7;
}
.static-hero .content {
    max-width: 690px;
    text-align: center;
}
@media (max-width: 1690px) {
    .static-hero .content {
        max-width: 600px;
    }
}
@media (max-width: 1399px) {
    .static-hero .content {
        max-width: 500px;
    }
}
@media (max-width: 1199px) {
    .static-hero .content {
        max-width: 400px;
    }
}
@media (max-width: 991px) {
    .static-hero .content {
        max-width: 600px;
        margin: 0 auto;
        margin-bottom: 40px;
    }
}
.static-hero .content .icon {
    margin-bottom: 20px;
}
.static-hero .content .title {
    color: #000;
    font-size: 50px;
    font-weight: 700;
    line-height: 80px;
    text-transform: capitalize;
    margin-bottom: 13px;
}
@media (max-width: 1399px) {
    .static-hero .content .title {
        font-size: 40px;
        line-height: 60px;
    }
}
@media (max-width: 1199px) {
    .static-hero .content .title {
        font-size: 35px;
        line-height: 60px;
    }
}
@media (max-width: 575px) {
    .static-hero .content .title {
        font-size: 19px;
        line-height: 33px;
    }
}
.static-hero .content .subtitle {
    color: #000;
    font-size: 18px;
    font-weight: 600;
    line-height: 30px;
    text-transform: capitalize;
}
@media (max-width: 575px) {
    .static-hero .content .subtitle {
        font-size: 15px;
        line-height: 25px;
    }
}
.static-hero .content .hero-btn {
    margin-top: 45px;
}
.static-hero .right-img {
    max-width: 780px;
    max-height: 840px;
    position: absolute;
    right: 30px;
    top: 30px;
}
@media (max-width: 1690px) {
    .static-hero .right-img {
        max-width: 600px;
        top: 50%;
        transform: translateY(-50%);
    }
}
@media (max-width: 1399px) {
    .static-hero .right-img {
        max-width: 500px;
    }
}
@media (max-width: 1199px) {
    .static-hero .right-img {
        max-width: 400px;
    }
}
@media (max-width: 991px) {
    .static-hero .right-img {
        position: unset;
        top: auto;
        transform: unset;
        margin: 0 auto;
    }
}
.static-hero .right-img img {
    width: 100%;
    border-radius: 60px;
}
@media (max-width: 991px) {
    .static-hero .right-img img {
        border-radius: 10px;
    }
}

.hero-slider {
    width: 100%;
    height: 840px;
    display: flex;
    position: relative;
    z-index: 0;
}
@media (max-width: 991px) {
    .hero-slider {
        height: 600px;
    }
}
@media (max-width: 767px) {
    .hero-slider {
        height: 600px;
    }
}
.hero-slider .swiper-slide {
    overflow: hidden;
}
.hero-slider .swiper-container,
.hero-slider .hero-container {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}
.hero-slider .slide-inner,
.hero-slider .hero-inner {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: left;
}
.hero-slider .slide-inner:before,
.hero-slider .hero-inner:before {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #040128;
    content: "";
    opacity: 0.4;
}
.hero-slider .slide-inner .slide-content,
.hero-slider .hero-inner .slide-content {
    padding-left: 240px;
    margin-top: -80px;
}
@media (max-width: 1700px) {
    .hero-slider .slide-inner .slide-content,
    .hero-slider .hero-inner .slide-content {
        padding-left: 140px;
    }
}
@media (max-width: 1199px) {
    .hero-slider .slide-inner .slide-content,
    .hero-slider .hero-inner .slide-content {
        padding-left: 85px;
        margin-top: -100px;
    }
}
@media (max-width: 991px) {
    .hero-slider .slide-inner .slide-content,
    .hero-slider .hero-inner .slide-content {
        padding-left: 30px;
        padding-top: 35px;
    }
}
@media (max-width: 767px) {
    .hero-slider .slide-inner .slide-content,
    .hero-slider .hero-inner .slide-content {
        padding-left: 10px;
    }
}
@media (max-width: 991px) {
    .hero-slider .slide-inner .slide-content,
    .hero-slider .hero-inner .slide-content {
        padding-left: 30px;
        padding-top: 35px;
    }
}
@media (max-width: 767px) {
    .hero-slider .slide-inner .slide-content,
    .hero-slider .hero-inner .slide-content {
        padding-left: 10px;
    }
}
@media (max-width: 991px) {
    .hero-slider .slide-inner .slide-content,
    .hero-slider .hero-inner .slide-content {
        padding-left: 30px;
        padding-top: 35px;
    }
}
/* static-hero-s2 */
.static-hero-s2 {
    height: 860px;
    background: #FFFBF4;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    padding-left: 210px;
}
@media (max-width: 1760px) {
    .static-hero-s2 {
        padding-left: 150px;
    }
}
@media (max-width: 1699px) {
    .static-hero-s2 {
        padding-left: 100px;
    }
}
@media (max-width: 1399px) {
    .static-hero-s2 {
        height: 750px;
    }
}
@media (max-width: 1199px) {
    .static-hero-s2 {
        padding-left: 20px;
        padding-top: 50px;
    }
}
@media (max-width: 991px) {
    .static-hero-s2 {
        height: 1000px;
        display: block;
        padding-left: 0;
    }
}
@media (max-width: 575px) {
    .static-hero-s2 {
        height: 900px;
    }
}
@media (max-width: 575px) {
    .static-hero-s2 {
        height: 900px;
    }
}
.static-hero-s2 .content {
    text-align: left;
    max-width: 777px;
}
@media (max-width: 1690px) {
    .static-hero-s2 .content {
        max-width: 600px;
    }
}
@media (max-width: 1399px) {
    .static-hero-s2 .content {
        max-width: 500px;
    }
}
@media (max-width: 1199px) {
    .static-hero-s2 .content {
        max-width: 400px;
    }
}
@media (max-width: 991px) {
    .static-hero-s2 .content {
        max-width: 600px;
        margin: 0 auto;
        margin-bottom: 40px;
        text-align: center;
        margin-top: 80px;
    }
}
.static-hero-s2 .content .icon {
    margin-bottom: 20px;
}
.static-hero-s2 .content .title {
    color: #000;
    font-size: 50px;
    font-weight: 700;
    line-height: 80px;
    text-transform: capitalize;
    margin-bottom: 13px;
}
@media (max-width: 1399px) {
    .static-hero-s2 .content .title {
        font-size: 40px;
        line-height: 60px;
    }
}
@media (max-width: 1199px) {
    .static-hero-s2 .content .title {
        font-size: 35px;
        line-height: 60px;
    }
}
@media (max-width: 575px) {
    .static-hero-s2 .content .title {
        font-size: 19px;
        line-height: 33px;
    }
}
.static-hero-s2 .content .subtitle {
    color: #000;
    font-size: 18px;
    font-weight: 600;
    line-height: 30px;
    text-transform: capitalize;
    max-width: 600px;
    display: block;
}
@media (max-width: 575px) {
    .static-hero-s2 .content .subtitle {
        font-size: 15px;
        line-height: 25px;
    }
}
.static-hero-s2 .content .hero-btn {
    margin-top: 45px;
}
.static-hero-s2 .image {
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    max-width: 715px;
    max-height: 652px;
}
@media (max-width: 1699px) {
    .static-hero-s2 .image {
        right: -15%;
    }
}
@media (max-width: 1499px) {
    .static-hero-s2 .image {
        right: -25%;
    }
}
@media (max-width: 1399px) {
    .static-hero-s2 .image {
        right: -15%;
        max-width: 515px;
        max-height: 552px;
    }
}
@media (max-width: 1199px) {
    .static-hero-s2 .image {
        right: -25%;
    }
}
@media (max-width: 991px) {
    .static-hero-s2 .image {
        position: unset;
        transform: unset;
        max-width: 400px;
        max-height: 400px;
        margin: 0 auto;
    }
}


/* --------------------------------------------------------------------------
     Pleasant UI enhancements
     - clean header with circular logo + centered nav
     - warm hero with readable text
     - refined cards and manifesto style
    ------------------------------------------------------------------------- */

:root{
    --simec-primary: #0b6b6b; /* deep teal */
    --simec-accent: #ffd166;  /* warm yellow */
    --simec-bg: #f7fafc;
    --simec-muted: #6b6b6b;
}

body { background: var(--simec-bg); color: #122; }

/* Navbar polish */
.navbar { padding: .5rem 0; }
.navbar-brand { display:flex; align-items:center; gap:.6rem; font-weight:700; color:var(--simec-primary); }


.navbar-nav .nav-link{ color: rgba(16,24,32,0.85); padding:.6rem .9rem; transition: color .15s ease, transform .08s ease; }
.navbar-nav .nav-link:hover{ color:var(--simec-primary); transform:translateY(-1px); }
.navbar-nav .nav-link.active{ color:var(--simec-primary); border-bottom:2px solid var(--simec-accent); padding-bottom:.5rem; }

.navbar-toggler{ border:1px solid rgba(16,24,32,0.06); }
.navbar-toggler-icon{ filter: invert(0.2) sepia(1) saturate(6) hue-rotate(150deg); }

/* Utilities area */
.input-group .form-control{ border-radius:6px 0 0 6px; }
.input-group .btn{ border-radius:0 6px 6px 0; }
.btn-primary{ background:var(--simec-primary); border-color:var(--simec-primary); box-shadow:0 6px 18px rgba(11,15,18,0.06); }
.btn-outline-secondary{ border-color:rgba(16,24,32,0.06); }
.cart-count{ background:#fff; color:var(--simec-primary); padding:2px 7px; border-radius:999px; font-weight:700; }

/* Note: .static-hero rules are defined earlier from the STY reference. Duplicate, smaller .static-hero rules removed to avoid conflicts. */

/* Manifesto and sections */
.manifesto{ background: linear-gradient(180deg,#ffffff, #fffbf2); padding:28px; border-radius:12px; box-shadow:0 8px 30px rgba(16,24,32,0.04); }
.manifesto .lead{ font-size:1.08rem; color:#123; }

.knowledge-card{ background:#ffffff; border-radius:12px; padding:18px; box-shadow:0 8px 30px rgba(16,24,32,0.04); transition: transform .12s ease, box-shadow .12s ease; }
.knowledge-card:hover{ transform:translateY(-6px); box-shadow:0 18px 40px rgba(16,24,32,0.08); }
.knowledge-card .title{ color:var(--simec-primary); font-size:1.05rem; }
.knowledge-card .subtitle{ color:var(--simec-muted); }

.bassymala-figure img{ border-radius:14px; border:1px solid rgba(11,15,18,0.04); }

/* Example card */
.example-card{ background: linear-gradient(180deg,#FFF9EC,#fff); padding:20px; border-radius:12px; box-shadow:0 12px 30px rgba(16,24,32,0.04); }

/* Footer */
footer{ background:transparent; padding:32px 0; color:var(--simec-muted); }

/* Responsive tweaks */
@media (max-width: 992px){
    .static-hero .title{ font-size:1.4rem; }
    .navbar-brand::before{ width:40px; height:40px; }
}


/* Cards for "Au Cœur de la Connaissance" section */
.knowledge-section {
    padding: 48px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0));
}
.knowledge-section .section-intro { max-width:900px; margin:0 auto 28px; text-align:center; }
.knowledge-cards { display:flex; gap:20px; justify-content:center; flex-wrap:wrap; }
.knowledge-card {
    background: #FFF9EC; /* cream */
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16,24,32,0.06);
    padding: 22px;
    width: 300px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
}

/* Bassymala cards reuse knowledge-card look but allow full width in grid */
.bassymala-cards .knowledge-card { width:100%; }
.bassymala-cards .title { color:#0b5f57; font-weight:700; }
.bassymala-cards .subtitle { color:#6b6b6b; margin-bottom:8px; }
.knowledge-card .title { color: #0b5f57; font-weight:700; margin-bottom:8px; font-size:1.05rem; }
.knowledge-card .subtitle { color:#6b6b6b; margin-bottom:12px; }
.knowledge-card .arabic { font-family: 'Amiri', serif; font-size:1.25rem; color:#222831; margin:12px 0; direction:rtl; text-align:right; }
.knowledge-card .explore { margin-top:auto; align-self:stretch; text-align:right; }
.knowledge-card .btn { background:#0b6b6b; color:#fff; border-radius:8px; padding:8px 12px; text-decoration:none; display:inline-block; }

@media (max-width: 960px) {
    .knowledge-cards { flex-direction:column; align-items:center; }
    .knowledge-card { width:92%; }
}

/* --------------------------------------------------------------------------
     Header improvements
     - dark transparent header over hero, switches to white on scroll
     - clearer link colors, toggler, and cart button styling
    ------------------------------------------------------------------------- */

#header { position:relative; z-index: 1100; }
#header .navbar { background: rgba(0,0,0,0.35); padding: 0.5rem 0; transition: background .22s ease, box-shadow .22s ease, padding .22s ease; }
#header .navbar .navbar-brand img { height:40px; }
#header .navbar .navbar-brand .fw-bold { color: #fff; font-size:1.05rem; }
#header .navbar .nav-link { color: rgba(255,255,255,0.95); font-weight:600; padding:0.5rem 0.75rem; }
#header .navbar .nav-link:hover, #header .navbar .nav-link:focus { color: var(--primary); }

/* scrolled / sticky state (JS adds .scrolled on header element) */
#header.scrolled .navbar { background: #ffffff; box-shadow: 0 6px 20px rgba(15,23,42,0.08); padding: 0.4rem 0; }
#header.scrolled .navbar .nav-link { color: #180461ff; }
#header.scrolled .navbar .navbar-brand .fw-bold { color: #180461ff; }

/* Toggler and collapsed menu */
.navbar-toggler { border: 0.5px solid rgba(255,255,255,0.12); background: transparent; }
#header.scrolled .navbar-toggler { border-color: rgba(11,15,18,0.06); }
.navbar-toggler-icon { filter: invert(1) brightness(2); }
#header.scrolled .navbar-toggler-icon { filter: none; }

/* Cart button small improvement */
.btn.btn-primary.d-flex.align-items-center { background: var(--primary); border-color: var(--primary); }
.cart-count { background:#fff;color:var(--primary);padding:2px 6px;border-radius:999px;font-weight:700;margin-left:6px }

/* Ensure dropdowns and menus inherit correct contrast */
.dropdown-menu { min-width: 160px; }
#header.scrolled .dropdown-menu { background: #fff; color: #222; }

@media (max-width: 768px) {
    #header .navbar { padding: 0.4rem 0; }
    #header .navbar .nav-link { padding: 0.4rem 0.6rem; }
}

/* --------------------------------------------------------------------------
     Merged rules from assets/css/home-main.css
     (kept at the end so project-specific overrides apply)
     -------------------------------------------------------------------------- */

:root{
    --primary:#0d6efd;
    --muted:#6c757d;
    --bg:#f8fafb;
}
body{background:var(--bg);font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;color:#222}
.navbar-brand img{height:36px}
.hero{background:linear-gradient(120deg, rgba(13,110,253,0.9), rgba(0,123,85,0.85));padding:80px 0}
.hero .lead{color:rgba(255,255,255,0.9)}
.card{border:none}
.stretched-link::after{display:none}
.btn-primary{background:var(--primary);border-color:var(--primary)}
.btn-outline-light{color:#fff;border-color:rgba(255,255,255,0.2)}
footer{background:transparent}
@media (max-width:768px){.hero{padding:48px 0}.hero .display-5{font-size:1.6rem}}

/* SIMEC specific blocks */
.manifesto{max-width:900px;margin:0 auto;font-size:1.02rem;color:var(--muted);line-height:1.6}
.manifesto .lead{font-weight:600;color:#222}

.bassymala-figure img{border-radius:12px;box-shadow:0 8px 24px rgba(15,23,42,0.08)}
.bassymala-cards .knowledge-card{background:#fff;padding:18px;border-radius:12px;box-shadow:0 6px 20px rgba(15,23,42,0.06);height:100%}
.knowledge-card .title{font-weight:700;color:var(--primary);margin-bottom:6px}
.knowledge-card .subtitle{color:var(--muted);font-size:0.95rem;margin-bottom:8px}
.knowledge-card .arabic{font-family:'Amiri',serif;font-size:1.05rem;color:#333}
.knowledge-card .verse{font-size:0.85rem;color:#6b6b6b}

.clavier-connaissance{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-width:720px;margin:0 auto}
.touche-clavier{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:8px;background:#fff;color:#111;text-decoration:none;box-shadow:0 6px 18px rgba(10,20,30,0.06);font-weight:700}
.touche-clavier:hover{transform:translateY(-4px);transition:all .15s ease}

.example-card{border-radius:12px}
.owl-carousel .item img{border-radius:8px}

.arabic-verse{font-family:'Amiri',serif;color:#222}

/* Footer small tweak for contrast */
footer p{color:#6b6b6b}

@media (max-width:992px){
    .bassymala-cards .knowledge-card{padding:14px}
    .touche-clavier{width:48px;height:48px}
}

/* 9A - Clavier styles moved from app/Views/home/index.php */
.clavier-connaissance.ksa-9a {
    max-width: 1400px;
    padding: 2.5rem;
    /* image (optional) + gradient fallback - use relative path from this CSS file */
    background-image: url('../images/lamain.png'), linear-gradient(145deg, #03062eb4, #1a0445cc); background-repeat: no-repeat; background-position: center; background-size:cover; background-blend-mode: overlay;
     
    position: relative;
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
               inset 0 2px 15px rgba(255, 255, 255, 0.1);
     /* Force strict 3 columns x 4 rows layout to preserve the schematic
         Keys will fill each fixed cell so the visual order never changes */
     display: grid;
     grid-template-columns: repeat(3, 110px);
     grid-template-rows: repeat(4, 110px);
     gap: 1rem;
     justify-content: center; /* center the whole grid inside container */
     align-items: center;
}

.clavier-grid.ksa-9a {
    display: grid;
    /* Force strict 3 columns x 4 rows layout */
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, minmax(80px, 1fr));
    gap: 1rem 1.2rem;
    padding: 1rem;
    width: 100%;
    max-width: none;
    margin: 0;
}

.touche-clavier.ksa-9a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(252, 155, 155, 0.12), rgba(255, 255, 255, 0.06));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    /* slightly reduced padding to give more room and tighten layout */
     
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    /* let the grid define size; make each key fill its grid cell */
    height: 120px;
    width: 90px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative; /* ensure keys sit above overlay */
    z-index: 2;
}

/* overlay to darken the background image and improve contrast */
.clavier-connaissance.ksa-9a::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
    /* slightly lighter overlay so the hand-image remains visible */
    background: linear-gradient(180deg, rgba(0,0,0,0.42), rgba(0,0,0,0.18));
}

.touche-clavier.ksa-9a:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3),
               0 2px 8px rgba(255, 255, 255, 0.1);
    color: white;
}

.touche-clavier.ksa-9a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.touche-clavier.ksa-9a:hover::before { opacity: 1; }

.touche-number.ksa-9a {
    /* reduced size to better fit the fixed 3x4 grid */
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.10rem;
    font-family: 'Cinzel Decorative', serif;
    text-shadow: 0 0 15px rgba(255,255,255,0.6),
                0 0 30px rgba(255,255,255,0.3);
    letter-spacing: 1px;
}

.touche-label.ksa-9a {
    font-size: 0.9rem;
    text-align: center;
    opacity: 0.95;
    /* tighter line-height and small margin-top to sit closer to the number */
    line-height: 1.2;
    margin-top: 0.08rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.touche-clavier.special.ksa-9a {
    background: linear-gradient(135deg, rgba(128, 0, 255, 0.15), rgba(64, 0, 128, 0.1));
    border-color: rgba(255, 255, 255, 0.25);
}

.touche-clavier.special.ksa-9a .touche-number.ksa-9a {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255,215,0,0.6),
                0 0 30px rgba(255,215,0,0.3);
}

@media (max-width: 1200px) {
    .clavier-grid.ksa-9a { gap: 0.8rem; }
    .touche-number.ksa-9a { font-size: 2rem; }
    .touche-label.ksa-9a { font-size: 0.8rem; }
}

@media (max-width: 768px) {
    .clavier-grid.ksa-9a { gap: 0.7rem; padding: 0.7rem; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); }
    .touche-clavier.ksa-9a { padding: 1rem 0.6rem; min-height: 100px; }
    .touche-number.ksa-9a { font-size: 1.6rem; margin-bottom: 0.3rem; }
    .touche-label.ksa-9a { font-size: 0.7rem; line-height: 1.2; }
}

@media (max-width: 480px) {
    .clavier-grid.ksa-9a { gap: 0.5rem; padding: 0.5rem; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); }
    .touche-clavier.ksa-9a { padding: 0.8rem 0.4rem; min-height: 90px; aspect-ratio: 1.2; }
    .touche-number.ksa-9a { font-size: 1.4rem; margin-bottom: 0.2rem; }
    .touche-label.ksa-9a { font-size: 0.65rem; }
}

/* End 9A */

/* 9A - Clavier: sequential glow animation (one light cycles across touches) */
@keyframes clavier-glow {
    0%, 6% {
        box-shadow: 0 8px 28px rgba(255,215,0,0.95), 0 0 64px rgba(255,215,0,0.25);
        transform: translateY(-4px) scale(1.02);
    }
    8%, 100% {
        box-shadow: none;
        transform: none;
    }
}

/* base animation on each key; delays below stagger the effect */
.touche-clavier.ksa-9a {
        /* keep existing transitions; add animation that loops across all keys */
        animation-name: clavier-glow;
        animation-duration: 12s; /* total cycle across 12 keys */
        animation-timing-function: linear;
        animation-iteration-count: infinite;
        animation-fill-mode: both;
}

/* Staggered delays for a 12-step sequence (1s per key) */
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(1)  { animation-delay: 0s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(2)  { animation-delay: 1s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(3)  { animation-delay: 2s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(4)  { animation-delay: 3s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(5)  { animation-delay: 4s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(6)  { animation-delay: 5s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(7)  { animation-delay: 6s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(8)  { animation-delay: 7s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(9)  { animation-delay: 8s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(10) { animation-delay: 9s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(11) { animation-delay: 10s; }
.clavier-connaissance.ksa-9a > .touche-clavier.ksa-9a:nth-child(12) { animation-delay: 11s; }

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .touche-clavier.ksa-9a { animation: none !important; }
}


