/*
 Theme Name:     Hello Elementor Enfant - EHPAD Derval
 Template:       hello-elementor
 Version:        1.0
 Description:    Thème enfant de Hello Elementor pour le site de la Résidence EHPAD Derval
 Author:         Eva Guegano
*/

/* Empêche le scroll horizontal du site (débordements ponctuels de blocs larges) */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

.bouton-pdf {
    display: inline-block;
    padding: 0.75em 1.5em;
    background-color: #2a7a2a;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

.bouton-pdf:hover {
    background-color: #1f5c1f;
    color: #fff;
}

selector p { margin-bottom: 0; }

.presse-liste {
    border-top: 1px solid #efe6db;
}

.presse-item {
    display: flex;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid #efe6db;
}

.presse-date {
    flex: 0 0 96px;
    min-width: 96px;
    color: #8a7a6a;
    font-size: 15px;
    font-weight: 400;
}

.presse-titre a {
    color: #1f3a3d;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.4;
}

.presse-titre a:hover {
    color: #f68a4a;
}

@media (max-width: 480px) {
    .presse-item {
        flex-direction: column;
        gap: 4px;
        padding: 12px 0;
    }

    .presse-date {
        flex: 0 0 auto;
        min-width: 0;
    }
}

/* ============================================================
   Widget Elementor : Presse - Grille de cartes (pg-)
   ============================================================ */

.pg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.pg-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31, 58, 61, 0.08);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 180ms ease;
}

a.pg-card:hover {
    box-shadow: 0 14px 32px rgba(31, 58, 61, 0.14);
}

.pg-card-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.pg-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding: 20px 22px 24px;
    background: #fdfaf6;
}

.pg-card-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #a68a63;
}

.pg-card-titre {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    color: #1f3a3d;
    margin: 0;
}

.pg-card-lien {
    margin-top: auto;
    padding-top: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #00868c;
}

a.pg-card:hover .pg-card-lien {
    color: #00565a;
}

@media (max-width: 900px) {
    .pg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .pg-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Widget Elementor : Articles - Grille de cartes (ag-)
   ============================================================ */

.ag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.ag-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31, 58, 61, 0.08);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 180ms ease;
}

.ag-card:hover {
    box-shadow: 0 14px 32px rgba(31, 58, 61, 0.14);
}

.ag-card-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.ag-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding: 20px 22px 24px;
    background: #e6f5f6;
}

.ag-card-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #00868c;
}

.ag-card-titre {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    color: #1f3a3d;
    margin: 0;
}

.ag-card-extrait {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #4d6668;
    margin: 0;
}

.ag-card-lien {
    margin-top: auto;
    padding-top: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #00868c;
}

.ag-card:hover .ag-card-lien {
    color: #00565a;
}

@media (max-width: 900px) {
    .ag-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .ag-grid {
        grid-template-columns: 1fr;
    }
}

.mp-liste {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mp-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid #e3e6ea;
    border-radius: 14px;
    background: #ffffff;
    text-decoration: none;
    color: inherit;
}

a.mp-card:hover {
    border-color: #b9c2c9;
}

.mp-titre {
    font-size: 18px;
    font-weight: 400;
    color: #1f3a3d;
    line-height: 1.35;
}

a.mp-card:hover .mp-titre {
    color: #00868c;
}

.mp-cloture {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}

.mp-cloture-label {
    color: #6b8a8f;
    font-size: 0.85em;
}

.mp-cloture-date {
    font-size: 18px;
    font-weight: 400;
    color: #7a9182;
}

@media (max-width: 480px) {
    .mp-card {
        align-items: flex-start;
    }
}

.oe-liste {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.oe-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border: 1px solid #e3e6ea;
    border-radius: 14px;
    background: #ffffff;
}

.oe-content {
    flex: 1 1 auto;
    min-width: 0;
}

.oe-titre {
    font-size: 19px;
    font-weight: 700;
    color: #1f3a3d;
    line-height: 1.35;
    margin-bottom: 10px;
}

.oe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.oe-tag {
    display: inline-block;
    padding: 4px 14px;
    background: #eaf3ea;
    color: #3a5a4d;
    font-size: 14px;
    font-weight: 500;
    border-radius: 999px;
    white-space: nowrap;
}

.oe-desc {
    color: #4a6a6d;
    font-size: 15px;
    line-height: 1.5;
}

.oe-card a.oe-btn {
    flex: 0 0 auto;
    display: inline-block;
    padding: 12px 26px;
    background: #00868c;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 999px;
    white-space: nowrap;
}

.oe-card a.oe-btn:hover {
    background: #006b70;
    color: #fff;
}

@media (max-width: 640px) {
    .oe-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .oe-btn {
        align-self: flex-start;
    }
}

/* Listes à puces dans les éditeurs de texte Elementor */
.elementor-widget-text-editor ul {
    padding-left: 18px;
}

.elementor-widget-text-editor ul li {
    margin-bottom: 10px;
}

.elementor-widget-text-editor ul li::marker {
    color: #00B2B8;
}

/* ============================================================
   Widget Elementor : Roue des pôles de services (rp-)
   ============================================================ */

.rp-section {
    --rp-vert: #7a9c1f;
    --rp-vert-claire: #f0f7e3;
    --rp-turquoise: #00868c;
    --rp-turquoise-claire: #e6f5f6;
    --rp-orange: #e5762f;
    --rp-orange-claire: #fdeee2;
    background: #fdfaf6;
    padding: 64px 24px;
    font-family: 'Poppins', system-ui, sans-serif;
}

.rp-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.rp-titre {
    font-size: 34px;
    font-weight: 700;
    color: #1f3a3d;
    margin: 0 0 16px;
}

.rp-chapeau {
    font-size: 19px;
    font-weight: 400;
    color: #4d6668;
    line-height: 1.55;
    max-width: 70ch;
    margin: 0 auto 48px;
}

/* --- Roue (desktop / tablette) --- */

.rp-wheel-wrap {
    display: flex;
    justify-content: center;
}

.rp-wheel {
    position: relative;
    width: 700px;
    height: 700px;
    flex: 0 0 auto;
}

.rp-ring {
    position: absolute;
    top: 100px;
    left: 100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    border: 2px dashed #e3d9cc;
    pointer-events: none;
}

.rp-hub {
    position: absolute;
    top: 180px;
    left: 180px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #f0e6da;
    box-shadow: 0 14px 36px rgba(31, 58, 61, 0.09);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    text-align: center;
    box-sizing: border-box;
}

.rp-hub-eyebrow {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--rp-turquoise);
    margin: 0 0 8px;
}

.rp-hub-titre {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    color: #1f3a3d;
    text-wrap: balance;
    margin: 0 0 12px;
}

.rp-hub-texte {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #4d6668;
    text-wrap: pretty;
    margin: 0;
}

.rp-wheel .rp-pole {
    /* reset des styles de bouton hérités du thème (Hello Elementor, plugins…)
       avant de reposer une géométrie de cercle garantie */
    all: unset;
    box-sizing: border-box;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    max-width: 150px;
    max-height: 150px;
    padding: 12px;
    margin: 0;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #f0e6da;
    box-shadow: 0 3px 14px rgba(31, 58, 61, 0.07);
    cursor: pointer;
    font-family: inherit;
    line-height: normal;
    text-align: center;
    overflow: hidden;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.rp-pole-icone {
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: background 180ms ease;
}

.rp-pole-icone svg {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
}

.rp-pole-label,
.rp-mobile-card-titre {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: #1f3a3d;
    text-align: center;
    margin: 0;
    white-space: normal;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Teintes au repos : pastille du picto uniquement */
.rp-teinte-vert .rp-pole-icone,
.rp-pole-icone.rp-teinte-vert { background: var(--rp-vert-claire); color: var(--rp-vert); }

.rp-teinte-turquoise .rp-pole-icone,
.rp-pole-icone.rp-teinte-turquoise { background: var(--rp-turquoise-claire); color: var(--rp-turquoise); }

.rp-teinte-orange .rp-pole-icone,
.rp-pole-icone.rp-teinte-orange { background: var(--rp-orange-claire); color: var(--rp-orange); }

/* Survol / focus / actif : même rendu que "sélectionné", selon la teinte du pôle.
   Sélecteur volontairement "sur-spécifique" (.rp-wheel .rp-pole.rp-teinte-X:hover)
   pour passer au-dessus du style global du kit Elementor
   (".elementor-kit-X button:hover" impose un fond orange plein + pill-shape à
   TOUS les <button> du site — border-radius et color sont donc repris ici
   explicitement pour neutraliser cette règle globale). */
.rp-wheel .rp-pole:hover,
.rp-wheel .rp-pole:focus,
.rp-wheel .rp-pole.is-active {
    transform: scale(1.07);
    box-shadow: 0 10px 26px rgba(31, 58, 61, 0.13);
    border-radius: 50%;
}

.rp-wheel .rp-pole.rp-teinte-vert:hover,
.rp-wheel .rp-pole.rp-teinte-vert:focus,
.rp-wheel .rp-pole.rp-teinte-vert.is-active {
    background: var(--rp-vert-claire);
    border-color: var(--rp-vert);
    color: #1f3a3d;
}

.rp-wheel .rp-pole.rp-teinte-turquoise:hover,
.rp-wheel .rp-pole.rp-teinte-turquoise:focus,
.rp-wheel .rp-pole.rp-teinte-turquoise.is-active {
    background: var(--rp-turquoise-claire);
    border-color: var(--rp-turquoise);
    color: #1f3a3d;
}

.rp-wheel .rp-pole.rp-teinte-orange:hover,
.rp-wheel .rp-pole.rp-teinte-orange:focus,
.rp-wheel .rp-pole.rp-teinte-orange.is-active {
    background: var(--rp-orange-claire);
    border-color: var(--rp-orange);
    color: #1f3a3d;
}

.rp-wheel .rp-pole:focus-visible {
    outline-offset: 3px;
}
.rp-wheel .rp-pole.rp-teinte-vert:focus-visible { outline: 3px solid var(--rp-vert); }
.rp-wheel .rp-pole.rp-teinte-turquoise:focus-visible { outline: 3px solid var(--rp-turquoise); }
.rp-wheel .rp-pole.rp-teinte-orange:focus-visible { outline: 3px solid var(--rp-orange); }

.rp-legende {
    font-size: 16px;
    font-weight: 400;
    color: #7d9090;
    margin: 32px 0 0;
}

.rp-cta {
    display: inline-block;
    margin-top: 32px;
    padding: 16px 28px;
    border-radius: 999px;
    background: #00b2b8;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: background 180ms ease;
}
.rp-cta:hover,
.rp-cta:focus-visible {
    background: #00868c;
    color: #fff;
}

/* --- Cartes mobiles (empilées, < 768px) --- */
.rp-mobile-list {
    display: none;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-top: 8px;
}

.rp-mobile-card {
    background: #ffffff;
    border: 1px solid #f0e6da;
    border-radius: 16px;
    padding: 16px;
}

div.rp-mobile-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.rp-mobile-card summary {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}
.rp-mobile-card summary::-webkit-details-marker { display: none; }
.rp-mobile-card summary::marker { content: ''; }

.rp-mobile-card-body {
    flex: 1 1 auto;
}

.rp-mobile-card-titre {
    text-align: left;
}

.rp-mobile-card-texte {
    font-size: 14px;
    font-weight: 400;
    color: #4d6668;
    line-height: 1.5;
    margin: 4px 0 0;
}

details.rp-mobile-card > .rp-mobile-card-texte {
    margin-top: 12px;
}

/* --- Responsive --- */

@media (max-width: 1099px) and (min-width: 768px) {
    .rp-wheel-wrap {
        height: 560px;
        overflow: hidden;
    }
    .rp-wheel {
        transform: scale(0.8);
        transform-origin: top center;
    }
}

@media (max-width: 767px) {
    .rp-wheel-wrap {
        display: none;
    }
    .rp-legende {
        display: none;
    }
    .rp-mobile-list {
        display: flex;
    }
}

/* ============================================================
   Template article : hero (ha-)
   ============================================================ */

.ha-hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    font-family: 'Asap', sans-serif;
}

.ha-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
}

.ha-panel {
    background: #1f3a3d;
    display: flex;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 72px;
    padding-right: 48px;
    padding-left: max(24px, calc((100vw - 1140px) / 2));
    box-sizing: border-box;
}

.ha-panel-content {
    max-width: 480px;
}

.ha-date {
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #b7d132;
    margin: 0 0 16px;
}

.ha-titre {
    font-size: 46px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    text-wrap: balance;
    color: #ffffff;
    margin: 0 0 20px;
}

.ha-chapeau {
    font-size: 21px;
    font-weight: 400;
    line-height: 1.6;
    text-wrap: pretty;
    color: #e2edeb;
    margin: 0;
}

.ha-photo {
    height: 100%;
}

.ha-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ha-bandeau {
    height: 6px;
    background: linear-gradient(to right,
        #00b2b8 0 33.333%,
        #b7d132 33.333% 66.666%,
        #f68a4a 66.666% 100%);
}

@media (max-width: 900px) {
    .ha-hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .ha-photo {
        order: -1;
        aspect-ratio: 4 / 3;
        height: auto;
    }

    .ha-panel {
        padding-top: 40px;
        padding-bottom: 40px;
        padding-right: 24px;
    }

    .ha-titre {
        font-size: 32px;
    }

    .ha-chapeau {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .ha-titre {
        font-size: 28px;
    }
}

/* === WPForms #484 : habillage Asap + couleurs boutons Elementor === */

#wpforms-484 {
    font-family: "Asap", Sans-serif;
}

#wpforms-484 .wpforms-field-label,
#wpforms-484 .wpforms-field-sublabel {
    font-family: "Asap", Sans-serif;
    font-weight: 500;
    color: #1F2937; /* remplacer par var(--e-global-color-text) si défini dans Elementor */
}

#wpforms-484 input[type="text"],
#wpforms-484 input[type="email"],
#wpforms-484 textarea {
    font-family: "Asap", Sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #1F2937;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    padding: 12px 15px;
    background-color: #FFFFFF;
    transition: border-color .2s ease;
}

#wpforms-484 input[type="text"]:focus,
#wpforms-484 input[type="email"]:focus,
#wpforms-484 textarea:focus {
    border-color: var(--e-global-color-primary);
    outline: none;
    box-shadow: 0 0 0 1px var(--e-global-color-primary);
}

#wpforms-484 button.wpforms-submit {
    background-color: var(--e-global-color-primary);
    font-family: "Asap", Sans-serif;
    font-size: 20px;
    font-weight: 500;
    fill: #FFFFFF;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .2s ease;
}

#wpforms-484 button.wpforms-submit:hover {
    background-color: var(--e-global-color-secondary, #1a1a1a);
    opacity: .9;
}

#wpforms-484 .wpforms-required-label {
    color: var(--e-global-color-primary);
}

/* === Widget Elementor : Les étapes (post-it) === */

.et-section {
    padding: 56px 0 80px;
}

.et-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px;
}

.et-titre {
    margin: 0 0 6px;
    font-size: 34px;
    font-weight: 700;
}

.et-intro {
    margin: 0 0 40px;
    font-size: 18px;
    color: var(--et-texte, #4d6668);
}

.et-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 28px 24px;
}

.et-card {
    position: relative;
    padding: 26px 22px 24px;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(31, 58, 61, .1);
}

.et-card--fond-turquoise {
    background: var(--et-fond-turquoise, #e6f5f6);
}

.et-card--fond-vert {
    background: var(--et-fond-vert, #f4f7dc);
}

.et-card--fond-blanc {
    background: var(--et-fond-blanc, #f7faf8);
}

.et-grid .et-card:nth-child(odd) {
    transform: rotate(-1.5deg);
}

.et-grid .et-card:nth-child(even) {
    transform: rotate(1.5deg);
    margin-top: 22px;
}

.et-ruban {
    position: absolute;
    top: -10px;
    left: 26px;
    width: 46px;
    height: 16px;
    border-radius: 3px;
    opacity: .85;
}

.et-grid .et-card:nth-child(odd) .et-ruban {
    transform: rotate(-3deg);
}

.et-grid .et-card:nth-child(even) .et-ruban {
    transform: rotate(3deg);
}

.et-ruban--citron {
    background: var(--et-ruban-citron, #b7d132);
}

.et-ruban--turquoise {
    background: var(--et-ruban-turquoise, #00b2b8);
}

.et-numero {
    display: block;
    font-size: 44px;
    font-weight: 800;
    color: var(--et-numero, #00b2b8);
    line-height: 1;
    font-family: Georgia, serif;
}

.et-icone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--et-icone, #00868c);
    margin: 14px 0;
}

.et-icone svg {
    width: 22px;
    height: 22px;
}

.et-titre-etape {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 700;
    color: var(--et-titre, #1f3a3d);
}

.et-texte {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--et-texte, #33585a);
}

@media (max-width: 480px) {
    .et-titre {
        font-size: 28px;
    }
}