/* ==========================================================================
 * Documentation API (.fc-apidoc) : une seule feuille pour les DEUX pages qui la montrent,
 * Reglages > Documentation API (application, chargee par layout/header) et la page publique
 * /documentation-api du site (frontend). Le contenu vient du meme gabarit Blade
 * (misc/apidocs/content), les styles d'ici : les deux restent identiques.
 * ========================================================================*/

/* Icones Themify utilisees par la doc. L'application les a deja (vendor.css) ; le site public non :
   seules les icones de la doc sont declarees ici, et seulement a l'interieur de .fc-apidoc. */
@font-face {
    font-family: 'themify';
    src: url('../vendor/fonts/themify-icons/themify.woff') format('woff'),
         url('../vendor/fonts/themify-icons/themify.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
.fc-apidoc [class^="ti-"], .fc-apidoc [class*=" ti-"] {
    font-family: 'themify'; speak: none; font-style: normal; font-weight: normal; font-variant: normal;
    text-transform: none; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.fc-apidoc .ti-alert:before { content: "\e6c5"; }
.fc-apidoc .ti-angle-right:before { content: "\e649"; }
.fc-apidoc .ti-arrow-down:before { content: "\e62a"; }
.fc-apidoc .ti-check:before { content: "\e64c"; }
.fc-apidoc .ti-cloud:before { content: "\e6b1"; }
.fc-apidoc .ti-download:before { content: "\e6a7"; }
.fc-apidoc .ti-exchange-vertical:before { content: "\e63f"; }
.fc-apidoc .ti-files:before { content: "\e6a3"; }
.fc-apidoc .ti-info-alt:before { content: "\e717"; }
.fc-apidoc .ti-key:before { content: "\e631"; }
.fc-apidoc .ti-lock:before { content: "\e62b"; }
.fc-apidoc .ti-money:before { content: "\e68c"; }
.fc-apidoc .ti-plus:before { content: "\e61a"; }
.fc-apidoc .ti-timer:before { content: "\e66e"; }

/* ===== Settings > Documentation API (mobile REST API reference) — .fc-apidoc ===== */
.fc-apidoc { color: #46515f; font-size: 14px; line-height: 1.6; }
.fc-apidoc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; background: #eef1f5; color: #3b4656; padding: 1px 6px; border-radius: 5px; }
.fc-apidoc section[id] { scroll-margin-top: 90px; }
/* language toggling — request blocks only; responses are shared */
.fc-apidoc[data-lang="curl"] .fc-apidoc-lang:not(.lang-curl),
.fc-apidoc[data-lang="js"] .fc-apidoc-lang:not(.lang-js),
.fc-apidoc[data-lang="php"] .fc-apidoc-lang:not(.lang-php) { display: none; }
/* en-tete : un titre (page publique), une phrase, l'URL de base */
.fc-apidoc-intro { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid #eef1f5; }
.fc-apidoc-title { margin: 0 0 8px; font-size: 28px; font-weight: 700; color: #2b3542; }
.fc-apidoc-lead { margin: 0 0 6px; font-size: 15px; color: #46515f; }
.fc-apidoc-baseurl { margin: 0; font-size: 13.5px; color: #6a7583; }
/* fichiers a telecharger : deux boutons secondaires, icone + format + usage */
.fc-apidoc-downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.fc-apidoc-dl { display: inline-flex; align-items: center; gap: 11px; padding: 9px 16px 9px 13px; border: 1px solid #dfe5ec; border-radius: 9px; background: #fff; color: #2b3542; text-decoration: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.fc-apidoc-dl:hover, .fc-apidoc-dl:focus { border-color: #20aee3; background: #f6fbfe; box-shadow: 0 2px 8px rgba(32, 174, 227, .12); color: #2b3542; text-decoration: none; }
.fc-apidoc-dl i { flex: none; width: 30px; height: 30px; border-radius: 7px; background: #eaf7fc; color: #0b7fb0; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.fc-apidoc-dl span { display: flex; flex-direction: column; line-height: 1.25; }
.fc-apidoc-dl b { font-size: 13.5px; font-weight: 600; }
.fc-apidoc-dl small { font-size: 12px; color: #7a8594; }
/* toolbar: section nav + language switch */
.fc-apidoc-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; padding: 4px 0 14px; margin-bottom: 22px; border-bottom: 1px solid #eef1f5; }
.fc-apidoc-toc { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-apidoc-toc__a { font-size: 12.5px; font-weight: 600; color: #6a7583; padding: 5px 12px; border-radius: 20px; background: #f2f4f7; }
.fc-apidoc-toc__a:hover { background: #e6f6fc; color: #1794c2; text-decoration: none; }
.fc-apidoc-langbar { display: inline-flex; background: #eef1f5; border-radius: 8px; padding: 3px; }
.fc-apidoc-langtab { border: 0; background: none; font-size: 12.5px; font-weight: 600; color: #7a8494; padding: 5px 14px; border-radius: 6px; cursor: pointer; }
.fc-apidoc-langtab.is-active { background: #fff; color: #2b3542; box-shadow: 0 1px 3px rgba(20,30,50,.12); }
/* section */
.fc-apidoc-section { margin-bottom: 38px; }
.fc-apidoc-h { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: #2b3542; margin: 0 0 6px; }
.fc-apidoc-h__num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #20aee3; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fc-apidoc-p { color: #6a7583; margin: 0 0 14px; }
.fc-apidoc-p--tight { margin-top: 22px; }
/* endpoint line */
.fc-apidoc-ep { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.fc-apidoc-path { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; font-weight: 600; color: #2b3542; }
.fc-apidoc-ep__note { font-size: 11.5px; color: #9aa6b2; font-style: italic; }
/* method badge */
.fc-apidoc-method { flex: none; display: inline-block; min-width: 50px; text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: 5px; color: #fff; }
.fc-apidoc-method.get { background: #16a34a; }
.fc-apidoc-method.post { background: #2563eb; }
.fc-apidoc-method.put { background: #d97706; }
.fc-apidoc-method.patch { background: #0891b2; }
.fc-apidoc-method.delete { background: #dc2626; }
/* code block with header bar */
.fc-apidoc-codewrap { margin: 10px 0; border-radius: 9px; overflow: hidden; box-shadow: 0 1px 2px rgba(20,30,50,.05); }
.fc-apidoc-codebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #141a24; padding: 7px 12px; border-bottom: 1px solid #2a323f; }
.fc-apidoc-codebar__lang { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: #9aa6b2; display: inline-flex; align-items: center; gap: 6px; }
.fc-apidoc-copy { border: 0; background: rgba(255,255,255,.06); color: #b7c2d0; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.fc-apidoc-copy:hover { background: rgba(255,255,255,.13); color: #fff; }
.fc-apidoc-copy.is-done { background: #1f6f4a; color: #eafaf1; }
.fc-apidoc-copy--icon { padding: 4px 8px; }
.fc-apidoc-code { background: #1b2230; border: 0; margin: 0; padding: 14px 16px; overflow-x: auto; }
.fc-apidoc-code code { display: block; background: none !important; color: #e6edf3 !important; padding: 0 !important; font-size: 12.5px; line-height: 1.6; white-space: pre; }
.fc-tk-key { color: #7ec7ff; }
.fc-apidoc-status { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 4px; background: rgba(52,169,111,.18); color: #4ade80; }
/* inline base url */
.fc-apidoc-codewrap--inline { display: inline-flex; align-items: stretch; margin: 0; border: 1px solid #2a323f; }
.fc-apidoc-code--inline { padding: 6px 10px; }
.fc-apidoc-code--inline code { font-size: 12px; white-space: nowrap; }
.fc-apidoc-codewrap--inline .fc-apidoc-copy--icon { border-radius: 0; background: #141a24; color: #9aa6b2; }
.fc-apidoc-codewrap--inline .fc-apidoc-copy--icon:hover { color: #fff; }
/* note */
.fc-apidoc-note { background: #eef8fc; border-left: 3px solid #20aee3; border-radius: 0 6px 6px 0; padding: 10px 14px; margin: 12px 0; font-size: 13px; color: #4a5561; }
.fc-apidoc-chip { background: #2b3542 !important; color: #e6edf3 !important; padding: 3px 8px !important; border-radius: 5px; font-size: 12px; }
/* steps */
.fc-apidoc-step { border: 1px solid #eef1f5; border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; background: #fff; }
/* Endpoint en deux colonnes : doc et champs a gauche, exemples sur fond sombre a droite. Seulement si
   la doc a la place (requete de conteneur : la page publique est large, Reglages l'est moins). */
.fc-apidoc { container-type: inline-size; container-name: fcapidoc; }
.fc-apidoc-main { container-type: inline-size; min-width: 0; }
.fc-apidoc [id] { scroll-margin-top: 96px; }
/* menu de gauche : seulement si la doc a la place (page publique sur grand ecran) */
.fc-apidoc-side { display: none; }
.fc-apidoc-side__h { margin: 18px 0 4px; padding: 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8a95a3; }
.fc-apidoc-side__h:first-child { margin-top: 0; }
.fc-apidoc-side__a { display: block; padding: 5px 10px; border-radius: 6px; font-size: 13px; line-height: 1.35; color: #4a5561; text-decoration: none; }
.fc-apidoc-side__a:hover { background: #f3f6f9; color: #2b3542; text-decoration: none; }
.fc-apidoc-side__a.is-on { background: #e8f6fc; color: #0b7fb0; font-weight: 600; }
@container fcapidoc (min-width: 1180px) {
    /* marge basse : le menu colle ne vient pas toucher le pied de page en fin de defilement */
    .fc-apidoc-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 56px; }
    .fc-apidoc-side { display: block; position: sticky; top: 96px; max-height: calc(100vh - 116px); overflow-y: auto; padding-right: 12px; border-right: 1px solid #eef1f5; }
    .fc-apidoc-toc { display: none; }
    .fc-apidoc-bar { justify-content: flex-end; }
}
.fc-apidoc-aside { border: 1px solid #eef1f5; border-radius: 10px; padding: 10px 14px 6px; margin: 14px 0 0; }
.fc-apidoc-aside__title { font-size: 12px; font-weight: 700; color: #2b3542; margin-bottom: 2px; }
.fc-apidoc-aside__item { position: relative; padding: 4px 0 4px 16px; font-size: 13px; color: #5b6674; }
.fc-apidoc-aside__item::before { content: ""; position: absolute; left: 3px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: #20aee3; }
/* page publique : plus large que le conteneur Bootstrap, pour les deux colonnes */
@media (min-width: 1400px) { .container.page-wrapper.apidocs { max-width: 1320px; } }
@container (min-width: 1000px) {
    .fc-apidoc-step--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; overflow: clip; }
    .fc-apidoc-step--split .fc-apidoc-step__doc { padding: 20px 24px; }
    .fc-apidoc-step--split .fc-apidoc-step__code { background: #0f1623; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
    /* les exemples restent a l'ecran pendant qu'on lit une longue liste de champs (overflow: clip, pas hidden, sinon sticky est sans effet) */
    .fc-apidoc-step--split .fc-apidoc-step__sticky { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; }
    .fc-apidoc-step--split .fc-apidoc-step__code .fc-apidoc-codewrap { margin: 0; border: 1px solid #1f2a3a; box-shadow: none; }
    .fc-apidoc-step--split .fc-apidoc-step__code .fc-apidoc-code { max-height: 460px; }
    .fc-apidoc-step--split .fc-apidoc-fields td:nth-child(2) { white-space: nowrap; }
}
.fc-apidoc-step__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fc-apidoc-step__num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #2b3542; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fc-apidoc-step__title { font-size: 15px; font-weight: 700; color: #2b3542; margin-right: 4px; }
/* fields table */
.fc-apidoc-fields { width: 100%; margin: 4px 0 12px; border-collapse: collapse; }
.fc-apidoc-fields td { padding: 7px 10px; border-bottom: 1px solid #f2f4f7; font-size: 13px; vertical-align: top; }
.fc-apidoc-fields td:first-child { white-space: nowrap; width: 1%; }
.fc-apidoc-fields td:nth-child(2) { white-space: nowrap; width: 1%; }
.fc-apidoc-fields__ind { padding-left: 26px !important; position: relative; }
.fc-apidoc-fields__ind::before { content: '\21B3'; position: absolute; left: 9px; color: #c2ccd8; }
.fc-apidoc-tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 4px; white-space: nowrap; }
.fc-apidoc-tag.req { background: #fdecec; color: #dc2626; }
.fc-apidoc-tag.opt { background: #eef1f5; color: #8a95a3; }
/* endpoint reference accordion */
.fc-apidoc-acc { border: 1px solid #eef1f5; border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.fc-apidoc-acc__sum { list-style: none; cursor: pointer; padding: 12px 16px; font-size: 14px; font-weight: 700; color: #2b3542; display: flex; align-items: center; gap: 9px; background: #f7f9fb; }
.fc-apidoc-acc__sum::-webkit-details-marker { display: none; }
.fc-apidoc-acc__chev { color: #9aa6b2; font-size: 11px; transition: transform .18s; }
.fc-apidoc-acc[open] .fc-apidoc-acc__chev { transform: rotate(90deg); }
.fc-apidoc-acc[open] .fc-apidoc-acc__sum { border-bottom: 1px solid #eef1f5; }
.fc-apidoc-acc__count { margin-left: auto; font-size: 11px; font-weight: 600; color: #8a95a3; background: #e9edf2; border-radius: 20px; padding: 1px 9px; }
/* reference table */
.fc-apidoc-table { width: 100%; border-collapse: collapse; }
.fc-apidoc-table td { padding: 8px 14px; border-top: 1px solid #f2f4f7; font-size: 13px; vertical-align: middle; }
.fc-apidoc-table tr:first-child td { border-top: 0; }
.fc-apidoc-table td:first-child { width: 1%; }
/* champs d'une route (misc/apidocs/fields) : nom, requis, type, contraintes, description ; les champs
   d'un objet en retrait sous un filet */
.fc-pf { border-top: 1px solid #eef1f5; margin-top: 4px; }
.fc-pf-row { padding: 14px 0; border-bottom: 1px solid #eef1f5; }
.fc-pf-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.fc-pf-name { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; font-weight: 700; color: #2b3542; }
.fc-pf-type { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: #5b6674; background: #f3f5f8; border-radius: 4px; padding: 1px 6px; }
.fc-pf-rules { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 7px; font-size: 12.5px; color: #5b6674; }
.fc-pf-rules b { font-weight: 500; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: #2b3542; border: 1px solid #e3e7ed; border-radius: 5px; padding: 1px 6px; background: #fff; }
.fc-pf-desc { margin-top: 6px; font-size: 13px; color: #6a7583; line-height: 1.55; }
.fc-pf-kids { margin: 12px 0 0 6px; padding-left: 16px; border-left: 2px solid #eef1f5; }
.fc-pf-kids > .fc-pf { border-top: 0; margin-top: 0; }
.fc-pf-kids .fc-pf-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.fc-pf-kids .fc-pf-row:first-child { padding-top: 2px; }
.fc-pf-label { margin: 16px 0 0; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #8a95a3; }
/* reference : une ligne par route, depliable (champs + reponse) */
.fc-apidoc-ref { border-top: 1px solid #f2f4f7; }
.fc-apidoc-ref__sum { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 9px 14px; font-size: 13px; }
.fc-apidoc-ref__sum::-webkit-details-marker { display: none; }
.fc-apidoc-ref__sum:hover { background: #f8fafc; }
.fc-apidoc-ref__sum .fc-apidoc-method { flex: none; width: 58px; text-align: center; }
.fc-apidoc-ref__path { flex: 0 1 300px; background: none !important; padding: 0 !important; font-size: 12.5px; color: #2b3542; }
.fc-apidoc-ref__title { flex: 1; color: #4a5561; }
.fc-apidoc-ref__sum::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid #9aa6b2; border-bottom: 2px solid #9aa6b2; transform: rotate(-45deg); transition: transform .15s; }
.fc-apidoc-ref[open] > .fc-apidoc-ref__sum::after { transform: rotate(45deg); }
.fc-apidoc-ref__body { padding: 4px 18px 18px 84px; }
@media (max-width: 640px) {
    .fc-apidoc-ref__sum { flex-wrap: wrap; gap: 6px 10px; }
    .fc-apidoc-ref__path { flex-basis: auto; }
    .fc-apidoc-ref__title { flex-basis: 100%; }
    .fc-apidoc-ref__body { padding-left: 14px; }
}
/* conventions : tableaux encadres avec entete */
.fc-apidoc-grid { border: 1px solid #e6eaf0; border-radius: 10px; overflow-x: auto; background: #fff; }
.fc-apidoc-grid table { width: 100%; border-collapse: collapse; }
.fc-apidoc-grid th { background: #f7f9fb; border-bottom: 1px solid #e6eaf0; padding: 10px 16px; text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #6a7583; }
.fc-apidoc-grid td { padding: 12px 16px; border-top: 1px solid #eef1f5; font-size: 13px; color: #4a5561; vertical-align: top; }
.fc-apidoc-grid tbody tr:first-child td, .fc-apidoc-grid tr:first-child td { border-top: 0; }
.fc-apidoc-grid td:first-child { width: 150px; font-weight: 600; color: #2b3542; white-space: nowrap; }
.fc-apidoc-grid td:first-child code { font-weight: 600; background: none; padding: 0; font-size: 13px; color: #2b3542; }
.fc-apidoc-errors-title { margin: 22px 0 10px; }
.fc-apidoc-errors-title b { color: #2b3542; }
@media (max-width: 640px) { .fc-apidoc-grid td:first-child { width: 96px; } .fc-apidoc-grid th, .fc-apidoc-grid td { padding-left: 12px; padding-right: 12px; } }
/* [CLES API] gestion des cles d'integration, en tete de la section Authentification */
.fc-apikeys { border: 1px solid #eef1f5; border-radius: 12px; padding: 16px 18px; margin: 4px 0 22px; background: #fff; }
.fc-apikeys-create { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fc-apikeys-create .form-control { flex: 1 1 240px; max-width: 360px; }
.fc-apikeys-new { background: #effaf4; border: 1px solid #c8ecd8; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.fc-apikeys-new__title { font-weight: 700; color: #1f6f4a; font-size: 13.5px; }
.fc-apikeys-new__txt { margin: 3px 0 8px; font-size: 12.5px; color: #4a5561; }
.fc-apikeys-new .fc-apidoc-codewrap--inline { max-width: 100%; }
.fc-apikeys-new .fc-apidoc-code--inline { overflow-x: auto; }
.fc-apikeys-name { font-weight: 600; color: #2b3542; }
.fc-apikeys-meta { font-size: 12px !important; color: #8a95a3; }
.fc-apikeys-actions { text-align: right; width: 1%; }
.fc-apikeys-empty { margin: 0; font-size: 13px; color: #9aa6b2; }

/* Telephone : chaque ligne des tableaux de champs s'empile (nom + requis/optionnel, puis description),
   sinon le tableau depasse l'ecran et toute la page defile de cote. Les blocs de code, eux, defilent
   dans leur cadre. */
@media (max-width: 640px) {
    .fc-apidoc-fields, .fc-apidoc-fields tbody, .fc-apidoc-fields tr { display: block; width: 100%; }
    .fc-apidoc-fields tr { padding: 8px 0; border-bottom: 1px solid #f2f4f7; }
    .fc-apidoc-fields td { display: inline-block; width: auto !important; border-bottom: 0; padding: 2px 6px 2px 0; }
    .fc-apidoc-fields td:nth-child(3) { display: block; padding-top: 4px; }
    .fc-apidoc-fields__ind { padding-left: 18px !important; }
    .fc-apidoc-fields__ind::before { left: 2px; }
    .fc-apidoc-codewrap--inline { max-width: 100%; }
    .fc-apidoc-code--inline { overflow-x: auto; }
}

