.ac { --v1: #0b3d2e; --v2: #1b5e20; --v3: #2e7d32; --or: #f5c542; --or2: #d4a017; --encre: #13241a; --gris: #5f6f66; --fond: #f4f7f5;
      font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--encre); background: var(--fond); }
.ac * { box-sizing: border-box; }

/* ---------- Bannière diaporama ----------
   Diapositives empilées dans une même case de grille (la bannière prend la hauteur de la plus grande).
   Ordinateur : image plein cadre, texte par-dessus. Téléphone : image en haut (format paysage), texte en dessous.
   .entiere : affiche / logo montré en entier sur un fond flouté tiré de l'image (rien n'est coupé). */
.ac-hero { position: relative; overflow: hidden; color: #fff; background: var(--v1); isolation: isolate; }
.ac-pistes { display: grid; }
.ac-diapo { grid-area: 1 / 1; position: relative; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s 1s; }
.ac-diapo.actif { opacity: 1; visibility: visible; transition: opacity 1s ease; z-index: 1; }
.ac-media { position: relative; overflow: hidden; background: radial-gradient(700px 500px at 80% 10%, rgba(245, 197, 66, .3), transparent 60%),
            radial-gradient(600px 500px at 0% 100%, rgba(46, 125, 50, .6), transparent 60%), linear-gradient(135deg, #0b3d2e, #14532d); }
.ac-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ac-diapo.actif:not(.entiere) .ac-img { animation: acKen 9s ease-out forwards; }
@keyframes acKen { from { transform: scale(1.02); } to { transform: scale(1.12); } }
.ac-flou { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(28px) saturate(1.3) brightness(.55); transform: scale(1.1); }
.entiere .ac-img { position: relative; object-fit: contain; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .45)); }
.ac-sur { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; font-size: .76rem; font-weight: 800; letter-spacing: .06em;
          text-transform: uppercase; color: #2b2300; background: var(--or); }
.ac-sur.rouge { background: #e53935; color: #fff; }
.ac-diapo h2 { margin: 12px 0 8px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; color: #fff; text-shadow: 0 4px 30px rgba(0, 0, 0, .35); overflow-wrap: anywhere; }
.ac-diapo p { margin: 0 0 20px; color: rgba(255, 255, 255, .9); line-height: 1.5; }
.ac-diapo.actif .ac-sur, .ac-diapo.actif h2, .ac-diapo.actif p, .ac-diapo.actif .ac-actions { animation: acMonte .9s cubic-bezier(.2, .9, .3, 1) both; }
.ac-diapo.actif h2 { animation-delay: .1s; } .ac-diapo.actif p { animation-delay: .2s; } .ac-diapo.actif .ac-actions { animation-delay: .3s; }
@keyframes acMonte { from { opacity: 0; transform: translateY(22px); } }
.ac-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ac-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 16px; font-weight: 800; font-size: 1rem; text-decoration: none !important;
          color: #2b2300 !important; background: linear-gradient(135deg, #ffd76a, var(--or) 50%, var(--or2)); box-shadow: 0 14px 34px rgba(212, 160, 23, .4); transition: transform .15s, box-shadow .15s; }
.ac-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(212, 160, 23, .5); }
.ac-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; }
.ac-compte { display: flex; gap: 8px; }
.ac-compte span { min-width: 56px; padding: 7px 6px; border-radius: 14px; text-align: center; background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
                  border: 1px solid rgba(255, 255, 255, .18); font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ac-compte b { display: block; font-size: 1.45rem; line-height: 1.1; color: var(--or); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.ac-jauge { width: 200px; max-width: 100%; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.ac-jauge i { display: block; height: 100%; background: linear-gradient(90deg, var(--or), #ffe08a); border-radius: 99px; }
.ac-puces { position: absolute; z-index: 3; display: flex; gap: 8px; }
.ac-puce { flex: 1; max-width: 80px; height: 4px; border: 0; padding: 0; border-radius: 99px; background: rgba(255, 255, 255, .3); cursor: pointer; overflow: hidden; position: relative; }
.ac-puce::before { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: var(--or); }
.ac-puce.actif::before { animation: acProgres var(--duree, 7s) linear forwards; }
.ac-puce.vu::before { transform: scaleX(1); }
@keyframes acProgres { to { transform: scaleX(1); } }
.ac-hero.pause .ac-puce.actif::before { animation-play-state: paused; }
.ac-fleches { position: absolute; z-index: 3; display: flex; gap: 8px; }
.ac-fleches button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer;
                     -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: grid; place-items: center; }
.ac-fleches button:hover { background: rgba(255, 255, 255, .22); }
.ac-fleches svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; }

/* Ordinateur et tablette : image plein cadre, texte par-dessus */
@media (min-width: 768px) {
    .ac-diapo { height: min(76vh, 620px); min-height: 460px; }
    .ac-media { position: absolute; inset: 0; }
    .ac-media::after { content: ''; position: absolute; inset: 0; pointer-events: none;
                       background: linear-gradient(180deg, rgba(6, 26, 18, .2) 0%, rgba(6, 26, 18, .1) 35%, rgba(6, 26, 18, .8) 80%, rgba(6, 26, 18, .95) 100%),
                                   linear-gradient(90deg, rgba(6, 26, 18, .7), rgba(6, 26, 18, .15) 60%, transparent); }
    .entiere .ac-img { position: absolute; z-index: 1; top: 7%; right: 5%; width: 44%; height: 80%; }
    .entiere .ac-media::after { background: linear-gradient(90deg, rgba(6, 26, 18, .85) 0%, rgba(6, 26, 18, .55) 45%, rgba(6, 26, 18, .1) 70%, transparent),
                                            linear-gradient(180deg, transparent 70%, rgba(6, 26, 18, .7)); z-index: 2; }
    .ac-diapo-txt { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; max-width: 1200px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 48px) 120px; }
    .entiere .ac-diapo-txt { padding-right: 52%; }
    .ac-diapo h2 { max-width: 760px; font-size: clamp(2.3rem, 5vw, 4rem); }
    .ac-diapo p { max-width: 560px; font-size: 1.15rem; }
    .ac-puces { left: 0; right: 0; bottom: 72px; max-width: 1200px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 48px); }
    .ac-fleches { right: clamp(24px, 5vw, 48px); bottom: 60px; }
}

/* Téléphone : image en haut au format paysage, texte en dessous sur un dégradé qui prolonge l'image */
@media (max-width: 767px) {
    .ac-diapo { display: flex; flex-direction: column; background: var(--v1); }
    .ac-media { flex: none; aspect-ratio: 4 / 3; }
    .entiere .ac-media { aspect-ratio: var(--ratio, 4 / 3); }
    .entiere .ac-img { padding: 14px 14px 30px; }
    .sans-image .ac-media { aspect-ratio: 16 / 7; }
    .ac-media::after { content: ''; position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none;
                       background: linear-gradient(180deg, transparent, rgba(11, 61, 46, .75) 60%, var(--v1)); }
    .ac-diapo-txt { position: relative; z-index: 2; flex: 1; margin-top: -44px; padding: 0 20px 92px; }
    .ac-diapo h2 { font-size: clamp(1.75rem, 8vw, 2.3rem); }
    .ac-diapo p { font-size: 1rem; margin-bottom: 18px; }
    .ac-btn { min-height: 50px; width: 100%; justify-content: center; }
    .ac-actions { gap: 10px; }
    .ac-compte { width: 100%; }
    .ac-compte span { flex: 1; }
    .ac-jauge { width: 100%; }
    .ac-puces { left: 20px; right: 20px; bottom: 56px; }
    .ac-fleches { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ac-diapo.actif .ac-img, .ac-diapo.actif .ac-sur, .ac-diapo.actif h2, .ac-diapo.actif p, .ac-diapo.actif .ac-actions { animation: none; } }

/* ---------- Bandeau « Aujourd'hui » ---------- */
.ac-jour { position: relative; z-index: 5; max-width: 1200px; margin: -40px auto 0; padding: 0 clamp(14px, 4vw, 32px); }
.ac-jour-rail { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .ac-jour-rail { grid-template-columns: 1fr 1fr; } .ac-carte-j.priere { grid-column: 1 / -1; } }
@media (max-width: 380px) { .ac-jour-rail { grid-template-columns: 1fr; } }
.ac-carte-j { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 22px; background: #fff; color: var(--encre) !important;
              text-decoration: none !important; box-shadow: 0 18px 44px rgba(11, 61, 46, .16); border: 1px solid rgba(226, 234, 229, .9); transition: transform .15s; }
a.ac-carte-j:hover { transform: translateY(-3px); }
.ac-carte-j small { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--v3); }
.ac-carte-j b { font-size: 1.15rem; line-height: 1.25; }
.ac-carte-j span { color: var(--gris); font-size: .88rem; }
.ac-carte-j.priere { background: linear-gradient(135deg, #0d2b4d, #102a43); color: #fff !important; border: 0; }
.ac-carte-j.priere small { color: var(--or); }
.ac-carte-j.priere span { color: rgba(255, 255, 255, .8); }
.ac-prieres { display: flex; gap: 6px; margin-top: 6px; }
.ac-prieres span { flex: 1; text-align: center; padding: 6px 2px; border-radius: 12px; background: rgba(255, 255, 255, .08); font-size: .7rem !important; }
.ac-prieres span b { display: block; font-size: .92rem; color: #fff; }
.ac-prieres span.is-prochaine { background: var(--or); color: #2b2300 !important; }
.ac-prieres span.is-prochaine b { color: #2b2300; }
.ac-hegire { font-family: 'Amiri', serif; font-size: 1.05rem !important; color: var(--v2) !important; }

/* ---------- Sections ---------- */
.ac-section { max-width: 1200px; margin: 0 auto; padding: clamp(44px, 7vw, 72px) clamp(14px, 4vw, 32px) 0; }
.ac-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ac-tete > div { min-width: 0; }
@media (max-width: 480px) { .ac-tete { margin-bottom: 14px; } .ac-tete h2 { font-size: 1.55rem; } }
.ac-tete small { display: block; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--or2); margin-bottom: 4px; }
.ac-tete h2 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; color: var(--encre); }
.ac-tete a { flex: none; font-weight: 800; color: var(--v3); text-decoration: none; white-space: nowrap; }

.ac-infos { display: grid; grid-template-columns: 1.5fr 1fr 1fr; grid-auto-rows: 1fr; gap: 16px; }
.ac-info { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: #fff; color: var(--encre) !important; text-decoration: none !important;
           box-shadow: 0 10px 30px rgba(16, 40, 28, .08); border: 1px solid #e6ede8; transition: transform .2s, box-shadow .2s; }
.ac-info:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(16, 40, 28, .14); }
.ac-info-img { aspect-ratio: 16 / 10; background: #e8f3ea center / cover no-repeat; transition: transform .5s; }
.ac-info:hover .ac-info-img { transform: scale(1.04); }
.ac-info-txt { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ac-info-rub { align-self: flex-start; padding: 3px 10px; border-radius: 99px; font-size: .7rem; font-weight: 800; background: #e8f3ea; color: var(--v2); }
.ac-info b { font-size: 1.05rem; line-height: 1.3; }
.ac-info p { margin: 0; color: var(--gris); font-size: .9rem; line-height: 1.45; }
.ac-info small { margin-top: auto; color: #8a9a90; font-size: .78rem; font-weight: 600; }
.ac-info.grande { grid-row: span 2; }
.ac-info.grande .ac-info-img { aspect-ratio: auto; flex: 1; min-height: 240px; }
.ac-info.grande b { font-size: 1.4rem; }
@media (max-width: 900px) {
    /* Téléphone : la première information en grande carte, les suivantes en liste compacte (vignette + titre) */
    .ac-infos { display: flex; flex-direction: column; gap: 10px; }
    .ac-info.grande .ac-info-img { aspect-ratio: 16 / 10; flex: none; min-height: 0; }
    .ac-info.grande b { font-size: 1.2rem; }
    .ac-info:not(.grande) { flex-direction: row; align-items: stretch; border-radius: 18px; }
    .ac-info:not(.grande) .ac-info-img { flex: none; width: 108px; aspect-ratio: auto; min-height: 96px; }
    .ac-info:not(.grande) .ac-info-txt { padding: 12px 14px; gap: 4px; min-width: 0; }
    .ac-info:not(.grande) b { font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .ac-info:not(.grande) .ac-info-rub { font-size: .64rem; }
    .ac-info:not(.grande) small { font-size: .74rem; }
    .ac-info:hover { transform: none; }
}

/* Spiritualité */
.ac-spirit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .ac-spirit { grid-template-columns: 1fr 1fr; } }
.ac-tuile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; min-height: 170px; padding: 20px; border-radius: 24px; color: #fff !important;
            text-decoration: none !important; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5); transition: transform .2s; }
.ac-tuile:hover { transform: translateY(-4px) rotate(-.4deg); }
.ac-tuile::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.ac-tuile .ar { font-family: 'Amiri', serif; font-size: 2rem; line-height: 1; margin-bottom: auto; opacity: .9; }
.ac-tuile b { font-size: 1.2rem; }
.ac-tuile span { font-size: .86rem; opacity: .88; }
.ac-tuile.vert { background: linear-gradient(135deg, #2e7d32, #0b3d2e); }
.ac-tuile.or { background: linear-gradient(135deg, #e0a91c, #a8740a); }
.ac-tuile.bleu { background: linear-gradient(135deg, #1e63c4, #0d2b6b); }
.ac-tuile.rouge { background: linear-gradient(135deg, #e53935, #8e1c1c); }

/* La Dahira en chiffres */
.ac-chiffres-bloc { margin-top: clamp(44px, 7vw, 72px); color: #fff; overflow: hidden; position: relative;
                    background: radial-gradient(600px 300px at 90% 0%, rgba(245, 197, 66, .3), transparent 60%), linear-gradient(135deg, #0b3d2e, #14532d); }
.ac-chiffres-bloc::before { content: 'توبة'; position: absolute; right: -2%; bottom: -18%; font-family: 'Amiri', serif; font-size: clamp(9rem, 26vw, 20rem); line-height: 1; opacity: .06; pointer-events: none; }
.ac-chiffres-in { position: relative; max-width: 1200px; margin: 0 auto; padding: clamp(40px, 6vw, 64px) clamp(14px, 4vw, 32px); }
.ac-chiffres-in .ac-tete h2 { color: #fff; }
.ac-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
@media (max-width: 900px) { .ac-chiffres { grid-template-columns: 1fr 1fr; } }
.ac-chiffre { padding: 20px; border-radius: 22px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.ac-chiffre b { display: block; font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1; color: var(--or); font-variant-numeric: tabular-nums; }
.ac-chiffre span { display: block; margin-top: 6px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.ac-citation { margin: 28px 0 0; padding-left: 18px; border-left: 3px solid var(--or); font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-style: italic; color: rgba(255, 255, 255, .92); max-width: 720px; }
.ac-citation cite { display: block; margin-top: 6px; font-style: normal; font-size: .88rem; color: var(--or); font-weight: 700; }
.ac-fin { height: clamp(40px, 6vw, 60px); }

.ac-apparait { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .9, .3, 1); }
.ac-apparait.vu { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ac-apparait { opacity: 1; transform: none; transition: none; } }

/* Keur Serigne Touba */
.ac-kst { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0; overflow: hidden; border-radius: 28px; background: #fff;
          box-shadow: 0 18px 44px rgba(16, 40, 28, .1); border: 1px solid #e6ede8; }
@media (max-width: 900px) { .ac-kst { grid-template-columns: 1fr; } }
.ac-kst-img { min-height: 320px; background: #e8f3ea center / cover no-repeat; }
.ac-kst-txt { padding: clamp(22px, 4vw, 40px); }
.ac-kst-txt h3 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; color: var(--encre); }
.ac-kst-txt > p { margin: 0 0 18px; color: var(--gris); line-height: 1.6; }
.ac-kst-points { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .ac-kst-points { grid-template-columns: 1fr; } }
.ac-kst-point { padding: 14px; border-radius: 16px; background: #f4f8f5; }
.ac-kst-point b { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--v2); margin-bottom: 4px; }
.ac-kst-point b svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.ac-kst-point p { margin: 0; font-size: .86rem; color: var(--gris); line-height: 1.5; }

/* Galeries */
.ac-galeries { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
@media (max-width: 900px) { .ac-galeries { grid-template-columns: 1fr 1fr; gap: 10px; } .ac-galerie { aspect-ratio: 1 / 1; border-radius: 20px; }
                            .ac-galerie-txt { left: 12px; right: 12px; bottom: 12px; } .ac-galerie-txt b { font-size: 1rem; } }
.ac-galerie { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 24px; color: #fff !important; text-decoration: none !important;
              box-shadow: 0 12px 30px rgba(16, 40, 28, .14); }
.ac-galerie-img { position: absolute; inset: 0; background: #1b5e20 center / cover no-repeat; transition: transform .6s; }
.ac-galerie:hover .ac-galerie-img { transform: scale(1.06); }
.ac-galerie::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(6, 26, 18, .88)); }
.ac-galerie-txt { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 16px; }
.ac-galerie-txt b { display: block; font-size: 1.15rem; }
.ac-galerie-txt span { font-size: .82rem; color: rgba(255, 255, 255, .85); font-weight: 600; }
.ac-boutons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ac-btn.clair { background: rgba(255, 255, 255, .12); color: #fff !important; box-shadow: none; border: 1px solid rgba(255, 255, 255, .25); }
