/* Accueil page styles - extracted from mockup */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.page-accueil {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    background-color: #f5f5f5;
}

.ca-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main.ca-container {
    background: #f0f0f0;
    padding: 60px 20px;
    max-width: 100%;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-inner {
    width: 100%;
    max-width: 1200px;
}

.hero-title {
    font-size: 1.9em;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
    margin: 0 0 8px;
}

.hero-title-accent {
    color: #ca0638;
}

.hero-subtitle {
    font-size: 16px;
    /* p { line-height: 20px } du thème serre le texte une fois passé en 16px */
    line-height: 1.5;
    color: #555;
    margin: 0;
}

header {
    background: #fff;
    padding: 30px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.header-col {
    display: flex;
    align-items: center;
}

.header-col-logo {
    flex: 0 0 auto;
}

.header-col-title {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.header-col-actions {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.main-logo {
    height: auto;
    display: block;
    max-width: 220px;
}

.oppbtp-logo {
    width: 120px;
    height: auto;
}

.ca-btn-login {
    width: auto;
    padding: 10px 24px;
    margin-top: 0;
}

.header-actions-logged {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

@media (max-width: 768px) {
    .header-grid {
        flex-direction: column;
        gap: 20px;
    }

    .header-col-actions {
        align-items: center;
    }

    .oppbtp-logo {
        width: 100px;
    }

    .main-logo {
        max-width: 80%;
    }

    .hero-title {
        font-size: 1.5em;
    }
}

.parcours-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

/* width/float/border neutralisent la règle .card du thème Pages (pages.css) */
.card {
    width: auto;
    float: none;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    background: #fff;
    padding: 35px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

/* Accent par carte : hérité par le picto, le titre et le trait via currentColor */
.card--green {
    color: #4caf50;
}

.card--red {
    color: #ca0638;
}

/* Carte mise en avant : liseré rouge et légère surélévation */
.card--featured {
    border: 2px solid #ca0638;
    background: #fffafb;
    box-shadow: 0 6px 20px rgba(202, 6, 56, 0.18);
    margin: -15px 0;
    padding: 50px 30px;
}

.card--featured:hover {
    box-shadow: 0 8px 26px rgba(202, 6, 56, 0.28);
}

.card-picto {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rond teinté clair : l'opacité ne s'applique qu'au fond, pas au SVG */

.card-picto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.12;
}

.card-picto svg {
    position: relative;
    width: 44px;
    height: 44px;
}

.card-title {
    font-size: 1.35em;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
    margin: 0;
}

/* currentColor résoudrait vers le #333 de .card-title : l'accent est fixé par variante */
.card--green .card-title-accent {
    color: #4caf50;
}

.card--red .card-title-accent {
    color: #ca0638;
}

.card-rule {
    display: block;
    width: 40px;
    height: 2px;
    background: currentColor;
    margin: 18px auto 22px;
}

.card-content {
    text-align: left;
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 25px;
}

/* p { font-size: 14px; line-height: 22px } du thème s'applique directement aux enfants */
.card-content p,
.card-list li {
    font-size: 16px;
    line-height: 1.7;
}

.card-content p {
    margin: 0 0 15px;
}

.card-content p:last-child {
    margin-bottom: 0;
}

.card-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.card-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
}

.card-list li:last-child {
    margin-bottom: 0;
}

/* Puce ronde avec coche, à la couleur d'accent de la carte.
   La coche est un SVG centré : deux bordures pivotées rendaient un trait
   crénelé et mal centré aux petites tailles. */
.card-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.8 8.4l2.7 2.7 5.7-5.7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
}

/* currentColor résoudrait vers le #555 de .card-content : l'accent est fixé par variante */
.card--green .card-list li::before {
    background-color: #4caf50;
}

.card--red .card-list li::before {
    background-color: #ca0638;
}

.ca-btn {
    display: inline-block;
    background: #ca0638;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-top: auto;
}

/* pages.css:2264 impose a:focus/:active { color:#48b0f7 } (specificite 0,1,1,
   superieure a .ca-btn) : on redonne au texte la couleur du bouton. */
.ca-btn:visited,
.ca-btn:focus,
.ca-btn:active {
    color: #fff;
    text-decoration: none;
}

.ca-btn:hover {
    background: #a00529;
    color: white;
    text-decoration: none;
}

/* Variantes contour : redéfinissent color aux deux états, .ca-btn:hover forçant le blanc */
.ca-btn-outline-green {
    background: transparent;
    color: #4caf50;
    border: 2px solid #4caf50;
}

.ca-btn-outline-green:visited,
.ca-btn-outline-green:focus {
    color: #4caf50;
}

.ca-btn-outline-green:hover,
.ca-btn-outline-green:active {
    background: #4caf50;
    color: #fff;
}

.ca-btn-outline-red {
    background: transparent;
    color: #ca0638;
    border: 2px solid #ca0638;
}

.ca-btn-outline-red:visited,
.ca-btn-outline-red:focus {
    color: #ca0638;
}

.ca-btn-outline-red:hover,
.ca-btn-outline-red:active {
    background: #ca0638;
    color: #fff;
}

.login-form {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ca-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.ca-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ca-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    font-size: 0.95em;
    font-family: Arial, sans-serif;
}

.ca-form-group input:focus {
    outline: none;
    border-color: #ca0638;
}

.form-links {
    text-align: center;
    margin-top: 15px;
}

.form-links a {
    color: #ca0638;
    text-decoration: none;
    font-size: 0.85em;
}

.form-links a:hover {
    text-decoration: underline;
}

footer {
    background: #fff;
    border-top: 2px solid #e0e0e0;
    padding: 20px 0;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    font-size: 0.95em;
    margin: 0 0 6px;
    color: #333;
}

.footer-content strong {
    color: #ca0638;
    font-weight: 700;
}

.footer-content a {
    color: #1565c0;
    text-decoration: none;
    font-weight: 600;
}

.footer-content a:hover {
    text-decoration: underline;
}

@media (max-width: 968px) {
    .parcours-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Empilement uniforme : la carte mise en avant n'est plus surélevée */
    .card--featured {
        margin: 0;
        padding: 35px 30px;
    }

    .main-logo {
        max-width: 200px;
    }

    .oppbtp-logo {
        width: 80px;
    }
}

/* Popin de connexion (ancrée sous le bouton « Se connecter ») */
.login-dropdown {
    position: relative;
}

.login-popin {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    padding: 30px 25px 25px;
    z-index: 1000;
    text-align: left;
}

/* Petite flèche pointant vers le bouton */
.login-popin::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.06);
}

.ca-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
}

.ca-modal-close:hover {
    color: #333;
}

.ca-modal-title {
    text-align: center;
    font-size: 1.6em;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.ca-modal-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95em;
    margin: 4px 0 25px;
}

@media (max-width: 768px) {
    /* Header empilé/centré : on recentre la popin sous le bouton */
    .login-popin {
        right: 50%;
        transform: translateX(50%);
        padding: 30px 20px 25px;
    }

    .login-popin::before {
        right: 50%;
        margin-right: -8px;
    }
}
