/* PRODIMED Valeurs — section « Nos valeurs » créative et animée.
   S'applique aux blocs existants .values-section / .values-grid / .value-card. */

@keyframes pdv-float-a { 0%,100% { transform: translate(0,0) scale(1); }  50% { transform: translate(60px,40px) scale(1.15); } }
@keyframes pdv-float-b { 0%,100% { transform: translate(0,0) scale(1); }  50% { transform: translate(-70px,-30px) scale(1.2); } }
@keyframes pdv-card-in { from { opacity: 0; transform: translateY(46px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pdv-ring    { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes pdv-bob     { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

body .values-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #07122e 0%, #0b1b3f 45%, #17357f 100%);
    color: #fff;
}
/* deux lueurs qui flottent doucement en arrière-plan */
body .values-section::before,
body .values-section::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}
body .values-section::before { top: -140px; left: -100px; background: rgba(59, 130, 246, .38); animation: pdv-float-a 14s ease-in-out infinite; }
body .values-section::after  { bottom: -160px; right: -120px; background: rgba(45, 212, 191, .26); animation: pdv-float-b 17s ease-in-out infinite; }

body .values-section .values-container { position: relative; z-index: 1; }

/* titres de la section en clair */
body .values-section h2,
body .values-section .section-title,
body .values-section .section-title-center { color: #fff; }
body .values-section .section-label,
body .values-section .section-label-center { color: #8fb4ff; }
body .values-section h2::after,
body .values-section .section-title-center::after { background: #fff; }

body .values-section .values-grid { counter-reset: pdval; perspective: 1200px; }

/* carte en verre */
body .values-section .value-card {
    position: relative;
    overflow: hidden;
    counter-increment: pdval;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: transform .45s cubic-bezier(.22, .61, .36, 1), border-color .35s ease, background-color .35s ease, box-shadow .45s ease;
}
/* grand numéro 01, 02… en filigrane */
body .values-section .value-card::before {
    content: "0" counter(pdval);
    position: absolute;
    top: 4px;
    right: 12px;
    font-family: "Roboto Condensed", "Inter", sans-serif;
    font-size: 52px;
    font-weight: 700;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .22);
    transition: -webkit-text-stroke-color .35s ease, transform .5s ease;
    pointer-events: none;
}
/* halo qui suit la souris + barre de couleur qui se dessine en bas */
body .values-section .value-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .20), transparent 60%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
body .values-section .value-card:hover {
    transform: translateY(-12px);
    background: rgba(255, 255, 255, .11);
    border-color: rgba(143, 180, 255, .75);
    box-shadow: 0 24px 50px rgba(0, 0, 0, .35);
}
body .values-section .value-card:hover::after { opacity: 1; }
body .values-section .value-card:hover::before { -webkit-text-stroke-color: rgba(255, 255, 255, .6); transform: scale(1.08); }

/* icône : pastille blanche + onde qui pulse */
body .values-section .value-icon {
    position: relative;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
body .values-section .value-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(143, 180, 255, .8);
    animation: pdv-ring 2.6s ease-out infinite;
}
body .values-section .value-card:nth-child(2) .value-icon::before { animation-delay: .5s; }
body .values-section .value-card:nth-child(3) .value-icon::before { animation-delay: 1s; }
body .values-section .value-card:nth-child(4) .value-icon::before { animation-delay: 1.5s; }
body .values-section .value-card:hover .value-icon { transform: scale(1.18) rotate(-8deg); animation: pdv-bob 1.2s ease-in-out infinite; }

body .values-section .value-card h3 { color: #fff; position: relative; }
body .values-section .value-card h3::after {
    content: "";
    display: block;
    width: 0;
    height: 3px;
    margin: 10px auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, #8fb4ff, #2DD4BF);
    transition: width .45s ease;
}
body .values-section .value-card:hover h3::after { width: 54px; }
body .values-section .value-card p { color: rgba(255, 255, 255, .78); position: relative; }

/* apparition en cascade (seulement si le script est actif) */
html.pdv-js body .values-section .value-card { opacity: 0; }
html.pdv-js body .values-section .values-grid.pdv-in .value-card {
    animation: pdv-card-in .8s cubic-bezier(.22, .61, .36, 1) both;
}
html.pdv-js body .values-section .values-grid.pdv-in .value-card:nth-child(2) { animation-delay: .14s; }
html.pdv-js body .values-section .values-grid.pdv-in .value-card:nth-child(3) { animation-delay: .28s; }
html.pdv-js body .values-section .values-grid.pdv-in .value-card:nth-child(4) { animation-delay: .42s; }

@media (max-width: 768px) {
    body .values-section .value-card::before { font-size: 44px; }
    body .values-section::before, body .values-section::after { width: 300px; height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
    body .values-section::before, body .values-section::after,
    body .values-section .value-icon::before,
    body .values-section .value-card:hover .value-icon { animation: none !important; }
    html.pdv-js body .values-section .value-card { opacity: 1; animation: none !important; }
}


/* =====================================================================
   NORMES & CERTIFICATIONS (.certifications-section)
   ===================================================================== */
@property --pdc-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes pdc-spin  { to { --pdc-angle: 360deg; } }
@keyframes pdc-grid  { to { background-position: 48px 48px, 48px 48px; } }
@keyframes pdc-in-l  { from { opacity: 0; transform: translateX(-40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pdc-in-r  { from { opacity: 0; transform: translateX(40px) scale(.96); }  to { opacity: 1; transform: none; } }
@keyframes pdc-sweep { from { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(230%) skewX(-18deg); } }
@keyframes pdc-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(45,212,191,.0); } 50% { box-shadow: 0 0 0 6px rgba(45,212,191,.10); } }

body .certifications-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #07122e 0%, #0b1b3f 55%, #102a66 100%);
}
/* grille technique qui défile lentement, estompée sur les bords */
body .certifications-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(143, 180, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 180, 255, .08) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
    animation: pdc-grid 9s linear infinite;
    pointer-events: none;
}
/* lueur turquoise en haut */
body .certifications-section::after {
    content: "";
    position: absolute;
    top: -180px;
    left: 50%;
    width: 620px;
    height: 360px;
    margin-left: -310px;
    background: radial-gradient(closest-side, rgba(45, 212, 191, .28), transparent);
    filter: blur(30px);
    animation: pdv-float-a 12s ease-in-out infinite;
    pointer-events: none;
}
body .certifications-section .certifications-container { position: relative; z-index: 1; }

body .certifications-section .cert-badge {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    padding: 22px 20px;
    font-weight: 500;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: transform .4s cubic-bezier(.22, .61, .36, 1), background-color .3s ease, box-shadow .4s ease;
}
/* bordure lumineuse qui tourne autour de la carte */
body .certifications-section .cert-badge::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    background: conic-gradient(from var(--pdc-angle), transparent 0 62%, #8fb4ff 82%, #2DD4BF 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: pdc-spin 5s linear infinite;
    opacity: .55;
    transition: opacity .3s ease;
    pointer-events: none;
}
/* reflet qui traverse la carte au survol */
body .certifications-section .cert-badge::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
    transform: translateX(-130%) skewX(-18deg);
    pointer-events: none;
}
body .certifications-section .cert-badge:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, .11);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
body .certifications-section .cert-badge:hover::before { opacity: 1; }
body .certifications-section .cert-badge:hover::after  { animation: pdc-sweep .9s ease; }

/* apparition : colonnes de gauche et de droite arrivent de côtés opposés */
html.pdv-js body .certifications-section .cert-badge { opacity: 0; }
html.pdv-js body .certifications-section .certifications-grid.pdv-in .cert-badge { animation: pdc-in-l .7s cubic-bezier(.22, .61, .36, 1) both; }
html.pdv-js body .certifications-section .certifications-grid.pdv-in .cert-badge:nth-child(3n) { animation-name: pdc-in-r; }
html.pdv-js body .certifications-section .certifications-grid.pdv-in .cert-badge:nth-child(3n+2) { animation-name: pdv-card-in; }
html.pdv-js body .certifications-section .certifications-grid.pdv-in .cert-badge:nth-child(2) { animation-delay: .1s; }
html.pdv-js body .certifications-section .certifications-grid.pdv-in .cert-badge:nth-child(3) { animation-delay: .2s; }
html.pdv-js body .certifications-section .certifications-grid.pdv-in .cert-badge:nth-child(4) { animation-delay: .3s; }
html.pdv-js body .certifications-section .certifications-grid.pdv-in .cert-badge:nth-child(5) { animation-delay: .4s; }
html.pdv-js body .certifications-section .certifications-grid.pdv-in .cert-badge:nth-child(6) { animation-delay: .5s; }

@media (max-width: 768px) {
    html.pdv-js body .certifications-section .certifications-grid.pdv-in .cert-badge:nth-child(n) { animation-name: pdv-card-in; }
}
@media (prefers-reduced-motion: reduce) {
    body .certifications-section::before,
    body .certifications-section::after,
    body .certifications-section .cert-badge::before,
    body .certifications-section .cert-badge:hover::after { animation: none !important; }
    html.pdv-js body .certifications-section .cert-badge { opacity: 1; animation: none !important; }
}
