/* Modèle « page permis » (gabarits/permis.html) : bannière, colonne, rythme des blocs.
   Les éléments eux-mêmes (titres, conditions, parcours, FAQ, tarifs, colonne B, tuiles) sont dans base.css et sections.css. */

/* ---------- bannière : texte à gauche, visuel animé du permis à droite, sur un fond lagon très clair ---------- */
.pmb { position: relative; isolation: isolate; overflow: hidden; padding: 26px 0 44px; }   /* fond Ciel (sections.css) */
.pmb-grille { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 50px; align-items: center; }
.pmb-fil { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 13px; font-weight: 600; color: var(--mute); }
.pmb-fil a { color: var(--b1); text-decoration: none; }
.pmb-fil a:hover { text-decoration: underline; }
.pmb-fil svg { width: 12px; height: 12px; stroke-width: 2.6; transform: rotate(-90deg); opacity: .6; }
.pmb .tt { margin-bottom: 0; }
.pmb .tt h1 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.1; }
.pmb .tt p { margin-top: 16px; font-size: 17px; color: #33475a; }
.pmb .tt p b { color: var(--ink); }
.pmb-puces { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.pmb-puces li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink); background: #fff;
  box-shadow: 0 1px 2px rgb(15 42 61 / .05), 0 10px 20px -14px rgb(15 42 61 / .5); }
.pmb-puces i { display: grid; place-items: center; width: 28px; height: 28px; padding: 6px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--b2), var(--b1)); }
.pmb-act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.pmb-visuel { max-width: 460px; justify-self: end; width: 100%; }

/* ---------- sections pleine largeur : conditions et avantages, parcours ---------- */
.pm-sec { padding: 46px 0 0; }
.pm-garantie { max-width: 900px; margin: 30px auto 0; }
.pm-etapes .conteneur { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
.pm-etapes .tt { margin-bottom: 0; }

/* ---------- FAQ + colonne B (360 px) ---------- */
.pm { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 50px; align-items: start; padding-top: 56px; padding-bottom: 0; }
.pm .fqA { padding: 0; }

/* ---------- tarifs pleine largeur, autres permis ---------- */
.pm-tarifs { margin-top: 0; padding: 70px 0 110px; }
.pm-tarifs .empi { background: none; padding-top: 0; padding-bottom: 0; }   /* le fond vient de .fs-ocean */
.pm-vague-haut { position: absolute; z-index: -1; left: 0; right: 0; top: -1px; height: 50px; pointer-events: none; }
.pm-vague-haut svg { width: 100%; height: 100%; display: block; }
.cs-grille.pm-autres { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 170px; gap: 14px; }

@media (max-width: 1080px) {
  .pm { grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; }
  .pm-etapes .conteneur { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .pmb-grille, .pm, .pm-etapes .conteneur { grid-template-columns: minmax(0, 1fr); }
  .pm-etapes .tt { margin-bottom: 10px; }
  .pmb-visuel { justify-self: center; max-width: 460px; }
  .pm-cote { max-width: 460px; width: 100%; margin: 0 auto; }
  .pmb-visuel { max-width: 360px; }
  .cs-grille.pm-autres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .pmb { padding: 24px 0 40px; }
  .pmb-grille { gap: 30px; }
  .pmb .tt p { font-size: 15.5px; }
  .pmb-puces li { font-size: 13px; }
  .pmb-act .bouton { flex: 1 1 100%; }
  .pm-sec { padding-top: 36px; }
  .cs-grille.pm-autres { grid-template-columns: 1fr; grid-auto-rows: 150px; }
  /* tarifs : un peu d'air de chaque côté (le bloc des offres n'a pas de marge à lui) */
  .pm-tarifs .empi { padding-left: 16px; padding-right: 16px; }
  /* FAQ : les icônes rondes sont à cheval sur le bord gauche des fiches, on décale la liste pour qu'elles restent dans l'écran */
  .pm-faq .emfaq { padding-left: 18px; }
}

/* fonds de section de la page (sections.css) : espacements propres au modèle */
.pm-etapes.fs { margin-top: 46px; padding: 56px 0; }
.pm-etapes .tt { padding: 22px 24px; border-radius: 20px; background: rgb(255 255 255 / .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pm-fond { padding: 0 0 40px; }
.pm-fond .pm { padding-top: 56px; }
.pm-accomp .tt { max-width: 860px; margin-bottom: 0; }
@media (max-width: 600px) { .pm-etapes.fs { margin-top: 36px; padding: 40px 0; } .pm-fond .pm { padding-top: 40px; } }

/* « À lire aussi » : un article à la fois qui défile (colonne.js) ; « Lire » et la flèche en bas à droite */
/* marge autour de la carte pour que son ombre ne soit pas coupée ; écart entre cartes plus grand que cette marge (la suivante reste cachée) */
.pm-articles { margin: -10px -24px -14px; padding: 10px 24px 14px; }
.pm-articles ul { gap: 60px; }
.pm-articles .co-points { position: relative; z-index: 2; margin-top: 14px; }
.pm-articles li { display: flex; }
.pm-articles .cs { flex: 1; }
.pm-articles .cs-corps { align-self: stretch; }
.pm-articles .cs-pied { align-self: stretch; justify-content: flex-end; gap: 8px; margin-top: auto; }
.pm-articles h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pm-articles .co-points button { background: #c9dceb; }
.pm-articles .co-points button.on { background: linear-gradient(90deg, var(--b2), var(--b1)); }

/* documents à fournir (haut de la colonne) */
.pm-docs-note { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--mute); }

/* « pourquoi nous » (permis sans FAQ, ou avant la FAQ) : fiches blanches à icône ronde, sur deux colonnes */
.pm-pq { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 30px; padding-left: 26px; }
.pm-pq h3 { font-size: 16.5px; color: var(--ink); }
.pm-pq p { margin-top: 4px; font-size: 14.5px; line-height: 1.55; color: var(--txt); }
.pm-pourquoi + .pm-faq { margin-top: 50px; }
@media (max-width: 600px) { .pm-pq { grid-template-columns: 1fr; } }

/* plus de 3 étapes : le titre au-dessus, le parcours sur toute la largeur */
.pm-etapes-large .conteneur { grid-template-columns: minmax(0, 1fr); gap: 30px; }
.pm-etapes-large .tt { max-width: 820px; }

/* documents en tuiles (permis sans FAQ) */
.pm-docs-large { margin-top: 46px; }
.pm-docs-tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.pm-docs-tuiles li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px; border-radius: 18px; text-align: center; font-size: 15px; font-weight: 700; color: var(--ink); background: #fff;
  box-shadow: 0 2px 4px rgb(15 42 61 / .05), 0 16px 30px -20px rgb(15 42 61 / .5); transition: transform .4s var(--rebond); }
.pm-docs-tuiles li:hover { transform: translateY(-4px); }
.pm-docs-tuiles i { display: grid; place-items: center; width: 48px; height: 48px; padding: 12px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--b2), var(--b1)); box-shadow: 0 10px 18px -8px rgb(28 125 179 / .8); }
.pm-docs-large .pm-docs-note { margin-top: 14px; font-size: 14px; }
@media (max-width: 600px) { .pm-docs-tuiles { grid-template-columns: 1fr 1fr; } }

/* plus de 2 conditions : titre et intro à côté de la carte, puis les conditions en 2 × 2 sur toute la largeur (pas de vide sous la carte) */
.pm .cpA.cpA-n, .cpA.cpA-n { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "tete carte" "liste liste"; gap: 34px 50px; align-items: center; }
.cpA-n > div:first-child { display: contents; }
.cpA-n .tt { grid-area: tete; margin-bottom: 0; }
.cpA-n .cpA-carte { grid-area: carte; }
.cpA-n .cpA-liste { grid-area: liste; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; padding-left: 26px; }
.cpA-n .cpA-fiche { height: 100%; }
@media (max-width: 960px) {
  .cpA.cpA-n { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tete" "liste" "carte"; }
  .cpA-n .cpA-liste { grid-template-columns: 1fr; }
}

/* pastilles de la bannière : un point de couleur au lieu d'une icône */
.pmb-puces li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--g), var(--b2)); }
/* « pourquoi nous » : un numéro dans la bulle */
.cpA-ic.pm-num { padding: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }

/* fiches des conditions : elles ressortent sur le blanc (trait de couleur en haut, fond bleuté, ombre plus marquée, bordure fine) */
.pm-sec .cpA-fiche { padding: 20px 22px 20px 46px; background: linear-gradient(135deg, #fff 55%, #eef7fd);
  box-shadow: inset 0 0 0 1px rgb(28 125 179 / .14), 0 4px 8px rgb(15 42 61 / .06), 0 24px 44px -24px rgb(28 125 179 / .6); }
.pm-sec .cpA-fiche::before { content: ""; position: absolute; left: 46px; right: 22px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--b2), var(--g)); }
.pm-sec .cpA-fiche:hover { box-shadow: inset 0 0 0 1.5px rgb(40 163 230 / .4), 0 4px 8px rgb(15 42 61 / .06), 0 30px 50px -24px rgb(28 125 179 / .7); }
.pm-sec .cpA-chiffre { font-size: 32px; }

/* conditions sur le fond Motif ; le lagon des étapes suit directement (plus de bande blanche entre les deux) */
.pm-sec.pm-conditions { padding: 56px 0 60px; }
.pm-etapes.fs { margin-top: 0; }
@media (max-width: 600px) { .pm-sec.pm-conditions { padding: 40px 0 44px; } .pm-etapes.fs { margin-top: 0; } }

/* ================= IMAGE DE MAURICE + DRAPEAU dans la section des conditions (planche /charte/ 16, macro conditions_permis) ================= */
.drapeau { position: relative; display: inline-flex; flex: none; width: 46px; height: 31px; vertical-align: middle; filter: drop-shadow(0 5px 7px rgb(8 30 48 / .35)); }
.drapeau i { flex: 1; background: linear-gradient(#ea2839 25%, #1a206d 0 50%, #ffd500 0 75%, #00a551 0); animation: drapeau-onde 1.5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.11s); }
.drapeau i:first-child { border-radius: 2px 0 0 2px; }
.drapeau i:last-child { border-radius: 0 2px 2px 0; }
.drapeau i::after { content: ""; display: block; height: 100%; background: #fff; animation: drapeau-lumiere 1.5s ease-in-out infinite alternate; animation-delay: inherit; }
@keyframes drapeau-onde { from { transform: translateY(-2px); } to { transform: translateY(2px); } }
@keyframes drapeau-lumiere { from { opacity: .2; } to { opacity: 0; } }
.drapeau.petit { width: 24px; height: 16px; margin-right: 8px; filter: none; }
.drapeau.petit i { animation-name: drapeau-onde-p; }
@keyframes drapeau-onde-p { from { transform: translateY(-1px); } to { transform: translateY(1px); } }
.drapeau.tampon { width: 40px; height: 27px; filter: none; }
@media (prefers-reduced-motion: reduce) { .drapeau i, .drapeau i::after { animation: none; } }

/* 1. Le Morne en fond de la carte : la photo dérive lentement sous un voile bleu, le reflet et les avantages en verre restent */
.pmi-photo { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.pmi-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; animation: pmi-derive 26s ease-in-out infinite alternate; }
.pmi-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(165deg, rgb(28 125 179 / .3) 0%, rgb(22 104 158 / .72) 42%, rgb(13 70 112 / .92) 100%); }
@keyframes pmi-derive { from { transform: scale(1.06); } to { transform: scale(1.2) translate(-3%, 2%); } }

/* 2. Le Morne derrière la carte, en fondu dans le motif ; le drapeau est planté sur la carte */
.pmi-section .pmi-fond { position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: 56%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 38%); mask-image: linear-gradient(90deg, transparent, #000 38%); }
.pmi-section .pmi-fond img { width: 100%; height: 100%; object-fit: cover; object-position: 25% 50%; animation: pmi-derive 30s ease-in-out infinite alternate; }
.pmi-section .pmi-fond::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(247 249 254 / .15), rgb(247 249 254 / .45)); }
.pmi-section .cpA-carte { overflow: visible; }
.pmi-section .cpA-carte::after { display: none; }
.pmi-section .cpA-fil { bottom: -4px; }
.drapeau.plante { position: absolute; z-index: 3; top: -38px; right: 34px; width: 64px; height: 42px; padding-left: 4px; }
.drapeau.plante::before { content: ""; position: absolute; left: 0; top: -4px; width: 3px; height: 74px; border-radius: 2px; background: linear-gradient(90deg, #d8dee6, #fff 50%, #9aa7b4); }
@media (max-width: 900px) { .pmi-section .pmi-fond { top: auto; width: 100%; height: 48%; -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%); mask-image: linear-gradient(180deg, transparent, #000 40%); } }

/* 3. Fenêtre sur Le Morne en haut de la carte, qui se fond dans le bleu ; un ruban aux couleurs du drapeau en bas */
.pmi-photo.pmi-haut { bottom: auto; height: 58%; -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.pmi-photo.pmi-haut::after { background: linear-gradient(180deg, rgb(13 70 112 / .25), rgb(28 125 179 / .55)); }
.pmi-ruban { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: linear-gradient(#ea2839 25%, #1a206d 0 50%, #ffd500 0 75%, #00a551 0); }
.pmi-ruban::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgb(255 255 255 / .55), transparent) 0 0 / 30% 100% no-repeat; animation: pmi-ruban 4s linear infinite; }
@keyframes pmi-ruban { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* 4. Le Morne en panorama dans la garantie Prestige, le drapeau dans le tampon */
.pmi-garantie { isolation: isolate; }
@media (min-width: 861px) { .gA.pmi-garantie > div { max-width: 54%; } }
.pmi-pano { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: 17px; }
.pmi-pano img { position: absolute; right: 0; top: 0; width: 44%; height: 100%; object-fit: cover; object-position: 30% 60%; animation: pmi-derive 30s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.pmi-pano::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(255 255 255 / 0) 60%, rgb(255 255 255 / .15)); }
.gA.pmi-garantie .ga-tampon { color: #fff; border-color: #fff; mix-blend-mode: normal; box-shadow: inset 0 0 0 5px rgb(255 255 255 / .0), 0 0 0 1px rgb(255 255 255 / .4); background: rgb(13 70 112 / .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media (max-width: 860px) { .pmi-pano img { width: 100%; height: 45%; top: auto; bottom: 0; -webkit-mask-image: linear-gradient(180deg, transparent, #000 50%); mask-image: linear-gradient(180deg, transparent, #000 50%); } }
@media (prefers-reduced-motion: reduce) { .pmi-photo img, .pmi-fond img, .pmi-pano img, .pmi-ruban::after { animation: none; } }
/* garantie avec des personnes (choix du 04/11) : cadrer sur elles, pas sur le ciel */
.pm-sec:not(.pmi-carte) .pmi-pano img { width: 50%; object-position: 62% 28%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 22%); }
/* le tampon suit le texte, à gauche de la photo : le couple reste visible */
@media (min-width: 861px) { .pm-sec:not(.pmi-carte) .gA.pmi-garantie > div { flex: none !important; max-width: 50%; } }
@media (max-width: 860px) { .pm-sec:not(.pmi-carte) .pmi-pano img { width: 100%; height: 52%; object-position: 62% 50%; -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%); mask-image: linear-gradient(180deg, transparent, #000 30%); }
  .pm-sec:not(.pmi-carte) .gA.pmi-garantie .ga-tampon { right: auto; margin: 4px auto 0 0; width: 92px; height: 92px; } }
/* chapô des conditions en plusieurs paragraphes (neuf.intro.separes) */
.tt .pm-intro-p + .pm-intro-p { margin-top: 12px; }

/* encart propre à la page (n.encart) : fiches « pourquoi nous », cliquables quand elles mènent à une page */
.pm-fiche-lien { display: block; text-decoration: none; color: inherit; transition: transform .45s var(--courbe), box-shadow .45s; }
.pm-fiche-lien:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgb(15 42 61 / .05), 0 24px 40px -22px rgb(28 125 179 / .6); }
.pm-fiche-lien h3 { padding-right: 34px; }
.pm-fiche-go { position: absolute; right: 16px; top: 18px; width: 28px; height: 28px; padding: 7px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--b2), var(--b1)); transition: transform .4s var(--courbe); }
.pm-fiche-lien:hover .pm-fiche-go { transform: translateX(4px); }
.pm-encart .pm-num svg { width: 22px; height: 22px; }
.pm-encart-act { margin-top: 24px; padding-left: 26px; }

/* tarifs à prix fixe (permis de travail) : mêmes fiches flottantes, deux formules côte à côte */
.pm-tarifs .empi.fixes .em-cards.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 780px; }
.pm-tarifs .empi.fixes .pr-from { display: block; font-size: 13px; font-weight: 600; color: var(--c); }
.pm-tarifs .empi.fixes .acc-sec.open li { opacity: 1; transform: none; }
@media (max-width: 960px) { .pm-tarifs .empi.fixes .em-cards.n2 { grid-template-columns: 1fr; max-width: 480px; gap: 60px; } }

/* permis sans tarif affiché (permis de travail) : le permis + l'installation, en tuiles de services sur le fond océan, puis la prise de contact */
.pm-install .tt { max-width: 760px; margin-left: auto; margin-right: auto; }
.pm-install .tt p { color: rgb(255 255 255 / .88); }
.pm-install .tt p b { color: #fff; }
.cs-grille.pm-install-grille { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 190px; gap: 14px; margin-top: 34px; }
.pm-install-aussi { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.pm-install-aussi li { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px 8px 9px; border-radius: 999px; font-size: 14.5px; font-weight: 700; color: #fff;
  background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pm-install-aussi i { display: grid; place-items: center; width: 30px; height: 30px; padding: 7px; border-radius: 50%; color: var(--ink); background: var(--jaune); }
.pm-install-act { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
@media (max-width: 960px) { .cs-grille.pm-install-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cs-grille.pm-install-grille { grid-template-columns: 1fr; grid-auto-rows: 120px; } .pm-install-act .bouton { flex: 1 1 100%; } }

/* carte « Ce que vous obtenez » : une durée longue (« 3 à 10 ans », « Sans limite ») reste sur une ligne, son texte passe dessous s'il ne tient plus à côté */
.pm-conditions .cpA-duree { flex-wrap: wrap; row-gap: 6px; }
.pm-conditions .cpA-duree b { white-space: nowrap; }
/* bouton de l'encart sur mobile : toute la largeur, le texte peut passer à la ligne */
@media (max-width: 600px) { .pm-encart-act { padding-left: 0; } .pm-encart-act .bouton { width: 100%; white-space: normal; text-align: center; } }

/* bannière sur mobile, resserrée (900 px → ~720) : titre plus compact, puces sur une ligne qui défile, moins d'air, visuel plus petit */
@media (max-width: 600px) {
  .pmb { padding: 16px 0 30px; }
  .pmb-grille { gap: 22px; }
  .pmb-fil { margin-bottom: 10px; font-size: 12px; }
  .pmb .tt h1 { font-size: 29px; }
  .pmb .tt p { margin-top: 12px; font-size: 15px; line-height: 1.55; }
  .pmb-puces { flex-wrap: nowrap; overflow-x: auto; margin: 16px -16px 0; padding: 2px 16px 8px; scrollbar-width: none; }
  .pmb-puces::-webkit-scrollbar { display: none; }
  .pmb-puces li { flex: none; padding: 6px 12px 6px 10px; }
  .pmb-act { margin-top: 18px; gap: 10px; }
  .pmb-visuel { max-width: 310px; }
}
