/**
 * tarifs.css — les pages Tarifs (connectée /abonnement/tarifs et publique /tarifs,
 * plus l'encart tarifs de la page d'accueil).
 *
 * Tout est rangé sous `.tarifs` : la feuille est chargée à la fois dans
 * l'application (base/base.html.twig, thème par html[data-theme]) et sur la
 * landing (base-landingpage.html.twig, sombre par défaut, claire avec
 * html[data-theme="light"]). Elle ne consomme que les jetons communs aux deux
 * mondes (--ink, --muted, --surface, --border-color, --primary) et définit
 * les siens en --t-*.
 *
 * Gabarits : templates/tarifs/*.html.twig.
 */

.tarifs {
    --t-ink: var(--ink, #0f172a);
    --t-muted: var(--muted, #5b6b80);
    --t-border: var(--border-color, #d1d7e0);
    --t-surface: var(--surface, #ffffff);
    --t-primary: var(--primary, #2957ff);
    --t-prix: linear-gradient(135deg, #4169E1 0%, #2952CC 100%);
    --t-ombre: 0 4px 20px rgba(15, 23, 42, 0.06);
    --t-ombre-survol: 0 14px 36px rgba(41, 87, 255, 0.16);
    --t-cle-bg: #eef2ff;
    --t-cle-border: #c7d2fe;
    --t-economie: #047857;
    --t-economie-bg: #ecfdf5;
    --t-places: #b45309;
    --t-actuelle: #059669;
    color: var(--t-ink);
}

/* Landing : mode_clair.css (importé par landing-modern.css) repose les jetons
   de l'application sur body, en clair, quel que soit le thème. On lit donc les
   jetons propres à la landing, qui suivent, eux, son thème. */
.tarifs--landing {
    --t-ink: var(--text-primary, #f1f5f9);
    --t-muted: var(--text-secondary, #cbd5e1);
    --t-border: var(--border-glass, rgba(255, 255, 255, 0.1));
    --t-surface: var(--bg-card, rgba(255, 255, 255, 0.05));
    --t-primary: var(--blue-primary, #3b82f6);
}
html[data-theme="light"] .tarifs--landing { --t-surface: #ffffff; }

/* Sombre : application (data-theme="dark") et landing (sombre sauf si claire). */
html[data-theme="dark"] .tarifs,
html:not([data-theme="light"]) .tarifs--landing {
    --t-prix: linear-gradient(135deg, #c7d2fe 0%, #60a5fa 100%);
    --t-ombre: 0 4px 20px rgba(0, 0, 0, 0.25);
    --t-ombre-survol: 0 14px 36px rgba(59, 130, 246, 0.25);
    --t-cle-bg: rgba(59, 130, 246, 0.12);
    --t-cle-border: rgba(96, 165, 250, 0.35);
    --t-economie: #6ee7b7;
    --t-economie-bg: rgba(16, 185, 129, 0.14);
    --t-places: #fbbf24;
    --t-actuelle: #34d399;
}

/* ── Blocs ─────────────────────────────────────────────────────────── */
.tarifs-bloc {
    max-width: var(--maxw, 1180px);
    margin: 3rem auto 0;
}
.tarifs-bloc:first-child { margin-top: 1.5rem; }
/* Sur la landing, landing-modern.css met TOUT <section> en flex, pleine
   hauteur, invisible jusqu'à l'animation d'apparition : un bloc tarifs est
   une section imbriquée, il redevient un simple bloc visible. */
section.tarifs-bloc {
    display: block;
    min-height: 0;
    padding: 0;
    opacity: 1;
    transform: none;
    transition: none;
}
.tarifs-bloc__titre {
    text-align: center;
    margin: 0 0 0.5rem;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--t-ink);
}
.tarifs-bloc__intro {
    text-align: center;
    color: var(--t-muted);
    max-width: 640px;
    margin: 0 auto 1.75rem;
    line-height: 1.6;
}
.tarifs-tva {
    text-align: center;
    margin: 1.25rem 0 0;
    font-size: 0.85rem;
    color: var(--t-muted);
}

/* Clé de lecture au-dessus du coût d'une notice : 1 crédit = X €. */
.tarifs-cle {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: 760px;
    margin: 0 auto 1.75rem;
    padding: 0.9rem 1.2rem;
    background: var(--t-cle-bg);
    border: 1px solid var(--t-cle-border);
    border-radius: 14px;
    color: var(--t-ink);
    line-height: 1.55;
}
.tarifs-cle .material-symbols-outlined {
    color: var(--t-primary);
    flex-shrink: 0;
    margin-top: 1px;
}
.tarifs-cle p { margin: 0; }

/* ── Grilles ───────────────────────────────────────────────────────── */
.tarifs-grille {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: 1.5rem;
    align-items: stretch;
}
.tarifs-grille--cout {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
}
/* Laisse la place au ruban « Recommandé » qui déborde au-dessus d'une carte. */
.tarifs-grille--abonnements { padding-top: 0.9rem; }

/* ── Carte ─────────────────────────────────────────────────────────── */
.tarifs-carte {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--t-border);
    border-radius: var(--radius-lg, 18px);
    background: var(--t-surface);
    box-shadow: var(--t-ombre);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tarifs-carte:hover {
    transform: translateY(-3px);
    box-shadow: var(--t-ombre-survol);
    border-color: var(--t-primary);
}
.tarifs-carte--recommandee { border: 2px solid var(--t-primary); }
.tarifs-carte--actuelle { border: 2px solid var(--t-actuelle); }

.tarifs-carte__ruban {
    position: absolute;
    top: -0.8rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}
.tarifs-carte__ruban .material-symbols-outlined { font-size: 0.95rem; }

.tarifs-carte__nom {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--t-ink);
    overflow-wrap: anywhere;
}
.tarifs-carte__detail {
    margin: -0.45rem 0 0;
    color: var(--t-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}
/* Le bas de carte (prix, action) s'aligne d'une carte à l'autre. */
.tarifs-carte__bas {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: auto;
}

/* Prix puis ses précisions (prix au crédit, places, bêta), serrés sous le montant. */
.tarifs-carte .tarifs-carte__prixbloc > * + * { margin-top: 0.45rem; }

/* ── Pastille colorée ──────────────────────────────────────────────── */
.tarifs-pastille {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #4169E1 0%, #2952CC 100%);
    box-shadow: 0 2px 8px rgba(65, 105, 225, 0.25);
}
.tarifs-pastille .material-symbols-outlined { font-size: 0.95rem; }
.tarifs-pastille--pro { background: linear-gradient(135deg, #059669 0%, #047857 100%); box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3); }
.tarifs-pastille--expert { background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%); box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3); }
.tarifs-pastille--fondateur { background: linear-gradient(135deg, #B45309 0%, #92400E 100%); box-shadow: 0 2px 8px rgba(180, 83, 9, 0.3); }
.tarifs-pastille--illimite { background: linear-gradient(135deg, #2952CC 0%, #7C3AED 100%); }
.tarifs-pastille--unite { background: linear-gradient(135deg, #4B5563 0%, #374151 100%); box-shadow: none; }
.tarifs-pastille--pack { background: linear-gradient(135deg, #0F766E 0%, #115E59 100%); box-shadow: 0 2px 8px rgba(15, 118, 110, 0.3); }
.tarifs-pastille--incendie { background: linear-gradient(135deg, #EA580C 0%, #B91C1C 100%); box-shadow: 0 2px 8px rgba(185, 28, 28, 0.3); }

/* ── Prix ──────────────────────────────────────────────────────────── */
.tarifs-prix {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin: 0;
}
.tarifs-prix__montant {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--t-primary);
    background: var(--t-prix);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tarifs-prix__suffixe {
    font-size: 1rem;
    font-weight: 600;
    color: var(--t-muted);
}
.tarifs-carte__sous-prix {
    margin: 0;
    color: var(--t-muted);
    font-size: 0.92rem;
    font-weight: 600;
}
.tarifs-economie {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 0.35rem 0.7rem;
    border-radius: 10px;
    background: var(--t-economie-bg);
    color: var(--t-economie);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.35;
}
.tarifs-economie .material-symbols-outlined { font-size: 1.05rem; flex-shrink: 0; }
.tarifs-places {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--t-places);
}
.tarifs-places .material-symbols-outlined { font-size: 1rem; }
.tarifs-beta {
    margin: 0;
    color: var(--t-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Liste des avantages ───────────────────────────────────────────── */
.tarifs-liste {
    list-style: none;
    margin: 0;
    padding: 1rem 0 0;
    border-top: 1px solid var(--t-border);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.tarifs-liste li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.93rem;
    line-height: 1.45;
    color: var(--t-ink);
}
.tarifs-liste li > .material-symbols-outlined {
    font-size: 1.2rem;
    color: var(--t-primary);
    flex-shrink: 0;
    margin-top: 1px;
}
.tarifs-liste__aide {
    display: block;
    margin-top: 2px;
    font-size: 0.8rem;
    color: var(--t-muted);
}
.tarifs-liste__off,
.tarifs-liste li > .material-symbols-outlined.tarifs-liste__off { color: var(--t-muted); }

/* ── Action ────────────────────────────────────────────────────────── */
.tarifs-carte__action {
    margin: 0;
    padding-top: 0.25rem;
}
.tarifs-carte__action .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    text-align: center;
    white-space: normal;
}
.tarifs-carte__action .btn .material-symbols-outlined { font-size: 1.2rem; }
.tarifs-actuelle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}
.tarifs-actuelle .material-symbols-outlined { font-size: 1rem; }

.tarifs-quantite {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--t-ink);
}
.tarifs-quantite select {
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--t-border);
    background: var(--t-surface);
    color: var(--t-ink);
    font-size: 1rem;
}
.tarifs-total {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--t-muted);
}
.tarifs-total strong { color: var(--t-ink); font-size: 1.15rem; }

/* Option « utilisateur supplémentaire » (page connectée) : une carte seule, centrée. */
.tarifs-option__carte { max-width: 560px; margin: 0 auto; }
.tarifs-option__carte:hover { transform: none; }

/* ── Encart d'information (option utilisateur, notices vierges) ───── */
.tarifs-note {
    max-width: var(--maxw, 1180px);
    margin: 2rem auto 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--t-muted);
}
.tarifs-note .material-symbols-outlined { vertical-align: middle; font-size: 1rem; }

@media (max-width: 480px) {
    .tarifs-bloc { margin-top: 2.25rem; }
    .tarifs-bloc__titre { font-size: 1.35rem; }
    .tarifs-carte { padding: 1.4rem 1.15rem; }
    .tarifs-prix__montant { font-size: 2.2rem; }
    .tarifs-cle { padding: 0.8rem 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    .tarifs-carte { transition: none; }
    .tarifs-carte:hover { transform: none; }
}
