/* =========================================================
   Dr Mohcine El Oufir — compléments au template Crafto Medical
   ---------------------------------------------------------
   Le design repose sur les fichiers d'origine du template
   (vendors, icon, style, responsive, demos/medical/medical.css).
   Ce fichier n'ajoute que :
   1. les polices du template Beauty Salon, hébergées localement ;
   2. la mise en forme des contenus saisis dans le back-office ;
   3. quelques ajustements propres au site (menu, vidéos, galerie).
   ========================================================= */

/* 1. Polices Beauty Salon : Marcellus (titres) + Urbanist (texte) */
@font-face {
    font-family: 'Marcellus';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/marcellus-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Marcellus';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/marcellus-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Urbanist';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/urbanist-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Urbanist';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/urbanist-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Charte graphique du Dr El Oufir : vert #6CC067 (couleur principale de l'ancien site).
   Le template Medical s'appuie sur la variable --base-color ; seules les teintes
   claires codées en dur dans demos/medical/medical.css sont redéfinies ici. */
:root {
    --base-color: #6CC067;
    --brand-green-dark: #4f9f4a;
    --brand-green-light: #f2faf2;
}
.bg-light-turquoise-blue {
    background-color: var(--brand-green-light);
}
.bg-light-sea-green-transparent {
    background-color: rgba(108, 192, 103, 0.8);
}
.bg-light-sea-green-transparent-light {
    background-color: rgba(108, 192, 103, 0.15);
}

/* Réglages typographiques repris du template Beauty Salon */
body {
    letter-spacing: 0.3px;
}

/* Échelle des titres : Marcellus est plus large que la police d'origine du template,
   les tailles sont donc modérées (environ -18 %) pour garder des titres sobres et équilibrés. */
h1, .h1 { font-size: 3.6rem; line-height: 4rem; }
h2, .h2 { font-size: 2.75rem; line-height: 3.1rem; }
h3, .h3 { font-size: 2.15rem; line-height: 2.6rem; }
h4, .h4 { font-size: 1.75rem; line-height: 2.2rem; }
.page-title-extra-large h1 { font-size: 3.2rem; line-height: 3.6rem; }
.page-title-extra-large h2 { font-size: 17px; line-height: 22px; }
@media (max-width: 1199px) {
    h1, .h1 { font-size: 3.1rem; line-height: 3.5rem; }
    h2, .h2 { font-size: 2.45rem; line-height: 2.85rem; }
    h3, .h3 { font-size: 1.95rem; line-height: 2.4rem; }
    .page-title-extra-large h1 { font-size: 2.8rem; line-height: 3.2rem; }
}
@media (max-width: 767px) {
    h1, .h1 { font-size: 2.45rem; line-height: 2.9rem; }
    h2, .h2 { font-size: 2.05rem; line-height: 2.45rem; }
    h3, .h3 { font-size: 1.7rem; line-height: 2.15rem; }
    h4, .h4 { font-size: 1.45rem; line-height: 1.9rem; }
    .page-title-extra-large h1 { font-size: 2.3rem; line-height: 2.75rem; }
}
/* Titres d'articles : souvent longs, ils restent au niveau d'un h2 pour garder une hiérarchie homogène. */
.page-title-extra-large .article-title { font-size: 2.75rem; line-height: 3.25rem; }
@media (max-width: 1199px) {
    .page-title-extra-large .article-title { font-size: 2.4rem; line-height: 2.9rem; }
}
@media (max-width: 767px) {
    .page-title-extra-large .article-title { font-size: 1.9rem; line-height: 2.4rem; }
}
.navbar .navbar-nav .nav-link {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 2. Contenus rédigés dans le back-office (pages, spécialités, articles) */
.rich-content > *:last-child {
    margin-bottom: 0;
}
.rich-content h2,
.rich-content h3,
.rich-content h4 {
    font-family: var(--alt-font);
    font-weight: 400;
    color: var(--dark-gray);
    letter-spacing: -0.5px;
}
.rich-content h2 {
    font-size: 2rem;
    line-height: 2.5rem;
    margin: 45px 0 18px;
}
.rich-content h3 {
    font-size: 1.55rem;
    line-height: 2.1rem;
    margin: 35px 0 15px;
}
.rich-content h4 {
    font-size: 1.25rem;
    line-height: 1.8rem;
    margin: 28px 0 12px;
}
.rich-content > h2:first-child,
.rich-content > h3:first-child,
.rich-content > h4:first-child {
    margin-top: 0;
}
.rich-content p {
    margin-bottom: 20px;
}
.rich-content a {
    color: var(--base-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.rich-content a:hover {
    color: var(--dark-gray);
}
.rich-content strong {
    color: var(--dark-gray);
    font-weight: 700;
}
.rich-content ul,
.rich-content ol {
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}
.rich-content ul > li,
.rich-content ol > li {
    position: relative;
    padding: 6px 0 6px 32px;
}
.rich-content ul > li::before {
    content: "\f00c";
    font-family: "Font Awesome 7 Free", "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 12px;
    position: absolute;
    left: 0;
    top: 7px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    text-align: center;
    color: var(--base-color);
    background-color: rgba(108, 192, 103, 0.15);
}
.rich-content ol {
    counter-reset: rich-ol;
}
.rich-content ol > li {
    counter-increment: rich-ol;
}
.rich-content ol > li::before {
    content: counter(rich-ol);
    position: absolute;
    left: 0;
    top: 8px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    background-color: var(--base-color);
}
.rich-content ul ul,
.rich-content ol ul {
    margin: 6px 0 0;
}
.rich-content blockquote {
    margin: 30px 0;
    padding: 22px 30px;
    border-left: 3px solid var(--base-color);
    border-radius: 0 6px 6px 0;
    background-color: var(--brand-green-light);
    color: var(--dark-gray);
    font-size: 18px;
    line-height: 30px;
}
.rich-content blockquote p:last-child {
    margin-bottom: 0;
}
.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.rich-content table {
    width: 100%;
    margin-bottom: 30px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--extra-medium-gray);
    border-radius: 6px;
    overflow: hidden;
    font-size: 16px;
    line-height: 26px;
}
.rich-content th,
.rich-content td {
    padding: 14px 18px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--extra-medium-gray);
}
.rich-content tr:last-child td {
    border-bottom: 0;
}
.rich-content th {
    background-color: var(--brand-green-light);
    color: var(--dark-gray);
    font-weight: 700;
}
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 3. Ajustements propres au site */

/* Menu : sept rubriques au lieu de six dans la démo */
@media (min-width: 992px) {
    .navbar .navbar-nav .nav-link {
        padding-left: 15px;
        padding-right: 15px;
        font-size: 17px;
    }
    header .navbar .simple-dropdown .dropdown-menu {
        border-radius: 6px;
    }
}
@media (min-width: 992px) and (max-width: 1399px) {
    .navbar .navbar-nav .nav-link {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 16px;
    }
    header .btn.btn-switch-text.btn-small > span {
        padding: 8px 10px;
    }
}

/* Portrait du docteur dans le hero (photo réelle détourée, de la coiffe aux mains) :
   placé au-dessus du bandeau vert pour que les mains restent visibles, avec de l'air au-dessus. */
.hero-doctor {
    margin: 0 auto;
    padding-top: 40px;
    margin-bottom: 92px;          /* hauteur du bandeau vert "Informations pratiques" */
    text-align: center;
}
.hero-doctor > img {
    display: inline-block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 620px;
}
@media (max-width: 1399px) {
    .hero-doctor > img { max-height: 560px; }
}
@media (max-width: 991px) {
    .hero-doctor { padding-top: 10px; margin-bottom: 0; }
    .hero-doctor > img { max-height: 470px; }
}
@media (max-width: 575px) {
    .hero-doctor > img { max-height: 400px; }
}

/* Boutons groupés (hero, en-têtes de section) : alignés et de même largeur sur mobile */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 15px;
}
.hero-actions > .btn {
    margin: 0 !important;
}
@media (max-width: 991px) {
    .hero-actions { justify-content: center; }
}
@media (max-width: 575px) {
    .hero-actions > .btn {
        flex: 1 1 100%;
        max-width: 320px;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .hero-actions > .btn > span { justify-content: center; }
}

/* Bandeau vert d'informations du hero : plus compact sur mobile */
@media (max-width: 767px) {
    .top-space-margin .bg-base-color.position-absolute .swiper-slide { font-size: 15px; line-height: 22px; }
    .top-space-margin .bg-base-color.position-absolute { padding-top: 18px !important; padding-bottom: 18px !important; }
}

/* Calendrier de réservation */
.booking-nav {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--extra-medium-gray);
    background: var(--white);
    color: var(--dark-gray);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}
.booking-nav:hover:not(:disabled) { background: var(--base-color); border-color: var(--base-color); color: var(--white); }
.booking-nav:disabled { opacity: .35; cursor: not-allowed; }
.booking-weekdays,
.booking-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}
.booking-weekdays span { font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--medium-gray); padding-bottom: 6px; }
.booking-day {
    aspect-ratio: 1 / 1;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b9bdbf;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}
.booking-day.is-available {
    background: var(--brand-green-light);
    color: var(--dark-gray);
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(108, 192, 103, .45);
    transition: all .2s ease;
}
.booking-day.is-available:hover { background: rgba(108, 192, 103, .25); }
.booking-day.is-selected,
.booking-day.is-selected:hover { background: var(--base-color); color: var(--white); box-shadow: 0 8px 18px rgba(108, 192, 103, .45); }
.booking-day.is-today { text-decoration: underline; text-underline-offset: 4px; }
.booking-days.is-loading { opacity: .4; pointer-events: none; }
.booking-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-green-light); box-shadow: inset 0 0 0 1px rgba(108, 192, 103, .6); margin-right: 8px; vertical-align: -1px; }
.booking-slots-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.booking-slot {
    border: 1px solid var(--extra-medium-gray);
    background: var(--white);
    border-radius: 6px;
    padding: 9px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-gray);
    transition: all .2s ease;
}
.booking-slot:hover { border-color: var(--base-color); color: var(--base-color); }
.booking-slot.is-selected { background: var(--base-color); border-color: var(--base-color); color: var(--white); }
.booking-empty { font-size: 15px; line-height: 24px; color: var(--medium-gray); }
.booking-choice.is-chosen { box-shadow: 0 0 0 2px var(--base-color); }
.booking-choice.is-missing { box-shadow: 0 0 0 2px #e05252; }

/* Titres arabes (vidéos des interventions télévisées) */
[dir="rtl"],
.rtl-text {
    direction: rtl;
    text-align: right;
    font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Geeza Pro", Arial, sans-serif;
    letter-spacing: 0;
}

/* Vignettes vidéo : toujours au format 16/9 quel que soit le visuel YouTube */
.video-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--dark-gray);
}
.video-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.12, 0, .38, 0);
}
.card:hover .video-thumb img {
    transform: scale(1.06);
}
.video-thumb .video-thumb-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 50%;
    text-align: center;
    background-color: var(--white);
    color: var(--red);
    font-size: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    transition: transform .3s ease, background-color .3s ease, color .3s ease;
}
.card:hover .video-thumb .video-thumb-play {
    background-color: var(--base-color);
    color: var(--white);
    transform: translate(-50%, -50%) scale(1.08);
}
.video-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background-color: var(--dark-gray);
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Cartes d'articles : hauteur égale sur une même ligne */
.blog-grid-row .card {
    height: 100%;
}
.blog-grid-row .blog-image img {
    width: 100%;
    aspect-ratio: 800 / 570;
    object-fit: cover;
}

/* Bandeau "source" des articles issus de la veille */
.source-box {
    border-left: 3px solid var(--base-color);
}

/* Carte Google Maps intégrée (remplace le composant #map du template, qui exige une clé API) */
.map-embed {
    display: block;
    width: 100%;
    height: 520px;
    border: 0;
    filter: grayscale(.25);
}
@media (max-width: 767px) {
    .map-embed {
        height: 380px;
    }
}

/* Champ anti-robots : invisible pour les visiteurs */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Lien d'évitement (accessibilité clavier) */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 10px 18px;
    background: var(--dark-gray);
    color: var(--white);
    border-radius: 0 0 6px 0;
}
.skip-link:focus {
    left: 0;
    color: var(--white);
}

/* Cartes sur deux colonnes (pages intérieures) : icône à gauche, texte à droite, pour des lignes lisibles. */
.feature-box.feature-box-horizontal {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 28px;
    padding: 36px 40px;
}
.feature-box.feature-box-horizontal .feature-box-icon {
    flex-shrink: 0;
    margin: 0;
}
.feature-box.feature-box-horizontal .feature-box-content {
    flex: 1 1 auto;
}
.feature-box.feature-box-horizontal .feature-box-content p {
    line-height: 28px;
}
@media (max-width: 575px) {
    .feature-box.feature-box-horizontal {
        flex-direction: column;
        text-align: center;
        gap: 18px;
        padding: 32px 26px;
    }
}

/* Page « À propos du centre » : vignettes de même format, quelle que soit l'orientation des photos. */
.centre-gallery .gallery-thumb {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center 35%;
}
