/* ==================================================================
   NESS FOOD — Feuille de style principale
   ------------------------------------------------------------------
   Construite au-dessus de Bootstrap 5 selon les principes du Material
   Design : élévation par l'ombre plutôt que par la bordure, rayons
   généreux, palette de surfaces hiérarchisée, mouvement discret.

   Les couleurs sont exprimées en variables CSS et redéfinies pour le
   thème sombre : un seul jeu de règles sert les deux modes.
   ================================================================== */

/* ------------------------------------------------------------------
   0. Polices
   ------------------------------------------------------------------
   Tajawal (SIL Open Font License 1.1, voir fonts/LICENSE.txt) est
   auto-hébergée plutôt que servie par Google : une requête de moins
   vers un tiers, aucune fuite d'adresse IP du visiteur, et le cache
   d'un an déjà déclaré pour « font/woff2 » dans public/.htaccess.

   Chaque graisse est découpée en deux fichiers par plage Unicode. Le
   navigateur ne télécharge l'arabe que s'il rencontre de l'arabe :
   une page française ne paie donc rien pour cette police.
   ------------------------------------------------------------------ */

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/tajawal-400-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
                   U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
                   U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/tajawal-400-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: 'Tajawal';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/tajawal-500-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
                   U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
                   U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/tajawal-500-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: 'Tajawal';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/tajawal-700-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
                   U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
                   U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/tajawal-700-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;
}

/* ------------------------------------------------------------------
   1. Jetons de conception
   ------------------------------------------------------------------ */

:root {
    /* Typographie */
    --nf-font:    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --nf-font-ar: 'Tajawal', system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;

    /* Couleur principale — orange chaleureux, registre culinaire */
    --nf-primary:        #e64a19;
    --nf-primary-hover:  #d84315;
    --nf-primary-soft:   #fbe9e3;
    --nf-primary-text:   #ffffff;

    /* Couleur secondaire — vert profond, rappel du patrimoine */
    --nf-secondary:      #00695c;
    --nf-secondary-soft: #e0f2f1;

    /* Surfaces */
    --nf-bg:             #f7f5f3;
    --nf-surface:        #ffffff;
    --nf-surface-2:      #faf8f7;
    --nf-border:         #e6e1dd;

    /* Texte */
    --nf-text:           #1c1a19;
    --nf-text-muted:     #6d6763;

    /* Élévation */
    --nf-shadow-1: 0 1px 2px rgba(28, 26, 25, .06), 0 1px 3px rgba(28, 26, 25, .04);
    --nf-shadow-2: 0 2px 6px rgba(28, 26, 25, .07), 0 4px 12px rgba(28, 26, 25, .05);
    --nf-shadow-3: 0 6px 16px rgba(28, 26, 25, .09), 0 12px 32px rgba(28, 26, 25, .07);

    /* Rayons */
    --nf-radius-sm: 10px;
    --nf-radius:    16px;
    --nf-radius-lg: 24px;
    --nf-radius-pill: 999px;

    /* Mouvement */
    --nf-ease:     cubic-bezier(.2, 0, 0, 1);
    --nf-duration: 220ms;
}

[data-bs-theme="dark"] {
    --nf-primary:        #ff7043;
    --nf-primary-hover:  #ff8a65;
    --nf-primary-soft:   #3a2119;
    --nf-primary-text:   #1c1a19;

    --nf-secondary:      #4db6ac;
    --nf-secondary-soft: #16302e;

    --nf-bg:             #131211;
    --nf-surface:        #1c1a19;
    --nf-surface-2:      #232120;
    --nf-border:         #34302e;

    --nf-text:           #ece6e2;
    --nf-text-muted:     #a49d98;

    --nf-shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --nf-shadow-2: 0 2px 8px rgba(0, 0, 0, .45);
    --nf-shadow-3: 0 8px 24px rgba(0, 0, 0, .55);
}

/* Respect de la préférence système pour les animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------ */

/* La pile typographique est portée par « body » et non par « .nf-body » :
   les gabarits du tableau de bord et de l'administration emploient
   leurs propres classes racines et étaient jusqu'ici privés du réglage. */
body {
    font-family: var(--nf-font);
    -webkit-font-smoothing: antialiased;
}

.nf-body {
    background: var(--nf-bg);
    color: var(--nf-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.nf-main { flex: 1 0 auto; }

/* ------------------------------------------------------------------
   Lien d'évitement : premier élément atteint au clavier
   ------------------------------------------------------------------
   Il se cache vers le haut, jamais vers le côté. Un « left: -9999px »
   sort bien de l'écran en écriture latine, mais en écriture arabe le
   débordement à gauche devient défilable : la page s'élargit de dix
   mille pixels et s'ouvre sur une zone vide — tout le site paraissait
   blanc en arabe. Le débordement vers le haut, lui, n'est défilable
   dans aucun sens d'écriture.
   ------------------------------------------------------------------ */
.nf-skip-link {
    position: absolute;
    inset-inline-start: 8px;
    top: 8px;
    transform: translateY(-200%);
    z-index: 2000;
    padding: 12px 20px;
    background: var(--nf-primary);
    color: var(--nf-primary-text);
    border-radius: var(--nf-radius-sm);
    text-decoration: none;
    font-weight: 600;
}

.nf-skip-link:focus {
    transform: translateY(0);
}

/* Anneau de focus visible, exigence d'accessibilité */
:focus-visible {
    outline: 3px solid var(--nf-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ------------------------------------------------------------------
   3. Boutons
   ------------------------------------------------------------------ */

.nf-btn-primary {
    background: var(--nf-primary);
    color: var(--nf-primary-text);
    border: none;
    border-radius: var(--nf-radius-pill);
    padding: .65rem 1.6rem;
    font-weight: 600;
    box-shadow: var(--nf-shadow-1);
    transition: background var(--nf-duration) var(--nf-ease),
                box-shadow var(--nf-duration) var(--nf-ease),
                transform var(--nf-duration) var(--nf-ease);
}

.nf-btn-primary:hover,
.nf-btn-primary:focus {
    background: var(--nf-primary-hover);
    color: var(--nf-primary-text);
    box-shadow: var(--nf-shadow-2);
    transform: translateY(-1px);
}

.nf-btn-ghost {
    background: transparent;
    color: var(--nf-text);
    border: 1.5px solid var(--nf-border);
    border-radius: var(--nf-radius-pill);
    padding: .65rem 1.4rem;
    font-weight: 600;
    transition: border-color var(--nf-duration) var(--nf-ease),
                background var(--nf-duration) var(--nf-ease);
}

.nf-btn-ghost:hover,
.nf-btn-ghost:focus {
    border-color: var(--nf-primary);
    color: var(--nf-primary);
    background: var(--nf-primary-soft);
}

.nf-btn-icon {
    background: transparent;
    border: 1.5px solid var(--nf-border);
    border-radius: var(--nf-radius-pill);
    color: var(--nf-text);
    padding: .45rem .8rem;
    font-weight: 600;
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: border-color var(--nf-duration) var(--nf-ease);
}

.nf-btn-icon:hover { border-color: var(--nf-primary); color: var(--nf-primary); }

/* Une seule icône de thème est visible à la fois */
.nf-icon-moon { display: none; }
[data-bs-theme="dark"] .nf-icon-sun  { display: none; }
[data-bs-theme="dark"] .nf-icon-moon { display: inline; }

.nf-btn-account {
    background: transparent;
    border: none;
    color: var(--nf-text);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
}

.nf-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--nf-primary);
    color: var(--nf-primary-text);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .9rem;
}

/* ------------------------------------------------------------------
   4. En-tête
   ------------------------------------------------------------------ */

.nf-header {
    background: var(--nf-surface);
    border-bottom: 1px solid var(--nf-border);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.nf-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--nf-text);
    text-decoration: none;
}

.nf-brand-mark { color: var(--nf-primary); display: inline-flex; }
.nf-brand-accent { color: var(--nf-primary); }

.nf-header .nav-link {
    color: var(--nf-text-muted);
    font-weight: 500;
    padding: .5rem .9rem;
    border-radius: var(--nf-radius-sm);
    transition: color var(--nf-duration) var(--nf-ease),
                background var(--nf-duration) var(--nf-ease);
}

.nf-header .nav-link:hover,
.nf-header .nav-link.active {
    color: var(--nf-primary);
    background: var(--nf-primary-soft);
}

/* Un intitulé coupé en deux lignes désaligne toute la barre : mieux
   vaut le laisser dépasser, ce que les tailles ci-dessous évitent. */
.nf-header .nav-link { white-space: nowrap; }

/* ------------------------------------------------------------------
   En-tête déployé — typographie resserrée
   ------------------------------------------------------------------
   La barre horizontale doit loger, sur 1140 px, la marque, cinq
   entrées et cinq commandes. Les intitulés français sont les plus
   longs des trois langues : « Visites virtuelles » et « Créer un
   compte » suffisaient à faire déborder la ligne.

   Les tailles ne sont réduites qu'ici. En menu déroulant, la place ne
   manque pas et les cibles tactiles gardent leurs dimensions.
   ------------------------------------------------------------------ */

@media (min-width: 1200px) {

    .nf-header .nf-brand { font-size: 1.1rem; }

    .nf-header .nav-link {
        font-size: .9rem;
        padding: .5rem .6rem;
    }

    .nf-header .nf-btn-ghost,
    .nf-header .nf-btn-primary {
        font-size: .9rem;
        padding: .5rem 1.1rem;
    }

    .nf-header .nf-btn-icon {
        font-size: .8rem;
        padding: .4rem .65rem;
    }
}

/* ------------------------------------------------------------------
   4 bis. Bandeaux administrables
   ------------------------------------------------------------------
   Rendus au-dessus du bandeau principal à partir de la table `banners`.
   Leur nombre est variable — la mise en page ne suppose ni leur
   présence, ni la présence d'une image ou d'un lien.
   ------------------------------------------------------------------ */

.nf-promo {
    padding: 1rem 0 0;
}

.nf-promo > .container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    background: var(--nf-secondary-soft);
    border-radius: var(--nf-radius);
    padding: 1rem 1.25rem;
}

.nf-promo-image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--nf-radius-sm);
    flex: none;
}

.nf-promo-body {
    flex: 1 1 16rem;
    min-width: 0;
}

.nf-promo-title {
    font-weight: 700;
    color: var(--nf-secondary);
    margin: 0;
}

.nf-promo-text {
    color: var(--nf-text-muted);
    font-size: .92rem;
    margin: .25rem 0 0;
}

.nf-promo-action {
    flex: none;
}

@media (max-width: 575px) {
    .nf-promo-image { width: 100%; height: 140px; }
    .nf-promo-action { width: 100%; }
}

/* ------------------------------------------------------------------
   5. Bandeau principal
   ------------------------------------------------------------------ */

.nf-hero {
    padding: clamp(3rem, 8vw, 6rem) 0;
    background:
        radial-gradient(1200px 400px at 15% -10%, var(--nf-primary-soft), transparent 60%),
        var(--nf-bg);
}

.nf-badge {
    display: inline-block;
    background: var(--nf-secondary-soft);
    color: var(--nf-secondary);
    border-radius: var(--nf-radius-pill);
    padding: .35rem 1rem;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.nf-badge-warning {
    background: #fff3e0;
    color: #e65100;
}

[data-bs-theme="dark"] .nf-badge-warning {
    background: #3a2a12;
    color: #ffb74d;
}

.nf-hero-title {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.02em;
    margin-bottom: 1.1rem;
}

.nf-highlight {
    color: var(--nf-primary);
    position: relative;
    white-space: nowrap;
}

.nf-hero-lead {
    font-size: 1.1rem;
    color: var(--nf-text-muted);
    line-height: 1.65;
    max-width: 34rem;
    margin-bottom: 2rem;
}

.nf-search {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    background: var(--nf-surface);
    padding: .5rem;
    border-radius: var(--nf-radius-pill);
    box-shadow: var(--nf-shadow-2);
    max-width: 34rem;
}

.nf-search-field {
    flex: 1 1 16rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding-inline-start: 1rem;
    color: var(--nf-text-muted);
}

.nf-search-field .form-control {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: .6rem 0;
    color: var(--nf-text);
}

.nf-search-field .form-control:focus {
    box-shadow: none;
    outline: none;
}

.nf-search-submit { flex: 0 0 auto; }

.nf-hero-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.nf-hero-link {
    color: var(--nf-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    transition: color var(--nf-duration) var(--nf-ease);
}

.nf-hero-link:hover { color: var(--nf-primary); }

/* Composition décorative du bandeau */
.nf-hero-visual {
    position: relative;
    min-height: 380px;
}

.nf-hero-card {
    position: absolute;
    background: var(--nf-surface);
    border-radius: var(--nf-radius-lg);
    box-shadow: var(--nf-shadow-3);
    overflow: hidden;
    width: 260px;
}

.nf-hero-card-1 { top: 0; inset-inline-start: 5%; }
.nf-hero-card-2 { bottom: 0; inset-inline-end: 5%; }

/* Le dégradé est conservé sous l'image : il tient lieu de fond pendant
   le chargement, et de repli si le fichier venait à manquer. */
.nf-hero-card-media {
    height: 150px;
    background: linear-gradient(135deg, #ff8a65, #e64a19);
}

.nf-hero-card-media-alt {
    background: linear-gradient(135deg, #4db6ac, #00695c);
}

.nf-hero-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nf-hero-card-body {
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.nf-chip {
    align-self: flex-start;
    background: var(--nf-primary-soft);
    color: var(--nf-primary);
    border-radius: var(--nf-radius-pill);
    padding: .2rem .7rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.nf-chip-alt {
    background: var(--nf-secondary-soft);
    color: var(--nf-secondary);
}

.nf-price { color: var(--nf-primary); font-weight: 700; }
.nf-muted { color: var(--nf-text-muted); font-size: .9rem; }

@media (max-width: 991.98px) {
    .nf-hero-visual { min-height: 320px; margin-top: 2rem; }
    .nf-hero-card { width: 220px; }
}

/* En dessous de 576 px, deux cartes de 220 px décalées de 5 % de part et
   d'autre ne tiennent plus côte à côte : elles se chevauchaient. Le
   positionnement absolu est abandonné au profit du flux normal. */
@media (max-width: 575.98px) {
    /*
     * La gouttière « g-5 » du bandeau vaut 3 rem, soit une marge
     * négative de 24 px de chaque côté de la rangée, alors que le
     * conteneur ne compense que 12 px. Il en résultait 13 px de
     * débordement horizontal sur l'accueil — mesurés, et seule page du
     * site à en souffrir. La gouttière est ramenée à la valeur que le
     * conteneur sait absorber.
     */
    .nf-hero .row { --bs-gutter-x: 1.5rem; }

    .nf-hero-visual {
        min-height: 0;
        display: grid;
        gap: 1rem;
    }

    .nf-hero-card,
    .nf-hero-card-1,
    .nf-hero-card-2 {
        position: static;
        width: 100%;
        max-width: 22rem;
        margin-inline: auto;
        inset: auto;
    }

    .nf-hero-card-media { height: 10.5rem; }
}

/* ------------------------------------------------------------------
   6. Sections de contenu
   ------------------------------------------------------------------ */

.nf-section { padding: clamp(3rem, 7vw, 5rem) 0; }

.nf-section-head {
    max-width: 42rem;
    margin: 0 auto 3rem;
    text-align: center;
}

.nf-section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    font-weight: 700;
    letter-spacing: -.01em;
    margin-bottom: .75rem;
}

.nf-section-lead {
    color: var(--nf-text-muted);
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0;
}

.nf-feature {
    background: var(--nf-surface);
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius);
    padding: 1.75rem;
    height: 100%;
    transition: box-shadow var(--nf-duration) var(--nf-ease),
                transform var(--nf-duration) var(--nf-ease),
                border-color var(--nf-duration) var(--nf-ease);
}

.nf-feature:hover {
    box-shadow: var(--nf-shadow-2);
    transform: translateY(-3px);
    border-color: transparent;
}

.nf-feature-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: var(--nf-radius-sm);
    background: var(--nf-primary-soft);
    color: var(--nf-primary);
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.nf-feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.nf-feature-text {
    color: var(--nf-text-muted);
    line-height: 1.65;
    margin: 0;
    font-size: .95rem;
}

/* ------------------------------------------------------------------
   7. Appel à l'action
   ------------------------------------------------------------------ */

.nf-cta { padding: 0 0 clamp(3rem, 7vw, 5rem); }

.nf-cta-inner {
    background: linear-gradient(135deg, var(--nf-secondary), #004d40);
    color: #fff;
    border-radius: var(--nf-radius-lg);
    padding: clamp(2rem, 5vw, 3.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.nf-cta-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; margin-bottom: .6rem; }
.nf-cta-text  { opacity: .9; margin: 0; max-width: 34rem; line-height: 1.6; }

.nf-cta-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.nf-cta-actions .nf-btn-ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.nf-cta-actions .nf-btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ------------------------------------------------------------------
   8. Carte d'installation
   ------------------------------------------------------------------ */

.nf-setup-card {
    background: var(--nf-surface);
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius-lg);
    padding: clamp(1.75rem, 4vw, 2.75rem);
    box-shadow: var(--nf-shadow-1);
}

.nf-setup-title { font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; }
.nf-setup-lead  { color: var(--nf-text-muted); margin-bottom: 1.75rem; }

.nf-setup-steps {
    margin: 0;
    padding-inline-start: 1.25rem;
    display: grid;
    gap: 1rem;
}

.nf-setup-steps li { line-height: 1.7; }
.nf-setup-steps strong { display: block; margin-bottom: .25rem; }

.nf-setup-steps code,
.nf-setup-hint code {
    background: var(--nf-surface-2);
    border: 1px solid var(--nf-border);
    border-radius: 6px;
    padding: .15rem .5rem;
    font-size: .875em;
    color: var(--nf-primary);
    display: inline-block;
}

.nf-setup-hint { margin: 1.75rem 0 0; color: var(--nf-text-muted); font-size: .95rem; }

/* ------------------------------------------------------------------
   9. Pied de page
   ------------------------------------------------------------------ */

.nf-footer {
    background: var(--nf-surface);
    border-top: 1px solid var(--nf-border);
    margin-top: auto;
}

.nf-footer-title {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--nf-text);
    margin-bottom: 1rem;
}

.nf-footer-text { color: var(--nf-text-muted); line-height: 1.65; font-size: .95rem; }

.nf-footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }

.nf-footer-list a {
    color: var(--nf-text-muted);
    text-decoration: none;
    font-size: .93rem;
    transition: color var(--nf-duration) var(--nf-ease);
}

.nf-footer-list a:hover { color: var(--nf-primary); }

.nf-footer-bottom {
    border-top: 1px solid var(--nf-border);
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .88rem;
    color: var(--nf-text-muted);
}

.nf-footer-muted { opacity: .7; }

/* Label de distinction du projet.
   Le logotype est fourni en fond transparent, avec un texte bleu nuit :
   posé tel quel sur le pied de page sombre, il devient illisible. Une
   plaque claire le rétablit, sans altérer le fichier d'origine. */
.nf-footer-label {
    display: block;
    width: 150px;
    height: auto;
    margin-top: 1.25rem;
}

[data-bs-theme="dark"] .nf-footer-label {
    background: #fff;
    border-radius: var(--nf-radius-sm);
    padding: .5rem .75rem;
}

.nf-footer-incubator {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.nf-footer-incubator:hover,
.nf-footer-incubator:focus { color: var(--nf-primary); }

/* ------------------------------------------------------------------
   10. Bandeaux de notification
   ------------------------------------------------------------------ */

.nf-alert {
    border: none;
    border-radius: var(--nf-radius);
    box-shadow: var(--nf-shadow-1);
}

/* ------------------------------------------------------------------
   11. Formulaires
   ------------------------------------------------------------------ */

.form-label {
    font-weight: 600;
    font-size: .92rem;
    margin-bottom: .4rem;
    color: var(--nf-text);
}

.form-control,
.form-select {
    background: var(--nf-surface);
    border: 1.5px solid var(--nf-border);
    border-radius: var(--nf-radius-sm);
    padding: .7rem .9rem;
    color: var(--nf-text);
    transition: border-color var(--nf-duration) var(--nf-ease),
                box-shadow var(--nf-duration) var(--nf-ease);
}

.form-control:focus,
.form-select:focus {
    background: var(--nf-surface);
    border-color: var(--nf-primary);
    box-shadow: 0 0 0 3px var(--nf-primary-soft);
    color: var(--nf-text);
}

.form-control::placeholder { color: var(--nf-text-muted); opacity: .65; }

.form-text { color: var(--nf-text-muted); font-size: .85rem; margin-top: .35rem; }

.form-check-input:checked {
    background-color: var(--nf-primary);
    border-color: var(--nf-primary);
}

.form-check-input:focus {
    border-color: var(--nf-primary);
    box-shadow: 0 0 0 3px var(--nf-primary-soft);
}

.form-check-label { font-size: .93rem; line-height: 1.55; }

.nf-optional { color: var(--nf-text-muted); font-weight: 400; font-size: .85em; }

/* ------------------------------------------------------------------
   Connexion par fournisseur externe
   ------------------------------------------------------------------ */

.nf-auth-separator {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0;
    color: var(--nf-text-muted);
    font-size: .85rem;
}

.nf-auth-separator::before,
.nf-auth-separator::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--nf-border);
}

/* Le bouton suit les règles d'identité de Google : fond neutre,
   bordure discrète, logotype à gauche du libellé. Il ne prend donc pas
   la couleur principale du site, volontairement. */
.nf-google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    width: 100%;
    padding: .7rem 1rem;
    border: 1.5px solid var(--nf-border);
    border-radius: var(--nf-radius-pill);
    background: var(--nf-surface);
    color: var(--nf-text);
    font-weight: 600;
    text-decoration: none;
    transition: border-color var(--nf-duration) var(--nf-ease),
                background var(--nf-duration) var(--nf-ease);
}

.nf-google-button:hover,
.nf-google-button:focus-visible {
    border-color: var(--nf-text-muted);
    background: var(--nf-surface-2);
    color: var(--nf-text);
}

.nf-google-button svg { flex: 0 0 auto; }

.nf-form-legend {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--nf-text-muted);
    padding-bottom: .6rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--nf-border);
}

/* Champ mot de passe et bouton de révélation */
.nf-password-field { position: relative; }

.nf-password-field .form-control { padding-inline-end: 3rem; }

.nf-password-toggle {
    position: absolute;
    inset-inline-end: .5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--nf-text-muted);
    padding: .35rem;
    border-radius: 6px;
    display: inline-flex;
    cursor: pointer;
}

.nf-password-toggle:hover { color: var(--nf-primary); }
.nf-password-toggle.is-visible { color: var(--nf-primary); }

/* Indicateur de robustesse du mot de passe */
.nf-meter {
    height: 4px;
    background: var(--nf-border);
    border-radius: 999px;
    overflow: hidden;
    margin-top: .5rem;
}

.nf-meter-bar {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #e53935;
    transition: width var(--nf-duration) var(--nf-ease),
                background var(--nf-duration) var(--nf-ease);
}

.nf-meter[data-level="2"] .nf-meter-bar { width: 40%; background: #fb8c00; }
.nf-meter[data-level="3"] .nf-meter-bar { width: 70%; background: #fdd835; }
.nf-meter[data-level="4"] .nf-meter-bar { width: 100%; background: #43a047; }
.nf-meter[data-level="1"] .nf-meter-bar { width: 20%; background: #e53935; }

/* ------------------------------------------------------------------
   12. Pages d'authentification
   ------------------------------------------------------------------ */

.nf-auth { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }

.nf-auth-card {
    background: var(--nf-surface);
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius-lg);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    box-shadow: var(--nf-shadow-2);
}

.nf-auth-head { margin-bottom: 1.75rem; }

.nf-auth-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin-bottom: .5rem;
}

.nf-auth-lead {
    color: var(--nf-text-muted);
    line-height: 1.6;
    margin: 0;
    font-size: .95rem;
}

.nf-auth-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--nf-primary-soft);
    color: var(--nf-primary);
    font-size: 1.75rem;
}

.nf-auth-link {
    font-size: .85rem;
    color: var(--nf-primary);
    text-decoration: none;
    font-weight: 500;
}

.nf-auth-link:hover { text-decoration: underline; }

.nf-auth-footer {
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--nf-border);
    text-align: center;
    font-size: .93rem;
    color: var(--nf-text-muted);
}

.nf-auth-footer a { color: var(--nf-primary); text-decoration: none; font-weight: 600; }
.nf-auth-footer a:hover { text-decoration: underline; }

.nf-auth-aside {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .9rem;
    color: var(--nf-text-muted);
}

.nf-auth-aside a { color: var(--nf-primary); text-decoration: none; font-weight: 600; }

.nf-notice {
    background: var(--nf-secondary-soft);
    color: var(--nf-secondary);
    border-radius: var(--nf-radius-sm);
    padding: .9rem 1.1rem;
    font-size: .9rem;
    line-height: 1.6;
}

.nf-notice-warning {
    background: #fff3e0;
    color: #e65100;
}

[data-bs-theme="dark"] .nf-notice-warning { background: #3a2a12; color: #ffb74d; }

/* ------------------------------------------------------------------
   13. Formules d'abonnement
   ------------------------------------------------------------------ */

.nf-plan {
    background: var(--nf-surface);
    border: 1.5px solid var(--nf-border);
    border-radius: var(--nf-radius);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: border-color var(--nf-duration) var(--nf-ease),
                box-shadow var(--nf-duration) var(--nf-ease);
}

.nf-plan:hover { border-color: var(--nf-primary); box-shadow: var(--nf-shadow-2); }

.nf-plan-default { border-color: var(--nf-primary); }

.nf-plan-name { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }

.nf-plan-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--nf-primary);
    margin-bottom: .25rem;
}

.nf-plan-period { font-size: .85rem; font-weight: 500; color: var(--nf-text-muted); }

.nf-plan-commission {
    font-size: .85rem;
    color: var(--nf-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--nf-border);
}

.nf-plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .5rem;
    font-size: .9rem;
}

.nf-plan-features li {
    padding-inline-start: 1.35rem;
    position: relative;
    color: var(--nf-text-muted);
    line-height: 1.5;
}

.nf-plan-features li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: 0;
    color: var(--nf-secondary);
    font-weight: 700;
}

/* ------------------------------------------------------------------
   14. Espace client
   ------------------------------------------------------------------ */

.nf-account-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.nf-stat-tile {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    background: var(--nf-surface);
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius);
    padding: 1.25rem;
    text-decoration: none;
    height: 100%;
    transition: border-color var(--nf-duration) var(--nf-ease),
                box-shadow var(--nf-duration) var(--nf-ease),
                transform var(--nf-duration) var(--nf-ease);
}

.nf-stat-tile:hover {
    border-color: var(--nf-primary);
    box-shadow: var(--nf-shadow-2);
    transform: translateY(-2px);
}

.nf-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--nf-primary);
    line-height: 1.1;
}

.nf-stat-label {
    font-size: .85rem;
    color: var(--nf-text-muted);
    font-weight: 500;
}

.nf-panel {
    background: var(--nf-surface);
    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius);
    overflow: hidden;
}

/*
 * Hauteur pleine réservée au panneau SEUL dans sa colonne.
 *
 * « height: 100% » était posé sur tous les panneaux, pour que deux
 * cartes voisines s'alignent sur la même hauteur. L'intention est
 * juste, sa portée ne l'était pas : dès qu'une colonne en empile
 * plusieurs — la fiche d'un établissement en compte quatre — chacun
 * réclamait la totalité de la hauteur de la colonne.
 *
 * Le pourcentage se résout contre la colonne, elle-même étirée par la
 * rangée flex à la hauteur de sa voisine. Quatre panneaux à 100 %
 * produisaient donc un contenu quatre fois trop haut, qui débordait
 * sous le pied de page : celui-ci semblait remonter au milieu de la
 * page et recouvrir le contenu.
 *
 * « :only-child » exprime exactement la condition voulue — remplir sa
 * colonne quand on y est seul — sans toucher au moindre gabarit.
 */
.row > [class*="col-"] > .nf-panel:only-child {
    height: 100%;
}

.nf-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--nf-border);
}

.nf-panel-title { font-size: 1rem; font-weight: 700; margin: 0; }

.nf-list { list-style: none; margin: 0; padding: 0; }

.nf-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.35rem;
    border-bottom: 1px solid var(--nf-border);
}

.nf-list-item:last-child { border-bottom: none; }

.nf-list-item.nf-unread { background: var(--nf-primary-soft); }

.nf-list-meta {
    display: block;
    font-size: .85rem;
    color: var(--nf-text-muted);
    margin-top: .2rem;
    line-height: 1.5;
}

.nf-list-amount { font-weight: 700; font-size: .95rem; margin-top: .3rem; }

.nf-empty {
    padding: 2.5rem 1.35rem;
    text-align: center;
    color: var(--nf-text-muted);
}

.nf-empty p { margin-bottom: 1rem; }

.nf-verified { color: #2e7d32; font-weight: 600; }
[data-bs-theme="dark"] .nf-verified { color: #66bb6a; }

/* ------------------------------------------------------------------
   15. Ajustements pour l'écriture de droite à gauche
   ------------------------------------------------------------------ */

[dir="rtl"] .nf-hero {
    background:
        radial-gradient(1200px 400px at 85% -10%, var(--nf-primary-soft), transparent 60%),
        var(--nf-bg);
}

/* ==================================================================
 | Modèles 3D embarqués — page d'accueil
 | ------------------------------------------------------------------
 | L'iframe de Sketchfab n'a ni largeur ni hauteur propres : sans
 | conteneur elle retombe sur 300 × 150 px. Le rapport d'aspect est
 | donc porté ici, ce qui évite au passage que la page ne saute une
 | fois le cadre chargé.
 | ================================================================== */

.nf-showcase-item { margin: 0; }

.nf-showcase-frame {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--nf-radius);
    overflow: hidden;
    background: var(--nf-surface-2);
    border: 1px solid var(--nf-border);
    box-shadow: var(--nf-shadow-1);
}

.nf-showcase-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.nf-showcase-credit {
    margin-top: .7rem;
    font-size: .85rem;
    line-height: 1.5;
    color: var(--nf-text-muted);
}

.nf-showcase-credit strong {
    display: block;
    color: var(--nf-text);
    font-size: .95rem;
}

.nf-showcase-credit a {
    color: var(--nf-primary);
    text-decoration: none;
    /* Les noms d'auteurs sont latins, la phrase arabe : sans isolation
       l'algorithme bidirectionnel recompose l'ordre des deux mots d'un
       nom autour du texte qui les entoure. */
    unicode-bidi: isolate;
}

.nf-showcase-credit a:hover,
.nf-showcase-credit a:focus { text-decoration: underline; }

@media (max-width: 575.98px) {
    /* Sur écran étroit, un cadre carré laisse plus de place au modèle
       qu'un rapport en largeur. */
    .nf-showcase-frame { aspect-ratio: 1 / 1; }
}

/* ==================================================================
 | Page des formules
 | ================================================================== */

.nf-plan-featured {
    border-color: var(--nf-primary, #c0392b);
    box-shadow: 0 0 0 2px rgba(192, 57, 43, .15);
}

.nf-plan-price {
    margin: 0 0 .5rem;
    font-size: 1.05rem;
}

.nf-plan-price strong {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
}

/* ==================================================================
 | Tableaux et listes de données
 | ------------------------------------------------------------------
 | Partagés par les pages publiques et le tableau de bord.
 | ================================================================== */

.nf-table {
    --bs-table-bg: transparent;
    margin: 0;
}

.nf-table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--nf-text-muted, #6b7280);
    font-weight: 600;
    border-bottom: 1px solid var(--nf-border, #e4e6eb);
    white-space: nowrap;
}

.nf-table td { vertical-align: middle; }

.nf-table .nf-list-meta {
    display: block;
    font-size: .78rem;
}

.nf-plain-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nf-plain-list > li {
    padding: .55rem 0;
    border-bottom: 1px solid var(--nf-border, #e4e6eb);
}

.nf-plain-list > li:last-child { border-bottom: 0; }

.nf-definition-list { margin: 0; }

.nf-definition-list dt {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--nf-text-muted, #6b7280);
    font-weight: 600;
    margin-top: .65rem;
}

.nf-definition-list dt:first-child { margin-top: 0; }

.nf-definition-list dd { margin: 0 0 .1rem; }
