:root{--ink:var(--ast-global-color-2,#1e293b);--muted:var(--ast-global-color-3,#334155);--mint:var(--ast-global-color-0,#046bd2);--mint-dark:var(--ast-global-color-1,#071a5f);--wash:var(--ast-global-color-5,#f0f5fa);--line:var(--ast-global-color-7,#d1d5db);--book-accent:#087e87;--book-accent-dark:#071a5f}
html,body{margin:0;background:transparent;min-height:0;font-family:var(--sfc-font,Inter,Arial,sans-serif)}
.app-shell{min-height:0;background:transparent}
.topbar{position:static;justify-content:flex-end;padding:12px 0;background:transparent}
.brand{display:none}
.hero{background:var(--wash);padding:30px;border-radius:6px;gap:22px}
.hero h1{font-size:clamp(26px,4vw,42px);color:var(--mint-dark)}
.hero p{font-size:16px}.hero-illustration{max-width:200px}
.workspace{padding:28px 0;max-width:none;gap:24px}
.form-panel{background:transparent}.step.active,.format-card.selected,.photo-field,.photo-upload:hover{background:var(--wash)}
.photo-field,.photo-upload,.format-card:hover{border-color:var(--line)}
.primary,.format-card.selected,.preview-toolbar>button.word-button.is-preferred{box-shadow:none}
.primary:hover{background:var(--mint-dark)}
.eyebrow,.section-heading>span,.stepper-title{font-size:12px}
label>span,.step b,.aside-preview b,.format-card b,.photo-copy p,.photo-upload>b{font-size:14px}
label small,.choice-label p,.photo-copy small,.format-card small,.field-intro p,.info-card p,.music-note,.print-guide p,.print-guide ol{font-size:14px}
button,input,textarea,select{font-family:inherit}
.preview-overlay{position:static;overflow:visible;background:var(--wash)}
.app-shell:has(.preview-overlay)>.topbar,.app-shell:has(.preview-overlay)>.hero,.app-shell:has(.preview-overlay)>.workspace{display:none}
.preview-toolbar{position:static;flex-wrap:wrap;height:auto;min-height:70px}
@media(max-width:800px){.hero{padding:22px}.workspace{padding:20px 0}.hero-illustration{max-width:130px}.hero h1{font-size:28px}}
@media print{html,body{background:white}.preview-overlay{position:static}.booklet{padding:0}.page{width:210mm;min-height:297mm;margin:0;box-shadow:none}.preview-toolbar{display:none!important}}

/* Livret 1.2 : Arial, papier blanc et portrait triple. */
.booklet .page,.booklet .page *{font-family:Arial,sans-serif!important}
.booklet .page{background:#fff!important;--paper:#fff}
.booklet .page *{background-color:transparent!important}
.booklet .cover .baby-portrait{width:336px;height:336px;max-width:100%;flex-shrink:0;object-fit:cover;aspect-ratio:1}
.booklet .cover.has-photo .cover-illustration{width:150px;height:180px;flex-shrink:0}
@media(max-width:400px){.booklet .cover .baby-portrait{height:auto}}
@media print{.booklet .cover .baby-portrait{width:336px;height:336px}.booklet .cover.has-photo{min-height:297mm}}

/* 1.3 : marges équilibrées et formulaires sans débordement. */
@media screen{
  html,body{width:100%;overflow-wrap:break-word}
  .app-shell{box-sizing:border-box;width:100%;max-width:1220px;margin:0 auto;padding:0 clamp(8px,1.4vw,20px)}
  .workspace{grid-template-columns:minmax(165px,210px) minmax(0,1fr);gap:clamp(18px,3vw,38px);width:100%;box-sizing:border-box}
  .stepper{padding-right:18px;min-width:0}
  .hero-copy,.form-grid>*,.choice-box,.music-card{min-width:0}
  .hero{display:flex;align-items:center;justify-content:space-between}
  .hero-copy{flex:1}.hero-illustration{width:25%;height:auto;flex-shrink:0}
  input,textarea,select{box-sizing:border-box;max-width:100%;min-width:0}
  .topbar{height:auto;min-height:64px}.top-actions{flex-wrap:wrap;justify-content:flex-end}
  .choice-box details p,.reading-page>p{white-space:pre-line}
  .preview-toolbar{gap:10px}
  .booklet{overflow-x:auto}
  @media(max-width:800px){
    .workspace{grid-template-columns:1fr;gap:22px}
    .stepper{border-right:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
    .stepper-title,.completion{display:none}
    .step{flex:1 1 calc(50% - 6px);width:auto;margin:0;padding:10px 8px}
    .aside-preview{width:100%;margin:0}
    .hero{padding:20px;gap:12px}.hero h1{font-size:clamp(24px,4.5vw,32px)}
  }
  @media(max-width:520px){
    .app-shell{padding:0 6px}.form-grid{grid-template-columns:minmax(0,1fr)}
    .hero{padding:18px}.hero-illustration{display:none}
    .save-state{width:100%;text-align:right;margin-right:0}
    .form-footer{gap:10px}.form-footer button{padding:12px 14px}
    .music-option{flex-wrap:wrap;gap:8px}.music-option a{margin-left:0}
    .photo-field{flex-direction:column;align-items:stretch}
  }
}
.celebration-choice{border:1px solid var(--line);border-radius:8px;padding:16px;margin:0;min-width:0}
.celebration-choice legend{padding:0 6px;font-weight:700;font-size:14px}
.celebration-choice label{flex-direction:row;align-items:center;gap:10px;margin:8px 0;font-size:14px}
.celebration-choice input{width:18px;height:18px;flex-shrink:0;margin:0;accent-color:var(--mint)}
.celebration-choice label:has(input:disabled){opacity:.65}
.celebration-help,.aelf-status,.aelf-error p{font-size:14px;line-height:1.6;margin:12px 0 0;color:var(--muted)}
.aelf-error{padding:12px;background:var(--wash);border-left:3px solid #b42318}.aelf-error button{margin-top:10px}
.aelf-summary textarea{background:var(--wash);color:var(--ink);width:100%;resize:none;overflow:hidden;font-size:15px;line-height:1.6;cursor:default}
.reading-page>p{white-space:pre-line}
.aelf-text{white-space:pre-line}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.aelf-credit{font-size:11px;color:var(--muted)}
/* Marges physiques sur chaque page, y compris la suite d’une lecture longue. */
@page{size:A4;margin:18mm}
@media print{
  html,body,.preview-overlay,.booklet{background:#fff!important}
  .booklet .page{box-sizing:border-box;width:auto;min-height:260mm;margin:0;padding:0;box-shadow:none;page-break-after:always}
  .booklet .cover,.booklet .cover.has-photo{min-height:260mm;padding:0}
  .booklet .page:last-child{page-break-after:auto}
  .reading-page h2,.reading-page h3,.reading-ref{break-after:avoid}
  .reading-page p{orphans:3;widows:3}
}

/* 1.4.0 : textes de préparation et couverture. */
.celebration-option-copy{line-height:1.5}
.celebration-option-copy strong{font-weight:700}
.celebration-option-detail{font-weight:400}
.booklet .cover h1{color:#000;text-transform:none}
.booklet .cover h1 em{color:#000}
.booklet .cover h2{font-family:Arial,sans-serif;font-size:42pt;font-weight:700;color:var(--book-accent);line-height:1.1;overflow-wrap:anywhere}

.aside-preview.active{background:var(--wash);color:var(--mint-dark)}
.review-step{display:grid;gap:16px;min-width:0}

/* 1.4 : propositions de prière et textes retenus. */
.universal-prayers{display:grid;gap:26px;min-width:0}
.prayer-category{min-width:0}
.prayer-category>h3{font-size:19px;line-height:1.4;margin:0 0 12px;color:var(--ink)}
.prayer-options{display:grid;gap:10px}
.prayer-option{display:flex;flex-direction:row;align-items:flex-start;gap:12px;border:1px solid var(--line);border-radius:10px;padding:14px;font-size:15px;font-weight:400;line-height:1.6;cursor:pointer;background:#fff}
.prayer-option.selected{border-color:var(--mint);background:var(--wash)}
.prayer-option input{width:18px;height:18px;flex:0 0 18px;margin:4px 0 0;accent-color:var(--mint)}
.prayer-option>span{min-width:0;font-weight:400}.prayer-option>span b{color:var(--ink)}
.prayer-edited{margin-top:14px;min-width:0}.prayer-edited textarea{width:100%;min-height:125px;font-size:15px;line-height:1.6}
